Information search method and device

By using the trained text processing model in the Q&A information database to determine the answer information based on the question statement and associated paragraph, the problem of low matching between answers and question sentences in the prior art is solved, and more accurate question-and-answer pair construction and user information acquisition is achieved.

CN113821612BActive Publication Date: 2025-04-11TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110797598.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-14
Publication Date
2025-04-11
Estimated Expiration
2041-07-14

AI Technical Summary

Technical Problem

When the prior art searches for text content related to question statements through search engines, the answers and question sentences match less, resulting in low accuracy of the built question answers and answers, which affects the user experience.

Method used

Provides an information search method, by receiving the question statement to be found, and searching for target answer information from the updated question and answer information database. This information database is updated by the target question statement and the answer information with an associated relationship. The answer information is determined by the trained text processing model based on the target question statement and the associated target paragraph.

Benefits of technology

It improves the matching degree between answers and questions, builds accurate question-and-answer pairs, and improves the accuracy of users' answer information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113821612B_ABST
    Figure CN113821612B_ABST
Patent Text Reader

Abstract

The embodiment of the present application relates to the field of artificial intelligence, and discloses an information search method and device; the embodiment of the present application can receive a question statement to be searched; search for the target answer information corresponding to the question statement to be searched from the updated question and answer information library, wherein the updated question and answer information library is updated by a target question statement and answer information with an associated relationship, the target question statement is a statement that conforms to a preset question statement rule, and the answer information is determined by a trained text processing model according to the target question statement and the associated target text segment; return the target answer information corresponding to the question statement to be searched. In this way, according to the target question statement that conforms to the preset question statement rule and the answer information that is highly associated with the target question statement, an accurate question and answer pair is constructed, and the question and answer information library is updated to improve the matching degree between the question statement and the answer information, and improve the accuracy of the user in obtaining the answer information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to an information search method and device. Background Art

[0002] A question-answer pair is a combination of a question and an answer, which contains the correlation between the question and the answer. In the field of question-answering, question-answer pairs can efficiently answer users' daily questions (Frequently Asked Questions, FAQ) and simplify the process of solving users' doubts. However, with the development of objective things, when users ask novel questions or question statements, the corresponding answer information needs to be expanded in real time. In order to improve the coverage of answer information, related technologies use search engines to search for text content related to question statements, and use the found text content as answer information to construct question-answer pairs for corresponding question statements to fill in the answer gaps.

[0003] In the process of research and practice of the prior art, the inventor of the present application discovered that for the existing method of searching for text content related to a question statement through a search engine, and using the found text content as the answer information or answer information of the question statement, since the match degree between the found text content and the corresponding question statement is low, that is, the match degree between the answer and the question sentence is low, the accuracy of the constructed question and answer pair is not high, making it impossible for users to obtain accurate answer information through the question and answer pair, affecting the user experience. Summary of the invention

[0004] The embodiments of the present application provide an information search method and device, which can improve the matching degree between answers and questions, construct accurate question-answer pairs, and improve the accuracy of users obtaining answer information.

[0005] The present application provides an information search method, including:

[0006] Receive a problem statement to be found;

[0007] Searching for target answer information corresponding to the question statement to be searched from the updated question and answer information database, wherein the updated question and answer information database is updated by a target question statement and answer information having an associated relationship, the target question statement is a statement that conforms to a preset question statement rule, and the answer information is determined by a trained text processing model according to the target question statement and an associated target text segment;

[0008] Return the target answer information corresponding to the question statement to be found.

[0009] Accordingly, an embodiment of the present application provides an information search device, including:

[0010] A receiving unit, used for receiving a question sentence to be found;

[0011] A search unit, used to search for target answer information corresponding to the question sentence to be searched from an updated question and answer information database, wherein the updated question and answer information database is updated by a target question sentence and answer information having an associated relationship, the target question sentence is a sentence that conforms to a preset question sentence rule, and the answer information is determined by a trained text processing model according to the target question sentence and an associated target text segment;

[0012] The returning unit is used to return the target answer information corresponding to the question sentence to be found.

[0013] In some embodiments, the information search device further comprises:

[0014] A collection unit, used for collecting a question statement set, wherein the question statement set includes a plurality of question statements;

[0015] A screening unit, configured to screen out a target question sentence that meets a preset question sentence rule from the plurality of question sentences;

[0016] A matching unit, configured to match a target text segment associated with the target question sentence from a preset document library;

[0017] An input unit, used to input the target question sentence and the target text segment into the trained text processing model to obtain answer information corresponding to the target question sentence;

[0018] The establishing unit is used to establish an association relationship between the target question statement and the corresponding answer information, and to update the question and answer information database using the target question statement and the corresponding answer information with the association relationship to obtain an updated question and answer information database.

[0019] In some embodiments, the screening unit is further used to:

[0020] Classifying the multiple question statements to obtain a category label corresponding to each question statement;

[0021] According to the word information of each question sentence, identifying the intention information corresponding to each question sentence;

[0022] Based on the category label and the intention information, a target question sentence that meets preset question sentence rules is selected from the multiple question sentences.

[0023] In some embodiments, the screening unit is further used to:

[0024] Obtaining a timeliness label corresponding to each question statement, wherein the timeliness label is used to indicate the timeliness type of the corresponding question statement;

[0025] Perform grammar check on each question statement, and determine the question statement that meets the preset grammar rules as a legal statement;

[0026] Based on the timeliness label, category label and intent information, a target question sentence that meets preset question sentence rules is selected from the legality sentences.

[0027] In some embodiments, the matching unit is further configured to:

[0028] Obtaining target word information in the target question sentence;

[0029] Searching for a target document associated with the target word information from a preset document library;

[0030] Segment the target document according to a preset segmentation rule to obtain multiple candidate segments;

[0031] The multiple candidate text segments are filtered to obtain a target text segment corresponding to the target question sentence.

[0032] In some embodiments, the input unit is further used to:

[0033] Inputting the target question sentence and the target text segment into the trained text processing model, wherein the target question sentence carries the corresponding sentence type information, and the target text segment carries the document title of the document in which it is located;

[0034] Extracting candidate answer information corresponding to the target question sentence from the target text segment based on the sentence type information of the target question sentence and the document title corresponding to the target text segment by the text processing model;

[0035] The candidate answer information is determined as the answer information corresponding to the target question sentence.

[0036] In some embodiments, the input unit is further used to:

[0037] The target question sentence, sentence type information, target text segment and document title are embedded by the text processing model to obtain a target encoding vector;

[0038] Classify the target encoding vector by using the text processing model, and output the position information of the text content associated with the target question sentence in the target text segment;

[0039] Extracting text content corresponding to the position information in the target text segment to obtain target text content;

[0040] The target text content is determined as candidate answer information.

[0041] In some embodiments, the input unit is further used to:

[0042] When multiple candidate answer information corresponding to the target question sentence is detected, the multiple candidate answer information is classified to obtain candidate answer information corresponding to each information type, and the number of candidate answer information corresponding to each information type is obtained;

[0043] Obtaining a correlation score between the target question statement and the document where the candidate answer information is located;

[0044] Performing weighted processing according to the number of candidate answer information corresponding to each information type and the relevance score to obtain a target information score corresponding to each information type;

[0045] The candidate answer information in the information type with the largest target information score is determined as the answer information corresponding to the target question sentence.

[0046] In some embodiments, the matching unit is further configured to:

[0047] Acquire a preset document set from a preset document library, wherein the preset document set includes a plurality of preset documents;

[0048] Calculate the association weight between each preset document and the target word information to obtain a first association weight coefficient;

[0049] Calculate the association weight based on the target word information and the target question sentence to obtain a second association weight coefficient;

[0050] Obtain word information weight values ​​of the target word information in the plurality of preset documents;

[0051] Determining a relevance score of each preset document relative to the target question sentence according to the first relevance weight coefficient, the second relevance weight coefficient and the word information weight value;

[0052] A preset document whose relevance score is greater than a preset relevance score threshold is determined as a target document.

[0053] In addition, an embodiment of the present application also provides a computer device, including a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to implement the information search method provided in the embodiment of the present application.

[0054] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores multiple instructions, and the instructions are suitable for a processor to load to execute the steps in any information search method provided in the embodiment of the present application.

[0055] In addition, the embodiment of the present application further provides a computer program, the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the information search methods provided in the embodiment of the present application.

[0056] The embodiment of the present application can receive a question sentence to be found; search for target answer information corresponding to the question sentence to be found from an updated question and answer information library, wherein the updated question and answer information library is updated by a target question sentence and answer information having an associated relationship, the target question sentence is a sentence that conforms to a preset question sentence rule, and the answer information is determined by a trained text processing model according to the target question sentence and the associated target text segment; and return the target answer information corresponding to the question sentence to be found. It can be obtained that the embodiment of the present application selects a target question sentence that conforms to the preset question sentence rule, and obtains a target text segment that is highly correlated with the target question sentence, and obtains answer information that is highly correlated with the target question sentence from the target text segment, so as to update the question and answer information library according to the target question sentence and the answer information, thereby improving the matching degree between the question sentence and the answer information, constructing an accurate question and answer pair, and improving the accuracy of the user in obtaining answer information through the updated question and answer information library. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0058] Figure 1 is a scenario diagram of an information search system provided by an embodiment of the present application;

[0059] Figure 2a It is a schematic diagram of the steps of the information search method provided in the embodiment of the present application;

[0060] Figure 2b It is a schematic diagram of the steps of the method for updating the question and answer information database provided in an embodiment of the present application;

[0061] Figure 3 is another step flow chart of the information search method provided in the embodiment of the present application;

[0062] Figure 4 is a scenario diagram of the information search method provided in an embodiment of the present application;

[0063] Figure 5is a schematic diagram of the structure of the first target model provided in an embodiment of the present application;

[0064] Figure 6 It is a structural diagram of the time-effect recognition model provided in the embodiment of the present application;

[0065] Figure 7 It is a structural diagram of a grammar detection model provided in an embodiment of the present application;

[0066] Figure 8 is a structural diagram of a matching recognition model provided in an embodiment of the present application;

[0067] Fig. 9 It is a structural diagram of a text processing model provided in an embodiment of the present application;

[0068] Fig.10 is a first structural diagram of an information search device provided in an embodiment of the present application;

[0069] Fig.11 is a second structural schematic diagram of the information search device provided in an embodiment of the present application;

[0070] Fig.12 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0071] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0072] The embodiments of the present application provide an information search method and device. Specifically, the embodiments of the present application will be described from the perspective of an information search device, which can be integrated in a computer device, which can be a server or a terminal or other device. Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.

[0073] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0074] The solution provided in the embodiments of the present application involves technologies such as artificial intelligence information search, which are specifically described by the following embodiments:

[0075] For example, see Figure 1 , is a schematic diagram of a scenario of an information search system provided in an embodiment of the present application. The scenario includes a terminal 10 and a server 20, and the terminal 10 and the server 20 are connected via wireless communication to achieve data interaction.

[0076] The user inputs a question sentence to be answered (to be matched) through the terminal 10, and sends the question sentence to be answered to the server 20 through the terminal 10, so that the server 20 matches the received question sentence to be answered (to be matched) in the question and answer information database to obtain the target answer information corresponding to the question sentence to be found. Then, the terminal 10 can receive the target answer information fed back by the server 20.

[0077] The server 20 is used to receive the question sentence to be found sent by the terminal 10; search for target answer information corresponding to the question sentence to be found from the updated question and answer information database, wherein the updated question and answer information database is updated by the target question sentence and answer information having an associated relationship, the target question sentence is a sentence that conforms to the preset question sentence rules, and the answer information is determined by the trained text processing model according to the target question sentence and the associated target text segment; and return the target answer information corresponding to the question sentence to be found to the terminal 10.

[0078] Among them, the information search method of the embodiment of the present application may include processing methods such as receiving a question statement to be searched, searching for target answer information, and returning target answer information.

[0079] It should be noted that the order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0080] See also Figure 2a , Figure 2a A schematic diagram of the steps of an information search method provided in an embodiment of the present application, the specific process is as follows:

[0081] 101. Receive a problem statement to be searched.

[0082] The question statement to be found may be a question statement or question information that the user needs to answer, and is used to reflect the user's intention information.

[0083] In order to provide a short answer information search service, the embodiment of the present application receives the question sentence to be searched sent by the user, so as to subsequently understand the user's intention based on the question sentence to be searched and provide corresponding short answer information.

