In-place translation and reply recommendation system and method driven by knowledge base within keyboard extension
By integrating a knowledge-based in-situ translation and response recommendation system within the keyboard extension, the problem of frequent application switching in cross-language communication is solved, achieving efficient and accurate translation and recommendation, improving communication efficiency and content quality, and supporting enterprise-level communication decision-making.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN LILYLONG WENTONG TECHNOLOGY CO LTD
- Filing Date
- 2026-02-10
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies frequently switch between applications in cross-language communication, lack in-situ interactive capabilities driven by knowledge bases within keyboard extensions, face difficulties in data sharing, cannot deeply integrate with enterprise knowledge bases, and lack sufficient visualization and adaptability of translation and recommendation results, making it difficult to support enterprise-level communication and decision-making.
By integrating a knowledge-based in-situ translation and response recommendation system within the keyboard extension, it enables anonymization of user input information, hierarchical vector retrieval, evidence verification, adaptation adjustment, and comprehensive scoring. It provides candidate response previews and in-situ insertion, and supports intelligent recommendations for cross-language communication.
It enables efficient and accurate translation and recommendation for cross-language communication, improving communication efficiency and content quality, breaking down barriers to tool switching, providing multiple style reply options and real-time adaptation suggestions, and enhancing the fluency and effectiveness of information transmission.
Smart Images

