Text processing method and device, equipment and storage medium

By selecting a target expert model and performing knowledge completion operations, the problems of low efficiency and accuracy in existing model correction are solved, and efficient model correction and continuous optimization are achieved.

CN121787558APending Publication Date: 2026-04-03BEIJING KNOWLEDGE ATLAS TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

The existing model has low correction efficiency and low accuracy.

Method used

By acquiring the prompt words input by the user and their corresponding task type, contextual semantics, and input features, a target expert model is selected from multiple sub-expert models. The native general-purpose base model and the target expert model are then input, and similarity is calculated and knowledge completion is performed.

Benefits of technology

It improved the efficiency of model correction, enhanced model accuracy, and enabled dynamic knowledge accumulation and continuous self-optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121787558A_ABST
    Figure CN121787558A_ABST
Patent Text Reader

Abstract

The invention provides a text processing method and device, equipment and a storage medium, and relates to the technical field of artificial intelligence. In some embodiments of the invention, cue words input by a user and task types, context semantics and input features corresponding to the cue words are obtained; selecting a target expert model from the plurality of sub-expert models according to the task type, the context semantics and the input features; inputting the cue word into the native general base large model to obtain an original answer result; inputting the cue word into the target expert model to obtain a target prediction result; and according to the similarity between the original answer result and the target prediction result, the knowledge completion operation is executed, the completed knowledge can be used for subsequent model training and knowledge enhancement processes, the model correction efficiency is improved, and the model precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a text processing method, apparatus, device, and storage medium. Background Technology

[0002] In recent years, with the exponential growth of the parameter scale and training data volume of Large Language Models (LLMs), these models have demonstrated unprecedented capabilities in general task understanding, complex reasoning, and multi-turn dialogue. However, further improvements in model performance depend not only on the breadth of data and computational investment during the pre-training phase but also heavily on refined optimization strategies during the post-training phase. This phase, through the introduction of high-quality instruction data, human feedback signals, or teacher-guided models, aims to optimize the model's behavioral patterns, knowledge structure, and reasoning logic, and has become a crucial factor in determining the model's final intelligence level. Especially in the pursuit of "deep understanding" and "generalized reasoning" capabilities, how to efficiently and deeply inject prior knowledge into student models has become a core research challenge.

[0003] Mainstream post-training methods commonly employ the teacher distillation paradigm, which utilizes a more powerful teacher model to generate soft labels for the input samples, using these as supervisory signals to guide the student model's learning process. This method minimizes the KL divergence or cross-entropy loss between the student model's output distribution and the teacher model's output distribution, prompting the student model to approximate the teacher's behavior at the output layer. This strategy, due to its simplicity, controllable computational cost, and ability to effectively compress the capabilities of large models into smaller architectures, has been widely applied in scenarios such as model fine-tuning, knowledge transfer, and inference acceleration.

[0004] Currently, the model correction efficiency is low, and the model accuracy is also low. Summary of the Invention

[0005] This disclosure provides a text processing method, apparatus, device, and storage medium to at least solve the problems of low model correction efficiency and low model accuracy in existing models.

[0006] The technical solution disclosed herein is as follows: This disclosure provides a text processing method, including: Obtain the prompt words input by the user, as well as the corresponding task type, contextual semantics, and input features of the prompt words; Based on the task type, the contextual semantics, and the input features, a target expert model is selected from multiple sub-expert models; Input the prompt words into the native universal base model to obtain the original answer result; The prompt words are input into the target expert model to obtain the target prediction result; Based on the similarity between the original answer and the target prediction, a knowledge completion operation is performed.

[0007] Optionally, selecting the target expert model from multiple sub-expert models based on the task type, the contextual semantics, and the input features includes: The task type, the context semantics, and the input features are input into the gating network to obtain the selection probability of each sub-expert model; The target expert model that satisfies the set probability condition is selected from multiple sub-expert models based on the selection probability.

[0008] Optionally, there are multiple target expert models, and the step of inputting the prompt word into the target expert model to obtain the target prediction result includes: The prompt words are input into multiple target expert models to obtain multiple candidate prediction results; The target prediction result is selected from the multiple candidate prediction results.

[0009] Optionally, selecting the target prediction result from the plurality of candidate prediction results includes: The target prediction result is selected from multiple candidate prediction results using any one of the following methods: multi-expert voting, inference path verification, and fact consistency detection.