[0084] 102. Search the updated question and answer information database for target answer information corresponding to the question statement to be searched.

[0085] Among them, the updated question and answer information database is updated by the target question sentence and answer information with an associated relationship. The target question sentence is a sentence that conforms to the preset question sentence rules, and the answer information is determined by the trained text processing model based on the target question sentence and the associated target text segment.

[0086] The question-answer information base may be a database storing question-answer pairs, which is applied to a search-based question-answer system in a search engine to provide answer information to a question statement. The question-answer pair refers to a combination of a question sentence (question statement) and answer information (answer sentence or answer information), which includes an association relationship between the question sentence and the answer information, and is used to subsequently match the answer information (answer information) corresponding to the question sentence (question sentence to be answered) raised by the user.

[0087] The target answer information may be information corresponding to the question statement to be found, and is used to answer the question (question statement to be found) raised by the user. The target answer information is obtained from the question and answer information database.

[0088] In order to obtain the target answer information corresponding to the question statement to be found, after receiving the question statement to be found, the embodiment of the present application searches for the target answer information corresponding to the question statement to be found from the pre-updated / established question and answer information library. Specifically, the method of searching for the corresponding target answer information can be: obtaining the sentence type information and intent information of the question statement to be found; determining the target question sentence corresponding to the question statement to be found based on the sentence type information and intent information; and searching for the target reply information associated with the target question sentence through the updated question and answer information library.

[0089] It should be noted that, when the user raises the question statement to be found, there is a difference between the sentence structure or expression of the question statement to be found and the actual question statement in the question and answer information library, which may affect the accuracy of the subsequent acquisition of the target answer information. In an embodiment of the present application, in order to accurately find the target answer information corresponding to the question statement to be found from the question and answer information library, first, the target question statement corresponding to the question statement to be found can be determined based on the sentence type information and intention information corresponding to the question statement to be found. The target question statement is the same as or very similar to a question statement contained in the question and answer information library, thereby realizing the conversion of the user's question statement to be found; and then, the target answer information corresponding to the target question statement is searched from the updated question and answer information library. In the above manner, the matching degree of the target answer information corresponding to the question information to be found can be improved, and the accuracy of the user in obtaining the target answer information can be improved.

[0090] In the embodiment of the present application, a method for updating a question and answer information database is also provided. Figure 2b As shown, the updating / building process of the question and answer information database is shown in steps S1-S5. Specifically, before the step of "searching for target answer information corresponding to the question statement to be searched from the updated question and answer information database", it may include:

[0091] S1. Collect a set of question sentences.

[0092] The question statement set includes multiple question statements, that is, the question statement set may be an information set including multiple question statements.

[0093] The question statement may be a statement or question for searching or obtaining various information, which may reflect the user's intention information. For example, when the question statement is "What is the function of A mouse", the question statement reflects that the user wants to obtain relevant information about "A mouse"; for another example, when the question statement is "B person", which is a single noun, the question statement reflects that the user may want to obtain relevant information about "B person".

[0094] In the embodiment of the present application, the question statement can be used as a basis for information search to construct a question-answer pair, thereby establishing a question-answer information database, which is used to answer users' daily questions. Among them, the question-answer pair refers to a combination of a question sentence (question sentence) and answer information (answer sentence or answer information), which contains the association relationship between the question sentence and the answer information, and is used for subsequent matching of the answer information (answer information) corresponding to the question sentence (question sentence to be answered) raised by the user.

[0095] In order to improve the matching degree between question statements and answer information, the embodiment of the present application can extract question statements from pre-stored question and answer pairs, collect question statements, and obtain a set of question statements, so as to facilitate the subsequent reconstruction of question and answer pairs based on the collected question statements, thereby improving the matching degree between question statements and answer information.

[0096] In some implementations, the method for collecting the question statement set may also be: obtaining historical search records in the local cache; reading the search information in the historical search records, and determining the read search information as a question statement; and adding the question statement to the question statement set. For example, taking the server as an example, when each terminal application sends a search request for a question statement to the server, the server local cache will contain a search record of the search information corresponding to the question statement. In order to obtain the question statement for constructing the question-answer pair, the historical search information can be obtained from the historical search records of the server as the question statement, so that the subsequent construction of the question-answer pair is more in line with the user's information acquisition needs and has reliability.

[0097] In addition, in order to obtain the information search basis (question statement) for constructing a question and answer pair, the embodiments of the present application can obtain online question statements in real time, such as a user sends a question statement to a server through a target application to obtain answer information corresponding to the question statement. Since the question statement sent by the user meets the user's information acquisition needs, the currently constructed question and answer pair set may not contain the question and answer pair corresponding to the question statement, or may not meet the user's information needs; therefore, the question statements sent by the user are collected in real time to facilitate the subsequent construction of question and answer pairs.

[0098] Through any one of the above methods or combinations, a set of question sentences is collected for subsequent construction of question-answer pairs, thereby improving the coverage of answer information corresponding to the question sentences and facilitating users to obtain the response information corresponding to the question sentences.

[0099] S2. Filter out a target question statement that meets preset question statement rules from multiple question statements.

[0100] Among them, the preset question statement rule can be a rule for filtering out question statements that meet the requirements for constructing question and answer pairs, and is used to filter question statements in the collected question statement set to filter out target question statements that meet the preset rules.

[0101] It should be noted that since the question-answer pair is suitable for answering users' daily questions, that is, matching routine questions raised by users, when constructing the question-answer pair, the target question sentence that can be used to construct the question-answer pair can be screened according to the preset question sentence rules. Among them, the preset question sentence rules may include sentence completeness rules for question sentences, timeliness rules for question sentences, grammatical rules for question sentences, sentence type rules for question sentences, etc. In order to avoid ambiguity in question sentences, which leads to invalidity in the subsequent generation of question-answer pairs and waste of resources, the embodiment of the present application needs to select question sentences that meet the preset question sentence rules for the subsequent construction of question-answer pairs.

[0102] In some implementations, the step of “selecting a target question statement that meets preset question statement rules from multiple question statements” includes:

[0103] (1) Classify multiple question statements and obtain the category label corresponding to each question statement.

[0104] Among them, the category label can be an identifier of the sentence type of the question statement, which is used to indicate the sentence category of the question statement and reflect the answer direction of the question statement. For example, in an embodiment of the present application, the category label may include thing category (what), time category (when), position category (where), person category (who), numerical category (numeric), selection category (which), judgment category (yes_no), evaluation category (how), causal category (why), length category (what-long), quantity category (what-multi), etc. Among them, question statements of thing category (what), time category (when), position category (where), person category (who), and numerical category (numeric) belong to question statements (query statements) of the short answer category.

[0105] It should be noted that each category of question statements has a corresponding category label. For example, the category label corresponding to the question statement of the thing category (what) may be a “what label”, and the category label corresponding to the question statement of the time category (when) may be a “when label”.

[0106] In order to improve the matching degree of subsequent answers to question statements raised by users, the embodiment of the present application needs to determine the category label corresponding to each question statement, that is, the sentence type information, before constructing a question-answer pair, so as to facilitate the subsequent selection of question statements with clear categories for use in constructing question statements of the question-answer pair.

[0107] In some implementations, the question statement can be identified by a trained category label recognition model to obtain the statement type (i.e., category) corresponding to the question statement. Specifically, the question statement is input into the trained category label recognition model; the question statement is embedded by the category label recognition model to obtain the encoding vector corresponding to the question statement; the encoding vector corresponding to the question statement is classified by the category label recognition model to obtain the category label corresponding to the question statement.

[0108] The training process of the trained category label recognition model can be: jointly training the preset category label recognition model according to the sample question sentences and the sample category labels until the category label difference output by the model converges to obtain the trained category label recognition model; it should be noted that during the training, by using a large number of sample question sentences and the corresponding sample category labels for training, it is ensured that the model converges when outputting the category label difference corresponding to the question sentence of each sentence type. In this way, the category label (sentence type) of the question sentence is identified through the model, and the efficiency of the subsequent selection of the target question sentence is improved.

[0109] (2) Based on the word information of each question sentence, identify the intention information corresponding to each question sentence.

[0110] The word information may be one or more phrases or word features contained in the question statement, and the word information may represent the information content of the question statement, and the intention of the question statement may be reflected based on the information content. For example, if the question statement is "the rules of game A", the word information of the question statement may include "game A" and "rules", and the intention information of the question statement may be reflected through "game A" and "rules", such as "get / search for the rules of game A".

[0111] In order to avoid ambiguity in the obtained question sentences, which will lead to invalidity and waste of resources in the subsequent generation of question-answer pairs, the embodiment of the present application needs to select question sentences with clear intent information for the subsequent construction of question-answer pairs.

[0112] Among them, the step of "identifying the intention information corresponding to each question sentence based on the word information of each question sentence" may include: first, extracting the word information in the question sentence based on the part-of-speech information, the part-of-speech information is information based on which the word classes are divided, and is used to divide each question sentence into multiple word features or word information based on the part-of-speech information; then, matching the word information with a preset word information table, the preset word information table contains preset word information that can be used to reflect the intention; when the target word information corresponding to the word information is matched from the preset word information table, the intention information corresponding to each question sentence is determined based on the matched target word information.

[0113] In some implementations, the intent information of each question statement can be identified by a trained intent information recognition model to obtain the intent information corresponding to the question statement. Specifically, the question statement is input into the trained intent information recognition model; the question statement is embedded by the intent information recognition model to obtain the encoding vector corresponding to the question statement; the encoding vector corresponding to the question statement is classified by the category label recognition model to obtain the intent information corresponding to the question statement.

[0114] The training process of the intention information recognition model can be: jointly training the preset model according to the sample question sentences and the sample intention information until the intention information difference output by the model converges, and a trained intention information recognition model is obtained; it should be noted that during training, by using a large number of sample question sentences and the corresponding sample intention information for training, it is ensured that the model converges when outputting the intention information difference corresponding to each question sentence. In this way, the intention information of the question sentence is recognized by the model, and the efficiency of the subsequent selection of the target question sentence is improved.

[0115] It should be noted that when it is recognized that a question sentence has corresponding intent information, it means that the question sentence has complete information, is a complete sentence, and complies with the sentence completeness rule.

[0116] In some embodiments, when identifying the intent information and category label corresponding to the question sentence, the question sentence can be jointly identified through the trained model. Specifically, the question sentence is input into the trained first target model to obtain the category label and intent information corresponding to the question sentence; wherein the first target model is obtained by jointly training the preset model with the sample question sentence, the sample category label and the sample intent information.

[0117] Specifically, the training process of the first target model can be: inputting the sample question statement into the preset model to obtain the predicted intent information and predicted category label output by the model; obtaining the information difference between the predicted intent information and the sample intent information, and obtaining the category difference between the predicted category label and the sample category label; adjusting the network parameters in the preset model according to the information difference and the category difference until the information difference and the category difference iteratively converge to obtain the trained first target model.

[0118] Through the above method, by combining the intent information and category labels of the question sentence, the model is trained by multi-task joint training, so that the model undergoes large-scale pre-training and obtains an iteratively converged first target model, so that the first target model outputs the predicted intent information and category labels when recognizing the question sentence. Through multi-task coordinated training, the trained first target model is more effective, the recognition performance of the first target model is improved, and the accuracy of the model in intent recognition and category label recognition of the question sentence is improved.

[0119] (3) Based on the category label and intent information, a target question sentence that meets the preset question sentence rules is selected from multiple question sentences.

[0120] In order to avoid ambiguity in question statements, which may lead to invalidity and waste of resources in the subsequent generation of question-answer pairs, the embodiment of the present application needs to select question statements that comply with preset question statement rules for the subsequent construction of question-answer pairs.

[0121] Among them, the step of "selecting a target question sentence that meets the preset question sentence rules from multiple question sentences based on the category label and the intention information" includes:

[0122] (3.1) Obtain the timeliness label corresponding to each question statement, where the timeliness label is used to indicate the timeliness type of the corresponding question statement.

[0123] Among them, the timeliness label refers to the timeliness type corresponding to the question statement, which can reflect the timeliness requirements of the question statement for the obtained answer information (answer information); among them, the timeliness label can include a non-timeliness label, a weak timeliness label and a strong timeliness label. For example, as time goes by, the answer information (answer information) can still satisfy the corresponding question statement, which means that the timeliness label of the question statement is a non-timeliness label; as time goes by, the answer information (answer information) changes very little, that is, the answer information (answer information) is applicable within a certain period of time, which means that the timeliness label of the question statement is a weak timeliness label; for example, as time goes by, the answer information (answer information) corresponding to the question statement changes greatly, that is, the reply information (answer information) is not fixed, and the reply information (answer information) update cycle is relatively short, which means that the timeliness label of the question statement is a strong timeliness label.