Figure CN122113944A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of translation technology, and more specifically discloses an in-situ translation and response recommendation system and method driven by a knowledge base within a keyboard extension. Background Technology
[0002] As an input method framework provided by mobile operating systems, keyboard extensions allow developers to embed functional modules into system-level input interfaces, enabling them to be directly invoked in input scenarios of any host application (such as WeChat, email, and customer service systems). In this context, to achieve accurate, compliant, and culturally adapted response support in cross-language communication without switching applications, it is proposed to integrate enterprise knowledge bases, real-time translation, and intelligent recommendation capabilities within keyboard extensions.
[0003] The prior art patent document with authorization announcement number CN119204043B discloses a "content translation method, system and wearable translation device", which includes obtaining first content, the first content including at least a first language; converting the first content into second content, the second content including a second language, the second language being different from the first language; generating third content based on the second content, the third content including at least: a response text to the second content, the response text being composed of the second language; and a translated text generated based on the response text, the translated text being obtained from the first conversion, the translated text being composed of the first language.
[0004] The patent document with authorization announcement number CN120315799A discloses a "method, device and medium for internationalization adaptation of Chinese web pages based on a large model", which includes: using a natural language model and web page parsing algorithm to parse Chinese web pages to obtain Chinese text information, multimedia resource information and web page structure information; performing intelligent translation and domain terminology adaptation on the Chinese text information based on a semantic understanding large model combined with a multilingual corpus and a domain terminology database to obtain internationalized text information; and performing cultural adaptation on the internationalized text information, multimedia resource information and web page structure information according to the cultural environment in which the internationalized text information is applicable to obtain internationalized resource files.
[0005] While existing technologies can achieve language conversion and webpage internationalization, and can improve communication efficiency through phonetic text-based pronunciation assistance, sentiment analysis to generate reference responses, and scenario-based adaptation, they can also leverage large models to accurately understand semantics, reduce manual costs, optimize content presentation considering cultural differences, and support multi-device display and multi-resolution adaptation to ensure basic usage needs in different scenarios. However, existing technologies only focus on independent translation tools or single input method functions, neglecting collaborative capabilities such as in-situ interaction driven by knowledge bases within keyboard extensions and evidence auditing. This leads to frequent application switching for cross-language communication. In addition, there is a lack of deep integration with enterprise knowledge bases and compliance systems, making it difficult to share data and lacking a front-end auditable link. Furthermore, visualization and candidate preview methods are limited, making it difficult to intuitively compare the adaptability of multiple versions of responses, and thus failing to efficiently support enterprise-level communication and decision-making. Summary of the Invention
[0006] This invention primarily provides an in-situ translation and response recommendation system and method driven by a knowledge base within a keyboard extension, which can solve the problems raised in the background art.
[0007] To address the aforementioned technical problems, this invention provides the following technical solution, more specifically, a keyboard-extended knowledge base-driven in-situ translation and response recommendation method, comprising: S1. Receive user input information or customer messages from the host application, perform desensitization processing on the information or messages and generate a semantically complete summary, while identifying the source language and target communication language of the user input information; S2. Perform hierarchical vector retrieval based on the summary to obtain relevant evidence fragments, and verify the validity of the retrieval results; S3. Based on the correspondence between the two communication languages, relevant information is processed in a targeted manner, preliminary response content is generated based on the verified association information, and the preliminary response content is adjusted for adaptability. S4. Extract features from the conversation context, retrieve suitable communication templates, and give a comprehensive score to the initial response content and the suitable templates; S5. Display candidate replies and processed content for users to preview and edit. After user confirmation, insert the content into the host application in its original position. At the same time, collect user feedback for system optimization.
[0008] Furthermore, in S1, a named entity recognition model is used to identify personal identity information in information or messages, and the identified personal identity information is replaced by reversible or irreversible encryption. A semantically complete digest is generated through a semantic consistency verification algorithm.
[0009] Furthermore, in S2, the hierarchical vector retrieval is based on the global vector layer, team vector layer, and user vector layer, and adopts a weighted fusion retrieval strategy to support secondary filtering of evidence metadata.
[0010] Furthermore, in S4, the conversation context is vectorized, and an approximate search for communication templates is performed based on the conversation context vectors. The preliminary response content and the suitable template are comprehensively scored in terms of relevance, emotional fit, compliance, and localization matching.
[0011] According to another aspect of the present invention, an in-situ translation and response recommendation system driven by a knowledge base within a keyboard extension is provided. This system is implemented based on the above-described in-situ translation and response recommendation method driven by a knowledge base within a keyboard extension, and specifically includes: a data acquisition and preprocessing module, a knowledge retrieval and evidence management module, a content generation and localization module, a sentiment adaptation and candidate scoring module, and an in-situ interaction and feedback optimization module. The data acquisition and preprocessing module acquires user input information or customer messages from a host application, processes sensitive data in the information or messages, and generates a semantically complete information summary, while simultaneously identifying the two communication languages corresponding to the user input information. The knowledge retrieval and evidence management module retrieves information from a multi-level data index based on the information summary. The system retrieves relevant related information and verifies its validity. The content generation and localization module processes user input based on the correspondence between the two communication languages, generates a preliminary response based on the verified related information, and adjusts the preliminary response for suitability. The sentiment adaptation and candidate scoring module extracts features from the conversation context, retrieves suitable communication templates, and scores the preliminary response and the suitable templates. The in-situ interaction and feedback optimization module displays the scored response and processed user input for user viewing and editing, imports the user-confirmed content into the corresponding location in the host application, and collects user operation data to adjust and optimize the system.
[0012] Furthermore, the data acquisition and preprocessing module includes: a data receiving module, a de-identified summary module, and a language recognition module; Data receiving module: Receives user input information or customer messages from the host application. User input information includes text and voice, and voice is converted into text through automatic speech recognition. The de-identification summary module uses a named entity recognition model to identify personal identity information in information or messages, replaces the identified personal identity information with reversible or irreversible encryption methods, and generates a semantically complete summary through a semantic consistency verification algorithm. Language recognition module: It infers the source language by reading the device language settings, detecting the language recognition model, and inferring the source language from the user's historical input records. It also reads the language preferences of the dialogue object, extracts the host application context, and identifies the target communication language manually specified by the user.
[0013] Furthermore, the knowledge retrieval and evidence management module includes: a hierarchical vector retrieval module and an evidence verification module; Hierarchical Vector Retrieval Module: The retrieval architecture is built based on the global vector layer, team vector layer, and user vector layer. It adopts a weighted fusion retrieval strategy and supports secondary filtering by publication date, source category, and evidence metadata. Evidence verification module: Verifies the validity and relevance of the retrieved information, records the source identifier, confidence score and timestamp of each piece of evidence, and ensures that the evidence and the information summary are semantically consistent.
[0014] Furthermore, the content generation and localization module includes: a constraint generation module, a conditional processing module, and a localization processing module; Constraint generation module: Generates constrained candidate responses based on a large language model, and binds the generated candidate responses to corresponding evidence fragments; Conditional processing module: When the source language and the target communication language are the same, perform language polishing on the user input information; when the source language and the target communication language are different, perform cross-language translation on the user input information. Localization module: Performs terminology mapping and replacement, etiquette template matching, compliance rule verification, and format standardization on the initial response content.
[0015] Furthermore, the emotion matching and candidate scoring module includes: a context vectorization module, a template retrieval module, and a multi-dimensional scoring module; Context vectorization module: Vectorizes the session context and message digest to generate session context vectors; Template retrieval module: Performs approximate retrieval in the template vector index based on the conversation context vector to obtain communication templates that are suitable for the current scenario and emotional tendency; Multi-dimensional scoring module: A comprehensive score is given to the initial response content and the appropriate communication template based on relevance, emotional fit, compliance, and localization.
[0016] Furthermore, the in-situ interaction and feedback optimization module includes: a display and interaction module, an in-situ insertion module, and a feedback collection and optimization module; Display and Interaction Module: Displays candidate responses after comprehensive scoring and processed user input information, synchronously shows the evidence sources and confidence levels corresponding to the candidate responses, and supports user preview, editing, and candidate content selection; In-situ insertion module: Through a secure inter-process communication protocol, the content confirmed by the user is directly written into the text input box of the host application in its original position; Feedback collection and optimization module: Records users' adoption decisions, content modification status, and evidence viewing behavior, and uses the collected data to optimize the system model, template library, and retrieval strategy.
[0017] The beneficial effects of the in-situ translation and reply recommendation system and method driven by a knowledge base within a keyboard extension of this invention are as follows: This system and method can cover various scenarios of cross-language communication and instant replies. It not only focuses on the accuracy of text translation but also incorporates elements such as context adaptation, style matching, and professional terminology alignment. Furthermore, it deeply integrates user input habits and scenario needs, making the translation and recommendation results more accurate and relevant to actual communication scenarios, providing more intelligent support for cross-language communication and efficient replies. In addition, through deep integration with keyboard input scenarios, it achieves seamless connection between translation recommendation capabilities and daily input behavior, breaking down barriers to tool switching. This allows for real-time access to knowledge base resources in various communication scenarios, improving communication efficiency and content quality. Simultaneously, based on dynamic updates and intelligent reasoning of the knowledge base, it provides reply options that better match user intent, clearly presenting multiple expression paradigms. Combined with intelligent analysis of real-time input content and scenario characteristics, it can quickly provide accurate translation results and appropriate reply suggestions in communication scenarios, greatly improving the fluency of cross-language communication and the effectiveness of information transmission. Attached Figure Description
[0018] The present invention will now be described in further detail with reference to the accompanying drawings and specific implementation methods.
[0019] Fig. 1 This is a schematic diagram of the system framework; Fig. 2 This is a flowchart illustrating the method. Detailed Implementation
[0020] The present invention will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the present application can be combined with each other.
[0021] According to one aspect of the invention, such as Figs. 1-2 As shown, a knowledge base-driven in-situ translation and response recommendation system and method with keyboard extensions is provided, including: Step 1: Message Reception and Preprocessing Receive user input information or customer messages from the host application, perform desensitization processing on the information or messages and generate a semantically complete summary, while identifying the source language and target communication language of the user input information; Specifically, the named entity recognition model is used to identify personal identity information in information or messages. The identified personal identity information is replaced with reversible or irreversible encryption. A semantically complete summary is generated through a semantic consistency verification algorithm. The source language is identified by reading the device language settings, detecting with a language recognition model, and inferring from the user's historical input records. The target language is identified by reading the language preference of the dialogue object, extracting from the host application context, and manually specifying by the user.
[0022] First, the data receiving module will actively capture various types of input data from users in the host application, including both directly entered text information and user-spoken voice information. For voice input, the module will call automatic speech recognition technology to accurately convert the voice signal into standardized text, ensuring that subsequent operations such as desensitization, summary generation, and language recognition can be carried out based on data in a unified format, effectively avoiding processing gaps caused by differences in input format. The desensitized summary uses a named entity recognition model to parse the input information sentence by sentence, accurately filtering out personal identity information such as names, phone numbers, and addresses. Then, based on the data sensitivity level, it selects reversible or irreversible encryption replacement methods, such as replacing specific phone numbers with specific placeholders. At the same time, when generating the summary, the summary content is checked and optimized in multiple rounds through a semantic consistency verification algorithm to ensure that the desensitized summary not only completely hides sensitive information, but also maintains a high degree of consistency with the core semantics of the original message, without any omission of key information or semantic distortion. In addition, in the source language recognition stage, the default parameters of the device language setting, the real-time detection results of the language recognition model, and the feature analysis of the user's historical input records are deeply integrated. Through cross-comparison of multi-dimensional information, interference factors are eliminated. For example, when the device language is set to Chinese but the user's historical input is mostly English, the source language is determined by combining the detection results of the language recognition model, which significantly improves the recognition accuracy. Finally, when determining the target communication language, the system prioritizes reading the historical communication language preferences of the conversation partner, and then extracts auxiliary information from the communication context of the host application (such as previous reply languages and communication scenario tags). At the same time, the system reserves the user's manual specification permissions. When the automatic recognition result does not match the user's needs, the user can directly correct it manually to ensure that the target language fully matches the actual communication needs. After the recognition is completed, the source language and target language information will be synchronized to the subsequent processing steps in real time to provide accurate basis for conditional processing.
[0023] Step 2: Hierarchical retrieval and verification Hierarchical vector retrieval is performed based on the abstract to obtain relevant evidence fragments, and the validity of the retrieval results is verified. Specifically, the hierarchical vector retrieval is based on the global vector layer, team vector layer, and user vector layer, and adopts a weighted fusion retrieval strategy, supporting two-level filtering of evidence metadata.
[0024] First, the hierarchical vector retrieval module will first convert the abstract into vectors to make it consistent with the data format in the retrieval index. Then, it will start a multi-dimensional retrieval process to match information related to the core semantics of the abstract from global, team and user-related knowledge base resources to ensure that the retrieval scope is comprehensive and does not miss key data, and avoid the loss of effective information due to a single retrieval dimension. Then, in order to improve the accuracy of the search, the parameters of the weighted fusion search strategy will be dynamically adjusted according to the attributes of the current communication scenario. For example, for internal team communication scenarios, the weight of team-related knowledge base resources will be appropriately increased, while for personal regular communication scenarios, the focus will be on matching resources related to the user's historical preferences, so that the search results are more in line with actual usage needs. In addition, after initially retrieving candidate evidence fragments, the system will activate a secondary filtering mechanism for evidence metadata. It will prioritize filtering recently updated knowledge base content according to the publication date, and at the same time filter information from authoritative sources such as official enterprise specifications and industry standard documents according to the source category, eliminating outdated, non-authoritative and invalid data, and further focusing on high-quality evidence. At the same time, the evidence verification module will intervene synchronously to verify the semantic fit between candidate evidence and the summary sentence by sentence. Evidence fragments with semantic deviations or that cannot provide effective support for response generation will be marked and removed to ensure the relevance and validity of the evidence. Finally, for each valid piece of evidence that has passed verification, a unique source identifier, a confidence score, and a timestamp are added. The source identifier clearly points to the original knowledge base entry corresponding to the evidence, the confidence score quantitatively reflects the degree of matching between the evidence and the current needs, and the timestamp accurately records the time of retrieval and verification of the evidence, forming a complete and traceable chain of evidence, providing core basis for subsequent response generation and source tracing.
[0025] Step 3: Generation and Adaptation Adjustment Based on the correspondence between the two communication languages, relevant information is processed in a targeted manner, preliminary response content is generated based on the verified association information, and the preliminary response content is adjusted for adaptability. Specifically, the process involves first processing user input based on language correspondence, then generating a compliant and well-founded preliminary response based on valid evidence, and finally making the response more relevant to the specific scenario through multi-dimensional localization adjustments.
[0026] First, the conditional processing module calls upon the previously identified source and target language information for accurate judgment: if the two languages are consistent, it performs deep language polishing on the user input, including removing redundant interjections such as "uh" and "um", repairing non-standard expressions such as omitted subjects or incomplete predicates, converting colloquial expressions into written or professional expressions that fit the context, and unifying terminology and expression style. If the two languages are inconsistent, it automatically switches to cross-language translation mode, adaptively selecting a local lightweight model or a high-quality cloud model to perform translation based on network latency, bandwidth conditions, and user quality preferences. During the translation process, it strictly preserves the core intent, emotional tone, and professional terminology of the original text to avoid semantic loss, and generates multiple versions of the translation results for subsequent selection. Then, the constraint generation module receives the verified valid evidence fragments and constrains the large language model through the preset Prompt template. It explicitly requires that the generated preliminary response must be completely based on the provided evidence fragments and must not add any additional content without evidence support. At the same time, each preliminary response is bound to the corresponding evidence fragment in an immutable manner, and the generation timestamp and model version are recorded to ensure the compliance and traceability of the response. For the same requirement, multiple preliminary response candidates with different styles will be generated, covering various expression scenarios such as formal, concise, and conversational. Finally, the localization module performs a full-dimensional adaptation adjustment on the initial response content: First, based on an editable terminology library in CSV / JSON format, it performs multi-dimensional filtering according to the current communication language pairs, industry codes, etc., replacing common words in the response with standard terms in the target region or industry. Then, based on the user level and the identity of the target party, it adaptively matches the corresponding etiquette template from a predefined multilingual honorific template library to optimize the appropriateness of the expression. Subsequently, it compares the content with compliance lists such as prohibited words, sensitive words, and prohibited words from competitors, rewrites the detected violations, and marks the content that cannot be rewritten as "pending approval". Finally, it automatically converts date formats, currency symbols, number separators, etc., to ensure that the format conforms to the usage habits of the target region, making the response both accurate and compliant, as well as fitting the local culture and scenario requirements.
[0027] Step 4: Adaptation and Scoring Feature extraction is performed on the conversation context to retrieve suitable communication templates, and a comprehensive score is given to the initial response content and the suitable template. Specifically, the conversation context is vectorized, and an approximate search for communication templates is performed based on the conversation context vectors. The initial response content and the appropriate template are then comprehensively scored based on relevance, emotional fit, compliance, and localization.
[0028] First, the context vectorization module will comprehensively extract the core features of the conversation context, including historical communication content, current interaction scenario tags, and the identity attributes of the user and the dialogue partner. At the same time, combined with the information summary generated in the early stage, this unstructured information is converted into a high-dimensional conversation context vector through semantic encoding technology. This vector can accurately capture the semantic logic, sentiment and scenario requirements of the conversation, providing accurate data support for subsequent template retrieval and ensuring that the retrieved template is highly consistent with the current communication scenario. Then, the template retrieval module will perform an approximate retrieval operation in the preset template vector index based on the generated conversation context vector. During the retrieval process, it will prioritize matching communication templates that are consistent with the conversation scenario category (such as inquiry, quotation, order reminder, complaint handling, etc.) and emotional tags (such as politeness, firmness, empathy, etc.). At the same time, it will combine additional dimensions such as region and industry for filtering, quickly selecting multiple candidate templates with high adaptability from the template resource library, so as to achieve accurate and efficient template retrieval. In addition, the multi-dimensional scoring module will initiate a comprehensive scoring process, calculating the comprehensive score using the following formula:
[0029] In the formula, For relevance weights, Weighting for emotional compatibility For compliance weighting, For localization matching degree weight, For personalized weighting, it can be pre-configured through enterprise team strategies or adjusted online based on user historical feedback data. The relevance dimension score focuses on the degree of fit between the initial response and the conversation context and user needs. The emotional fit dimension score focuses on the degree of matching between the response and the emotional tendencies of the user and the conversation partner. The compliance dimension score verifies the compliance of the response content based on the enterprise's compliance checklist. The localization matching dimension score assesses the localization adaptation of terminology, etiquette, and format. The personalization dimension score is adjusted with reference to the user's historical adoption preferences. All dimension scores are calculated through quantitative algorithms to ensure the objectivity and accuracy of the comprehensive score. Finally, the system sorts the combinations of preliminary responses and candidate templates in descending order based on the overall score, selects the combinations with the highest overall scores as the final candidate results, and records the specific scores of each combination in each dimension. This provides a reference for users to preview and select, and also accumulates data for the system's subsequent template optimization and weight adjustment, ensuring that the scoring system can continuously adapt to the communication needs of users and the team.
[0030] Step 5: Optimization of Interactive Confirmation and In-situ Feedback The system displays candidate responses and processed content for users to preview and edit. After user confirmation, the content is inserted into the host application in its original position. At the same time, user feedback is collected for system optimization. Specifically, the system first provides users with an intuitive preview and editing interface, then enables seamless in-place insertion of content, and finally completes closed-loop optimization of the system based on user feedback data.
[0031] First, the display and interaction module will sort the candidate responses selected in step 4 and the processed user input information (translation results or polished text) in descending order of comprehensive score. Each candidate response will be labeled with the corresponding evidence source (including the link to the original entry in the knowledge base) and confidence score, so that users can quickly verify the compliance and reliability of the content. The interface allows users to click on the candidate content to edit it, including modifying the text, adjusting the tone, adding or deleting information, etc. It also provides the functions of "restore default" and "compare multiple versions" so that users can flexibly adjust it to meet their expectations. Then, once the user confirms the final content, the in-place insertion module will bypass the sandbox restrictions of the mobile device keyboard extension through a secure inter-process communication protocol and directly write the confirmed content into the host application's text input box in its original position. This eliminates the need for the user to manually copy and paste, and the entire process can be completed without leaving the host application, achieving a seamless connection between "preview-edit-insert" and ensuring the continuity of the communication process. In addition, it supports users to abandon the current candidate content and re-trigger the generation process before insertion, or manually select other candidate versions. It also provides users with a "favorite frequently used replies" function to store frequently used compliant replies in a personal template library for easy and quick retrieval later, further improving communication efficiency. Finally, the feedback collection and optimization module records the user's entire operation data, including the adoption status of candidate replies, the specific content of editing and modification, evidence viewing behavior, and collection operations. This data is encrypted and stored and periodically synchronized to the system backend. By analyzing user feedback data, the backend dynamically optimizes model parameters (such as adjusting the weight of multi-dimensional scoring), updates the template library (supplementing user-defined high-quality replies), and optimizes the retrieval strategy (strengthening evidence matching of user preferences), thereby achieving continuous iteration of system capabilities and making translation and reply recommendations increasingly aligned with user habits and actual communication needs.
[0032] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present invention are also within the protection scope of the present invention.
Claims
1. A keyboard-extended knowledge base-driven in-situ translation and reply recommendation method, characterized in that, The method includes: S1. Receive user input information or customer messages from the host application, perform desensitization processing on the information or messages and generate a semantically complete summary, while identifying the source language and target communication language of the user input information; S2. Perform hierarchical vector retrieval based on the summary to obtain relevant evidence fragments, and verify the validity of the retrieval results; S3. Based on the correspondence between the two communication languages, perform targeted processing on the relevant information, generate preliminary response content based on the verified association information, and make adaptation adjustments to the preliminary response content; S4. Extract features from the conversation context, retrieve suitable communication templates, and give a comprehensive score to the initial response content and the suitable templates; S5. Display candidate replies and processed content for users to preview and edit. After user confirmation, insert the content into the host application in its original position. At the same time, collect user feedback for system optimization.
2. The in-situ translation and response recommendation method driven by a knowledge base within a keyboard extension according to claim 1, characterized in that: In step S1, a named entity recognition model is used to identify personal identity information in information or messages. The identified personal identity information is replaced by reversible or irreversible encryption. A semantically complete summary is generated through a semantic consistency verification algorithm. The source language is identified by reading the device language settings, detecting the language recognition model, and inferring from the user's historical input records. The target language is identified by reading the language preference of the dialogue object, extracting the host application context, and manually specifying it by the user.
3. The in-situ translation and response recommendation method driven by a knowledge base within a keyboard extension according to claim 1, characterized in that: In S2, the hierarchical vector retrieval is based on the global vector layer, team vector layer, and user vector layer, and adopts a weighted fusion retrieval strategy to support secondary filtering of evidence metadata.
4. The in-situ translation and response recommendation method driven by a knowledge base within a keyboard extension according to claim 1, characterized in that: In step S4, the conversation context is vectorized, and an approximate search for communication templates is performed based on the conversation context vectors. The preliminary response content and the suitable template are comprehensively scored in terms of relevance, emotional fit, compliance, and localization matching.
5. A keyboard-extended knowledge base-driven in-situ translation and response recommendation system, characterized in that, This system is implemented based on the in-situ translation and response recommendation method driven by the keyboard extension knowledge base as described in any one of claims 1-4. Specifically, it includes: a data acquisition and preprocessing module, a knowledge retrieval and evidence management module, a content generation and localization module, a sentiment adaptation and candidate scoring module, and an in-situ interaction and feedback optimization module. The data acquisition and preprocessing module acquires user input information or customer messages from the host application, processes sensitive data in the information or messages, and generates a semantically complete information summary, while simultaneously identifying the two communication languages corresponding to the user input information. The knowledge retrieval and evidence management module retrieves relevant related information from a multi-level data index based on the information summary and processes the retrieved information. The system performs validity checks on the associated information; the content generation and localization module processes the user input information according to the correspondence between the two communication languages, generates preliminary response content based on the verified associated information, and adjusts the preliminary response content for suitability; the sentiment adaptation and candidate scoring module extracts features from the conversation context, retrieves suitable communication templates, and performs a comprehensive score on the preliminary response content and the suitable templates; the in-situ interaction and feedback optimization module displays the scored response content and processed user input information for users to view and edit, imports the user-confirmed content into the corresponding location in the host application, and collects user operation-related data to adjust and optimize the system.
6. The in-situ translation and response recommendation system driven by a knowledge base within a keyboard extension according to claim 5, characterized in that: The data acquisition and preprocessing module includes: a data receiving module, a de-identified summary module, and a language recognition module; Data receiving module: Receives user input information or customer messages from the host application. User input information includes text and voice, and voice is converted into text through automatic speech recognition. The de-identification summary module uses a named entity recognition model to identify personal identity information in information or messages, replaces the identified personal identity information with reversible or irreversible encryption methods, and generates a semantically complete summary through a semantic consistency verification algorithm. Language recognition module: It infers the source language by reading the device language settings, detecting the language recognition model, and inferring the source language from the user's historical input records. It also reads the language preferences of the dialogue object, extracts the host application context, and identifies the target communication language manually specified by the user.
7. The in-situ translation and response recommendation system driven by a knowledge base within a keyboard extension according to claim 5, characterized in that: The knowledge retrieval and evidence management module includes: a hierarchical vector retrieval module and an evidence verification module; Hierarchical Vector Retrieval Module: The retrieval architecture is built based on the global vector layer, team vector layer, and user vector layer. It adopts a weighted fusion retrieval strategy and supports secondary filtering by publication date, source category, and evidence metadata. Evidence verification module: Verifies the validity and relevance of the retrieved information, records the source identifier, confidence score and timestamp of each piece of evidence, and ensures that the evidence and the information summary are semantically consistent.
8. The in-situ translation and response recommendation system driven by a knowledge base within a keyboard extension according to claim 5, characterized in that: The content generation and localization module includes: a constraint generation module, a conditional processing module, and a localization processing module; Constraint generation module: Generates constrained candidate responses based on a large language model, and binds the generated candidate responses to corresponding evidence fragments; Conditional processing module: When the source language and the target communication language are the same, perform language polishing on the user input information; when the source language and the target communication language are different, perform cross-language translation on the user input information. Localization module: Performs terminology mapping and replacement, etiquette template matching, compliance rule verification, and format standardization on the initial response content.
9. The in-situ translation and response recommendation system driven by a knowledge base within a keyboard extension according to claim 5, characterized in that: The emotion matching and candidate scoring module includes: a context vectorization module, a template retrieval module, and a multi-dimensional scoring module; Context vectorization module: Vectorizes the session context and message digest to generate session context vectors; Template retrieval module: Performs approximate retrieval in the template vector index based on the conversation context vector to obtain communication templates that are suitable for the current scenario and emotional tendency; Multi-dimensional scoring module: A comprehensive score is given to the initial response content and the appropriate communication template based on relevance, emotional fit, compliance, and localization.
10. The in-situ translation and response recommendation system driven by a knowledge base within a keyboard extension according to claim 5, characterized in that: The in-situ interaction and feedback optimization module includes: a display and interaction module, an in-situ insertion module, and a feedback collection and optimization module; Display and Interaction Module: Displays candidate responses after comprehensive scoring and processed user input information, synchronously shows the evidence sources and confidence levels corresponding to the candidate responses, and supports user preview, editing, and candidate content selection; In-situ insertion module: Through a secure inter-process communication protocol, the content confirmed by the user is directly written into the text input box of the host application in its original position; Feedback collection and optimization module: Records users' adoption decisions, content modification status, and evidence viewing behavior, and uses the collected data to optimize the system model, template library, and retrieval strategy.