[0010] Optionally, the similarity is a comprehensive difference value; the step of performing knowledge completion operation based on the similarity between the original answer result and the target prediction result includes: Calculate the combined difference between the original answer and the target prediction; If the overall difference value is greater than the preset capability alignment threshold, then a knowledge completion operation is performed; If the overall difference value is less than or equal to the preset capability alignment threshold, then the original answer result and the target prediction result are determined to be consistent.

[0011] Optionally, if the overall difference value is greater than a preset capability alignment threshold, then performing a knowledge completion operation includes: If the overall difference value is greater than the preset capability alignment threshold, the knowledge sample corresponding to the prompt word will be structured and stored in an external knowledge base.

[0012] Optionally, the knowledge sample includes any one of the following: the prompt word, the target prediction result, the difference label, the similar task index, and the timestamp and task classification information.

[0013] This disclosure also provides a text processing apparatus, including: The acquisition module is used to acquire the prompt words input by the user, as well as the corresponding task type, contextual semantics, and input features of the prompt words; The selection module is used to select a target expert model from multiple sub-expert models based on the task type, the context semantics, and the input features. The first generation module is used to input the prompt words into the native general-purpose base model to obtain the original answer result; The second generation module is used to input the prompt words into the target expert model to obtain the target prediction result; The execution module is used to perform knowledge completion operations based on the similarity between the original answer and the target prediction result.

[0014] This disclosure also provides an electronic device, including: processor; Memory used to store processor-executable instructions; The processor is configured to execute instructions to implement the steps in the above method.

[0015] This disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0016] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects: In some embodiments of this disclosure, the system obtains user-inputted prompt words, their corresponding task type, contextual semantics, and input features; selects a target expert model from multiple sub-expert models based on the task type, contextual semantics, and input features; inputs the prompt words into the native general-purpose base model to obtain the original answer result; inputs the prompt words into the target expert model to obtain the target prediction result; and performs a knowledge completion operation based on the similarity between the original answer result and the target prediction result. The completed knowledge can be used for subsequent model training and knowledge enhancement processes, improving model correction efficiency and enhancing model accuracy.

[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0019] Figure 1 A flowchart illustrating a text processing method provided for an exemplary embodiment of this disclosure; Figure 2 A schematic diagram of the structure of a text processing apparatus provided for an exemplary embodiment of this disclosure; Figure 3 A schematic diagram of the structure of an electronic device provided for an exemplary embodiment of this disclosure. Detailed Implementation

[0020] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0021] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.

[0022] It should be noted that the user information involved in this disclosure includes, but is not limited to, user device information and user personal information; the collection, storage, use, processing, transmission, provision and disclosure of user information in this disclosure all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0023] To address the aforementioned technical issues, in some embodiments of this disclosure, the user-inputted prompt words, along with their corresponding task type, contextual semantics, and input features, are obtained. Based on the task type, contextual semantics, and input features, a target expert model is selected from multiple sub-expert models. The prompt words are input into the native general-purpose base model to obtain the original answer result. The prompt words are then input into the target expert model to obtain the target prediction result. Based on the similarity between the original answer result and the target prediction result, a knowledge completion operation is performed. The completed knowledge can be used for subsequent model training and knowledge enhancement processes, improving model correction efficiency and enhancing model accuracy.

[0024] The technical solutions provided by the embodiments of this disclosure are described in detail below with reference to the accompanying drawings.

[0025] Figure 1 This is a flowchart illustrating a text processing method provided as an exemplary embodiment of the present disclosure. Figure 1 As shown, the method includes: S101: Obtain the prompt words input by the user, as well as the corresponding task type, contextual semantics, and input features of the prompt words; S102: Select the target expert model from multiple sub-expert models based on task type, contextual semantics, and input features; S103: Input the prompt words into the native universal base model to obtain the original answer result; S104: Input the prompt words into the target expert model to obtain the target prediction result; S105: Perform knowledge completion operation based on the similarity between the original answer and the target prediction result.

[0026] In this embodiment, the entity executing the above method can be a terminal device or a server.

