Intelligent question and answer method, device and equipment and storage medium

By using the vector characterization model trained by large models, the shortcomings of traditional vector search methods in dealing with long and complex texts are solved, the performance and result reliability of the question-and-answer system are improved, and more efficient semantic capture and noise resistance are achieved.

CN119311833APending Publication Date: 2025-01-14INFORMATION & COMM BRANCH OF STATE GRID JIANGSU ELECTRIC POWER +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411435702.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

Traditional vector search methods cannot effectively capture complex semantic and contextual information in long texts, and are sensitive to noise, resulting in reduced quality and reliability of search Q&A results.

Method used

Using a large model as a pre-trained vector representation model, the model is trained through a sub-sample training set containing different task scenarios, and the vector representation model is obtained, which improves the representation ability of long text and complex text, and is also derived from the preset document vector set. Determine the feature vector of the target document paragraph to improve the quality and reliability of the answer results.

Benefits of technology

It improves the performance of vector retrieval and the quality and reliability of answering results, enhances the representation ability of long and complex texts, and reduces the impact of noise on the results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311833A_ABST
    Figure CN119311833A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent question and answer method and device, equipment and a storage medium. The method comprises the following steps: acquiring a question text and scene description information, and determining a question text feature vector of the question text and a question scene vector corresponding to the scene description information; according to the problem text feature vector and the problem scene vector, at least one target document paragraph feature vector meeting a matching condition is determined from a preset document vector set, and the document paragraph feature vector is obtained by performing feature analysis on the document paragraphs through a vector representation model; the vector representation model is obtained by performing model training through a constructed sample training set, and the sample training set comprises sub-sample training sets corresponding to different task scenes; and determining an answering result of the question text according to the paragraph feature vector of each target document. By means of the method, generalization and precision of the vector representation model are improved, the representation capacity of long texts and complex texts is improved, and then the quality and reliability of question and answer results are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to an intelligent question-answering method, apparatus, device, and storage medium. Background Technology

[0002] With the development of artificial intelligence technology, intelligent question-answering systems have been applied in many fields such as education, finance, healthcare, customer service, and smart homes.

[0003] Among these, question-answering systems based on Retrieve-and-Generate (RAG) have become a hot research topic due to their combination of the advantages of information retrieval and natural language generation. Vector retrieval technology plays a crucial role in information retrieval, enabling efficient similarity matching by converting text into vectors, thereby quickly finding search results relevant to the question.

[0004] However, traditional vector retrieval methods and deep learning-based vector retrieval methods cannot capture the complex semantics and contextual information in long texts, and the text length they can handle is difficult to meet real-world needs. Furthermore, publicly available vector retrieval methods are sensitive to noise in the data, which leads to a decrease in the quality and reliability of retrieval and question-answering results. Summary of the Invention

[0005] This invention provides an intelligent question-answering method, apparatus, device, and storage medium to address the shortcomings of existing vector retrieval methods when processing long or complex texts, as well as the problem that the accuracy of retrieval results is reduced due to noise during retrieval.

[0006] In a first aspect, embodiments of the present invention provide an intelligent question-answering method, the method comprising:

[0007] Obtain the problem text and scene description information, and determine the problem text feature vector of the problem text and the problem scene vector corresponding to the scene description information;

[0008] Based on the problem text feature vector and the problem scenario vector, at least one target document paragraph feature vector that meets the matching conditions is determined from a preset document vector set. The document vector set includes at least one document paragraph feature vector. The document paragraph feature vector is obtained by performing feature analysis on the document paragraph through a vector representation model. The vector representation model is obtained by training the model through a constructed sample training set. The sample training set includes sub-sample training sets corresponding to different task scenarios.

[0009] The answer to the question text is determined based on the feature vectors of each target document paragraph.

[0010] Secondly, embodiments of the present invention provide an intelligent question-answering device, the device comprising:

[0011] The information acquisition module is used to acquire the problem text and the scene description information, and to determine the problem text feature vector of the problem text and the problem scene vector corresponding to the scene description information;

[0012] The target paragraph determination module is used to determine at least one target document paragraph feature vector that meets the matching conditions from a preset document vector set based on the problem text feature vector and the problem scenario vector. The document vector set includes at least one document paragraph feature vector. The document paragraph feature vector is obtained by performing feature analysis on the document paragraph through a vector representation model. The vector representation model is obtained by training the model through a constructed sample training set. The sample training set includes sub-sample training sets corresponding to different task scenarios.

[0013] The answer result determination module is used to determine the answer result of the question text based on the feature vectors of each target document paragraph.

[0014] Thirdly, embodiments of the present invention provide an electronic device, the electronic device comprising:

[0015] At least one processor;

[0016] and a memory communicatively connected to the at least one processor;

[0017] The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the intelligent question-answering method according to any embodiment of the present invention.

[0018] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions that are used to cause a processor to execute and implement the intelligent question-answering method described in any embodiment of the present invention.

[0019] The technical solution of this invention involves acquiring question text and scenario description information, determining the question text feature vector and the corresponding scenario vector, based on the question text feature vector and the scenario vector. Then, based on the question text feature vector and the scenario vector, at least one target document paragraph feature vector satisfying the matching conditions is determined from a preset document vector set. This document vector set includes at least one document paragraph feature vector, which is obtained through feature analysis of the document paragraph using a vector representation model. The vector representation model is trained using a constructed sample training set, which includes sub-sample training sets corresponding to different task scenarios. Finally, the answer result for the question text is determined based on each target document paragraph feature vector. The technical solution of this invention selects a large model as a pre-trained vector representation model. By training the large model with a sample training set containing sub-sample training sets corresponding to different task scenarios, a vector representation model is obtained. This improves the generalization, accuracy, and representation ability of the vector representation model for long and complex texts, thereby improving the performance of vector retrieval. The vector representation model is used to obtain document feature paragraphs, thereby determining the target document paragraph feature vector. Based on the target document paragraph feature vector, the answer result of the question text is determined, thus improving the quality and reliability of the answer result.