[0124] In order to facilitate the subsequent selection of question statements that meet the preset timeliness rules, the embodiment of the present application needs to first obtain the timeliness label of the question statement. The timeliness label can be obtained by: inputting each question statement into the trained timeliness recognition model; embedding the question statement through the timeliness recognition model to obtain the encoding vector corresponding to the question statement; classifying the encoding vector corresponding to the question statement through the timeliness recognition model to obtain the timeliness label corresponding to each question statement.

[0125] Among them, the trained time-limit recognition model is obtained by jointly training the preset model with sample question sentences and sample time-limit labels, and the time-limit recognition model is a binary classification model. The training process of the trained time-limit recognition model can be: inputting the sample question sentence into the preset model to obtain the predicted time-limit label output by the model; obtaining the time-limit label difference between the predicted time-limit label and the sample time-limit label; adjusting the network parameters in the preset model according to the time-limit label difference until the time-limit label difference iteratively converges to obtain the trained time-limit recognition model. It should be noted that during training, by using large-scale sample question sentences and corresponding sample time-limit labels for training, it is ensured that the model converges when outputting the time-limit label difference corresponding to each question sentence, so that the time-limit label of the question sentence is identified through the model, and the efficiency of subsequent selection of the target question sentence is improved.

[0126] (3.2) Perform grammar check on each question statement, and determine the question statement that meets the preset grammar rules as a legal statement.

[0127] The preset grammar rules may be grammar judgment rules such as grammatical error recognition (recognizing whether a sentence has errors), grammatical error classification (recognizing specific error types), grammatical error location (recognizing the location of errors), etc., which are used to select problem sentences that conform to the grammatical structure.

[0128] It should be noted that since the question sentences used to construct the question-answer pairs are collected in a variety of ways, they may contain grammatical errors, such as the reversal of the subject, predicate and object in the sentence structure corresponding to the question sentence, typos, etc., which will affect the constructed question-answer pairs and prevent them from being accurately matched, thereby affecting the user's acquisition of accurate answer information through the question-answer pairs. Therefore, in order to enable the subsequent constructed question-answer pairs to be used accurately, it is necessary to ensure the grammatical accuracy of the question sentences used to construct the question-answer pairs. The embodiment of the present application needs to perform grammatical verification on the question sentences, such as grammatical structure, typos, etc., to select question sentences that meet the preset grammatical rules as legal sentences.

[0129] In some implementations, the grammatical structure of the question statement can be detected by the model. Specifically, the question statement is input into the trained grammar detection model; the question statement is embedded by the grammar detection model to obtain the encoding vector corresponding to the question statement; the encoding vector corresponding to the question statement is classified by the grammar detection model to obtain the grammar detection result. Furthermore, the grammar detection result is compared with the preset grammar rules to determine the question statement that meets the preset grammar rules as a legal statement.

[0130] Among them, the trained grammar detection model is obtained by jointly training a preset model with sample question sentences and sample grammar detection results. Specifically, the training process of the grammar detection model can be: inputting the sample question sentence into the preset model to obtain the predicted grammar detection result output by the model; obtaining the grammatical difference between the predicted grammar detection result and the sample predicted grammar detection result; adjusting the network parameters in the preset model according to the grammatical difference until the grammatical difference iteratively converges to obtain the trained grammar detection model. It should be noted that the grammar detection model is a binary classification model.

[0131] The embodiment of the present application can improve the efficiency of grammar detection for question sentences through the above method.

[0132] (3.3) Based on the timeliness label, category label and intent information, select the target question sentence that meets the preset question sentence rules from the legality sentences.

[0133] Specifically, the preset question statement rules may also include preset statement completeness rules, preset timeliness rules, and preset statement type rules. In order to avoid ambiguity in the question statement, which may lead to invalidity in the subsequent generation of question-answer pairs and waste of resources, the embodiment of the present application needs to select question statements that meet the preset question statement rules for subsequent construction of question-answer pairs.

[0134] Among them, the preset sentence completeness rule may mean that the question sentence should have question intent completeness, that is, the question sentence should have intent information; the preset sentence completeness rule is used to select question sentences with intent information.

[0135] Among them, the preset sentence type rule can be a rule for screening the sentence type of the question sentence. For example, the sentence type (category) can include thing category (what), time category (when), location category (where), person category (who), value category (numeric), selection category (which), judgment category (yes_no), evaluation category (how), cause and effect category (why), length category (what-long), quantity category (what-multi), etc.; among them, the question sentences of thing category (what), time category (when), location category (where), person category (who), and value category (numeric) belong to the question sentences of short answer category; assuming that the preset sentence type rule is to select the question sentence of short answer category, when the category of the question sentence belongs to any category of thing category (what), time category (when), location category (where), person category (who), and value category (numeric), it meets the preset sentence type rule.

[0136] Among them, the preset timeliness rule can be a rule for screening / selecting question statements that meet the preset timeliness requirements. In an embodiment of the present application, the preset timeliness rules may include no timeliness and weak timeliness, so as to select question statements that meet the no timeliness and weak timeliness requirements. It should be noted that since the answer information corresponding to the question statement with strong timeliness is updated quickly, it is usually not suitable for constructing question and answer pairs, otherwise it will waste resources and cause the question statement and the answer information (answer information) to have a low match.

[0137] In order to obtain question statements that comply with preset question statement rules, after obtaining the legal statements, the embodiments of the present application screen the legal statements according to preset timeliness rules, preset statement type rules and preset statement integrity rules, so as to select the target question statements that comply with the preset question statement rules from the legal statements.

[0138] Specifically, the legal statements are screened through the preset sentence type rules, and the legal statements of the short answer type are determined as the first question statements; the first question statements are screened through the preset sentence completeness rules, and the first question statements with intent information are determined as the second question statements; the second question statements are screened through the preset timeliness rules, and the second question statements with timeliness labels of no timeliness label and low timeliness label are determined as the target question statements.

[0139] Through the above method, a question sentence that conforms to the preset question sentence rules can be selected as the target question sentence, which can avoid ambiguity in the question sentence, resulting in invalidity in the subsequent generation of question-answer pairs and waste of resources. In the embodiment of the present application, a question sentence that conforms to the preset question sentence rules is selected for the subsequent construction of question-answer pairs, so that the feasibility and reliability of subsequent answering of question sentences based on the question-answer pairs are achieved.

[0140] S3. Match the target text segment associated with the target question sentence from the preset document library.

[0141] The preset document library may be a data library or database storing a large number of documents. Each document may include one or more paragraphs, and each paragraph includes text content. For example, the document may be an academic paper, a log, an abstract, news, etc. Taking an academic paper as an example, it may include multiple paragraphs, and each paragraph includes academic content. No further details are given here.

[0142] In order to subsequently obtain answer information that is highly correlated with the question statement, the embodiment of the present application needs to first locate or match a target text segment that is highly correlated from a preset document library. Specifically, the matching method of the target text segment can be: according to the target word information contained in the target question statement, search for a target document associated with the target word information from the preset document library, and then obtain a target text segment that has a high degree of matching with the target word information from the target text segment, so as to obtain answer information that is highly correlated with the target question statement based on the target document, so as to improve the matching degree between the target question statement and the corresponding answer information.

[0143] In some implementations, the step of “matching a target text segment associated with a target question sentence from a preset document library” includes:

[0144] (1) Obtain the target word information in the target question sentence.

[0145] The target word information may be one or more phrases or word features contained in the question sentence. These word information may represent the information content of the question sentence, and the intention of the question sentence may be reflected based on these information contents.

[0146] In order to improve the accuracy of subsequent matching to the target text segment, the embodiment of the present application obtains the target word information in the target question sentence, so as to facilitate the subsequent matching of the associated target text segment based on the obtained target word information, thereby avoiding other irrelevant characters or text in the target question information from participating in the matching, resulting in a low correlation between the matched target text segment and the target question sentence.

[0147] In an embodiment of the present application, the method for acquiring the target word information may be: performing word segmentation processing on the target question sentence according to the part-of-speech information to obtain the target word information, wherein the part-of-speech information is information based on which the word classes are divided, and is used to divide the target question sentence into a plurality of word features or word information according to the part-of-speech information. In this way, the target word information in the target question sentence is acquired, so that the target text segment can be matched according to the target word information in the subsequent process, thereby improving the accuracy and efficiency of the subsequent acquisition of the associated answer information.

[0148] (2) Search for target documents associated with the target word information from a preset document library.

[0149] The target document is a document text stored or deposited in a preset document library, which contains text information.

[0150] In order to improve the matching degree of the answer information obtained subsequently and improve the efficiency of constructing question-answer pairs, the embodiment of the present application first obtains the target document associated with the target question statement. Specifically, after extracting the target word information, the target document associated with the target word information is searched from the preset document library, so as to facilitate the subsequent search for relevant answer information from the matched target document, effectively avoiding the reading of documents with low relevance, saving resources, and improving the efficiency of obtaining answer information.

[0151] In some implementations, the step of “searching for a target document associated with the target word information from a preset document library” includes:

[0152] (2.1) Obtaining a preset document set from a preset document library, where the preset document set includes multiple preset documents;

[0153] (2.2) Calculating the association weight based on each preset document and the target word information to obtain a first association weight coefficient;

[0154] (2.3) calculating the association weight based on the target word information and the target question sentence to obtain a second association weight coefficient;

[0155] (2.4) Obtaining word information weight values ​​of target word information in multiple preset documents;

[0156] (2.5) determining a relevance score of each preset document relative to the target question statement according to the first relevance weight coefficient, the second relevance weight coefficient and the word information weight value;

[0157] (2.6) A preset document having a relevance score greater than a preset relevance score threshold is determined as a target document.

[0158] In order to obtain a target document with a high degree of relevance to the target question information, the embodiment of the present application calculates the relevance score between the target word information in the target question sentence and each document after obtaining the preset document from the preset document library. The relevance score can reflect the relevance between the corresponding document and the target question sentence (or target word information); then, the document with a higher relevance score is selected as the target document.

[0159] The relevance score can reflect the relevance between the document and the target question statement. The higher the relevance score, the greater the relevance between the document and the target question statement. The relevance score can be determined based on the relevance between the target word information and the preset document, the relevance between the target word information and the target question statement, and the weight value of each target word information.

[0160] Specifically, the first association weight coefficient is obtained by calculating the association weight between each preset document and the target word information. It should be noted that since the relationship between word frequency and relevance is nonlinear, the relevance score of each target word information to the document will not exceed a specific threshold. When the number of times the word information appears reaches a threshold, its influence will not increase linearly, and this threshold will be related to the document itself. Therefore, when describing the similarity between the target word information and the document, the calculation process of the first association weight coefficient is as follows:

[0161] and

[0162] Among them, S(q i ,d) represents the first association weight coefficient (i.e., the correlation coefficient between the target word information and the document); q i represents the target word information in the target question sentence; i represents the position or order of the target word information in the target question sentence, i∈t, t is any positive integer; d represents the preset document; f td Indicates the target word information q corresponding to t i The frequency of the word in document d; L d Indicates the length of document d; L ave represents the average length of all documents; k 1 represents a positive variable parameter used to standardize the range of article word frequency. 1 =0, the first associated weight coefficient is closer to the original word frequency; b represents the importance of measuring the weight of the target word information by the document length. b is an adjustable parameter, b∈(0,1). When b is 1, the document length is fully used to weigh the weight of the target word information. When b is 0, it means that the document length is not used to weigh the weight of the target word information.

[0163] Specifically, the association weight is calculated based on the target word information and the target question sentence to obtain the second association weight coefficient. The calculation process of the second association weight coefficient is as follows:

[0164]

[0165] Among them, S(q i , Q) represents the second association weight coefficient, tf tq Indicates the target word information q corresponding to t i The word frequency in the target question sentence Q, k 3 Represents an adjustable parameter used to adjust the word frequency range in the target question sentence Q.

[0166] Specifically, the word information weight values ​​of the target word information in multiple preset documents are obtained, that is, the word information weight values ​​of the target word information in all preset documents are calculated. The word information weight values ​​are expressed as follows:

[0167]