[0027] The terminal device includes, but is not limited to, mobile stations (MS), mobile terminals, mobile phones, handsets, and portable equipment. This terminal device can communicate with one or more core networks via a radio access network (RAN). For example, the terminal device can be a mobile phone (or "cellular" phone), a computer with wireless communication capabilities, a computer with wireless transceiver capabilities, a virtual reality (VR) terminal device, an AR terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical care, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, etc. The operating systems installed on the terminal device include, but are not limited to, iOS, Android, Windows, Linux, and Mac OS. In different networks, terminals may be called by different names, such as: user equipment, mobile station, user unit, station, cellular phone, personal digital assistant, wireless modem, wireless communication device, handheld device, laptop, cordless phone, wireless local loop station, television, etc. For ease of description, this embodiment will simply refer to it as terminal device.

[0028] In this embodiment, the implementation form of the server is not limited. For example, the server can be a conventional server, a cloud server, a cloud host, a virtual center, or other server devices. The server mainly consists of a processor, hard disk, memory, system bus, and other common computer architecture types.

[0029] In this embodiment, the system obtains the prompt words input by the user, along with the corresponding task type, contextual semantics, and input features. Based on the task type, contextual semantics, and input features, a target expert model is selected from multiple sub-expert models. The prompt words are input into the native general-purpose base model to obtain the original answer result. The prompt words are then input into the target expert model to obtain the target prediction result. Based on the similarity between the original answer result and the target prediction result, a knowledge completion operation is performed. The completed knowledge can be used for subsequent model training and knowledge enhancement processes, improving model correction efficiency and enhancing model accuracy.

[0030] To provide a clear and complete explanation of this disclosure, the technical terms used in this disclosure are explained below.

[0031] Native pedestal model: This refers to a general-purpose large language model that has undergone pre-training, supervised fine-tuning (SFT), and reinforcement alignment (RLHF / DPO), serving as the main body for subsequent capability optimization. The results generated by the pedestal model will be compared with the output of the expert model to evaluate the model's capability level and knowledge mastery in a specific task domain.

[0032] Expert models refer to a group of models that outperform the base model and possess specific domain or reasoning capabilities. Expert models may include logical reasoning experts, knowledge-based question-answering experts, or multimodal understanding experts, etc. Their outputs are considered as high-confidence reference answers and are used to guide the transfer of capabilities and knowledge enhancement of the base model.

[0033] Expert Hybrid Mechanism: A dynamic routing mechanism used to distribute inputs among multiple expert models based on task type and contextual semantics. It selects the optimal expert combination to perform inference and generation tasks through a gating network, thereby improving the professionalism and consistency of the output.

[0034] Generate similarity threshold: This measures the semantic difference between the content generated by the base model and the expert model under the same input. When the semantic similarity is lower than the set threshold, the system automatically determines that there is a capability gap in the task domain, triggers the knowledge completion process, and stores the relevant samples in an external knowledge base.

[0035] External knowledge base: This refers to a dynamically updated knowledge storage module used to store high-confidence samples generated by experts and records of discrepancies in tasks. During model inference or retraining, the system can access the content in this knowledge base through semantic retrieval to enhance the model's generation capabilities and knowledge coverage, achieving dynamic knowledge accumulation and feedback.

[0036] Knowledge feedback refers to re-inputting high-quality samples generated by experts or manually corrected into the model as training signals, helping the model learn from external knowledge and gradually reduce illusions, errors and uncertainties, forming a continuous self-optimizing and self-evolving learning loop.

[0037] Capability difference detection: This refers to identifying knowledge areas or reasoning weaknesses that the model has not yet mastered by calculating the semantic similarity difference between the base model and the expert model in the generated results, thus providing a basis for dynamic training scheduling and knowledge completion.

[0038] Knowledge-enhanced reasoning: When the model encounters inputs similar to historical difference samples during the reasoning process, it automatically retrieves relevant expert samples from external knowledge bases and integrates them into the current generation context, thereby improving the model's logical consistency and factual accuracy.

[0039] It should be noted that task type refers to the category of user intent; task types include, but are not limited to, question answering, code generation, planning, and tool invocation. Contextual semantics refers to the deeper meanings implied in the input, such as domain, object relationships, referentiality, and sentiment; input features include, but are not limited to, length, language, whether it contains structured data (such as JSON / tables), and whether it contains tool invocation keywords.

