Text processing method and device, computer readable medium and electronic equipment

By retrieving and extracting knowledge point features from a pre-set question bank and combining them with a large language model to generate answers, the problem of insufficient accuracy in existing text processing systems is solved, and more accurate answer generation is achieved.

CN122072645APending Publication Date: 2026-05-22TENCENT DIGITAL TIANJIN
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TENCENT DIGITAL TIANJIN
Filing Date
2024-11-21
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

Existing text processing systems struggle to find accurate answers to user queries that have significantly different text descriptions but the same actual meaning, resulting in insufficient processing accuracy.

Method used

By retrieving the first question-and-answer information that matches the question information from a pre-set question bank, extracting knowledge point features, and combining them with a large language model to generate target answer information, the accuracy of the answer is improved by integrating traditional matching and knowledge point matching methods.

Benefits of technology

It improves the accuracy of text processing, and the generated answers can refer to more and more accurate question and answer information, thus enhancing the quality of responses to user questions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122072645A_ABST
    Figure CN122072645A_ABST
Patent Text Reader

Abstract

The invention discloses a text processing method and device, a computer readable medium and electronic equipment, a natural language processing technology is applied, the text processing method comprises the steps that retrieval is conducted in a preset question bank according to question information, and first question and answer information matched with the question information is obtained; performing knowledge point feature extraction on the question information to obtain knowledge point features of the question information; the knowledge point features indicate knowledge points involved when the question information is answered; retrieving in a preset question bank according to the knowledge point features to obtain second question and answer information matched with the knowledge point features; and generating target answer information corresponding to the question information according to the question information, the first question and answer information and the second question and answer information. According to the technical scheme, the question and answer information obtained in a traditional matching mode and the question and answer information obtained based on a knowledge point matching mode are fused, so that generation of the target answer information can refer to more and more accurate question and answer information, and the accuracy of the target answer information is improved, namely, the accuracy of text processing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of natural language processing technology, specifically relating to a text processing method, apparatus, computer-readable medium, and electronic device. Background Technology

[0002] With the development of technology, intelligent question answering technology is being used in more and more scenarios. In intelligent question answering technology, users ask questions in natural language, and text processing systems provide accurate and relevant answers by understanding the content and context of the questions. Currently, when processing user questions, text processing systems typically first search a question bank for questions that are similar to the user's question, and then return the answers to those questions as the answers to the user's question. This approach usually only yields high accuracy for questions with similar text descriptions. For questions with significantly different text descriptions but the same actual meaning, it is difficult to find an accurate answer; therefore, the accuracy of text processing needs to be improved. Summary of the Invention

[0003] The purpose of this application is to provide a text processing method, apparatus, computer-readable medium, and electronic device to improve the accuracy of text processing.

[0004] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.

[0005] According to one aspect of the embodiments of this application, a text processing method is provided, including:

[0006] Based on the question information, a first question and answer information matching the question information is obtained by searching a preset question bank.

[0007] The question information is subjected to knowledge point feature extraction to obtain the knowledge point features of the question information; the knowledge point features indicate the knowledge points involved in answering the question information;

[0008] Based on the characteristics of the knowledge points, a second question and answer information matching the characteristics of the knowledge points is obtained by searching the preset question bank.

[0009] The target answer information corresponding to the question information is generated based on the question information, the first question and answer information, and the second question and answer information.

[0010] According to one aspect of the embodiments of this application, a text processing apparatus is provided, comprising:

[0011] The first retrieval module is used to retrieve first question and answer information that matches the question information from a preset question bank based on the question information.

[0012] The knowledge feature extraction module is used to extract knowledge point features from the question information to obtain the knowledge point features of the question information; the knowledge point features indicate the knowledge points involved in answering the question information.

[0013] The second retrieval module is used to retrieve second question and answer information that matches the knowledge point features from the preset question bank.

[0014] The answer generation module is used to generate target answer information corresponding to the question information based on the question information, the first question and answer information, and the second question and answer information.

[0015] In one embodiment of this application, the knowledge feature extraction module includes:

[0016] The knowledge point extraction unit is used to extract knowledge points from the question information to obtain the knowledge point text corresponding to the question information.

[0017] The feature extraction unit is used to extract features from the knowledge point text to obtain the knowledge point features of the question information.

[0018] In one embodiment of this application, the feature extraction unit is specifically used for:

[0019] The knowledge point text is segmented to obtain the word sequence corresponding to the knowledge point text;

[0020] The word sequence is embedded to obtain the word embedding representation corresponding to the knowledge point text;

[0021] The word embedding representation is used to extract features by multilayer transformer encoder to obtain the knowledge point features of the question information.

[0022] In one embodiment of this application, the knowledge point extraction unit is specifically used for:

[0023] Fill the question information into the knowledge point prompt template to obtain the knowledge point prompt information;

[0024] The knowledge point prompts are processed using a large language model to obtain the knowledge point text corresponding to the question.

[0025] In one embodiment of this application, the answer generation module is specifically used for:

[0026] The first question and answer information and the second question and answer information are filled into the known content field of the preset prompt template, and the question information is filled into the question field of the preset prompt template to obtain the question prompt information;

[0027] The question prompt information is processed by a large language model to obtain the target answer information corresponding to the question prompt information.

[0028] In one embodiment of this application, the answer generation module is specifically used for:

[0029] Based on the order of increasing similarity to the question information, the first question and answer information and the second question and answer information are sequentially filled into the known content field of the preset prompt template to obtain the question prompt template.

[0030] In one embodiment of this application, the second retrieval module is specifically used for:

[0031] Extract knowledge point features from each question in the preset question bank to obtain the knowledge point features of each question.