[0168] Among them, IDF(q i ) represents the word information weight value, N represents the number of all indexed documents, df i Indicates that it contains the target word information q i It can be understood that for a certain target word information q i , if it contains the target word information q i The more documents there are, the more information about the target word q i The smaller the importance, or the lower the discrimination, the higher the word information weight value IDF(q i ) is smaller, therefore, IDF(q i ) to characterize the target word information q i The weight in the document.

[0169] Specifically, the relevance score of each preset document relative to the target question statement is determined according to the first relevance weight coefficient, the second relevance weight coefficient and the word information weight value. The relevance score is expressed as follows:

[0170]

[0171] Among them, RSV d Represents the relevance score of the document relative to the target question sentence. Since the other parameters in this formula have the same interpretation as the parameters of the first relevance weight coefficient, the second relevance weight coefficient and the word information weight value mentioned above, they are not further elaborated here.

[0172] In the embodiment of the present application, after obtaining the relevance score of each preset document relative to the target question sentence, the target document can be selected according to the relevance score corresponding to each preset document. For example, the preset document with the largest relevance score is selected as the target document; or by setting a preset relevance score threshold, by selecting the preset document with a score greater than the preset relevance score threshold as the target document, multiple target documents can be selected, so as to facilitate the subsequent selection of the target paragraph with higher relevance from the multiple target documents, which is reliable.

[0173] (3) Segment the target document according to preset segmentation rules to obtain multiple candidate segments.

[0174] The preset text segmentation rule may be a rule for dividing each text segment in a document, and the preset text segmentation rule includes a sliding window and a segmentation step, wherein the sliding window is used to limit the text segment size or the amount of text content when segmenting the document, and the segmentation step is used to limit the segmentation frequency or density when segmenting the document. For example, the sliding window may be 300 characters or 3 lines of text content, and the segmentation step may be to move the sliding window with 100 characters or 1 line of text content as the sliding step. The above is only an example, and the size of the sliding window and the segmentation step is not limited here.

[0175] After obtaining the target text segment, the embodiment of the present application can segment the target document according to a preset text segmentation rule to obtain multiple candidate text segments, so as to facilitate the subsequent selection of a target text segment with higher relevance from the multiple candidate text segments.

[0176] It should be noted that the target document is segmented according to the preset segmentation rule to ensure the size of the candidate segments obtained from the target document and the density between the candidate segments to avoid missing relevant text information.

[0177] (4) Filter multiple candidate text segments to obtain the target text segment corresponding to the target question sentence.

[0178] In order to obtain a target text segment that is highly relevant to the target question sentence, the embodiment of the present application needs to perform preliminary filtering on the candidate text segments to obtain a target text segment that contains text content corresponding to the answer information.

[0179] In some implementations, the step of “filtering multiple candidate text segments to obtain a target text segment corresponding to the target question sentence” includes:

[0180] (4.1) Each candidate text segment and target question sentence are input into a preset sentence-segment matching model to obtain the matching degree between each candidate text segment and the target question sentence.

[0181] The preset sentence segment matching model is obtained by joint training of sample segments, sample question sentences and sample matching degrees. Specifically, a preset model is obtained, and the sample segments and sample question sentences are simultaneously input into the preset model to obtain a predicted matching degree; the difference between the predicted matching degree and the sample matching degree is obtained; the network parameters of the preset model are adjusted according to the difference between the predicted matching degree and the sample matching degree until the difference between the predicted matching degree and the sample matching degree converges, thereby obtaining a trained preset sentence segment matching model. It should be noted that in the stage of training the model, large-scale sample question information and corresponding sample segments are used to train the model to improve the performance of the model.

[0182] In order to obtain the matching degree between the candidate segment and the target question sentence, a sentence-segment matching pair can be generated for each candidate segment and the target question sentence, and each sentence-segment matching pair can be input into a preset sentence-segment matching model. The preset sentence-segment matching model can be used to determine the matching degree between each candidate segment and the target question sentence based on the association features between the candidate segment and the target question sentence.

[0183] In some embodiments, the step of “inputting each candidate text segment and the target question sentence into a preset sentence-segment matching model to obtain a matching degree between each candidate text segment and the target question sentence” includes:

[0184] (4.1.1) Each candidate text segment and target question sentence is input into the preset sentence-text matching model.

[0185] (4.1.2) The candidate text segments and target question sentences are embedded through the preset sentence segment matching model to obtain the embedded coding vector.

[0186] The embedded coding vector may be composed of a character feature subvector, a position feature subvector, and a segmentation subvector. Among them, the character feature subvector may be a feature vector corresponding to each character (such as text, word or number) in the candidate paragraph or target question sentence. The position feature subvector may be a feature vector generated based on the position information of each character in the candidate paragraph or target question sentence. The segmentation subvector may be a vector representing the candidate paragraph or target question sentence, which is used to distinguish the candidate paragraph from the target question sentence. Specifically, the segmentation subvector may represent the sentence to which each character belongs, such as the candidate paragraph or the target question sentence, to determine that the corresponding character belongs to the input candidate paragraph or target question sentence.

[0187] In order to obtain the matching degree between the candidate segment and the target question sentence, first, the embodiment of the present application embeds the candidate segment and the target question sentence through a preset sentence segment matching model to obtain the encoding vector corresponding to the candidate segment and the target question sentence; and then determines the matching degree between the current candidate segment and the target question sentence based on the correlation between the feature vectors in the encoding vector.

[0188] Specifically, when the preset sentence-text matching model performs embedding processing on the target question sentence and the candidate text segment, the embedding processing may include: preprocessing the target question sentence and the candidate text segment through the preset sentence-text segment model to obtain the preprocessed target question sentence and the candidate text segment, wherein the preprocessing method may be reading, and specifically the characters in the target question sentence and the candidate text segment may be read through the corresponding character units of the model; performing character vector conversion on the preprocessed target question sentence and the candidate text segment through the preset sentence-text segment model to obtain the corresponding character feature sub-vector; performing vector conversion on the position information of the characters in the preprocessed target question sentence and the candidate text segment through the preset sentence-text segment model to obtain the corresponding position feature sub-vector; segmenting the preprocessed target question sentence and the candidate text segment through the preset sentence-text segment model to obtain the corresponding segmentation sub-vector; performing weighted processing on the character feature sub-vector, the position feature sub-vector and the segmentation sub-vector through the preset sentence-text segment model, such as summation processing, to obtain the embedded coding vector.

[0189] (4.1.3) The encoding vector is classified and processed by a preset sentence-text matching model to obtain a matching degree, wherein the matching degree is generated by the preset sentence-text matching model from the correlation between the sub-vectors of the target question sentence and the candidate text in the encoding vector.

[0190] The sub-vector may be a character feature sub-vector, a position feature sub-vector, and a segmentation sub-vector corresponding to each character in the target question sentence and the candidate text segment.

[0191] In order to obtain the matching degree between the candidate text segment and the target question sentence, the embodiment of the present application classifies the coding vector according to the correlation between the sub-vectors between the target question sentence and the candidate text segment in the coding vector through a preset sentence-text matching model, and obtains the matching degree between the candidate text segment and the target question sentence, so as to facilitate the subsequent preliminary filtering of the candidate text segment according to the matching degree to improve the matching degree.

[0192] (4.2) The candidate text segments whose matching degree is greater than a preset matching degree threshold are determined as target text segments.

[0193] The preset matching degree threshold may be a preset matching degree reference value, which is used to screen or filter the candidate text segments.

[0194] In order to obtain a target text segment with a high correlation with the target question sentence, after obtaining the matching degree between the candidate text segment and the target question sentence, the embodiment of the present application filters the candidate text segments with a low matching degree by using a preset matching degree threshold, so as to determine the candidate text segment with a matching degree greater than the preset matching degree threshold as the target text segment. In this way, preliminary filtering of the candidate text segments is achieved to obtain the target text segment with a high correlation with the target question sentence.

[0195] S4. Input the target question sentence and the target text segment into the trained text processing model to obtain the answer information corresponding to the target question sentence.

[0196] The trained text processing model is obtained by jointly training the preset model with the location information of the sample question sentence, the sample text segment, and the sample answer information. The sample question sentence carries the sample sentence type information, and the sample text segment carries the document title information of the document in which it is located; specifically, the training process of the model can be: input the sample question sentence and the sample text segment into the preset model, so that the preset model embeds the sample question sentence, the sentence type information corresponding to the sample question sentence, the sample text segment, and the document title corresponding to the sample text segment, and classifies them to obtain the predicted location information of the text content associated with the sample question sentence in the sample text segment; obtain the location information difference between the predicted location information and the sample location information; and adjust the network parameters in the preset model according to the location information, and after iterative training, until the location information difference converges, obtain the trained text processing model. It should be noted that in the process of training the model, it is necessary to use ultra-large-scale sample text data to train the model to improve the performance of the model.

[0197] In some implementations, the step of “inputting the target question sentence and the target text segment into the trained text processing model to obtain answer information corresponding to the target question sentence” includes:

[0198] (1) Input the target question sentence and target text segment into the trained text processing model.

[0199] The target question sentence carries the corresponding sentence type information, and the target text segment carries the document title of the document.

[0200] The sentence type information may be information corresponding to the category label to which the question sentence belongs. For example, if the target question sentence is "When is Labor Day?", the sentence type information of the target question sentence belongs to information corresponding to the "when label".

[0201] (2) Extracting candidate answer information corresponding to the target question sentence from the target text segment through a text processing model based on the sentence type information of the target question sentence and the document title corresponding to the target text segment.

[0202] In order to obtain more accurate answer information from the target text segment, the embodiment of the present application combines the sentence type information of the target question sentence and the document title of the document where the target text segment is located to achieve multi-dimensional combination, and determines the candidate answer information that is strongly related to the target question sentence from the target text segment.

[0203] In some embodiments, the step of “extracting candidate answer information corresponding to the target question sentence from the target text segment based on the sentence type information of the target question sentence and the document title corresponding to the target text segment through a text processing model” includes:

[0204] (2.1) Embedding the target question sentence, sentence type information, target text segment and document title through the text processing model to obtain the target encoding vector;

[0205] (2.2) classifying the target encoding vector through the text processing model and outputting the location information of the text content associated with the target question sentence in the target text segment;

[0206] (2.3) extracting the text content corresponding to the position information in the target text segment to obtain the target text content;

[0207] (2.4) Determine the target text content as candidate answer information.

[0208] In order to obtain more accurate answer information from the target text segment, the embodiment of the present application embeds the target question sentence, the sentence type information corresponding to the target question sentence, the target text segment and the document title corresponding to the target text segment through a trained text processing model to obtain a target encoding vector; the target encoding vector is classified through the text processing model to obtain the position information of the text content associated with the target question sentence in the target text segment; based on the position information, the text content corresponding to the position information in the target text segment is extracted to obtain the target text content, and determined as candidate answer information strongly related to the target question sentence.

[0209] Through the above method, candidate answer information related to the target question sentence can be further extracted from the target text segment with higher relevance, so as to improve the matching degree between the question sentence and the answer information in the subsequent process.

[0210] (3) Determine the answer information corresponding to the target question sentence based on the candidate answer information.

[0211] The answer information is the answer information that matches the target question sentence and is used to construct a question-answer pair together with the target question sentence.

[0212] In order to improve the efficiency of subsequent construction of question-answer pairs, after obtaining the candidate answer information, the embodiment of the present application needs to determine the answer information corresponding to the target question sentence from the candidate answer information, that is, to determine the candidate answer information as the answer information corresponding to the target question sentence, so as to facilitate the subsequent construction of question-answer pairs and improve the efficiency of constructing question-answer pairs.

[0213] It should be noted that in the embodiment of the present application, since the number of target documents associated with the target question sentence may be multiple, the number of target segments associated with the target question sentence is also multiple. Candidate answer information related to the target question sentence can be extracted from the multiple target segments respectively, that is, multiple candidate answer information is obtained. At this time, it is necessary to select one answer information from the multiple candidate answer information so as to jointly construct a question-answer pair with the target question sentence.

[0214] Specifically, the step of “determining answer information corresponding to the target question sentence based on the candidate answer information” includes:

[0215] (3.1) When multiple candidate answer information corresponding to the target question sentence is detected, the multiple candidate answer information is classified to obtain the candidate answer information corresponding to each information type, and the number of candidate answer information corresponding to each information type is obtained.