[0040] In some embodiments of this disclosure, prompt words input by the user, along with the corresponding task type, contextual semantics, and input features, are obtained. Specifically, the task type is identified using a lightweight classifier (such as mini-BERT, rule templates, or Prompt keyword matching); contextual semantics are extracted using embedding vectors or semantic parsing modules (such as dependency parsing or named entity recognition); and input features are extracted using feature engineering and metadata (such as regular expression matching and token statistics).

[0041] It should be noted that the sub-expert models disclosed herein include, but are not limited to: reasoning expert models, agent expert models, and general expert models. Reasoning expert models focus on complex logical chains and deductive reasoning tasks. They are sub-expert models specifically designed for performing logical reasoning, mathematical calculations, multi-step derivations, causal analysis, or solving complex problems. Their training data and architecture optimization emphasize higher-order cognitive tasks such as symbolic reasoning, chain-of-thought, theorem proving, and numerical computation. Agent expert models are responsible for task decomposition, planning, and strategic decision-making tasks. They are sub-expert models with tool use, environmental interaction, and task planning capabilities, enabling them to perform external operations on behalf of users, such as calling APIs, querying databases, running code, controlling smart devices, or coordinating multi-step action processes. General expert models cover language generation, knowledge-based question answering, and factual reasoning tasks. They are sub-expert models oriented towards open-domain, general language understanding and generation tasks, adept at handling non-specialized tasks such as commonsense question answering, text creation, summarizing, translation, and dialogue, emphasizing language fluency, breadth of knowledge, and contextual coherence.

[0042] In this embodiment, after the user inputs a prompt, the prompt is simultaneously sent to both the native general-purpose base model and the MOE module. The native general-purpose base model is responsible for generating its own original answer; while the MOE (Mixture of Experts) module dynamically selects and schedules several sub-expert models to participate in the generation based on the task type, contextual semantics, and input features. This disclosed MOE module dynamically routes the input based on the expert weights calculated by the gating network, ensuring that the task is executed by the most suitable expert combination, thereby improving the professionalism and robustness of the model generation.

[0043] In some embodiments of this disclosure, a target expert model is selected from multiple sub-expert models based on task type, contextual semantics, and input features. One possible approach is to input the task type, contextual semantics, and input features into a gating network to obtain the selection probability of each sub-expert model; then, based on the selection probabilities, a target expert model that meets a set probability condition is selected from the multiple sub-expert models. For example, the task type, contextual semantics, and input features are input into a gating network to obtain the selection probability of each sub-expert model; the multiple sub-expert models are then arranged in descending order of selection probability, and the top two target expert models are selected from the multiple sub-expert models.

[0044] In some embodiments of this disclosure, multiple target expert models are used. Prompt words are input into these target expert models to obtain target prediction results. One possible approach is to input prompt words into multiple target expert models to obtain multiple candidate prediction results; the target prediction result is then selected from these candidate prediction results. Optionally, the target prediction result can be selected from the multiple candidate prediction results using any one of multi-expert voting, inference path verification, or factual consistency detection. In embodiments of this disclosure, the expert models activated by the MOE module process and generate multiple sets of candidate prediction results; wherein, the candidate prediction results include: answer, inference path, and confidence information. The results output by each target expert model are merged into a unified Expert Output Set, and the optimal result is selected as the final output of the expert model by combining an internal consistency judgment mechanism (such as multi-expert voting, inference path verification, and factual consistency detection). Simultaneously, the native base model also independently completes the same task of generation, outputting the base model's generated result (i.e., the original answer result).

[0045] It should be noted that the original answer output by the native general-purpose base model represents the current model's generation capability level; the target prediction output by the expert model represents a high-confidence standard reference.

[0046] In some embodiments of this disclosure, the similarity is a comprehensive difference value; knowledge completion is performed based on the similarity between the original answer and the target prediction result. One possible approach is to calculate the comprehensive difference value between the original answer and the target prediction result; if the comprehensive difference value is greater than a preset capability alignment threshold, then a knowledge completion operation is performed; if the comprehensive difference value is less than or equal to the preset capability alignment threshold, then the original answer and the target prediction result are determined to be consistent. It should be noted that this disclosure does not limit the preset capability alignment threshold, and the preset capability alignment threshold can be adjusted according to actual conditions. The preset capability alignment threshold is, for example, 0.1. Similarity calculation algorithms include, but are not limited to: BERTScore, Cosine Similarity, BLEURT, and GPT-Eval semantic evaluation. In embodiments of this disclosure, the generated results of the native general-purpose base model and the expert model under the same input are compared, and the semantic similarity difference is calculated. When the difference exceeds the threshold, it is determined that there is a capability gap in the task domain, and then subsequent knowledge completion operations are performed.