[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 A flowchart of an intelligent question-answering method provided in an embodiment of the present invention;

[0023] Figure 2 This is an example diagram of a data format in a subsample training set for a similarity task scenario;

[0024] Figure 3 An example diagram of a data format in a subsample training set for a retrieval task scenario;

[0025] Figure 4 An example diagram of a data format in a subsample training set for a summary extraction task scenario;

[0026] Figure 5 An example diagram of another data format in the training set for a subsample of a summary extraction task scenario;

[0027] Figure 6 This is a schematic diagram of the structure of an intelligent question-answering device provided in an embodiment of the present invention;

[0028] Figure 7 A schematic diagram of an electronic device that can be used to implement embodiments of the present invention is shown. Detailed Implementation

[0029] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0030] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention 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 the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0031] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0032] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application program, server, or storage medium executing the operation of this invention, based on the prompt message.

[0033] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0034] It is understood that the above notification and user authorization process is merely illustrative and does not constitute a limitation on the implementation of the present invention. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present invention.

[0035] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0036] It should be noted that traditional vector retrieval methods and deep learning-based vector retrieval methods cannot capture the complex semantics and contextual information in long texts, and the text length they can handle is difficult to meet real-world needs. Furthermore, publicly available vector retrieval methods are quite sensitive to noise in the data, resulting in low quality and reliability of retrieval and question-answering results.

[0037] Based on this, embodiments of the present invention provide an intelligent question-answering method. Figure 1 This is a flowchart of an intelligent question-answering method provided by an embodiment of the present invention. The embodiment of the present invention is applicable to the situation of retrieving answers that match questions. The method can be executed by an intelligent question-answering device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, preferably a mobile terminal, desktop computer, laptop computer, or server.

[0038] like Figure 1 As shown, the intelligent question-answering method provided in this embodiment of the invention may specifically include:

[0039] S101. Obtain the problem text and scene description information, and determine the problem text feature vector and the problem scene vector corresponding to the scene description information.

[0040] In this context, the question text can be understood as text that requires retrieving a corresponding answer; it can be a question or a statement, a sentence or a paragraph. The question text feature vector can be considered as a vector composed of the features of the question text. The scenario description information can be understood as the task scenario in which the question exists, i.e., what kind of retrieval task needs to be performed based on the question. The question scenario vector can be considered as a vector composed of the features of the scenario description information.

[0041] In this embodiment, the question text is obtained from the client. The scenario description information can be descriptive information input by the client, such as inputting text with the same meaning, or specifying the topic of this news article. The scenario description information can also be automatically supplemented by the system. For example, if the question text "Does Xi'an have car restrictions?" is input, the scenario description information will be automatically supplemented, such as retrieving paragraphs related to Xi'an car restrictions. A model capable of vector representation of text is used. The question text is input into the model to determine the question text feature vector, and the scenario description information is input into the model to determine the question scenario vector.

[0042] S102. Based on the problem text feature vector and the problem scenario vector, determine at least one target document paragraph feature vector that meets the matching conditions from the preset document vector set. The document vector set includes at least one document paragraph feature vector. The document paragraph feature vector is obtained by performing feature analysis on the document paragraph through a vector representation model. The vector representation model is obtained by training the model through the constructed sample training set. The sample training set includes sub-sample training sets corresponding to different task scenarios.

[0043] In this context, the target document paragraph can be considered as the document paragraph that matches the question text. The target document paragraph feature vector can be understood as a vector composed of the features of the target document paragraph. The document paragraph feature vector can be considered as a vector composed of the features of each document paragraph in the document library to be retrieved. The document vector set can be understood as a collection containing the document paragraph feature vectors of each document paragraph in the document library to be retrieved, storing one or more documents. The vector representation model can be considered as a model that represents data such as text, images, and sound as vectors. The sample training set can be considered as a set containing the original samples in the training set, as well as positive and negative examples of the original samples. The negative examples can be simple negative examples and hard negative examples constructed using various methods. The sub-sample training set can be considered as a subset of the sample training set, corresponding to different task scenarios.

[0044] In this embodiment, each document segment in the document library to be retrieved is input into a vector representation model. The vector representation model performs feature analysis on the document segment to obtain the corresponding document segment feature vector. All document segment feature vectors are stored in a document vector set. Then, using similarity calculation methods, such as cosine distance, Euclidean distance, Manhattan distance, or Hamming distance, document segment feature vectors that match the problem text features and problem scenario features are determined from the preset document vector set. Finally, the target document segment feature vector is determined according to the matching conditions. The matching conditions can be conditions that restrict similarity values, or conditions that restrict the ranking of similarity values, etc. For example, the matching conditions are the five document segment feature vectors with the highest similarity.

[0045] It should be noted that, one can first determine the document paragraph feature vector that matches the question text feature vector from a preset document vector set based on the question text feature vector, and then determine the document paragraph feature vector that matches the question scenario vector from the document paragraph feature vector that matches the question text feature vector; or one can first determine the matching document paragraph feature vector from a preset document vector set based on the question scenario vector, and then determine the document paragraph feature vector that matches the question text feature vector from the document paragraph feature vector that matches the question scenario vector.

[0046] In this embodiment, a large pre-trained model with vector representation capabilities, such as gte-qwen2-1.5B or Qwen2-7B, is trained using the constructed sample training set. Contrastive learning can be used for model training, and the loss function can be the contrastive learning loss function (InfoNCE). By maximizing the similarity of similar sentence pairs and minimizing the similarity of dissimilar sentence pairs, a well-trained vector representation model is obtained.