[0216] In an embodiment of the present application, after obtaining the candidate answer information corresponding to the target question sentence, the number of candidate answer information corresponding to the target question sentence is counted; when it is detected that the target question sentence has multiple corresponding candidate answer information, the multiple candidate answer information are classified, wherein the information classification refers to classifying the same or similar candidate answer information to determine the number of candidate answer information corresponding to each information type.

[0217] (3.2) Obtain the correlation score between the target question statement and the document where the candidate answer information is located.

[0218] The relevance score can reflect the relevance between the document and the target question statement. The higher the relevance score, the greater the relevance between the document and the target question statement. The relevance score can be determined based on the relevance between the target word information and the preset document, the relevance between the target word information and the target question statement, and the weight value of each target word information.

[0219] In order to obtain the association score between the target question statement and the target document where the candidate answer information is located, the embodiment of the present application performs an association weight calculation based on the target word information in each target document and the target question statement to obtain a first association weight coefficient; performs an association weight calculation based on the target word information and the target question statement to obtain a second association weight coefficient; obtains the word information weight value of the target word information in multiple preset documents; and determines the association score of each preset document relative to the target question statement based on the first association weight coefficient, the second association weight coefficient and the word information weight value.

[0220] (3.3) Weighted processing is performed according to the number of candidate answer information corresponding to each information type and the relevance score to obtain the target information score corresponding to each information type.

[0221] Among them, the target information score refers to the score of the information type corresponding to the candidate answer information, which can reflect the matching degree between the candidate answer information in the corresponding type and the target question statement. The target information score can be used to evaluate the credibility of the candidate answer information in the corresponding type as the answer information of the target question statement.

[0222] In order to obtain answer information that is closer to the information type of the target question statement, after obtaining the correlation score between the target question statement and the document where the candidate answer information is located, the embodiment of the present application performs weighted processing by the number of candidate answer information corresponding to each information type and the correlation score, such as multiplying, to obtain the target information score corresponding to each information type. In this way, the degree of fit or matching between the candidate answer information in each information type and the target question statement can be determined, so that the candidate answer information can be selected from multiple information types in the future, which is reliable.

[0223] (3.4) The candidate answer information in the information type with the largest target information score is determined as the answer information corresponding to the target question sentence.

[0224] In order to provide answer information that is closer to the information type of the target question sentence, the embodiment of the present application selects the candidate answer information in the information type with the largest target information score as the answer information corresponding to the target question sentence after determining the target information score corresponding to each information type. In this way, the matching degree between the target question sentence and the answer information is improved, so as to facilitate the subsequent construction of a more accurate question-answer pair.

[0225] S5. Establish an association relationship between the target question sentence and the corresponding answer information, and use the target question sentence and the corresponding answer information with the association relationship to update the question and answer information database to obtain an updated question and answer information database.

[0226] The question-answer information base may be a database storing question-answer pairs, which is applied to a search-based question-answer system in a search engine to provide answer information to a question statement. The question-answer pair refers to a combination of a question sentence (question statement) and answer information (answer sentence or answer information), which includes an association relationship between the question sentence and the answer information, and is used to subsequently match the answer information (answer information) corresponding to the question sentence (question sentence to be answered) raised by the user.

[0227] In order to enable the user to obtain the answer information corresponding to the question statement, after the embodiment of the present application obtains the answer information corresponding to the target question statement, it is necessary to bind the target question statement with the corresponding answer information and add it to the question and answer information library. Specifically, after obtaining the answer information corresponding to the target question statement, an association relationship is established between the target question statement and the corresponding answer information, and a target question statement and answer information with an association relationship, that is, a question and answer pair with an association relationship, is obtained, and the question and answer pair with an association relationship is updated to the question and answer information library. In this way, the coverage rate of the answer information of the question statement in the question and answer information library can be improved, so as to facilitate the subsequent search for the answer information corresponding to the user's question information based on the question and answer information library.

[0228] Among them, the association relationship between the target question sentence and the corresponding answer information is established, and the process can be: obtaining the sentence type information and intention information of the target question sentence, generating a question tag according to the sentence type information and intention information; determining the answer tag according to the intention information and answer information of the target question sentence; binding the question tag with the answer tag to establish the association relationship between the target question sentence and the corresponding answer information. For example, if the target question sentence is "When is Labor Day", the sentence type information of the target question sentence belongs to the sentence type of "when tag", the intention information can be "Labor Day time", and the generated question tag can be "Labor Day time". If the answer information is "Labor Day time is May 1st every year", the answer tag corresponding to the answer information can be "May 1st is Labor Day", and the question tag is established and bound to the reply tag to establish the association relationship between the target question sentence and the corresponding answer information, and obtain the corresponding question and answer pair.

[0229] In the above manner, the target question statement can be bound to the corresponding answer information to construct a question-answer pair, and updated to the question-answer information library to improve the coverage of the answer information for the question statement. In this way, when the question statement to be found is received later, the target answer information corresponding to the question statement to be found can be found in the updated question-answer information library.

[0230] 103. Return the target answer information corresponding to the question statement to be found.

[0231] In order to enable the found target answer information to be presented to the corresponding user, the embodiment of the present application needs to return the target answer information corresponding to the question sentence to be found after finding the target answer information corresponding to the question sentence to be found. Specifically, the found target answer information is returned to the corresponding terminal for display on the terminal, so that the user can know the target answer information corresponding to the question sentence to be found.

[0232] In an embodiment of the present application, a question statement set is obtained, which includes multiple question statements. The question statements are understood to obtain sentence type information, timeliness labels, grammatical conditions and intent information of each question statement. Then, a target question statement that meets preset question statement rules is selected from the multiple question statements, such as selecting a question statement that meets preset sentence types, preset timeliness rules, preset grammatical rules and has intent information as the target question statement. In this way, it is possible to avoid invalidation of subsequently generated question and answer pairs due to ambiguity in the question statements. For example, in the generated question and answer pairs, due to ambiguity in the question statements, they cannot be matched with the question statements to be found, and thus cannot be used to subsequently answer the question statements to be found, wasting system resources.

[0233] Furthermore, in the process of searching for answer information corresponding to the target question sentence, first, candidate documents associated with the target word information in the target question sentence are selected from the preset document library, then target documents with high relevance are selected from the candidate documents, and the target text segment is segmented to obtain the candidate text segment, and then a strongly related target text segment is selected from the candidate text segment, and finally, the answer information corresponding to the target question sentence is extracted from the target text segment, so as to accurately obtain the answer information corresponding to the target question sentence and improve the matching degree between the target question sentence and the answer information. Furthermore, when the target question sentence and the answer information are used to construct a question-answer pair, the accuracy of the question-answer pair is improved, so that when the user proposes a question sentence to be found, the target answer information corresponding to the question sentence to be found can be accurately found through the question-answer pair, which is reliable and improves the user experience.

[0234] As can be seen from the above, the embodiment of the present application can receive a question sentence to be found; search for the target answer information corresponding to the question sentence to be found from the updated question and answer information library, wherein the updated question and answer information library is updated by the target question sentence and the answer information having an associated relationship, the target question sentence is a sentence that conforms to the preset question sentence rules, and the answer information is determined by the trained text processing model according to the target question sentence and the associated target text segment; return the target answer information corresponding to the question sentence to be found. It can be obtained that the embodiment of the present application selects the target question sentence that conforms to the preset question sentence rules, and obtains the target text segment with a high correlation with the target question sentence, and obtains the answer information with a high correlation with the target question sentence from the target text segment, so as to update the question and answer information library according to the target question sentence and the answer information, thereby improving the matching degree between the question sentence and the answer information, constructing an accurate question and answer pair, and improving the accuracy of the user in obtaining the answer information through the updated question and answer information library.

[0235] According to the method described in the above embodiment, the following is further described in detail with examples.

[0236] The embodiment of the present application takes information search as an example to further describe the information search method provided in the embodiment of the present application.

[0237] See also Figure 3 , Figure 3 is another step flow chart of the information search method provided in the embodiment of the present application, Figure 4 is a schematic diagram of a scenario of an information search method provided in an embodiment of the present application, Figure 5 is a schematic diagram of the structure of the first target model provided in the embodiment of the present application, Figure 6 is a schematic diagram of the structure of the time-effect recognition model provided in the embodiment of the present application, Figure 7 is a structural diagram of a grammar detection model provided in an embodiment of the present application, Figure 8 is a schematic diagram of the structure of the matching recognition model provided in the embodiment of the present application, Fig. 9 This is a structural diagram of the text processing model provided in the embodiment of the present application; for ease of understanding, please refer to Figure 3 , Figure 4 , Figure 5 , Figure 6 , Figure 7 , Figure 8 and Fig. 9 , the embodiments of the present application are described.

[0238] In the embodiments of the present application, the information search method will be described from the perspective of an information search device, which can be integrated into a computer device such as a terminal or a server. When the processor on the terminal or server executes the program corresponding to the information search method, the specific process of the information search method is as follows:

[0239] 201. Collect a set of problem statements.

[0240] The question statement set includes multiple question statements.

[0241] The question statement may be a statement or question for searching or obtaining various information, which may reflect the user's intention information. For example, when the question statement is "What is the function of A mouse", the question statement reflects that the user wants to obtain relevant information about "A mouse"; for another example, when the question statement is "B person", which is a single noun, the question statement reflects that the user may want to obtain relevant information about "B person".

[0242] In the embodiment of the present application, the question statement can be used as a basis for information search to construct a question-answer pair, thereby establishing a question-answer information database, which is used to answer users' daily questions. Among them, the question-answer pair refers to a combination of a question sentence (question sentence) and answer information (answer sentence or answer information), which contains the association relationship between the question sentence and the answer information, and is used for subsequent matching of the answer information (answer information) corresponding to the question sentence (question sentence to be answered) raised by the user.

[0243] For example, a method for collecting a set of question statements may be: extracting question statements from pre-stored question-answer pairs, collecting question statements, and obtaining a set of question statements, so as to facilitate subsequent reconstruction of question-answer pairs based on the collected question statements, thereby improving the matching degree between question statements and answer information.

[0244] Another example is obtaining historical search records in the local cache; reading the search information in the historical search records, and determining the read search information as a question statement; and adding the question statement to the question statement set. For example, taking the server as an example, when each terminal application sends a search request for a question statement to the server, the server's local cache will contain a search record of the search information corresponding to the question statement. In order to obtain the question statement for constructing a question-answer pair, the historical search information can be obtained from the server's historical search records as the question statement, so that the subsequent construction of the question-answer pair is more in line with the user's information acquisition needs and is reliable.

[0245] In addition, it is also possible to obtain online question statements in real time, for example, a user sends a question statement to the server through the target application to obtain the answer information corresponding to the question statement. Since the question statement sent by the user meets the user's information acquisition needs, the currently constructed question and answer pair set may not contain the question and answer pair corresponding to the question statement, or may not meet the user's information needs; therefore, the question statements sent by the user are collected in real time to facilitate the subsequent construction of question and answer pairs.

[0246] Through any one of the above methods or combinations, a set of question sentences is collected for subsequent construction of question-answer pairs, thereby improving the coverage of answer information corresponding to the question sentences and facilitating users to obtain the response information corresponding to the question sentences.

[0247] 202. Filter out a target question statement that meets preset question statement rules from multiple question statements.

[0248] Among them, the preset question statement rule can be a rule for filtering out question statements that meet the requirements for constructing question and answer pairs, and is used to filter question statements in the collected question statement set to filter out target question statements that meet the preset rules.

[0249] Since the question-answer pair is suitable for answering users' daily questions, that is, matching routine questions raised by users, when constructing the question-answer pair, the target question sentence that can be used to construct the question-answer pair can be screened according to the preset question sentence rules. Among them, the preset question sentence rules may include sentence completeness rules for question sentences, timeliness rules for question sentences, grammatical rules for question sentences, sentence type rules for question sentences, etc. In order to avoid ambiguity in the question sentence, which leads to invalidity in the subsequent generation of question-answer pairs and waste of resources, the embodiment of the present application needs to select question sentences that meet the preset question sentence rules for the subsequent construction of question-answer pairs.

[0250] Among them, the preset sentence type rule can be a rule for screening the sentence type of the question sentence. For example, the sentence type (category) can include thing category (what), time category (when), location category (where), person category (who), value category (numeric), selection category (which), judgment category (yes_no), evaluation category (how), cause and effect category (why), length category (what-long), quantity category (what-multi), etc.; among them, the question sentences of thing category (what), time category (when), location category (where), person category (who), and value category (numeric) belong to the question sentences of short answer category; assuming that the preset sentence type rule is to select the question sentence of short answer category, when the category of the question sentence belongs to any category of thing category (what), time category (when), location category (where), person category (who), and value category (numeric), it meets the preset sentence type rule.