[0047] For example, embodiments of this disclosure calculate the comprehensive difference between the original answer and the target prediction result by integrating multiple dimensions such as logical consistency of reasoning, factual accuracy, and linguistic fluency. :

[0048] in, This indicates the output of the base model. This represents the output of the expert model. This is a semantic similarity function.

[0049] when ≤ If the original answer and the target prediction are consistent, it indicates that the ability in this area has reached the standard. when > If the task or knowledge point has a significant skill gap, a knowledge completion operation will be performed.

[0050] In some embodiments of this disclosure, a knowledge completion operation is performed when the overall difference value exceeds a preset capability alignment threshold. One possible approach is to structurally store the knowledge sample corresponding to the prompt word in an external knowledge base when the overall difference value exceeds the preset capability alignment threshold. The knowledge sample includes any one of the following: prompt word (user input), target prediction result (i.e., result generated by the expert model), difference tag (Reason Tag, such as logical error, factual bias, inference gap, etc.), similar task index (Embedding vector for subsequent retrieval), and timestamp and task classification information. Embodiments of this disclosure achieve automatic accumulation of high-value knowledge, retaining capability gap records of the original general-purpose base model at different task stages, forming a dynamically scalable knowledge memory layer. Samples with significant differences are automatically stored in the RAG external knowledge base as a "dynamically supplementary knowledge source." The model can retrieve these high-value knowledge samples during subsequent inference and retraining, achieving continuous knowledge backflow and capability evolution.

[0051] In some embodiments of this disclosure, if the native general-purpose base model encounters a task input similar to the historical capability gap during subsequent reasoning or task execution, it triggers the RAG retrieval mechanism to recall the most relevant expert-generated samples from the external knowledge base and integrate them as contextual hints into the current generation process, thereby achieving knowledge-augmented inference.

[0052] Furthermore, this embodiment periodically extracts high-confidence samples from the RAG knowledge base and inputs them as retraining data into the native general-purpose foundation model, forming a knowledge feedback loop of "generation → comparison → storage → retrieval → relearning," thereby achieving continuous optimization and self-evolution of the model's capabilities. This embodiment generates high-confidence task samples (including questions, answers, and inference chains) through multiple expert models, which are directly used for supervised fine-tuning of the native general-purpose foundation model, reshaping the model's generation logic and knowledge representation from the source.

[0053] This disclosure has the following beneficial effects in terms of knowledge transfer depth, model adaptive capability, and system self-evolution mechanism: (1) Upgrading from distribution imitation to generative ability transfer significantly improves the depth of model knowledge absorption. Traditional teacher distillation only achieves model imitation through probability distribution alignment. The student model passively learns the teacher's output tendency and cannot truly understand the teacher's generative logic and knowledge structure. This disclosure no longer uses the teacher's soft label as a learning signal, but directly uses high-quality task samples (question-answer-reasoning chain) generated by the expert model as training data, realizing a fundamental shift from "probability alignment" to "ability transfer". This source fine-tuning method not only transmits the knowledge content of the expert model, but also allows the base model to learn its generative thinking and reasoning path, thereby significantly improving the model's ability in complex reasoning, multi-task generation and knowledge understanding, and realizing true knowledge absorption and reconstruction.

[0054] (2) Upgrading from static fine-tuning to threshold-driven dynamic capability detection, and constructing an adaptive optimization mechanism. Existing post-training strategies mostly use fixed training periods and uniform learning rates, lacking real-time evaluation mechanisms, making it difficult to dynamically adjust the model training direction according to capability gaps. This disclosure uses a similarity threshold determination mechanism to compare the generation results of native models and expert models under the same input. When the semantic similarity is lower than a preset threshold, it is determined that there is a capability gap in the task domain. The system can dynamically select training data sources accordingly, automatically strengthen learning for model weaknesses, and automatically reduce or freeze the weight of already qualified domains to avoid repetitive learning and overfitting. This threshold-driven capability detection mechanism shifts the training process from static equilibrium to dynamic focus, allowing the model to concentrate on optimizing its own shortcomings at different stages and achieve adaptive evolution.