[0047] In this embodiment, the sample training set includes sub-sample training sets corresponding to different task scenarios. For example, when the task scenario is a similarity task, the sub-sample training set may contain short sentences and the corresponding positive and negative examples; when the task scenario is a retrieval task, the sub-sample training set may contain questions and the corresponding positive and negative examples.

[0048] S103. Determine the answer to the question text based on the feature vectors of each target document paragraph.

[0049] The answer result can be understood as the text presented in response to the input question, which may include factual information as well as logical reasoning, explanations, and other information.

[0050] In this embodiment, the target document paragraph corresponding to the feature vector of each target document paragraph is determined, and each target document paragraph is input into the large model to provide the basis for answering the question. The large model combines each target document paragraph and can perform logical reasoning to finally determine the fluent, coherent and accurate answer corresponding to the question text.

[0051] This invention provides an intelligent question-answering method that acquires question text and scenario description information, determines the question text feature vector and the corresponding scenario vector, and then, based on the question text feature vector and scenario vector, determines at least one target document paragraph feature vector that meets the matching conditions from a preset document vector set. The document paragraph feature vector is obtained by performing feature analysis on the document paragraph using a vector representation model, which is trained using a constructed sample training set that includes sub-sample training sets corresponding to different task scenarios. Finally, based on the target document paragraph feature vectors, the answer result for the question text is determined. The technical solution of this invention selects a large model as a pre-trained vector representation model. By training the large model with a sample training set containing sub-sample training sets corresponding to different task scenarios, a vector representation model is obtained. This improves the generalization, accuracy, and representation ability of the vector representation model for long and complex texts, thereby improving the performance of vector retrieval. The vector representation model is used to obtain document feature paragraphs, thereby determining the target document paragraph feature vector. Based on the target document paragraph feature vector, the answer result of the question text is determined, thus improving the quality and reliability of the answer result.

[0052] As a first optional embodiment of the present invention, based on the above embodiments, the determination of the problem text feature vector of the problem text and the determination of the problem scene vector corresponding to the scene description information can be further specified as follows:

[0053] a1) Using the vector representation model, determine the problem text feature vector and the problem scene vector corresponding to the problem text and the scene description information.

[0054] In this embodiment, the problem text and scene description information are input into the vector representation model, respectively. Feature analysis is performed through the vector representation model to obtain the corresponding problem text feature vector and problem scene vector.

[0055] The above-described technical solution in this embodiment determines the feature vector of the problem text and the problem scene vector through a vector representation model, which improves the accuracy of the feature vector of the problem text and the problem scene vector, and is conducive to improving the accuracy of subsequent vector retrieval and matching.

[0056] As a second optional embodiment of the present invention, based on the above optimization, at least one target document paragraph feature vector that meets the matching conditions can be determined from a preset document vector set according to the problem text feature vector and the problem scenario vector. Specifically, the optimization is as follows:

[0057] a2) Locate the document vector set and determine the subset of document paragraph vectors that match the problem scenario vector.

[0058] Among them, the document paragraph vector subset can be considered as a subset of the document vector set that corresponds to a certain problem scenario.

[0059] In this embodiment, all documents in the document library are first split into titles and paragraphs. Titles can be identified using a title recognition model, such as Qwen1.5-110B-Chat. If the title identified by the model is empty, it is left blank. Then, the identified titles are matched with documents, and the document is split according to the nearest paragraph under each title. Based on this step, each document is split into multiple text blocks, each consisting of a title and a paragraph. Finally, a vector representation model is used to represent all text blocks in the document library, and the representation results are stored in a document vector set.

[0060] As described above, based on the determined problem scenario vector, a subset of document paragraph vectors that match the problem scenario vector is found in the document vector set.

[0061] For example, when the scene description information is a synonym transformation of this sentence, the document vector set is searched to find a subset of document paragraph vectors that match the problem scene vector corresponding to the scene description information. The subset of document paragraph vectors can be a set of vectors composed of a large number of short sentences.

[0062] b2) Determine the vector similarity value between the feature vector of the problem text and the feature vector of each document paragraph in the document paragraph vector subset.

[0063] In this embodiment, similarity calculation methods, such as cosine distance, Euclidean distance, Manhattan distance, or Hamming distance, can be used to determine the vector similarity value between the feature vector of the problem text and the feature vectors of each document paragraph in the document paragraph vector subset.

[0064] c2) The text paragraph feature vectors that rank first according to the vector similarity value are determined as the target document paragraph feature vectors that meet the matching conditions.

[0065] In this embodiment, the matching condition is the ranking of similarity values. The vector similarity values ​​between the feature vector of the problem text and the feature vectors of each document paragraph in the document paragraph vector subset are sorted from largest to smallest, and the text paragraph feature vector with the highest similarity value is determined as the target document paragraph feature vector.

[0066] For example, if the matching condition is the top 5 in similarity value, then the feature vector of the target document paragraph is the feature vector of the 5 text paragraphs that rank in the top 5 in similarity value with the feature vector of the question text.

[0067] The above-described technical solution in this embodiment improves vector retrieval speed and saves computing resources by first determining a subset of matching document paragraph vectors based on the question scenario vector. By determining the vector similarity between the question text feature vector and the feature vectors of each document paragraph, and sorting the similarity to determine the target document paragraph feature vector that meets the matching conditions, the accuracy and speed of determining the target document paragraph feature vector are improved, and a more sufficient and reliable basis is provided for subsequent question answering.

[0068] As a third optional embodiment of the present invention, based on the above optimizations, as an implementation method, determining the answer result of the question text according to the feature vectors of each target document paragraph may specifically include the following steps:

[0069] a3) Determine the target document paragraphs corresponding to the feature vectors of each target document paragraph.