[0032] Calculate the similarity between the knowledge point features and the knowledge point features of each question, and determine at least one second question knowledge point feature whose similarity meets the conditions;

[0033] The question corresponding to the knowledge point feature of the second question is taken as the second question, and the second question and the second answer corresponding to the second question are taken as the second question and answer information that matches the knowledge point feature.

[0034] In one embodiment of this application, the first retrieval module is specifically used for:

[0035] Feature extraction is performed on the question information to obtain the question features of the question information;

[0036] Feature extraction is performed on each question in the preset question bank to obtain the features of each question;

[0037] Based on the similarity between the question feature and each question feature, a first question feature that matches the question feature is obtained;

[0038] The question corresponding to the first question feature is taken as the first question, and the first question and the first answer corresponding to the first question are taken as the first question and answer information that matches the question information.

[0039] According to one aspect of the embodiments of this application, a computer-readable medium is provided, on which a computer program is stored, which, when executed by a processor, implements the text processing method as described in the above technical solutions.

[0040] According to one aspect of the embodiments of this application, an electronic device is provided, the electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor executes the executable instructions to cause the electronic device to perform a text processing method as described in the above technical solutions.

[0041] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the text processing method as described in the above technical solutions.

[0042] In the technical solution provided in this application embodiment, the text processing system, on the one hand, searches in a preset question bank based on the question information to obtain first question-and-answer information matching the question information; on the other hand, it extracts knowledge point features from the question information to obtain knowledge point features of the question information; the knowledge point features indicate the knowledge points involved in answering the question information; and searches in the preset question bank based on the knowledge point features to obtain second question-and-answer information matching the knowledge point features; finally, it generates target answer information corresponding to the question information based on the question information, the first question-and-answer information, and the second question-and-answer information. Thus, in the process of answering the question information, it integrates question-and-answer information obtained by traditional matching methods and question-and-answer information obtained by knowledge point matching methods, so that the generation of target answer information can refer to more and more accurate question-and-answer information, thereby improving the accuracy of target answer information, which in turn improves the accuracy of text processing.

[0043] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0044] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0045] Figure 1 An exemplary system architecture block diagram illustrating the application of the technical solution of this application is shown schematically.

[0046] Figure 2 This schematically illustrates the application of the technical solution of this application to... Figure 1 The diagram shows the technical principle of the text processing system.

[0047] Figure 3 A flowchart illustrating a text processing method provided in one embodiment of this application is shown schematically.

[0048] Figure 4A flowchart illustrating a text processing method provided in one embodiment of this application is shown schematically.

[0049] Figure 5 A flowchart illustrating a text processing method provided in one embodiment of this application is shown schematically.

[0050] Figure 6 A schematic block diagram of the text processing apparatus provided in an embodiment of this application is shown.

[0051] Figure 7 A schematic diagram of a computer system architecture suitable for implementing the embodiments of this application is shown. Detailed Implementation

[0052] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.

[0053] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.

[0054] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0055] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0056] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0057] The technical solutions proposed in this application utilize natural language processing (NLP) technology, which is a branch of artificial intelligence (AI). The following section provides a brief introduction to AI and NLP technologies.

[0058] I. Artificial Intelligence Technology.

[0059] Artificial intelligence (AI) technology is a comprehensive technology within computer science that primarily focuses on studying the essence of intelligence in order to produce machines or devices capable of reacting in a manner similar to human intelligence. Specifically, AI technology mainly studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making capabilities. In practical applications, AI technology can utilize digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, allowing these machines to perceive their environment and acquire knowledge. Therefore, AI technology encompasses the theories, methods, techniques, and application systems that enable digital computers or related machines to utilize their learned knowledge to achieve optimal results.

[0060] With the research and advancement of artificial intelligence (AI) technology, it has been studied and applied in various aspects of life, such as smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, autonomous driving, drones, robots, smart healthcare, and smart customer service. It is believed that with further technological development, AI will be applied in even more fields and play an increasingly important role. Therefore, it is easy to see that AI technology involves not only hardware-level technologies (or AI hardware technology) but also software-level technologies (or AI software technology). Specifically, AI hardware technology generally refers to technologies such as sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operating / interaction systems, and mechatronics. AI software technology generally refers to technologies such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning technology.

[0061] II. Natural Language Processing Technology.

[0062] Natural Language Processing (NLP) is an important branch of artificial intelligence. It primarily focuses on researching theories and methods to enable effective communication between humans and computers using natural language (i.e., the language people use in daily life), making NLP a science and technology integrating linguistics, computer science, and mathematics. In practical applications, NLP is often combined with machine learning / deep learning techniques to construct neural network models for implementing NLP (such as the large language model in this application). The neural network used to construct this model can reflect the behavior of the human brain, allowing computer programs to learn and recognize patterns based on training data, thereby solving common problems in current artificial intelligence, machine learning, and deep learning fields. Therefore, it can be understood that the large language model mentioned in subsequent embodiments of this application can specifically be a large language model with semantic understanding capabilities obtained by training on training data.

[0063] Based on the aforementioned artificial intelligence and natural language processing technologies, this application proposes a text processing method. Figure 1 A schematic diagram illustrating the architecture of a text processing system applying the technical solution of this application is shown. Figure 1 As shown, the text processing system includes a terminal device 110, a network 120, and a server 130. The terminal device 110 may include smartphones, tablets, laptops, smart voice interaction devices, smart home appliances, in-vehicle terminals, etc. The server 130 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The network 120 may be a communication medium of various connection types capable of providing a communication link between the terminal device 110 and the server 130, such as a wired communication link or a wireless communication link.