[0055] (3) Upgrading from one-way distillation to closed-loop knowledge feedback to achieve long-term self-reinforcement of the model. The traditional distillation or fine-tuning learning process is one-way. The knowledge of the teacher model cannot be continuously updated into the external memory of the student model, resulting in low knowledge utilization and static training results. After ability difference detection, this disclosure automatically stores the significantly different task samples (including input, expert-generated results and difference annotations) into the RAG external knowledge base (Retrieval-Augmented Memory) to form a dynamic and searchable knowledge completion system. The model can actively retrieve and integrate these knowledge samples in the subsequent generation and fine-tuning process. At the same time, the system periodically re-incorporates high-confidence entries in RAG into the training process to achieve closed-loop optimization of "generation-detection-feedback-relearning". Through this mechanism, the model has the ability to continuously absorb new knowledge and correct old knowledge, realizing the transformation from one-time distillation training to long-term knowledge evolution, and enabling the large model to have the characteristics of continuous self-reinforcement and self-evolution.

[0056] In summary, this disclosure achieves a comprehensive upgrade of the training signal source, optimization mechanism, and knowledge loop system at the structural level. It maintains high-quality generation under the guidance of expert models and achieves continuous optimization through threshold detection and external knowledge feedback, significantly improving the model's inference stability, knowledge integrity, and cross-task generalization ability.

[0057] Figure 2 This is a schematic diagram of the structure of a text processing apparatus 20 provided for an exemplary embodiment of this disclosure. (See diagram below.) Figure 2 As shown, the text processing device 20 includes: an acquisition module 21, a selection module 22, a first generation module 23, a second generation module 24, and an execution module 25.

[0058] The acquisition module 21 is used to acquire the prompt words input by the user, as well as the corresponding task type, contextual semantics, and input features of the prompt words; Selection module 22 is used to select the target expert model from multiple sub-expert models based on task type, contextual semantics, and input features. The first generation module 23 is used to input the prompt words into the native general base model to obtain the original answer result; The second generation module 24 is used to input the prompt words into the target expert model to obtain the target prediction result; Execution module 25 is used to perform knowledge completion operations based on the similarity between the original answer results and the target prediction results.

[0059] Optionally, when selecting the target expert model from multiple sub-expert models based on task type, contextual semantics, and input features, the selection module 22 is used to: By inputting the task type, contextual semantics, and input features into the gating network, the selection probability of each sub-expert model is obtained; The target expert model that meets the set probability conditions is selected from multiple sub-expert models based on the selection probability.

[0060] Optionally, there are multiple target expert models. When the second generation module 24 inputs the prompt words into the target expert model and obtains the target prediction result, it is used for: Input the prompt words into multiple target expert models to obtain multiple candidate prediction results; Select the target prediction result from multiple candidate prediction results.

[0061] Optionally, when selecting the target prediction result from multiple candidate prediction results, the second generation module 24 is used to: The target prediction result is selected from multiple candidate prediction results by using any one of the following methods: multi-expert voting, inference path verification, and fact consistency detection.

[0062] Optionally, the similarity is a comprehensive difference value; when performing knowledge completion operations based on the similarity between the original answer result and the target prediction result, the execution module 25 is used for: Calculate the combined difference between the original answer and the target prediction; If the overall difference value exceeds the preset capability alignment threshold, then a knowledge completion operation will be performed; If the overall difference value is less than or equal to the preset capability alignment threshold, then the original answer result and the target prediction result are determined to be consistent.

[0063] Optionally, when the execution module 25 performs the knowledge completion operation if the overall difference value is greater than the preset capability alignment threshold, it is used to: If the overall difference value is greater than the preset capability alignment threshold, the knowledge sample corresponding to the prompt word will be stored in an external knowledge base in a structured manner.

[0064] Optionally, the knowledge sample includes any one of the following: prompt words, target prediction results, difference labels, similar task indexes, and timestamps and task classification information.

[0065] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0066] Figure 3 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of the present disclosure. For example... Figure 3 As shown, the electronic device includes a memory 31 and a processor 32. Additionally, the electronic device also includes a power supply component 33 and a communication component 34.

[0067] Memory 31 is used to store computer programs and can be configured to store various other data to support operation on the electronic device. Examples of this data include instructions for any application or method used to operate on the electronic device.

[0068] The memory 31 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0069] Communication component 34 is used for data transmission with other devices.