[0070] In this embodiment, the corresponding target document paragraph is determined based on the determined target document paragraph feature vector.

[0071] b3) Extract and integrate the content of the target document paragraph using the given question-answering model, and determine the processing result as the answer to the question text.

[0072] In this embodiment, the question-answering model can be a large model with question-answering functionality. The target document paragraph is input into the question-answering model, and the model is used to extract and integrate the content of the target document paragraph. The integration process can be a simple splicing of the content in the target document paragraph to form a precise and concise result, or it can be based on the existing content to make inferences and supplement or explain the existing content to form a more accurate, comprehensive and coherent result. Then, the result is determined as the answer to the question text.

[0073] The above-described technical solution in this embodiment improves the quality and reliability of the answer results by determining the corresponding target document paragraph based on the characteristics of the target document paragraph, and by extracting and integrating the content of the target document paragraph through a question-and-answer model.

[0074] As one implementation of any embodiment of the present invention, the step of constructing the sample training set can be further specified as the following steps:

[0075] a4) Determine at least one task scenario and construct a sub-sample training set for each task scenario, wherein the sub-sample training set includes sample text corresponding to the corresponding task scenario, positive sample labels corresponding to the sample text, and at least one negative sample label corresponding to the sample text.

[0076] Here, sample text can be understood as the text used as samples within the sub-sample training set. Positive sample labels can be understood as text, topics, etc., that match the sample text, while negative sample labels can be considered as text, topics, etc., that do not match the sample text.

[0077] In this embodiment, at least one task scenario is determined. The task scenario can be retrieval, synonym conversion, classification, or topic determination, etc. For each task scenario, a sub-sample training set is constructed. The sub-sample training set includes sample text corresponding to the respective task scenario, positive sample labels constructed based on the sample text, and at least one negative sample label. The construction of positive and negative sample labels can employ methods such as labeled data, data augmentation techniques (e.g., rotation, scaling, cropping), BERT models, and large-scale models.

[0078] The above-described technical solution in this embodiment constructs sub-sample training sets according to different task scenarios. Each sub-sample training set includes sample text, positive sample labels, and at least one negative sample label corresponding to the corresponding task scenario, thereby improving the quality of the sample training set and thus improving the performance of the vector representation model.

[0079] As one implementation, determining at least one task scenario and constructing sub-sample training sets for each task scenario can be further specified as the following steps:

[0080] a5) For a given similarity task scenario, at least one short text obtained from the similarity dataset will be used as the first sample text.

[0081] The similarity task scenario can be understood as finding similar text. A similarity dataset can be understood as a dataset containing multiple unique short texts. The first sample text can be considered as a short text within the similarity dataset.

[0082] In this embodiment, a corresponding similarity dataset is selected for the determined similarity task scenario, and at least one short text is obtained from the similarity dataset and used as the first sample text.

[0083] b5) Using the given first network model, take the first sample text as input to obtain the first sample positive example label and the first type of sample negative example label corresponding to the first sample text.

[0084] The first network model can be understood as a model capable of generating positive and negative sample labels based on sample text. The first positive sample label can be considered as text that is semantically the same as or similar to the first sample text, while the first negative sample label can be considered as text that is semantically slightly different or completely different from the first sample text.

[0085] In this embodiment, the first sample text is input into the first network model, which may be Qwen1.5-110B-Chat, and the prompt information is also input into the first network model, thereby simultaneously obtaining a first sample positive example label and a first class sample negative example label for the first sample text.

[0086] For example, the prompt message could be: "Based on the content of the sentence, generate a first-class positive example label with semantic similarity and a first-class negative example label with semantic oppositeity. Semantic similarity means that the description of the event is consistent, and semantic oppositeity means that the description of the event is slightly different or completely different. Now let's start the test. Please read the original sentence carefully and output the corresponding positive and negative examples. Original sentence:"

[0087] For example, the prompt message may also include specific examples, such as "The following are specific examples: Original sentence: China's elevator market is in a period of rapid growth; Positive example: China's elevator market is currently developing rapidly; Negative example: China's elevator market is developing slowly."

[0088] c5) Using the given second network model, obtain the second type of sample feedback label corresponding to the first sample text from the output of the first network model and the similarity dataset.

[0089] The second network model can be understood as a model capable of retrieving similar text. The second type of sample feedback label can be understood as the text determined by the second network model that has a high similarity to the first sample text but is not a positive example label of the first sample, i.e., a more difficult-to-distinguish negative example label corresponding to the first sample text.

[0090] In this embodiment, the second network model can be a vector model BGE. The first sample text is input into the second network model. The second network model uses the output of the first network model (i.e., all first sample positive labels and all first class sample negative labels of all first sample texts in the similarity dataset) and the similarity dataset to determine the first set number of texts with the highest similarity by calculating similarity and other methods. After removing the first set number of texts with the highest similarity, the remaining first set number of texts with the highest similarity are considered as the second class sample feedback labels corresponding to the first sample text.

[0091] For example, a first sample text is input into a second network model. The similarity value between all texts and the first sample text in the set combining the similarity dataset and the output of the first network model is determined by similarity calculation. The top 12 texts with the highest similarity are determined, and the two texts with the highest similarity among the 12 texts are removed. The remaining 10 texts are the feedback labels for the second type of sample.

[0092] d5) Using the given retrieval algorithm, determine the third type of sample feedback label corresponding to the first sample text from the output of the first network model and the similarity dataset.

[0093] The retrieval algorithm can be considered as an algorithm capable of performing semantic retrieval based on keywords. The third type of sample feedback label can be understood as text that is strongly related to the first sample text but is not a positive example label of the first sample text, as determined by the retrieval algorithm; that is, another, more difficult-to-distinguish negative example label corresponding to the first sample text.