[0064] Depending on the implementation requirements, the system architecture in this application embodiment can have any number of terminal devices 110, network 120, and server 130. For example, server 130 can be a server group composed of multiple server devices. In addition, the technical solutions provided in this application embodiment can be applied to terminal device 110, or to server 130, or can be implemented jointly by terminal device 110 and server 130. This application does not impose any special limitations on this.

[0065] In one embodiment of this application, Figure 2 This schematically illustrates the application of the technical solution of this application to... Figure 1 The diagram illustrates the technical principles of the text processing system shown. Figure 2 As shown, the person asking the question can use a question client to ask a question. The question client can be deployed on... Figure 1 In the terminal device 110 shown, after receiving the question information, the questioning client sends the question information to the questioning server, which can be deployed on... Figure 1 In server 130 shown, after receiving the question information, the question server performs two processes simultaneously: first, it directly uses the question information to detect in a preset question bank to obtain the first question-and-answer information that matches the question information; second, it extracts knowledge point features from the question information and uses the extracted knowledge point features to detect in the preset question bank to obtain the second question-and-answer information that matches the question information. Finally, the question server merges the question information, the first question-and-answer information, and the second question-and-answer information to obtain the final target answer information. The question server returns the target answer information to the question client, and the questioner obtains the target answer information through the question client. In this embodiment, the question server and the preset question bank can be deployed on the same server device or on different server devices.

[0066] The text processing method provided in this application can be applied to question-and-answer scenarios, where a user asks a question to the text processing system, and the system uses the technical solution of this application to provide an answer. For example, the application scenarios of the technical solution of this application can include customer service question-and-answer scenarios, educational question-and-answer scenarios, intelligent assistant question-and-answer scenarios, medical consultation question-and-answer scenarios, and information retrieval question-and-answer scenarios.

[0067] The text processing method provided in this application will be described in detail below with reference to specific implementation methods.

[0068] Figure 3 The flowchart of a text processing method provided in one embodiment of this application is illustrated schematically. This method can be implemented by a text processing system, which can be implemented via a terminal device or a server, such as... Figure 1 The terminal device 110 or server 130 shown below will be used as an example to illustrate the specific implementation process of the method, with a text processing system as the execution subject. Figure 3 As shown, the text processing method provided in this embodiment includes steps 310 to 340, as detailed below:

[0069] Step 310: Search the preset question bank based on the question information to obtain the first question and answer information that matches the question information.

[0070] Specifically, the question information can be provided to the text processing system by the questioner through voice input, keyboard input, gesture input, or other means. After receiving the input information, the text processing system can detect whether the input information contains image or video information. If the input information does not contain image or video information, the text processing system can convert the input information into text information, thus obtaining the question information in plain text form. If the input information contains image or video information, the text processing system can keep the image or video information unchanged and convert the rest of the input information into text information, thus obtaining the question information in a combined image and text form.

[0071] After receiving the question information, the text processing system searches a preset question bank using the question information to obtain the question data that matches the question information, which serves as the first question-and-answer information. The preset question bank includes at least two pre-set questions and may also include the answers to each question. When searching in the preset question bank, the text content of the question information can be matched with the text content of each question in the preset question bank. The question with the highest matching degree is selected as the first question that matches the question information, and then the first question and its first answer are used as the first question-and-answer information.

[0072] Step 320: Extract knowledge point features from the question information to obtain the knowledge point features of the question information; the knowledge point features indicate the knowledge points involved in answering the question information.

[0073] Specifically, knowledge points refer to the basic facts, concepts, principles, skills, etc., required to master or understand a particular technology. They are the basic units that constitute a knowledge system. Therefore, to solve or answer a question, it is necessary to master the corresponding knowledge points. In this embodiment, knowledge point feature extraction is performed on the question information to extract the knowledge points involved in answering the question. Subsequently, the question information can be answered based on the extracted knowledge point features, thereby improving the accuracy of the given answer.

[0074] In one embodiment of this application, knowledge point features can be extracted from the question information by a pre-trained knowledge point extraction model. Here, the knowledge point extraction model can be a natural language processing model with a large number of model parameters and / or a complex network structure, such as a large language model (LLM).

[0075] Step 330: Search the preset question bank based on the characteristics of the knowledge points to obtain the second question and answer information that matches the characteristics of the knowledge points.

[0076] Specifically, the process of searching the preset question bank based on knowledge point features is similar to the process of searching the preset question bank based on question information; both involve finding questions with high matching degrees within the preset question bank. Before this step, knowledge point features can be extracted from each question in the preset question bank to obtain a preset knowledge feature database, which includes the knowledge point features of each question. During the search, the knowledge point features of the question information are matched with the knowledge point features of each question in the preset knowledge feature database. The knowledge point features of questions with high matching degrees are extracted, and the questions and answers corresponding to these knowledge point features are used as the second question-and-answer information.

[0077] Step 340: Generate the target answer information corresponding to the question information based on the question information, the first question and answer information, and the second question and answer information.

[0078] Specifically, the text processing system can still use a pre-trained question-answering model to process the question information, the first question-answer information, and the second question-answer information to generate the target answer information. Here, the question-answering model can also be a large language model. The first and second question-answer information are extracted from a pre-set question bank based on two different aspects and are relatively matched with the question information. Therefore, the first and second question-answer information can serve as accurate reference information when answering the question information, thus enabling the target answer information to be generated based on more reference information and improving the accuracy of the target answer information. At the same time, since the second question-answer information is based on the knowledge points involved in answering the question information, using the second question-answer information as reference information can take into account the knowledge points involved in the question information when generating the target answer information, thereby further improving the accuracy of the target answer information.