[0251] Among them, the preset timeliness rule can be a rule for screening / selecting question statements that meet the preset timeliness requirements. In an embodiment of the present application, the preset timeliness rules may include no timeliness and weak timeliness, so as to select question statements that meet the no timeliness and weak timeliness requirements. It should be noted that since the answer information corresponding to the question statement with strong timeliness is updated quickly, it is usually not suitable for constructing question and answer pairs, otherwise it will waste resources and cause the question statement and the answer information (answer information) to have a low match.

[0252] In the embodiment of the present application, question sentences are divided into no timeliness, weak timeliness and strong timeliness according to the strength of timeliness.

[0253] Among them, non-timeliness means that there is no timeliness demand, and the answer can still be satisfied as time goes by. For example, (1) knowledge-based question sentences: medical diagnosis and treatment methods, famous sayings, ancient poems, translation, Chinese characters, concepts, principles, historical events, musical instrument tutorials, constellation matching, literary classics, etc.; (2) immutable fact query: Is mobile phone A a smart phone, the gender of a famous person, the nationality of a famous person; (3) large topic viewpoints: the role of brand in enterprises, the positioning of Chinese language in modern education; (4) common sense with little change: tutorials on playing mahjong / chess / letter writing / biking / swimming, the advantages and disadvantages of xx object materials, home maintenance problems without a specified brand, regional area, how many towns are there in xx, regional license plates; (5) copywriting: how to write an application for xx; (6) unclear intention, unable to judge timeliness.

[0254] Among them, weak timeliness means that there is a timeliness requirement, and the answer changes little over time, such as the answer can be satisfied within the preset number of years after it is generated. For example, (1) Process policy and law category: what materials are required to apply for a social security card, legal policy category, examination policy category; (2) Variable tutorial parameter category: software app tutorial, mobile phone parameters, car parameters, game strategy; (3) Song and film category: what song is the lyrics of xx, movie, TV series, novel and animation plot, what TV series has star A star played, and song recommendations of star A; (4) Small topic viewpoint category: how is the operator's SIM card, how is brand B milk powder, comparison of mobile phone models, how is the development of the live broadcast industry, shopping recommendations, unsolved mysteries, etc.; (5) Variable fact query: regional altitude, city population, school address, etc.

[0255] Among them, strong timeliness has a strong demand for timeliness, and the answer information corresponding to the question statement changes every year or shorter period. For example, (1) implicit questions about the latest: when does school start, how many days are there on May 1st, what year is this year, the ranking of the strongest majors, the current chairman of company xx, will the basketball team win the championship, what time does shopping mall A close, how to get to xx, etc.; (2) commodity price questions: stock exchange rates, lottery draw time, interest rates, how much discount is xx; (3) questions that require very precise answers: customer service phone numbers, text messages, addressing (asking about websites), zip codes, area codes, resource download seeds; (4) entertainment questions: celebrity xx events, celebrity introductions, profiles of people who are still alive, etc.; (5) time queries (asking about the year): when will mobile phone A be launched, when company H was founded, etc.; (6) mutable fact queries: person A's height, age, social relationship between person A and person B, officials in city xx, box office of xx; (7) questions with years or linked to years and months: the number of deaths in the xx earthquake in xx, the time of the Spring Festival travel rush in xx, where the 2010 World Cup will be held, age of xx, financial report of company xx, etc.

[0256] The above are only examples of question sentences being classified into no timeliness, weak timeliness and strong timeliness according to the strength of timeliness, and no limitation is made here.

[0257] Among them, the preset sentence completeness rule can refer to that the question sentence should have the completeness of the question intention, that is, the question sentence should have the intention information; the preset sentence completeness rule is used to select the question sentence with the intention information. It can be understood that the intention information of the question sentence that meets the preset sentence completeness rule can be expressed as follows: the question category (i.e., 11 categories in the sentence type) can be analyzed; when the question sentence directly contains question words, the question intention of the question sentence is clarified, such as the role of xx, how to do xx, the interpretation of xx, why xx, etc.; when the question sentence does not have question words, the user's unique question intention should be guessed with a high probability through the question sentence; in addition, for compound / nested question sentences, as long as there is a question that is complete, it meets the preset sentence completeness rule. On the contrary, the intention information of the question sentence that does not meet the preset sentence completeness rule is expressed as follows: a single noun (game, novel, film and television, character, place, dish name, etc.); no question type, or no qualifier, or ambiguous, or demonstrative pronouns are unclear, or the key sentence components are missing, resulting in multiple possibilities, etc.

[0258] Among them, the preset grammatical rules can be grammatical judgment rules such as grammatical error recognition (recognizing whether a sentence has errors), grammatical error classification (recognizing specific error types), and grammatical error location (recognizing the location of errors), which are used to select problem sentences that conform to the grammatical structure.

[0259] Specifically, the process of selecting the target question statement that meets the preset question statement rules can be:

[0260] (1) Each question sentence is input into the trained first target model to obtain the category label and intent information corresponding to each question sentence, wherein the first target model is obtained by jointly training a preset model with sample question sentences, sample category labels and sample intent information.

[0261] like Figure 5 As shown, the first target model can be a language representation model, for example, the first model can be a bidirectional encoder representation (Bidirectional Encoder Representations from Transformers, BRET) model through sample question sentences, sample intent information and sample category labels. When identifying the sentence type and intent information of each question sentence, each question sentence is input into the trained bidirectional encoder representation model, and the question sentence is embedded through the bidirectional encoder representation model to obtain a first encoding vector, and the first encoding vector is classified through the bidirectional encoding representation model to obtain the category label and intent information corresponding to each question sentence.

[0262] (2) Input each question sentence into the trained time-limit recognition model, and obtain the time-limit label corresponding to each question sentence through the time-limit recognition model.

[0263] like Figure 6 As shown, the timeliness recognition model can be a language representation model, which is obtained by jointly training a bidirectional encoder representation (Bidirectional Encoder Representations from Transformers, BRET) model through sample question sentences and sample timeliness labels. When performing timeliness recognition on each question sentence, each question sentence is input into the trained timeliness recognition model, and the question sentence is embedded through the timeliness recognition model to obtain the corresponding second encoding vector, and the second encoding vector is classified through the timeliness recognition model to obtain the timeliness label corresponding to each question sentence.

[0264] (3) Input each question sentence into the trained grammar detection model, and obtain the grammar detection result corresponding to each question sentence through the grammar detection model.

[0265] like Figure 7 As shown, the grammar detection model can be a language representation model, which is obtained by jointly training a bidirectional encoder representation (Bidirectional Encoder Representations from Transformers, BRET) model through sample question sentences and sample grammar detection results. When performing grammar detection on each question sentence, each question sentence is input into the trained time recognition model, and the question sentence is embedded through the time recognition model to obtain the corresponding third encoding vector, and the third encoding vector is classified through the time recognition model to obtain the grammar detection result corresponding to each question sentence.

[0266] (4) Based on the category label, intent information, time label and grammar detection result of each question sentence, a target question sentence that meets the preset question sentence rules is selected from multiple question sentences.

[0267] Specifically, the grammar detection result is compared with the preset grammar rules to determine the question sentence that meets the preset grammar rules as a legal sentence; the legal sentence is screened by the preset sentence type rule, and the legal sentence of the short answer type is determined as the first question sentence; the first question sentence is screened by the preset sentence complete rule, and the first question sentence with intent information is determined as the second question sentence; the second question sentence is screened by the preset timeliness rule, and the second question sentence with timeliness labels of no timeliness label and low timeliness label is determined as the target question sentence.

[0268] It should be noted that when the embodiment of the present application filters question statements by using preset question statement rules, the filtering order between different rules is not limited.

[0269] Through the above method, a question sentence that conforms to the preset question sentence rules can be selected as the target question sentence, which can avoid ambiguity in the question sentence, resulting in invalidity in the subsequent generation of question-answer pairs and waste of resources. In the embodiment of the present application, a question sentence that conforms to the preset question sentence rules is selected for the subsequent construction of question-answer pairs, so that the feasibility and reliability of subsequent answering of question sentences based on the question-answer pairs are achieved.

[0270] 203. Obtain target word information in the target question sentence, and match target documents associated with the target word information from a preset document library.

[0271] Among them, the process of matching the target document associated with the target word information can be: obtaining a preset document set from a preset document library, the preset document set including multiple preset documents; performing an association weight calculation based on each preset document and the target word information to obtain a first association weight coefficient; performing an association weight calculation based on the target word information and the target question statement to obtain a second association weight coefficient; obtaining the word information weight value of the target word information in multiple preset documents; determining the association score of each preset document relative to the target question statement based on the first association weight coefficient, the second association weight coefficient and the word information weight value; and determining the preset document whose association score is greater than the preset association score threshold as the target document.

[0272] For example, the retrieval technology of the search and data analysis engine (Elasticsearch) is used to recall a number of preset documents associated with the target question statement (query) from the self-built encyclopedia text index library, and the relevance score of each preset document relative to the target question statement is calculated through the BM25 algorithm, so as to select the preset document with a relevance score greater than the preset relevance score threshold as the target document.

[0273] 204. Segment the target document according to a preset segmentation rule to obtain multiple candidate segments.

[0274] The preset text segmentation rule may be a rule for dividing each text segment in a document, and the preset text segmentation rule includes a sliding window and a segmentation step, wherein the sliding window is used to limit the text segment size or the amount of text content when segmenting the document, and the segmentation step is used to limit the segmentation frequency or density when segmenting the document. For example, the sliding window may be 300 characters or 3 lines of text content, and the segmentation step may be to move the sliding window with 100 characters or 1 line of text content as the sliding step. The above is only an example, and the size of the sliding window and the segmentation step is not limited here.

[0275] After obtaining the target text segment, the embodiment of the present application can segment the target document according to a preset text segmentation rule to obtain multiple candidate text segments, so as to facilitate the subsequent selection of relevant candidate text segments from the multiple candidate text segments.

[0276] 205. Filter multiple candidate text segments to obtain a target text segment corresponding to the target question sentence.

[0277] In order to obtain a target text segment with a high correlation with the target question sentence, the embodiment of the present application needs to preliminarily filter the candidate text segments to obtain the target text segment containing the text content corresponding to the answer information. Specifically, by obtaining the matching degree between each candidate text segment and the target question sentence, the candidate text segments are filtered according to the matching degree to select the target text segment corresponding to the target question sentence.

[0278] like Figure 8 As shown, the matching recognition model can be a language representation model, which is obtained by jointly training a bidirectional encoder representation (Bidirectional Encoder Representations from Transformers, BRET) model through sample question sentences, sample text segments and sample matching degrees. When the matching degree of each candidate text segment and the question sentence is identified, each candidate text segment and the target question sentence are input into a preset sentence text segment matching model; the candidate text segment and the target question sentence are embedded by the preset sentence text segment matching model to obtain an embedded encoding vector; the encoding vector is classified by the preset sentence text segment matching model to obtain a matching degree, wherein the matching degree is generated by the preset sentence text segment matching model from the correlation between the sub-vectors of the target question sentence and the candidate text segment in the encoding vector; the candidate text segment with a matching degree greater than a preset matching degree threshold is determined as the target text segment.

[0279] The embodiment of the present application implements preliminary filtering of candidate text segments through the above method to obtain target text segments with high relevance to the target question sentence.

[0280] 206. Input the target question sentence and the target text segment into the trained text processing model.

[0281] The trained text processing model is obtained by jointly training a preset model with the location information of sample question sentences, sample text segments, and sample answer information. The sample question sentences carry sample sentence type information, and the sample text segments carry document title information of the document in which they are located.

[0282] Specifically, the training process of the model can be: inputting sample question sentences and sample text segments into a preset model, so that the preset model embeds and processes the sample question sentences, the sentence type information corresponding to the sample question sentences, the sample text segments and the document titles corresponding to the sample text segments, and classifies them to obtain the predicted position information of the text content associated with the sample question sentences in the sample text segments; obtaining the position information difference between the predicted position information and the sample position information; and adjusting the network parameters in the preset model according to the position information, and after iterative training until the position information difference converges, a trained text processing model is obtained. It should be noted that in the process of training the model, it is necessary to use ultra-large-scale sample text data to train the model to improve the performance of the model.