[0094] In this embodiment, the retrieval algorithm can be Elasticsearch. Using the retrieval algorithm, a set number of texts with the highest relevance to the first sample text retrieval result are determined from the output result of the first network model and the similarity dataset. After removing the set number of texts with the highest relevance, the remaining set number of texts with the highest relevance are considered as the third type of sample feedback label corresponding to the first sample text.

[0095] e5) Based on the first sample text, the first sample positive example label, the first type of sample negative example label, the second type of sample feedback label, and the third type of sample feedback label, a sub-sample training set for the similarity task scenario is constructed.

[0096] In this embodiment, firstly, the negative example label of the first sample, the feedback label of the second type of sample, and the feedback label of the third type of sample are deduplicated so that there is no duplicate text in the negative example label of the first sample, the feedback label of the second type of sample, and the feedback label of the third type of sample. Next, a prompt template prompt1 for the input of the pre-trained vector representation model is constructed for the similarity task scenario. Finally, based on the first sample text, the positive example label of the first sample, the negative example label of the first type of sample, the feedback label of the second type of sample, and the feedback label of the third type of sample, a sub-sample training set for the similarity task scenario is constructed.

[0097] For example, the prompt template prompt1 could be "This is a similarity task, retrieve semantically similar text:".

[0098] For example, Figure 2 This is an example diagram of a data format from a subsample training set for a similarity task scenario. For example... Figure 2As shown, the first column is the query, which includes the prompt template prompt1 and the first sample text; the second column is the sample positive example label, which includes the first sample positive example label; the third column is the sample negative example label, which includes the first type of sample negative example label, the second type of sample feedback label, and the third type of sample feedback label.

[0099] The above-described technical solution in this embodiment, targeting the similarity task scenario, constructs the first sample positive example label of the first sample text in the similarity dataset through one method, and constructs the first type of sample negative example label, the second type of sample feedback label, and the third type of sample feedback label of the first sample text through multiple methods from the perspectives of large model generation, vector retrieval, and keyword retrieval, respectively. These constitute the sub-sample training set of the similarity task scenario, providing an effective training sample set for the pre-trained vector representation model. At the same time, it increases the difficulty and richness of the negative example label identification, improves the quality of the sub-sample training set of the similarity task scenario, and thus makes the training process of the pre-trained vector representation model more effective, with better generalization and accuracy.

[0100] As another implementation, the process of determining at least one task scenario and constructing sub-sample training sets for each task scenario can be further specified as the following steps:

[0101] a6) For a given retrieval task scenario, at least one first question text obtained from the reading comprehension dataset and the news dataset will be used as the second sample text, and the retrieval paragraphs corresponding to each first question text will be used as the second sample positive example labels.

[0102] The retrieval task scenario can be understood as retrieving relevant answer text based on a question. The reading comprehension dataset and the news dataset can be considered as datasets containing multiple unique question texts and multiple unique paragraph texts, with more paragraph texts than question texts. Each question text has a corresponding paragraph text that can answer the question. The first question text can be considered as the question text in the reading comprehension dataset and the news dataset. The retrieved paragraph can be understood as the paragraph text in the reading comprehension dataset and the news dataset. The second sample positive example label can be considered as the paragraph text corresponding to the first question text.

[0103] In this embodiment, for a given retrieval task scenario, a corresponding reading comprehension dataset and a news dataset are selected. At least one first question text obtained from the reading comprehension dataset and the news dataset is used as the second sample text, and a retrieval paragraph corresponding to each first question text is used as the second sample positive example label.

[0104] b6) Using the given second network model, determine the second type of sample feedback label corresponding to the second sample text from the reading comprehension dataset and the news dataset.

[0105] In this embodiment, the first question text is input into the second network model. The second network model is used to determine the highest similarity of a predetermined number of retrieval paragraphs from the reading comprehension dataset and the news dataset. After removing the highest similarity of the predetermined number of retrieval paragraphs, the remaining highest similarity of the predetermined number of retrieval paragraphs are considered as the second type of sample feedback label corresponding to the second sample text.

[0106] c6) Using a given retrieval algorithm, determine the third type of sample feedback label corresponding to the second sample text from the reading comprehension dataset and the news dataset.

[0107] In this embodiment, using a given retrieval algorithm, a predetermined number of retrieval paragraphs with the highest relevance to the first question text retrieval result are determined from the reading comprehension dataset and the news dataset. After removing the predetermined number of retrieval paragraphs with the highest relevance, the remaining predetermined number of retrieval paragraphs with the highest relevance are considered as the third type of sample feedback label corresponding to the second sample text.

[0108] d6) Based on the second sample text, the second sample positive example label, the second type of sample feedback label, and the third type of sample feedback label, a sub-sample training set for the retrieval task scenario is constructed.

[0109] In this embodiment, firstly, the second type of sample feedback labels and the third type of sample feedback labels are deduplicated so that there is no duplicate text in the second type of sample feedback labels and the third type of sample feedback labels. Next, a prompt template prompt2 for the input of the pre-trained vector representation model is constructed for the retrieval task scenario. Finally, based on the second sample text, the second sample positive example label, the second type of sample feedback label and the third type of sample feedback label, a sub-sample training set for the retrieval task scenario is constructed.

[0110] For example, the prompt template prompt2 could be "This is a search task. Search for relevant paragraphs based on the question:".

[0111] For example, Figure 3 This is an example diagram of a data format used in a subsample training set for a retrieval task scenario. For example... Figure 3 As shown, the first column is the query, which includes the prompt template prompt2 and the second sample text; the second column is the sample positive example label, which includes the second sample positive example label; the third column is the sample negative example label, which includes the second type of sample negative example label and the third type of sample feedback label.