[0079] In the technical solution provided in this application embodiment, the text processing system, on the one hand, searches in a preset question bank based on the question information to obtain first question-and-answer information matching the question information; on the other hand, it extracts knowledge point features from the question information to obtain knowledge point features of the question information; the knowledge point features indicate the knowledge points involved in answering the question information; and searches in the preset question bank based on the knowledge point features to obtain second question-and-answer information matching the knowledge point features; finally, it generates target answer information corresponding to the question information based on the question information, the first question-and-answer information, and the second question-and-answer information. Thus, in the process of answering the question information, it integrates question-and-answer information obtained by traditional matching methods and question-and-answer information obtained by knowledge point matching methods, so that the generation of target answer information can refer to more and more accurate question-and-answer information, thereby improving the accuracy of target answer information, which in turn improves the accuracy of text processing.

[0080] Figure 4 A flowchart illustrating a text processing method provided in one embodiment of this application is shown schematically. This embodiment is a further refinement of the above embodiment. Figure 4As shown, the text processing method provided in this application includes the following steps:

[0081] Step 410: Search the preset question bank based on the question information to obtain the first question and answer information that matches the question information.

[0082] Specifically, the specific implementation of step 410 can be found in the relevant description in step 310 above, and will not be repeated here.

[0083] In one embodiment of this application, when searching a preset question bank based on question information, features can first be extracted from both the question information and each question in the preset question bank to obtain the question features and each question feature. Then, the question features are matched with each question feature. This matching process can be achieved through the similarity between features, i.e., the similarity between the question features and each question feature is calculated separately. Finally, at least one question feature with a similarity greater than a threshold can be used as the first question feature matched with the question feature, or the question feature with the highest similarity can be used as the first question feature matched with the question feature. The question corresponding to this first question feature is then the first question, and the answer to this first question is denoted as the first answer. Thus, the first question and the first answer are considered as the first question-and-answer information. It can be seen that the first question-and-answer information is information that has a similar question to the question information itself.

[0084] In one embodiment of this application, the process of extracting features from question information or each question in a preset question bank may include several steps such as word segmentation, embedding representation, and multilayer transformer encoder processing, which is similar to the process of extracting features from knowledge point text later in the text. For details, please refer to the description of extracting features from knowledge point text later in the text.

[0085] In one embodiment of this application, the process of extracting features from each question in the preset question bank can be performed in advance. For example, after constructing the preset question bank, features can be extracted from each question immediately, and the extracted question features can be used as data in the preset feature library. When a question is received, the text processing system can directly use the extracted question features to compare and match with the question features in the question information to determine the first question and answer information.

[0086] In one embodiment of this application, the similarity between the question feature and the topic feature can be represented by the cosine similarity between them, as shown in the following formula:

[0087]

[0088] Among them, cosine similarity(u,v) represents the cosine similarity between vectors u and v. In this embodiment, one of vectors u and v can be represented by a question feature, and the other by a topic feature. In the expression for this cosine similarity, the numerator is the dot product of the two vectors, and the denominator is the product of the norms of the two vectors.

[0089] Step 420: Extract knowledge points from the question information to obtain the knowledge point text corresponding to the question information.

[0090] Specifically, knowledge point extraction refers to determining the knowledge points used to answer the question. For example, if the question is to solve a quadratic equation, the knowledge point could be "quadratic equation". In this embodiment, the question can be input into a large language model, which then outputs the knowledge point text.

[0091] In one embodiment of this application, when extracting knowledge points, the text processing system can first fill the question information into a knowledge point prompt template to obtain knowledge point prompt information; then, it can process the knowledge point prompt information through a large language model to obtain the knowledge point text corresponding to the question information. The knowledge point prompt template contains at least one knowledge point extraction reference example, which includes a preset question and the knowledge points involved in that preset question. For example, a knowledge point extraction reference example is shown below:

[0092] Question: Calculate the given equation: 15 / 19 + 23 / 19 - 7 / 4, and list the detailed calculation steps.

[0093] Key concepts: addition and subtraction of fractions, finding a common denominator

[0094] The knowledge point hint template also includes a question fill field, which is used to fill in the question information. Generally, the question fill field is located after the knowledge point extraction reference example. After filling the question information into the knowledge point hint template, the obtained knowledge point hint information is then input into the large language model. The large language model outputs the knowledge points involved in the question information. These knowledge points are represented in text form and are therefore denoted as knowledge point text.

[0095] Step 430: Extract features from the knowledge point text to obtain the knowledge point features of the question information.

[0096] Specifically, feature extraction from knowledge point text can be seen as a process of vectorizing the knowledge point text, where the extracted knowledge point features are represented in vector form.

[0097] In one embodiment of this application, the feature extraction process may be as follows: performing word segmentation on the knowledge point text to obtain the word sequence corresponding to the knowledge point text; performing embedding representation on the word sequence to obtain the word embedding representation corresponding to the knowledge point text; and performing feature extraction on the word embedding representation through a multilayer transformer encoder to obtain the knowledge point features of the question information.

[0098] Tokenization is used to break down knowledge point text into smaller units, usually called "tokens." During tokenization, the string in the knowledge point text is matched against words in a pre-defined vocabulary. A match is formed when a word is found. The matching process proceeds from left to right, with the minimum string length being 1 and the maximum length being the entire knowledge point text. If a match is found, the next match continues with the characters following the matched character; if no match is found, the length of the matched string is increased for the next match. A match means a word matching the string is found in the pre-defined vocabulary, while a no-match means no word matching the string is found in the pre-defined vocabulary.

[0099] For example: First, the first character of the knowledge point text is matched with a word in a preset vocabulary list. If no matching word is found, the first two characters of the knowledge point text are then matched with words in the preset vocabulary list. If a matching word is found, the third character of the knowledge point text is then matched with words in the preset vocabulary list. If a matching word is found, the fourth character of the knowledge point text is matched with words in the preset vocabulary list. If no matching word is found, the fourth and fifth characters of the knowledge point text are matched with words in the preset vocabulary list, and so on, until all characters of the knowledge point text have been traversed. For example, the knowledge point text "univariate quadratic equation" can be segmented into the word sequence "univariate, quadratic, equation", which contains three words.