[0283] 207. The target question sentence, sentence type information, target text segment and document title are embedded through the text processing model to obtain a target encoding vector, and the encoding vector is classified to output the position information of the text content associated with the target question sentence in the target text segment.

[0284] like Fig. 9 As shown, the text processing model can be a language representation model, which is obtained by jointly training a bidirectional encoder representation (Bidirectional Encoder Representations from Transformers, BRET) model through sample question sentences, sample sentence type information, sample text segments and sample document titles. When text processing is performed on each question sentence, the target question sentence and the target text segment are input into the trained time recognition model, and the question sentence is embedded through the time recognition model to obtain the corresponding target encoding vector, and the target encoding vector is classified through the time recognition model to obtain the position information of the text content associated with the target question sentence in the target text segment.

[0285] Specifically, the encoding vector may be composed of a character feature sub-vector, a position feature sub-vector, and a segmentation sub-vector.

[0286] The character feature sub-vector may be a feature vector corresponding to each character (such as text, word or number) in the candidate text segment or the target question sentence.

[0287] The position feature sub-vector may be a feature vector generated according to the position information of each character in the candidate text segment or the target question sentence.

[0288] Among them, the segmentation sub-vector can be a vector representing a candidate text segment or a target question sentence, which is used to distinguish between the candidate text segment and the target question sentence. Specifically, the segmentation sub-vector can represent the sentence to which each character belongs, such as the candidate text segment or the target question sentence, to determine whether the corresponding character belongs to the input candidate text segment or the target question sentence.

[0289] The embedding process may include: preprocessing the target question sentence (query), sentence type information (query type), target paragraph (paragraph) and document title (title) through a text processing model to obtain the preprocessed target question sentence, sentence type information, target paragraph and document title, wherein the preprocessing method may be reading, specifically, reading the characters in the target question sentence and the candidate paragraph through the corresponding character units of the model; converting the preprocessed target question sentence, sentence type information, target paragraph and document title into character vectors through the text processing model to obtain the corresponding character feature sub-vector; converting the position information of the characters in the preprocessed target question sentence and the candidate paragraph into character vectors through the text processing model The method converts the preprocessed target question sentence, sentence type information, target text segment and document title into corresponding position feature sub-vectors; the preprocessed target question sentence, sentence type information, target text segment and document title are segmented through the text processing model to obtain corresponding segmentation sub-vectors; the character feature sub-vector, the position feature sub-vector and the segmentation sub-vector are weightedly processed, such as summing, through the preset sentence text segment model to obtain the target encoding vector; further, the target encoding vector is classified through the text processing model to obtain the position information of the text content associated with the target question sentence in the target text segment, that is, the starting position and the ending position (start / end span) of the text content in the target text segment that is strongly related to the target question sentence.

[0290] The classification process of the target encoding vector by the text processing model may be: the classification process of the position feature subvector in the target encoding vector by the text processing model is performed to obtain the position information of the text content associated with the target question sentence in the target text segment.

[0291] By the above method, the position information of the text content associated with the target question sentence in the target text segment is obtained, so as to determine the response information related to the target question sentence in the target text segment.

[0292] 208. Extract the text content corresponding to the position information in the target text segment to obtain candidate answer information.

[0293] Among them, the position information is the position information of the text content related to the target question sentence in the target paragraph, such as the starting position and ending position of the related text content. The position information is related to the position feature sub-vector in the target encoding vector and is obtained by classification processing of the position feature sub-vector.

[0294] Based on the position information, the text content corresponding to the position information in the target text segment is extracted to obtain the target text content, and the candidate answer information strongly related to the target question sentence is determined.

[0295] Through the above method, candidate answer information related to the target question sentence can be further extracted from the target text segment with higher relevance, so as to improve the matching degree between the question sentence and the answer information in the subsequent process.

[0296] 209. Select answer information corresponding to the target question statement from the candidate answer information.

[0297] The answer information is the answer information that matches the target question sentence and is used to construct a question-answer pair together with the target question sentence.

[0298] In order to improve the efficiency of subsequent construction of question-answer pairs, after obtaining the candidate answer information, the embodiment of the present application needs to determine the answer information corresponding to the target question sentence from the candidate answer information, that is, to determine the candidate answer information as the answer information corresponding to the target question sentence, so as to facilitate the subsequent construction of question-answer pairs and improve the efficiency of constructing question-answer pairs.

[0299] It should be noted that in the embodiment of the present application, since the number of target documents associated with the target question sentence may be multiple, the number of target segments associated with the target question sentence is also multiple. Candidate answer information related to the target question sentence can be extracted from the multiple target segments respectively, that is, multiple candidate answer information is obtained. At this time, it is necessary to select one answer information from the multiple candidate answer information so as to jointly construct a question-answer pair with the target question sentence.

[0300] Specifically, after obtaining the candidate answer information corresponding to the target question sentence, the number of candidate answer information corresponding to the target question sentence is counted; when it is detected that the target question sentence has multiple corresponding candidate answer information, the multiple candidate answer information are classified to obtain the candidate answer information corresponding to each information type, and the number of candidate answer information corresponding to each information type is obtained; the association score between the target question sentence and the document where the candidate answer information is located is obtained, such as calculating the association score between the target question sentence and the document where the candidate answer information is located through the BM25 algorithm; weighted processing is performed on the number of candidate answer information corresponding to each information type and the association score, such as multiplication, to obtain the target information score corresponding to each information type; the candidate answer information in the information type with the largest target information score is determined as the answer information corresponding to the target question sentence.

[0301] Through the above method, answer information with an information type that is closer to the target question sentence can be selected as the answer information corresponding to the target question sentence, thereby improving the matching degree between the target question sentence and the answer information, so as to facilitate the subsequent construction of a more accurate question-answer pair.

[0302] 210. Establish an association relationship between the target question sentence and the corresponding answer information, and use the target question sentence and the corresponding answer information with the association relationship to update the question and answer information database.

[0303] The question-answer information database may be a database storing question-answer pairs, such as a FAQ database, which is applied to a search-based question-answer system in a search engine to provide answer information to a question statement. The question-answer pair refers to a combination of a question sentence (question statement) and answer information (answer sentence or answer information), which includes an association relationship between the question sentence and the answer information, and is used to subsequently match the answer information (answer information) corresponding to the question sentence (question sentence to be answered) raised by the user.

[0304] By implementing this step, the coverage rate of the answer information of the question statement in the question and answer information database can be improved, so as to facilitate the subsequent search for the answer information corresponding to the user's question information based on the question and answer information database.

[0305] 211. When receiving the question statement to be found, search for the target answer information corresponding to the question statement to be found in the updated question and answer information database, and return the target answer information.

[0306] The question statement to be found may be a question statement or question information that the user needs to answer, and is used to reflect the user's intention information.

[0307] In order to obtain the target answer information corresponding to the question statement to be found, after receiving the question statement to be found sent by the terminal, the embodiment of the present application searches for the target answer information corresponding to the question statement to be found from the pre-updated / established question and answer information library. Specifically, the method of searching for the corresponding target intent information can be: obtaining the sentence type information and intent information of the question statement to be found; determining the target question statement corresponding to the question statement to be found based on the sentence type information and intent information; and searching for the target reply information associated with the target question statement through the updated question and answer information library.

[0308] Furthermore, the found target answer information is returned to the corresponding terminal to be displayed on the terminal.

[0309] By executing steps 201-211, the following is achieved: Figure 4 The process in, specifically, Figure 4The icon recognition method flow shown is as follows:

[0310] 301. Obtain online question statements in real time.

[0311] 302. Understand the question sentence, obtain the category label, intent information, time label and grammar detection result of the question sentence; and based on the category label, intent information, time label and grammar detection result of the question sentence, select the question sentence that meets the preset question sentence rules as the target question sentence.

[0312] 303. Recall target documents related to the target question sentence from a preset document library through document indexing, and segment the target text segment to obtain candidate text segments.

[0313] 304. The target question sentence is matched with the candidate text segments to determine the target text segment.

[0314] 305. Determine the position information of the text content related to the target question sentence in the target sentence through the text processing model based on the target question sentence, sentence type information, the target sentence and the document title, and extract the text content corresponding to the position information from the target sentence as candidate answer information.

[0315] 306. Post-process the extracted candidate answer information. For example, when there are multiple candidate answer information, the answer information corresponding to the target question statement can be selected from the multiple candidate answer information by voting, weighted processing, etc.

[0316] By executing processes 301-306, after obtaining the reply information corresponding to the target question sentence, a high-quality question-answer pair is constructed through the target question sentence and the corresponding answer information, and the high-quality question-answer pair is updated to the question-answer information library.

[0317] It should be noted that the specific implementation of processes 301 - 306 can be found in the previous embodiments and will not be elaborated here.

[0318] As can be seen from the above, the embodiment of the present application can receive a question sentence to be found; search for the target answer information corresponding to the question sentence to be found from the updated question and answer information library, wherein the updated question and answer information library is updated by the target question sentence and the answer information having an associated relationship, the target question sentence is a sentence that conforms to the preset question sentence rules, and the answer information is determined by the trained text processing model according to the target question sentence and the associated target text segment; return the target answer information corresponding to the question sentence to be found. It can be obtained that the embodiment of the present application selects the target question sentence that conforms to the preset question sentence rules, and obtains the target text segment with a high correlation with the target question sentence, and obtains the answer information with a high correlation with the target question sentence from the target text segment, so as to update the question and answer information library according to the target question sentence and the answer information, thereby improving the matching degree between the question sentence and the answer information, constructing an accurate question and answer pair, and improving the accuracy of the user in obtaining the answer information through the updated question and answer information library.

[0319] In order to better implement the above method, an embodiment of the present application also provides an information search device, which can be integrated into a network device, such as a server or a terminal. The terminal may include a tablet computer, a laptop computer and / or a personal computer.

[0320] For example, Fig.10 As shown, the information searching device may include a receiving unit 401 , a searching unit 402 and a returning unit 403 .

[0321] A receiving unit 401 is used to receive a question sentence to be found;

[0322] A search unit 402 is used to search for target answer information corresponding to the question sentence to be searched from the updated question and answer information database, wherein the updated question and answer information database is updated by a target question sentence and answer information having an associated relationship, the target question sentence is a sentence that conforms to a preset question sentence rule, and the answer information is determined by a trained text processing model according to the target question sentence and the associated target text segment;

[0323] The returning unit 403 is used to return the target answer information corresponding to the question sentence to be found.

[0324] In some embodiments, the search unit 402 is further specifically used to: obtain sentence type information and intent information of the question sentence to be found; determine the target question sentence corresponding to the question sentence to be found based on the sentence type information and intent information; and search for target reply information associated with the target question sentence through an updated question and answer information library.

[0325] In some embodiments, Fig.11As shown, the information searching device may further include a collecting unit 404 , a screening unit 405 , a matching unit 406 , an input unit 407 and a establishing unit 408 .

[0326] A collection unit 404 is used to collect a question statement set, where the question statement set includes a plurality of question statements;

[0327] A screening unit 405 is used to screen out a target question sentence that meets a preset question sentence rule from a plurality of question sentences;

[0328] A matching unit 406 is used to match a target text segment associated with a target question sentence from a preset document library;

[0329] An input unit 407 is used to input the target question sentence and the target text segment into the trained text processing model to obtain answer information corresponding to the target question sentence;

[0330] The establishing unit 408 is used to establish an association relationship between the target question sentence and the corresponding answer information, and update the question and answer information database using the target question sentence and the corresponding answer information with the association relationship to obtain an updated question and answer information database.

[0331] In some embodiments, the screening unit 405 is further configured to:

[0332] Classify multiple question statements and obtain the category label corresponding to each question statement;

[0333] According to the word information of each question sentence, identify the intention information corresponding to each question sentence;

[0334] Based on the category label and intent information, a target question sentence that meets the preset question sentence rules is selected from multiple question sentences.

[0335] In some embodiments, the screening unit 405 is further configured to:

[0336] Obtaining a timeliness label corresponding to each question statement, where the timeliness label is used to indicate the timeliness type of the corresponding question statement;

[0337] Perform grammar check on each question statement, and determine the question statement that meets the preset grammar rules as a legal statement;

[0338] Based on the timeliness label, category label and intent information, the target question sentence that meets the preset question sentence rules is selected from the legitimacy sentences.