[0070] The processor 32 can execute computer instructions stored in the memory 31 to: obtain prompt words input by the user, as well as the corresponding task type, contextual semantics, and input features of the prompt words; select a target expert model from multiple sub-expert models based on the task type, contextual semantics, and input features; input the prompt words into the native general-purpose base model to obtain the original answer result; input the prompt words into the target expert model to obtain the target prediction result; and perform knowledge completion operation based on the similarity between the original answer result and the target prediction result.

[0071] Accordingly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program. When the computer-readable storage medium stores a computer program, and the computer program is executed by one or more processors, it causes one or more processors to perform... Figure 1 Each step in the method embodiment.

[0072] Accordingly, embodiments of this disclosure also provide a computer program product, which includes a computer program / instructions that are executed by a processor. Figure 1 Each step in the method embodiment.

[0073] The above Figure 3 The communication component is configured to facilitate wired or wireless communication between the device containing the communication component and other devices. The device containing the communication component can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G / LTE, 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA) technology, Ultra-Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0074] The above Figure 3 The power supply component provides power to the various components of the device in which it resides. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which it resides.

[0075] The aforementioned electronic devices also include a display screen and audio components.

[0076] The display includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions, but also the duration and pressure associated with the touch or swipe operation.

[0077] An audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC) configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, or voice recognition mode. The received audio signals may be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.

[0078] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0079] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0080] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0081] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0082] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0083] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0084] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0085] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0086] The above are merely specific embodiments of this disclosure, enabling those skilled in the art to understand or implement this disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to these embodiments, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A text processing method, characterized in that, include: Obtain the prompt words input by the user, as well as the corresponding task type, contextual semantics, and input features of the prompt words; Based on the task type, the contextual semantics, and the input features, a target expert model is selected from multiple sub-expert models; Input the prompt words into the native universal base model to obtain the original answer result; The prompt words are input into the target expert model to obtain the target prediction result; Based on the similarity between the original answer and the target prediction, a knowledge completion operation is performed.

2. The method according to claim 1, characterized in that, The step of selecting a target expert model from multiple sub-expert models based on the task type, the contextual semantics, and the input features includes: The task type, the context semantics, and the input features are input into the gating network to obtain the selection probability of each sub-expert model; The target expert model that satisfies the set probability condition is selected from multiple sub-expert models based on the selection probability.

3. The method according to claim 1, characterized in that, The target expert model is multiple, and the step of inputting the prompt word into the target expert model to obtain the target prediction result includes: The prompt words are input into multiple target expert models to obtain multiple candidate prediction results; The target prediction result is selected from the multiple candidate prediction results.

4. The method according to claim 3, characterized in that, The step of selecting the target prediction result from the plurality of candidate prediction results includes: The target prediction result is selected from multiple candidate prediction results using any one of the following methods: multi-expert voting, inference path verification, and fact consistency detection.

5. The method according to claim 1, characterized in that, The similarity is a comprehensive difference value; the step of performing knowledge completion operation based on the similarity between the original answer result and the target prediction result includes: Calculate the combined difference between the original answer and the target prediction; If the overall difference value is greater than the preset capability alignment threshold, then a knowledge completion operation is performed; If the overall difference value is less than or equal to the preset capability alignment threshold, then the original answer result and the target prediction result are determined to be consistent.

6. The method according to claim 5, characterized in that, If the overall difference value is greater than a preset capability alignment threshold, then a knowledge completion operation is performed, including: If the overall difference value is greater than the preset capability alignment threshold, the knowledge sample corresponding to the prompt word will be structured and stored in an external knowledge base.

7. The method according to claim 6, characterized in that, The knowledge sample includes any one of the following: the prompt words, the target prediction results, the difference labels, the similar task index, and the timestamp and task classification information.

8. A text processing device, characterized in that, include: The acquisition module is used to acquire the prompt words input by the user, as well as the corresponding task type, contextual semantics, and input features of the prompt words; The selection module is used to select a target expert model from multiple sub-expert models based on the task type, the context semantics, and the input features. The first generation module is used to input the prompt words into the native general base model to obtain the original answer result; The second generation module is used to input the prompt words into the target expert model to obtain the target prediction result; The execution module is used to perform knowledge completion operations based on the similarity between the original answer and the target prediction result.

9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to execute instructions to implement the steps of the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.