[0100] Optionally, when at least two word sequences are obtained after word segmentation of the knowledge point text, the at least two word sequences can be selected according to the principle of minimum word count, that is, the word sequence with the smallest number of words is taken as the final required word sequence.

[0101] Embedding a word sequence is equivalent to vectorizing it, also known as embedding processing. In this embodiment, the word embedding representation includes two parts: token embeddings and position embeddings. Token embeddings are obtained by embedding the content of the word sequence itself. For example, the index of each word in the word sequence within a preset vocabulary can be used as the word embedding information for each word. This word embedding information can be obtained through a model, such as the BERT model. For example, after word segmentation, the knowledge point text Q yields a word sequence {q1,q2,…,qm}, where qi represents the i-th word in the knowledge point text Q, and m represents the total number of words in the knowledge point text Q; the corresponding word embedding information can be represented as Tokenized(Q) = {t q1 ,t q2 ,…,t qm}, t qi This represents the index of the i-th word in the knowledge point text Q within the preset vocabulary.

[0102] Considering the relative positional relationships between words, and how different combinations of words can produce different semantics, the positional information of words is extracted and converted into vectors during embedding representation to generate positional embedding information. The word embedding information and the positional embedding information have the same length; these are then superimposed to obtain the complete word embedding representation.

[0103] After obtaining the word embedding representation, it is input into a multilayer transformer encoder for feature extraction to obtain the knowledge point features of the query information. The multilayer transformer encoder, also known as a multi-layer Transformer encoder, includes a multi-head self-attention mechanism and a feedforward neural network in each layer of the encoder. In the multi-head self-attention mechanism, the word embedding representation undergoes three different linear transformations to obtain three different parameters: Q (Query), K (Key), and V (Value). Each head has its own independent Q, K, and V parameters. Finally, the outputs of all heads are concatenated and then fused through the feedforward neural network to obtain the final knowledge point features.

[0104] Step 440: Search the preset question bank based on the characteristics of the knowledge points to obtain the second question and answer information that matches the characteristics of the knowledge points.

[0105] Specifically, the specific implementation of step 440 can be found in the relevant description in step 330 above, and will not be repeated here.

[0106] In one embodiment of this application, when searching in a preset question bank based on knowledge point features, knowledge point features can be extracted from each question in the preset question bank first. The process of extracting knowledge point features from each question is similar to that of extracting knowledge point features from the question information, and will not be described again. Then, the knowledge point features of the question information are matched with the knowledge point features of each question. This matching process can be achieved through the similarity between features, i.e., calculating the similarity between the knowledge point features of the question information and the knowledge point features of each question. Finally, at least one question knowledge point feature with a similarity greater than a threshold can be used as the second question knowledge point feature matched with the knowledge point features of the question information, or the question feature with the highest similarity can be used as the second question feature matched with the question features. The question corresponding to this second question feature is the second question, and the answer corresponding to this second question is recorded as the second answer. Thus, the second question and the second answer are used as the second question-and-answer information. It can be seen that the second question-and-answer information is question-and-answer information that is relevant to the knowledge points involved in the question information.

[0107] In one embodiment of this application, the similarity calculation process between knowledge point features can refer to the aforementioned similarity calculation process between question features and topic features, and will not be repeated here. The similarity threshold involved in the extraction of the second question's knowledge point features can be the same as or different from the similarity threshold involved in the extraction of the first question's features.

[0108] In one embodiment of this application, the extraction of knowledge point features for each question in the preset question bank can be performed in advance, for example, immediately after the preset question bank is constructed. When the question information currently issued by the questioner is obtained, the text processing system can directly use the pre-extracted knowledge point features of each question to compare and match with the knowledge point features of the question information to obtain the second question-and-answer information.

[0109] Step 450: Generate the target answer information corresponding to the question information based on the question information, the first question and answer information, and the second question and answer information.

[0110] Specifically, the specific implementation of step 450 can be found in the relevant description in step 340 above, and will not be repeated here.

[0111] In the technical solution provided in this application embodiment, when the text processing system extracts knowledge point features, it first extracts the knowledge point text, and then performs feature extraction on the knowledge point text to obtain vectorized knowledge point features. This allows for retrieval based on vectorized data when searching in a preset question bank according to the knowledge point features, facilitating the calculation of the matching degree between knowledge point features, thereby improving the accuracy of the obtained second question-and-answer information. Finally, based on the question information, the first question-and-answer information, and the second question-and-answer information, the target answer information corresponding to the question information is generated, improving the accuracy of text processing.

[0112] In one embodiment of this application, when generating target answer information, question prompt information can be constructed first based on the question information, the first question-and-answer information, and the second question-and-answer information. Then, the question prompt information is input into a large language model to obtain the target answer information corresponding to the question information. Specifically, the question prompt information is generated based on a preset prompt template. The preset prompt template includes a known content field and a question field. The known content field is used to fill in the specific question and its corresponding answer, while the question field is used to fill in the question information currently raised by the questioner. Thus, the text processing system can fill the known content field with the first and second question-and-answer information and the question field with the question information to obtain the question prompt information.