[0339] In some embodiments, the input unit 407 is further used to:

[0340] Input the target question sentence and the target text segment into the trained text processing model, wherein the target question sentence carries the corresponding sentence type information, and the target text segment carries the document title of the document in which it is located;

[0341] Extracting candidate answer information corresponding to the target question sentence from the target text segment based on the sentence type information of the target question sentence and the document title corresponding to the target text segment through the text processing model;

[0342] The candidate answer information is determined as the answer information corresponding to the target question sentence.

[0343] In some embodiments, the input unit 407 is further used to:

[0344] The target question sentence, sentence type information, target text segment and document title are embedded through the text processing model to obtain the target encoding vector;

[0345] The target encoding vector is classified and processed by the text processing model, and the position information of the text content associated with the target question sentence in the target text segment is output;

[0346] Extracting the text content corresponding to the position information in the target text segment to obtain the target text content;

[0347] The target text content is determined as candidate answer information.

[0348] In some embodiments, the input unit 407 is further used to:

[0349] When multiple candidate answer information corresponding to the target question sentence is detected, the multiple candidate answer information is classified to obtain candidate answer information corresponding to each information type, and the number of candidate answer information corresponding to each information type is obtained;

[0350] Obtain the correlation score between the target question sentence and the document where the candidate answer information is located;

[0351] Perform weighted processing according to the number of candidate answer information corresponding to each information type and the relevance score to obtain the target information score corresponding to each information type;

[0352] The candidate answer information in the information type with the largest target information score is determined as the answer information corresponding to the target question sentence.

[0353] In some embodiments, the matching unit 406 is further configured to:

[0354] Obtain target word information in the target question sentence;

[0355] Searching for target documents associated with target word information from a preset document library;

[0356] Segment the target document according to the preset segmentation rules to obtain multiple candidate segments;

[0357] Multiple candidate text segments are filtered to obtain a target text segment corresponding to the target question sentence.

[0358] In some embodiments, the matching unit 406 is further configured to:

[0359] Obtain a preset document collection from a preset document library, where the preset document collection contains multiple preset documents;

[0360] Calculate the association weight based on each preset document and the target word information to obtain a first association weight coefficient;

[0361] Calculate the association weight based on the target word information and the target question sentence to obtain a second association weight coefficient;

[0362] Obtaining word information weight values ​​of target word information in multiple preset documents;

[0363] Determine a relevance score of each preset document relative to the target question statement according to the first relevance weight coefficient, the second relevance weight coefficient and the word information weight value;

[0364] A preset document having a relevance score greater than a preset relevance score threshold is determined as a target document.

[0365] As can be seen from the above, the embodiment of the present application receives the question sentence to be found through the receiving unit 401; searches the target answer information corresponding to the question sentence to be found from the updated question and answer information library through the searching unit 402, wherein the updated question and answer information library is updated by the target question sentence and the answer information having an associated relationship, the target question sentence is a sentence that conforms to the preset question sentence rules, and the answer information is determined by the trained text processing model according to the target question sentence and the associated target text segment; returns the target answer information corresponding to the question sentence to be found through the returning unit 403. It can be obtained that the embodiment of the present application selects the target question sentence that conforms to the preset question sentence rules, obtains the target text segment with a high correlation with the target question sentence, and obtains the answer information with a high correlation with the target question sentence from the target text segment, so as to update the question and answer information library according to the target question sentence and the answer information, thereby improving the matching degree between the question sentence and the answer information, constructing an accurate question and answer pair, and improving the accuracy of the user in obtaining the answer information through the updated question and answer information library.

[0366] The present application also provides a computer device, such as Fig.12 As shown, it shows a schematic diagram of the structure of the computer device involved in the embodiment of the present application, specifically:

[0367] The computer device may include one or more processing core processors 501, one or more computer-readable storage media memories 502, a power supply 503, an input unit 504 and other components. Those skilled in the art will appreciate that Fig.12 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

[0368] The processor 501 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 502 and calling data stored in the memory 502, it executes various functions of the computer device and processes data, thereby performing overall detection of the computer device. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 501.

[0369] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.

[0370] The computer device also includes a power supply 503 for supplying power to various components. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 503 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0371] The computer device may further include an input unit 504, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0372] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in the embodiment of the present application, the processor 501 in the computer device will load the executable file corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 501 will run the application program stored in the memory 502, thereby realizing various functions, as follows:

[0373] Receive a question sentence to be found; search for target answer information corresponding to the question sentence to be found from an updated question and answer information database, wherein the updated question and answer information database is updated by a target question sentence and answer information having an associated relationship, the target question sentence is a sentence that conforms to a preset question sentence rule, and the answer information is determined by a trained text processing model according to the target question sentence and an associated target text segment; return the target answer information corresponding to the question sentence to be found.

[0374] The specific implementation of the above operations can be found in the previous embodiments and will not be described in detail here.

[0375] From the above, it can be seen that the embodiment of the present application can receive a question sentence to be found; search for the target answer information corresponding to the question sentence to be found from the updated question and answer information library, wherein the updated question and answer information library is updated by the target question sentence and the answer information having an associated relationship, the target question sentence is a sentence that conforms to the preset question sentence rules, and the answer information is determined by the trained text processing model according to the target question sentence and the associated target text segment; return the target answer information corresponding to the question sentence to be found. It can be obtained that the embodiment of the present application selects the target question sentence that conforms to the preset question sentence rules, and obtains the target text segment with a high correlation with the target question sentence, and obtains the answer information with a high correlation with the target question sentence from the target text segment, so as to update the question and answer information library according to the target question sentence and the answer information, thereby improving the matching degree between the question sentence and the answer information, constructing an accurate question and answer pair, and improving the accuracy of the user in obtaining the answer information through the updated question and answer information library.

[0376] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0377] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the information search methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:

[0378] Receive a question sentence to be found; search for target answer information corresponding to the question sentence to be found from an updated question and answer information database, wherein the updated question and answer information database is updated by a target question sentence and answer information having an associated relationship, the target question sentence is a sentence that conforms to a preset question sentence rule, and the answer information is determined by a trained text processing model according to the target question sentence and an associated target text segment; return the target answer information corresponding to the question sentence to be found.

[0379] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0380] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0381] Since the instructions stored in the computer-readable storage medium can execute the steps in any information search method provided in the embodiments of the present application, the beneficial effects that can be achieved by any information search method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0382] The above is a detailed introduction to an information search method and device provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An information search method, characterized in that: include: Receive a problem statement to be found; Searching for target answer information corresponding to the question statement to be searched from the updated question and answer information database, wherein the updated question and answer information database is updated by a target question statement and answer information having an associated relationship, the target question statement is a statement that conforms to a preset question statement rule, and the answer information is determined by a trained text processing model according to the target question statement and an associated target text segment; Before searching the updated question-answer information database for target answer information corresponding to the question statement to be searched, the method further includes: Collecting a question statement set, wherein the question statement set includes a plurality of question statements; Filtering out a target question sentence that meets preset question sentence rules from the multiple question sentences; Matching a target text segment associated with the target question sentence from a preset document library; Input the target question sentence and the target text segment into the trained text processing model to obtain the answer information corresponding to the target question sentence; wherein, it includes: inputting the target question sentence and the target text segment into the trained text processing model, wherein the target question sentence carries the corresponding sentence type information, and the target text segment carries the document title of the document in which it is located; extracting the candidate answer information corresponding to the target question sentence from the target text segment based on the sentence type information of the target question sentence and the document title corresponding to the target text segment by the text processing model; determining the answer information corresponding to the target question sentence based on the candidate answer information; Establishing an association relationship between the target question statement and the corresponding answer information, and updating the question and answer information database using the target question statement and the corresponding answer information with the association relationship to obtain an updated question and answer information database; Return the target answer information corresponding to the question statement to be found.

2. The method according to claim 1, characterized in that The step of selecting a target question statement that meets preset question statement rules from the multiple question statements includes: Classifying the multiple question statements to obtain a category label corresponding to each question statement; According to the word information of each question sentence, identifying the intention information corresponding to each question sentence; Based on the category label and the intention information, a target question sentence that meets preset question sentence rules is selected from the multiple question sentences.

3. The method according to claim 2, characterized in that The step of selecting a target question sentence that meets a preset question sentence rule from the multiple question sentences based on the category label and the intention information includes: Obtaining a timeliness label corresponding to each question statement, wherein the timeliness label is used to indicate the timeliness type of the corresponding question statement; Perform grammar check on each question statement, and determine the question statement that meets the preset grammar rules as a legal statement; Based on the timeliness label, category label and intent information, a target question sentence that meets preset question sentence rules is selected from the legality sentences.

4. The method according to claim 1, characterized in that: The extracting candidate answer information corresponding to the target question sentence from the target text segment based on the sentence type information of the target question sentence and the document title corresponding to the target text segment by the text processing model includes: The target question sentence, sentence type information, target text segment and document title are embedded by the text processing model to obtain a target encoding vector; Classify the target encoding vector by using the text processing model, and output the position information of the text content associated with the target question sentence in the target text segment; Extracting text content corresponding to the position information in the target text segment to obtain target text content; The target text content is determined as candidate answer information.

5. The method according to claim 1, characterized in that The determining the answer information corresponding to the target question sentence based on the candidate answer information includes: When multiple candidate answer information corresponding to the target question sentence is detected, the multiple candidate answer information is classified to obtain candidate answer information corresponding to each information type, and the number of candidate answer information corresponding to each information type is obtained; Obtaining a correlation score between the target question statement and the document where the candidate answer information is located; Performing weighted processing according to the number of candidate answer information corresponding to each information type and the relevance score to obtain a target information score corresponding to each information type; The candidate answer information corresponding to the information type with the largest target information score is determined as the answer information corresponding to the target question sentence.

6. The method according to claim 1, characterized in that The step of matching the target text segment associated with the target question sentence from a preset document library includes: Obtaining target word information in the target question sentence; Searching for a target document associated with the target word information from a preset document library; Segment the target document according to a preset segmentation rule to obtain multiple candidate segments; The multiple candidate text segments are filtered to obtain a target text segment corresponding to the target question sentence.

7. The method according to claim 6, characterized in that The step of searching a preset document library for a target document associated with the target word information includes: Acquire a preset document set from a preset document library, wherein the preset document set includes a plurality of preset documents; Calculate the association weight between each preset document and the target word information to obtain a first association weight coefficient; Calculate the association weight based on the target word information and the target question sentence to obtain a second association weight coefficient; Obtain word information weight values ​​of the target word information in the plurality of preset documents; Determining a relevance score of each preset document relative to the target question sentence according to the first relevance weight coefficient, the second relevance weight coefficient and the word information weight value; A preset document whose relevance score is greater than a preset relevance score threshold is determined as a target document.

8. An information search device, characterized in that: include: A receiving unit, used for receiving a question sentence to be found; A search unit, used to search for target answer information corresponding to the question sentence to be searched from an updated question and answer information database, wherein the updated question and answer information database is updated by a target question sentence and answer information having an associated relationship, the target question sentence is a sentence that conforms to a preset question sentence rule, and the answer information is determined by a trained text processing model according to the target question sentence and an associated target text segment; A returning unit, used to return the target answer information corresponding to the question statement to be found; the device also includes: a collecting unit, used to collect a question statement set, the question statement set includes a plurality of question statements; A screening unit, configured to screen out a target question sentence that meets a preset question sentence rule from the plurality of question sentences; A matching unit, configured to match a target text segment associated with the target question sentence from a preset document library; An input unit is used to input the target question sentence and the target text segment into a trained text processing model to obtain answer information corresponding to the target question sentence; wherein the input unit is also used to: input the target question sentence and the target text segment into a trained text processing model, wherein the target question sentence carries corresponding sentence type information, and the target text segment carries the document title of the document in which it is located; extract candidate answer information corresponding to the target question sentence from the target text segment based on the sentence type information of the target question sentence and the document title corresponding to the target text segment through the text processing model; determine the candidate answer information as the answer information corresponding to the target question sentence The establishing unit is used to establish an association relationship between the target question statement and the corresponding answer information, and to update the question and answer information database using the target question statement and the corresponding answer information with the association relationship to obtain an updated question and answer information database.

Citation Information

Patent Citations

  • Multi-document multi-answer machine reading understanding system based on joint training mode

    CN111930887A

  • Machine reading understanding method and device

    CN112860863A

  • Question and answer pair generation method, device and equipment and computer readable storage medium

    CN113010679A