[0112] The above-described technical solution in this embodiment, targeting the retrieval task scenario, constructs second-type and third-type sample feedback labels for the second sample text from the perspectives of vector retrieval and keyword retrieval, respectively. This constitutes a sub-sample training set for the retrieval task scenario, providing an effective training sample set for the pre-trained vector representation model. At the same time, it increases the difficulty and richness of identifying negative sample labels, improves the quality of the sub-sample training set for the retrieval task scenario, and makes the training process of the pre-trained vector representation model more effective, with better generalization and accuracy.

[0113] As a third implementation, determining at least one task scenario and constructing a sub-sample training set for each task scenario may specifically include the following steps:

[0114] a7) For a given summary extraction task scenario, process the text content of each text in the given news dataset and obtain the tag retrieval library corresponding to the news dataset.

[0115] In this context, a news dataset can be understood as a dataset containing tagged text and paragraph text. Tag text can be such as sports, entertainment, real estate, or horoscope. One tag text in a news dataset can correspond to one or more paragraph texts, and each paragraph text has corresponding tag text. Each paragraph text can include one or more question texts. The summary extraction task can be understood as either determining the question text corresponding to the description content of a sample text, or determining the tag text corresponding to the description content of a text, based on the sample text. The tag retrieval library can be understood as the collection of all questions and all category tags in the news dataset to be retrieved.

[0116] In this embodiment, a corresponding news dataset is selected for the determined summary extraction task scenario. The text content within the given news dataset is processed, such as identifying paragraph text, extracting paragraph text, identifying tag text, extracting tag text, constructing the correspondence between paragraph text and tag text, identifying question text, and extracting question text. At least one paragraph text obtained from the news dataset is used as sample text, and the tag text and question text obtained from the news dataset are used as a tag retrieval library.

[0117] b7) Based on the processing results of the text content and the tag retrieval library, determine the third sample text, the corresponding third sample positive example tag, and at least one type of sample negative example tag.

[0118] The third sample text can be understood as paragraph text in a news dataset. The third sample positive example label can be considered as the label text or question text that matches the third sample text.

[0119] In this embodiment, the paragraph text content after text content processing is used as the third sample text, and the tag retrieval library is determined based on the processing result of the text content.

[0120] In this embodiment, two different types of third positive sample labels and sample negative sample labels corresponding to the third sample text can be constructed in two different ways. In the first method, the third sample text and the prompt information are first input into the first network model, thereby generating the question text corresponding to the third sample text, which serves as the third sample positive sample label. Next, the question text generated by the first network model is input into a second network model. The second network model uses this model to determine a predetermined number of texts with the highest similarity from the label retrieval library. After removing the predetermined number of texts with the highest similarity, the remaining predetermined number of texts with the highest similarity are considered as the second type of sample feedback label corresponding to the third sample text. Then, a retrieval algorithm is used to determine a predetermined number of texts with the highest relevance to the retrieval results of the third sample text from the label retrieval library. After removing the predetermined number of texts with the highest relevance, the remaining predetermined number of texts with the highest relevance are considered as the third type of sample feedback label corresponding to the third sample text. The sample negative sample label can be composed of the second type of sample feedback label and the third type of sample feedback label.

[0121] For example, the prompt message input into the first network model could be: "Please generate a question related to the paragraph content. The question should not be very long and should not be in English. The paragraph content is:."

[0122] Following the above description, the second method can be considered as follows: first, based on the processing result of the text content and the tag retrieval library, determine the tag text corresponding to the third sample text as the third sample positive example tag corresponding to the third sample text; then, randomly select a set number of tag texts from other tag texts in the tag retrieval library as the sample negative example tags corresponding to the third sample positive example tags.

[0123] c7) Based on the third sample text, the third sample positive example label, and at least one type of sample negative example label, a sub-sample training set for the summary extraction task scenario is constructed.

[0124] In this embodiment, firstly, at least one type of negative sample labels are deduplicated so that there are no identical texts in the negative sample labels. Then, a prompt template prompt3 is constructed for the input of the pre-trained vector representation model for the summary extraction task scenario. Finally, a sub-sample training set for the summary extraction task scenario is constructed based on the third sample text, the third sample positive sample labels, and at least one type of negative sample labels.

[0125] For example, the prompt template prompt3 could be "This is a summary extraction task. Determine the corresponding topic based on the text:".

[0126] For example, Figure 4 This is an example diagram of a data format from a subsample training set for a summary extraction task scenario. (Example:) Figure 4 As shown, the first column is the query, which includes the prompt template prompt3 and the third sample text; the second column is the sample positive example label, which includes the third sample positive example label; the third column is the sample negative example label, which includes the second type of sample feedback label and the third type of sample feedback label.

[0127] For example, Figure 5 This is an example diagram of another data format in the training set for a subsample of a task scenario involving summarization extraction. (Example:) Figure 5 As shown, the first column is the query, which includes the prompt template prompt3 and the third sample text; the second column is the sample positive example label, which includes the first sample positive example label; and the third column is the sample negative example label, which includes the sample negative example label corresponding to the third sample text.

[0128] The above technical solution in this embodiment, for the task scenario of abstract extraction, provides two methods to construct two different sub-sample training sets, which enriches the diversity of task scenarios that the pre-trained vector representation model can use, and at the same time provides an effective and high-quality training sample set for the pre-trained vector representation model, making the training process of the pre-trained vector representation model more effective and improving its generalization and accuracy.

[0129] Figure 6 This is a schematic diagram of the structure of an intelligent question-answering device provided in an embodiment of the present invention. Figure 6 As shown, the device may include: an information acquisition module 61, a target paragraph determination module 62, and an answer result determination module 63, wherein,

[0130] The information acquisition module 61 is used to acquire the problem text and the scene description information, and to determine the problem text feature vector of the problem text and the problem scene vector corresponding to the scene description information;