[0113] In one embodiment of this application, when filling the first and second question-and-answer information into a preset prompt template, the similarity between each information and the question information must be considered. Specifically, the text processing system can fill the first and second question-and-answer information into the known content field of the preset prompt template in ascending order of similarity to the question information. That is, the question-and-answer information with lower similarity to the question information is filled into the earlier positions of the known content field, and the question-and-answer information with higher similarity to the question information is filled into the later positions of the known content field. In this way, when the large language model processes the question prompt information, it can gradually learn the question-and-answer information with higher similarity to the question information, thereby obtaining more accurate target answer information. For example, the first question-and-answer information includes question-and-answer information A and question-and-answer information B, and the second question-and-answer information includes question-and-answer information C and question-and-answer information D. The similarity ranking of each question-and-answer information with the question information is: question-and-answer information A > question-and-answer information C > question-and-answer information D > question-and-answer information B, where "question-and-answer information A > question-and-answer information C" means that the similarity between question-and-answer information A and the question information is greater than that between question-and-answer information C and the question information. When filling in the preset prompt template, fill in the information in the order of "Question and Answer Information B - Question and Answer Information D - Question and Answer Information C - Question and Answer Information A".

[0114] Figure 5A flowchart illustrating a text processing method provided in one embodiment of this application is shown. This embodiment is a further optimization of the above embodiment. The following is in conjunction with... Figure 5 The implementation process of the technical solution in this application will be illustrated by a specific example of an educational question-and-answer scenario.

[0115] like Figure 5 As shown, the question information initiated by the questioner is recorded as a question. After the text processing system obtains the question, it processes it in two aspects, specifically including the following processes:

[0116] First, the text processing system searches a pre-set question bank (hereinafter referred to as the question bank) based on the question itself to obtain the first question-and-answer information, namely... Figure 5 The search results for the questions are as follows. The process of searching the question bank based on the question itself specifically includes: first, inputting the question into a feature model to extract features from the question; this feature extraction process is the same as the aforementioned feature extraction process for the question information, which will not be elaborated further here; then, searching the question bank based on the question features output by the feature model. This retrieval process is... Figure 5 The process of question retrieval involves extracting features from each question in the question bank, calculating the similarity between the question features and the features of each question, and finally extracting the question and its answer corresponding to the question features with the highest similarity to obtain the question retrieval results.

[0117] Second, the text processing system extracts knowledge point features from the question, and then searches a pre-set question bank based on the extracted knowledge point features to obtain the second question-and-answer information, i.e. Figure 5 The search results for knowledge points in [the document / section / etc.] are as follows. The search process specifically includes the following four steps, S1-S4:

[0118] S1: The text processing system first inputs the question into the large language model, and obtains the knowledge point text extracted by the large language model (i.e., Figure 5 (The knowledge points in the text). During this process, questions can be filled into the knowledge point hint template to obtain knowledge point hint information. For example, the knowledge point hint template is shown below:

[0119]

[0120] In the knowledge point prompt template above, "keywords" represent the knowledge points involved in the question.

[0121] Suppose the current problem is: "There is a two-digit number where the tens digit is twice the units digit. If the tens digit and the units digit are swapped, another two-digit number is obtained. Adding this two-digit number to the original two-digit number results in 66. What was the original two-digit number?" Fill this into the question field of the above knowledge point hint template, i.e., " <question>The field yields the following knowledge point hints:

[0122]

[0123]

[0124] Input the above knowledge point prompts into the large language model. The content output by the large language model in the "keywords" field after the question field is the knowledge point text involved in this question.

[0125] S2: The same approach as step one is used for the question bank to obtain the knowledge points of each question in the question bank.

[0126] S3: Using a feature model, extract features from the knowledge points of the question information and the knowledge points of each question in the question bank to obtain the knowledge point features of the question information and the knowledge point features of each question.

[0127] In this step, the text processing system uses the BERT model to extract features from the knowledge points of the question information and the knowledge points of each question in the question bank. The specific steps are as follows:

[0128] S3.1 Input Text Preprocessing

[0129] The text processing system preprocesses the knowledge points in the question letter and the knowledge points of each question in the question bank. Assuming the knowledge point in the question letter is Q = "quadratic equation", the knowledge point text is tokenized to obtain a word sequence. The index representation of this word sequence in the vocabulary is then used as word embedding information. Assuming the BERT model's vocabulary is V, the tokenized index representation (i.e., word embedding information) is as follows:

[0130] Tokenized(Q) = {t q1 ,t q2 ,…,t qm }

[0131] Among them, t qi ,i∈{1,..,m} is an index in the vocabulary V.

[0132] S3.2 Input Representation

[0133] Each token is converted into its corresponding embedded representation, including token embeddings and position embeddings:

[0134] E Qj =E token (t Qj )+E position (j)

[0135] Word embedding representation E Q ={E Q1 E Q2 ,…,E Qm The input is fed into a multi-layer Transformer encoder, where E Qj This represents the word embedding representation of the j-th text, where E Q It can be viewed as a word embedding representation corresponding to the text set consisting of knowledge point text and knowledge points of each question.

[0136] Each layer of a multi-layer Transformer encoder consists of a multi-head self-attention mechanism and a feedforward neural network. The formula for the attention mechanism is shown below:

[0137]

[0138] Where Q, K, and V are obtained through linear transformations of the input representation:

[0139] Q = EW Q K = EW K V = EW V ,

[0140] The input to the multi-head attention mechanism is:

[0141] MultiHead(Q,K,V)=Concat(head1,head2,…,head h W O

[0142] The calculation method for each head is as follows:

[0143] head i =Attention(QW i Q ,KW i K VW i V )

[0144] W in the above formula Q W K W V W O All of these are model parameters.

[0145] After passing through multiple Transformer encoders, the output representations of the knowledge points and the knowledge points for each question are obtained:

[0146]

[0147] Here, the output of the BERT model with [CLS] notation is used as the embedding vector for the entire input sentence, which is the final required knowledge point feature. Therefore, the final sentence embedding vector (knowledge point feature) is:

[0148] S4 uses the knowledge points in the question information to search for the knowledge points of all questions in the question bank, obtains the question with the highest similarity, and returns its answer.

[0149] In this step, the text processing system uses the knowledge point embedding vector (knowledge point feature) of the question information to retrieve the knowledge point embedding vectors (knowledge point features) of all questions in the question bank, finds the question with the highest similarity, and returns its answer. Cosine similarity is chosen as the retrieval method. The specific steps are as follows:

[0150] S4.1 Calculate cosine similarity

[0151] The formula for calculating cosine similarity is as follows:

[0152]

[0153] Here, u and v are two vectors, the numerator is the dot product of the two vectors, and the denominator is the product of the norms of the two vectors.

[0154] S4.2 Calculate the cosine similarity between the knowledge point features of the question information and the knowledge point features of each question in the question bank.

[0155] The knowledge point characteristic of the question information is E query The knowledge point feature of the i-th question in the question bank is E. knowledge Then, the cosine similarity between the two is:

[0156] similarity i =cosine similarity (E query E knowledge )

[0157] Iterate through all questions in the question bank and find the question with the highest similarity to the question information. Assuming there are N questions in the question bank, we need to find the index i that maximizes the similarity. * :

[0158] i * =argmax i∈{1,2,…,N} similarity i

[0159] After finding the question with the highest similarity, return its answer as part of the second question-and-answer information. Assume the i-th question in the question bank... * The answer to the question is A. i* The returned result is:

[0160]

[0161] For example, the second question-and-answer information is shown below:

[0162]

[0163] Third, the results of question retrieval and knowledge point retrieval are combined and sorted to construct question prompt information.

[0164] Here, similar questions and answers retrieved based on the question information itself (first question and answer information), and questions and answers retrieved based on the knowledge points in the question information (second question and answer information) are populated into the preset prompt template. For example, the preset prompt template is shown below. The following example preset prompt template contains...<sample question1> , <sampleanswer1>and<sample question2> ,<sample answer2> These are all fields with known content, used to populate the aforementioned two types of search results. When populating, they are sorted from lowest to highest similarity, with the least similar fields placed first.<sample question1> and<sample answer1> Place those with high similarity in<sample question2> and<sample answer2> The preset prompt template <question>This is the question field, used to populate the question information.

[0165] Preset prompt template:

[0166]

[0167] The completed question prompt message:

[0168]

[0169]

[0170] At this point, the construction of the question prompt information is complete, which is equivalent to constructing a new question. The new question information integrates questions with similar content and similar knowledge points. Inputting the new question information into the large model helps the large model to answer better, thereby obtaining more accurate target answer information.

[0171] The overall performance indicators for a test set containing 1000 questions from primary and junior high schools using the technical solution of this application are shown below:

[0172] Overall Indicators This application 69.40 Existing solutions 66.70

[0173] The overall index can represent the accuracy of the answer given for the question. It can be seen that the overall index of the technical solution of this application is significantly higher than that of the existing solutions, that is, the answer given by the technical solution of this application is more accurate.

[0174] It should be noted that although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0175] The following describes an embodiment of the apparatus of this application, which can be used to execute the text processing method in the above embodiments of this application. Figure 6 A schematic block diagram of a text processing apparatus provided in an embodiment of this application is shown. Figure 6 As shown, the text processing apparatus provided in this application embodiment includes:

[0176] The first retrieval module 610 is used to retrieve first question and answer information that matches the question information from a preset question bank based on the question information.

[0177] The knowledge feature extraction module 620 is used to extract knowledge point features from the question information to obtain the knowledge point features of the question information; the knowledge point features indicate the knowledge points involved in answering the question information.

[0178] The second retrieval module 630 is used to retrieve second question-and-answer information that matches the knowledge point features from the preset question bank.

[0179] The answer generation module 640 is used to generate target answer information corresponding to the question information based on the question information, the first question and answer information, and the second question and answer information.

[0180] In one embodiment of this application, the knowledge feature extraction module 620 includes:

[0181] The knowledge point extraction unit is used to extract knowledge points from the question information to obtain the knowledge point text corresponding to the question information.

[0182] The feature extraction unit is used to extract features from the knowledge point text to obtain the knowledge point features of the question information.

[0183] In one embodiment of this application, the feature extraction unit is specifically used for:

[0184] The knowledge point text is segmented to obtain the word sequence corresponding to the knowledge point text;

[0185] The word sequence is embedded to obtain the word embedding representation corresponding to the knowledge point text;

[0186] The word embedding representation is used to extract features by multilayer transformer encoder to obtain the knowledge point features of the question information.

[0187] In one embodiment of this application, the knowledge point extraction unit is specifically used for:

[0188] Fill the question information into the knowledge point prompt template to obtain the knowledge point prompt information;

[0189] The knowledge point prompts are processed using a large language model to obtain the knowledge point text corresponding to the question.

[0190] In one embodiment of this application, the answer generation module 640 is specifically used for:

[0191] The first question and answer information and the second question and answer information are filled into the known content field of the preset prompt template, and the question information is filled into the question field of the preset prompt template to obtain the question prompt information;

[0192] The question prompt information is processed by a large language model to obtain the target answer information corresponding to the question prompt information.

[0193] In one embodiment of this application, the answer generation module 640 is specifically used for:

[0194] Based on the order of increasing similarity to the question information, the first question and answer information and the second question and answer information are sequentially filled into the known content field of the preset prompt template to obtain the question prompt template.

[0195] In one embodiment of this application, the second retrieval module 630 is specifically used for:

[0196] Extract knowledge point features from each question in the preset question bank to obtain the knowledge point features of each question.

[0197] Calculate the similarity between the knowledge point features and the knowledge point features of each question, and determine at least one second question knowledge point feature whose similarity meets the conditions;

[0198] The question corresponding to the knowledge point feature of the second question is taken as the second question, and the second question and the second answer corresponding to the second question are taken as the second question and answer information that matches the knowledge point feature.

[0199] In one embodiment of this application, the first retrieval module 610 is specifically used for:

[0200] Feature extraction is performed on the question information to obtain the question features of the question information;

[0201] Feature extraction is performed on each question in the preset question bank to obtain the features of each question;

[0202] Based on the similarity between the question feature and each question feature, a first question feature that matches the question feature is obtained;

[0203] The question corresponding to the first question feature is taken as the first question, and the first question and the first answer corresponding to the first question are taken as the first question and answer information that matches the question information.

[0204] The specific details of the text processing apparatus provided in the various embodiments of this application have been described in detail in the corresponding method embodiments, and will not be repeated here.

[0205] Figure 7 A schematic block diagram of a computer system architecture for implementing an electronic device according to embodiments of the present application is shown.

[0206] It should be noted that, Figure 7 The computer system 700 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0207] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for system operation. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output interface 705 (I / O interface) is also connected to the bus 704.

[0208] The following components are connected to the input / output interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a local area network card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.

[0209] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by central processing unit 701, it performs various functions defined in the system of this application.

[0210] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0211] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0212] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0213] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application.