[0131] The target paragraph determination module 62 is used to determine at least one target document paragraph feature vector that meets the matching conditions from a preset document vector set based on the problem text feature vector and the problem scenario vector. The document vector set includes at least one document paragraph feature vector. The document paragraph feature vector is obtained by performing feature analysis on the document paragraph through a vector representation model. The vector representation model is obtained by training the model through a constructed sample training set. The sample training set includes sub-sample training sets corresponding to different task scenarios.

[0132] The answer result determination module 63 is used to determine the answer result of the question text based on the feature vectors of each target document paragraph.

[0133] This invention provides an intelligent question-answering device that acquires question text and scene description information, determines the question text feature vector and the corresponding question scene vector, and then, based on the question text feature vector and the question scene vector, determines at least one target document paragraph feature vector that meets the matching conditions from a preset document vector set. The document paragraph feature vector is obtained by performing feature analysis on the document paragraph using a vector representation model, which is trained using a constructed sample training set that includes sub-sample training sets corresponding to different task scenarios. Finally, based on the target document paragraph feature vectors, the device determines the answer to the question text. The technical solution of this invention selects a large model as a pre-trained vector representation model. By training the large model with a sample training set containing sub-sample training sets corresponding to different task scenarios, a vector representation model is obtained. This improves the generalization, accuracy, and representation ability of the vector representation model for long and complex texts, thereby improving the performance of vector retrieval. The vector representation model is used to obtain document feature paragraphs, thereby determining the target document paragraph feature vector. Based on the target document paragraph feature vector, the answer result of the question text is determined, thus improving the quality and reliability of the answer result.

[0134] Furthermore, the information acquisition module 61 can specifically be used for:

[0135] The vector representation model is used to determine the feature vector of the question text and the question scene vector corresponding to the question text and the scene description information.

[0136] Furthermore, the target paragraph determination module 62 can specifically be used for:

[0137] Locate the document vector set and determine the subset of document paragraph vectors that match the problem scenario vector;

[0138] Determine the vector similarity value between the feature vector of the question text and the feature vectors of each document paragraph in the document paragraph vector subset;

[0139] The text paragraph feature vectors that rank first according to the vector similarity value are determined as the target document paragraph feature vectors that meet the matching conditions.

[0140] Furthermore, the answer determination module 63 can specifically be used for:

[0141] Determine the target document paragraphs corresponding to each of the target document paragraph feature vectors;

[0142] The target document paragraphs are extracted and integrated using a given question-and-answer model, and the processing result is determined as the answer to the question text.

[0143] Furthermore, the intelligent question-answering device also includes a sample construction module, specifically including:

[0144] A subsample training set construction unit is used to determine at least one task scenario and construct a subsample training set for each task scenario.

[0145] The sub-sample training set includes sample text corresponding to the corresponding task scenario, positive sample labels corresponding to the sample text, and at least one negative sample label corresponding to the sample text.

[0146] Furthermore, the subsample training set construction unit can be specifically used for:

[0147] For a given similarity task scenario, at least one short text obtained from the similarity dataset will be used as the first sample text.

[0148] Using the given first network model, the first sample text is taken as input to obtain the first sample positive example label and the first type of sample negative example label corresponding to the first sample text;

[0149] Using a given second network model and combining the output of the first network model, the second type of sample feedback label corresponding to the first sample text is obtained from the similarity dataset;

[0150] Using a given retrieval algorithm, determine the third type of sample feedback label corresponding to the first sample text from the similarity dataset;

[0151] Based on the first sample text, the first sample positive example label, the first type of sample negative example label, the second type of sample feedback label, and the third type of sample feedback label, a sub-sample training set for the similarity task scenario is constructed.

[0152] For a given retrieval task scenario, at least one first question text obtained from the reading comprehension dataset and the news dataset will be used as the second sample text, and the retrieval paragraphs corresponding to each first question text will be used as the second sample positive example labels.

[0153] Using a given second network model, determine the second type of sample feedback label corresponding to the second sample text from the reading comprehension dataset and the news dataset;

[0154] Using a given retrieval algorithm, determine the third type of sample feedback label corresponding to the second sample text from the reading comprehension dataset and the news dataset;

[0155] The second sample text, the second sample positive example label, the second type of sample feedback label, and the third type of sample feedback label constitute a sub-sample training set for the retrieval task scenario.

[0156] For a given summary extraction task scenario, the text content of each text in the given news dataset is processed, and the tag retrieval library corresponding to the news dataset is obtained.

[0157] Based on the processing results of the text content and the tag retrieval library, the third sample text, the corresponding third sample positive example tag, and at least one type of sample negative example tag are determined respectively.

[0158] Based on the third sample text, the third sample positive example label, and at least one type of sample negative example label, a sub-sample training set is constructed for the summary extraction task scenario.

[0159] The intelligent question-answering device provided in the embodiments of the present invention can execute the intelligent question-answering method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0160] Figure 7 A schematic diagram of an electronic device 70 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0161] like Figure 7 As shown, the electronic device 70 includes at least one processor 71 and a memory, such as a read-only memory (ROM) 72 and a random access memory (RAM) 73, communicatively connected to the at least one processor 71. The memory stores computer programs executable by the at least one processor. The processor 71 can perform various appropriate actions and processes based on the computer program stored in the ROM 72 or loaded from storage unit 78 into the RAM 73. The RAM 73 can also store various programs and data required for the operation of the electronic device 70. The processor 71, ROM 72, and RAM 73 are interconnected via a bus 74. An input / output (I / O) interface 75 is also connected to the bus 74.

[0162] Multiple components in electronic device 70 are connected to I / O interface 75, including: input unit 76, such as keyboard, mouse, etc.; output unit 77, such as various types of monitors, speakers, etc.; storage unit 78, such as disk, optical disk, etc.; and communication unit 79, such as network card, modem, wireless transceiver, etc. Communication unit 79 allows electronic device 70 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0163] Processor 71 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 71 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 71 performs the various methods and processes described above, such as intelligent question answering methods.

[0164] In some embodiments, the intelligent question-answering method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 78. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 70 via ROM 72 and / or communication unit 79. When the computer program is loaded into RAM 73 and executed by processor 71, one or more steps of the intelligent question-answering method described above may be performed. Alternatively, in other embodiments, processor 71 may be configured to execute the intelligent question-answering method by any other suitable means (e.g., by means of firmware).

[0165] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0166] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0167] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0168] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0169] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0170] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0171] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0172] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. An intelligent question-answering method, characterized in that: include: Obtaining a question text and a scenario description information, and determining a question text feature vector of the question text and determining a question scenario vector corresponding to the scenario description information; According to the problem text feature vector and the problem scenario vector, at least one target document paragraph feature vector that meets the matching condition is determined from a preset document vector set, wherein the document vector set includes at least one document paragraph feature vector, and the document paragraph feature vector is obtained by performing feature analysis on the document paragraph using a vector representation model, and the vector representation model is obtained by performing model training on the constructed sample training set, and the sample training set includes sub-sample training sets corresponding to different task scenarios; The answer result of the question text is determined according to the feature vectors of each target document paragraph.

2. The method according to claim 1, characterized in that: The step of determining a question text feature vector of the question text and determining a question scene vector corresponding to the scene description information includes: The question text feature vector and the question scene vector corresponding to the question text and the scene description information are determined through the vector representation model.

3. The method according to claim 1, characterized in that Determining at least one target document paragraph feature vector that meets the matching condition from a preset document vector set according to the question text feature vector and the question scenario vector, including: Searching the document vector set to determine a subset of document paragraph vectors that matches the problem scenario vector; Determine a vector similarity value between the question text feature vector and each document paragraph feature vector in the document paragraph vector subset; The text paragraph feature vector that is ranked in a front set ranking after being ranked according to the vector similarity value is determined as the target document paragraph feature vector that meets the matching condition.

4. The method according to claim 1, characterized in that: Determining the answer result of the question text according to each of the target document paragraph feature vectors includes: Determine the target document paragraphs corresponding to each of the target document paragraph feature vectors; The target document paragraph is subjected to content extraction and integration processing through a given question-answering model, and the processing result is determined as the answer result of the question text.

5. The method according to any one of claims 1 to 4, characterized in that: The steps of constructing the sample training set include: Determine at least one task scenario, and construct sub-sample training sets for each of the task scenarios; The sub-sample training set includes sample texts corresponding to the corresponding task scenarios, sample positive labels corresponding to the sample texts, and at least one sample negative label corresponding to the sample texts.

6. The method according to claim 5, characterized in that The determining of at least one task scenario and constructing sub-sample training sets for each of the task scenarios respectively include: For a determined similarity task scenario, at least one short text obtained from a similarity dataset is used as a first sample text; Using a given first network model, taking the first sample text as input, obtaining a first sample positive example label and a first type sample negative example label corresponding to the first sample text; Obtaining a second type of sample feedback label corresponding to the first sample text from the output result of the first network model and the similarity data set through a given second network model; Determine, by using a given retrieval algorithm, a third-category sample feedback label corresponding to the first sample text from the output result of the first network model and the similarity data set; Based on the first sample text, the first sample positive example label, the first category sample negative example label, the second category sample feedback label and the third category sample feedback label, a sub-sample training set of the similarity task scenario is constructed.

7. The method according to claim 5, characterized in that The determining of at least one task scenario and constructing sub-sample training sets for each of the task scenarios respectively include: For a determined retrieval task scenario, at least one first question text obtained from a reading comprehension dataset and a news dataset is used as a second sample text, and the retrieval paragraphs corresponding to each first question text are used as second sample positive example labels; Determining a second type of sample feedback label corresponding to the second sample text from the reading comprehension dataset and the news dataset through a given second network model; Determine, by using a given retrieval algorithm, a third type of sample feedback label corresponding to the second sample text from the reading comprehension dataset and the news dataset; Based on the second sample text, the second sample positive example label, the second category sample feedback label and the third category sample feedback label, a sub-sample training set of the retrieval task scenario is constructed.

8. The method according to claim 5, characterized in that The determining of at least one task scenario and constructing sub-sample training sets for each of the task scenarios respectively include: For the determined summary extraction task scenario, each text content in the given news dataset is processed, and a label retrieval library corresponding to the news dataset is obtained; According to the processing result of the text content and the label search library, respectively determine the third sample text and the corresponding third sample positive example label and at least one type of sample negative example label; Based on the third sample text, the third sample positive example label and at least one type of sample negative example label, a sub-sample training set of the summary extraction task scenario is formed.

9. An intelligent question-answering device, characterized in that: include: An information acquisition module, used to acquire question text and scene description information, and determine a question text feature vector of the question text and a question scene vector corresponding to the scene description information; A target paragraph determination module is used to determine at least one target document paragraph feature vector that meets the matching condition from a preset document vector set according to the problem text feature vector and the problem scenario vector, wherein the document vector set includes at least one document paragraph feature vector, and the document paragraph feature vector is obtained by performing feature analysis on the document paragraph using a vector representation model, and the vector representation model is obtained by performing model training on the constructed sample training set, and the sample training set includes sub-sample training sets corresponding to different task scenarios; The answer result determination module is used to determine the answer result of the question text according to the feature vectors of each target document paragraph.

10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the intelligent question-answering method described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the intelligent question-answering method according to any one of claims 1 to 8 when executed.

Citation Information

Cited By

  • Question and answer method and device, storage medium and electronic equipment

    CN120611012A

  • Question and answer generation method and system, electronic equipment, storage medium and program product

    CN120821812A