[0214] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.

[0215] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.< / question> < / question>

Claims

1. A text processing method, characterized in that, include: Based on the question information, a first question and answer information matching the question information is obtained by searching a preset question bank. The question information is subjected to knowledge point feature extraction to obtain the knowledge point features of the question information; The knowledge point features indicate the knowledge points involved in answering the question. Based on the characteristics of the knowledge points, a second question and answer information matching the characteristics of the knowledge points is obtained by searching the preset question bank. The target answer information corresponding to the question information is generated based on the question information, the first question and answer information, and the second question and answer information.

2. The text processing method according to claim 1, characterized in that, The question information is subjected to knowledge point feature extraction to obtain the knowledge point features of the question information, including: Extract knowledge points from the question information to obtain the knowledge point text corresponding to the question information; Feature extraction is performed on the knowledge point text to obtain the knowledge point features of the question information.

3. The text processing method according to claim 2, characterized in that, Feature extraction is performed on the knowledge point text to obtain the knowledge point features of the question information, including: The knowledge point text is segmented to obtain the word sequence corresponding to the knowledge point text; The word sequence is embedded to obtain the word embedding representation corresponding to the knowledge point text; The word embedding representation is used to extract features by multilayer transformer encoder to obtain the knowledge point features of the question information.

4. The text processing method according to claim 2, characterized in that, The question information is processed to extract knowledge points, resulting in the corresponding knowledge point text, including: Fill the question information into the knowledge point prompt template to obtain the knowledge point prompt information; The knowledge point prompts are processed using a large language model to obtain the knowledge point text corresponding to the question.

5. The text processing method according to claim 1, characterized in that, Generate target answer information corresponding to the question information based on the question information, the first question-and-answer information, and the second question-and-answer information, including: The first question and answer information and the second question and answer information are filled into the known content field of the preset prompt template, and the question information is filled into the question field of the preset prompt template to obtain the question prompt information; The question prompt information is processed by a large language model to obtain the target answer information corresponding to the question prompt information.

6. The text processing method according to claim 5, characterized in that, The first and second question-and-answer information are filled into the known content field of the preset prompt template, including: Based on the order of increasing similarity to the question information, the first question and answer information and the second question and answer information are sequentially filled into the known content field of the preset prompt template.

7. The text processing method according to claim 1, characterized in that, Based on the knowledge point features, a second question-and-answer message matching the knowledge point features is obtained by searching the preset question bank, including: Extract knowledge point features from each question in the preset question bank to obtain the knowledge point features of each question. Calculate the similarity between the knowledge point features and the knowledge point features of each question, and determine at least one second question knowledge point feature whose similarity meets the conditions; The question corresponding to the knowledge point feature of the second question is taken as the second question, and the second question and the second answer corresponding to the second question are taken as the second question and answer information that matches the knowledge point feature.

8. The text processing method according to claim 1, characterized in that, Based on the question information, a search is performed in a preset question bank to obtain the first question and answer information that matches the question information, including: Feature extraction is performed on the question information to obtain the question features of the question information; Feature extraction is performed on each question in the preset question bank to obtain the features of each question; Based on the similarity between the question feature and each question feature, a first question feature that matches the question feature is obtained; The question corresponding to the first question feature is taken as the first question, and the first question and the first answer corresponding to the first question are taken as the first question and answer information that matches the question information.

9. A text processing device, characterized in that, include: The first retrieval module is used to retrieve first question and answer information that matches the question information from a preset question bank based on the question information. The knowledge feature extraction module is used to extract knowledge point features from the question information to obtain the knowledge point features of the question information. The knowledge point features indicate the knowledge points involved in answering the question. The second retrieval module is used to retrieve second question and answer information that matches the knowledge point features from the preset question bank. The answer generation module is used to generate target answer information corresponding to the question information based on the question information, the first question and answer information, and the second question and answer information.

10. A computer-readable medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the text processing method according to any one of claims 1 to 8.

11. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor executes the executable instructions to cause the electronic device to perform the text processing method according to any one of claims 1 to 8.

12. A computer program product, characterized in that, The computer program product includes computer instructions, which are stored in a computer-readable storage medium. The processor of the computer device reads and executes the computer instructions from the computer-readable storage medium, causing the computer device to perform the text processing method according to any one of claims 1 to 8.