Abstract correction method, device, equipment and storage medium for search results

By splicing and text encoding of the abstract and target documents of the search results, the training correction model is used to correct the abstract, which solves the problem of insufficient consistency of abstract facts in the prior art, and achieves a more accurate summary correction effect.

CN117725198BActive Publication Date: 2025-05-27SHUXING TECH (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310324187.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2025-05-27
Estimated Expiration
2043-03-29

AI Technical Summary

Technical Problem

When generating a summary of search results, the prior art is prone to include factual errors or inconsistent content expressions, resulting in insufficient factual consistency of the summary.

Method used

By obtaining the summary of the search results and the target document, splicing and text encoding are performed, text feature vectors are generated, and the summary is corrected using the correction model to obtain the corrected summary. Correction models are supervised training by training samples, including non-factual abstracts and reference abstracts, to reduce differences in target abstracts and reference abstracts.

Benefits of technology

The summary of search results is intelligently corrected, which improves the factual consistency of the summary and ensures that the corrected summary is more accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117725198B_ABST
    Figure CN117725198B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a method, apparatus, device, and storage medium for correcting abstracts of search results. The method includes: obtaining an abstract of a search result, where the search result is found in response to a search request and includes a target document; splicing the abstract and the target document to obtain text information, and performing text encoding on the text information to obtain a text feature vector of the text information; and based on the text feature vector, performing correction processing on the abstract to obtain a corrected abstract. Using the embodiments of the present application can intelligently correct the abstracts of search results to improve the consistency of facts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer application technology, and in particular to a method, device, equipment and storage medium for correcting the summary of search results. Background Art

[0002] With the popularization of computer technology, search engines play an important role in querying questions and retrieving information in daily life. Search engines can find search results through search requests. Search results can include documents. The summary of search results can be used to shorten and refine the core content of the document. When determining the summary of search results, the prior art usually generates a summary containing factual errors or inconsistent content. How to correct the summary of search results is a technical problem that needs to be solved urgently. Summary of the invention

[0003] The embodiments of the present application provide a method, apparatus, device and storage medium for correcting the summary of search results, which can intelligently correct the summary of search results to improve the consistency of facts.

[0004] On the one hand, an embodiment of the present application provides a method for correcting a summary of a search result, the method comprising:

[0005] Obtaining a summary of search results; wherein the search results are found in response to the search request, and the search results include a target document;

[0006] The summary and the target document are concatenated to obtain text information, and the text information is encoded to obtain a text feature vector of the text information;

[0007] Based on the text feature vector, the summary is corrected to obtain a corrected summary.

[0008] In one embodiment, the corrected summary is obtained by a correction model; the training method of the correction model includes:

[0009] Acquire a training sample; wherein the training sample includes a training document, a non-factual summary of the training document, and a reference summary of the training document;

[0010] Concatenating the non-factual summary and the training document to obtain first training text information;

[0011] Calling the initial correction model to perform text encoding on the first training text information to obtain a text feature vector of the first training text information;

[0012] Based on the text feature vector of the first training text information, correcting the non-factual summary to obtain a corrected target summary;

[0013] The initial correction model is trained in a direction of reducing the difference between the target summary and the reference summary to obtain the correction model.

[0014] In one embodiment, the non-factual summary of the training document is obtained by:

[0015] Obtaining the training document and a reference summary of the training document;

[0016] Masking the entity of the reference summary to obtain a masked reference summary;

[0017] Concatenating the training document and the masked reference summary to obtain second training text information;

[0018] Predicting the entity at the mask position in the second training text information to obtain a target entity;

[0019] The entity in the reference summary is replaced with the target entity to obtain a non-factual summary of the training document.

[0020] In one embodiment, predicting the entity at the mask position in the second training text information to obtain the target entity includes:

[0021] Predicting the entity at the mask position in the second training text information to obtain at least one candidate entity and a prediction probability of each candidate entity;

[0022] Based on the predicted probabilities of the candidate entities, a target entity is selected from the at least one candidate entity; wherein the predicted probability of the target entity is less than the predicted probabilities of other candidate entities, or the predicted probability of the target entity is less than a preset probability threshold.

[0023] In one embodiment, predicting the entity at the mask position in the second training text information to obtain at least one candidate entity and the prediction probability of each candidate entity includes:

[0024] The filling language model is called to predict the entity at the mask position in the second training text information to obtain at least one candidate entity and the prediction probability of each candidate entity.

[0025] In one embodiment, the method further comprises:

[0026] Performing entity recognition on the reference abstract to obtain an entity of the reference abstract and a position of the entity in the reference abstract;

[0027] The masking of the entity of the reference summary to obtain the masked reference summary includes:

[0028] Based on the position of the entity in the reference digest, mask processing is performed on the entity in the reference digest to obtain the masked reference digest.

[0029] In one embodiment, the method further comprises:

[0030] displaying a search interface, wherein the search interface includes the corrected summary;

[0031] In response to a click operation on the corrected summary, the target document is displayed.

[0032] On the other hand, an embodiment of the present application provides a device for correcting a summary of a search result, the device for correcting a summary of a search result comprising:

[0033] An acquisition unit, configured to acquire a summary of a search result; wherein the search result is found in response to a search request, and the search result includes a target document;

[0034] A concatenation unit, used for concatenating the summary and the target document to obtain text information;

[0035] An encoding unit, used for performing text encoding on the text information to obtain a text feature vector of the text information;

[0036] The correction unit is used to correct the summary based on the text feature vector to obtain a corrected summary.

[0037] On the other hand, an embodiment of the present application provides a computer device, including a processor, a storage device, and a communication interface, wherein the processor, the storage device, and the communication interface are connected to each other, wherein the storage device is used to store a computer program that supports the computer device to execute the above method, the computer program includes program instructions, and the processor is configured to call the program instructions to perform the following steps:

[0038] Obtaining a summary of search results; wherein the search results are found in response to the search request, and the search results include a target document;

[0039] The summary and the target document are concatenated to obtain text information, and the text information is encoded to obtain a text feature vector of the text information;

[0040] Based on the text feature vector, the summary is corrected to obtain a corrected summary.

[0041] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the above-mentioned search result summary correction method.

[0042] On the other hand, an embodiment of the present application provides a computer program product, which includes a computer program, and the computer program is suitable for being loaded by a processor and executing the above-mentioned search result summary correction method.

[0043] In an embodiment of the present application, by obtaining a summary of the search results, the search results are found in response to a search request, and the search results include a target document, and then the summary and the target document are spliced ​​to obtain text information, and the text information is text-encoded to obtain a text feature vector of the text information, and based on the text feature vector, the summary is corrected to obtain a corrected summary, which can realize intelligent correction of the summary of the search results to improve the consistency of facts. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0045] Figure 1 is a schematic diagram of an interface of a search engine provided in an embodiment of the present application;

[0046] Figure 2 It is a schematic diagram of the architecture of a search result summary correction system provided in an embodiment of the present application;

[0047] Figure 3 It is a flowchart of a method for correcting a summary of a search result provided in an embodiment of the present application;

[0048] Figure 4 It is a flowchart of a method for generating a non-factual summary provided in an embodiment of the present application;

[0049] Figure 5 It is a structural schematic diagram of a search result summary correction device provided in an embodiment of the present application;

[0050] Figure 6 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] 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 ordinary technicians in this field without creative work are within the scope of protection of this application.

[0052] In one example, a search engine can find search results through a search request. After obtaining a summary of the search results, the search results and the search request can be correlated based on the summary of the search results and the search request. In another example, a search engine can find search results through a search request. When displaying search results, the document title and partial document content are generally displayed. Users judge whether the document is useful based on this displayed information and decide whether to click on it. In order to provide a better search experience, more and more search engines are making "partial document content" query-aware, providing different "partial document content" displays for different queries.

[0053] like Figure 1 Taking the interface diagram of the search engine shown as an example, the user can query questions or retrieve information through the search engine. For example, the user can enter a search request in the search engine, for example, the search request can include the search keyword "Is there a surname Xiao in the Hundred Family Names" to query questions; for example, the search request can include the search keyword "Forbidden City Pictures" to retrieve information. The search engine can find at least one search result that matches the search keyword and output at least one search result found, and any search result includes a document content. Since each search result generally displays the document title and part of the document content (such as the abstract) when it is displayed, the user determines whether the document is useful based on the displayed information, and thus decides whether to click. However, when determining the summary of the query-aware search results, the prior art usually generates a summary containing factual errors or inconsistent content expressions, such as "Then what needs to be explained is whether you have done research on these backgrounds", or "The mobile phone is a communication APP", etc. In order to ensure the factual consistency of the summary of the search result, after the summary of the search result is generated, the summary of the search result can be corrected. Therefore, how to correct the summary of the search result is a technical problem that needs to be solved urgently.

[0054] Based on this, an embodiment of the present application provides a method for correcting the summary of search results, by obtaining the summary of the search results, the search results are found in response to a search request, the search results include a target document, and then the summary and the target document are spliced ​​to obtain text information, and the text information is text encoded to obtain a text feature vector of the text information, based on the text feature vector, the summary is corrected to obtain a corrected summary, which can realize intelligent correction of the summary of the search results to improve the consistency of facts.

[0055] The summary correction method of search results provided in the embodiment of the present application can be applied in a search engine. The search engine can be installed or integrated in a content publishing platform or a browser. The content publishing platform or the browser can run in a computer device. The computer device can include a terminal device or a server, etc. The computer device includes but is not limited to a smart phone, a camera, a wearable device or a computer, etc.

[0056] See also Figure 2 , Figure 2 1 is a schematic diagram of the architecture of a search result summary correction system provided by an embodiment of the present application. First, a non-factual summary can be constructed, that is, a negative sample for training a correction model. Specifically, a training document and a reference summary of the training document can be obtained, and the entities of the reference summary can be masked to obtain a masked reference summary. The training document and the masked reference summary can be concatenated to obtain a second training text information. The second training text information can be, for example, Figure 2 In the text “a mobile phone is a communication [MASK][SEP] mobile phone, the full name is a mobile phone or wireless phone, usually called a mobile phone, originally just a communication tool…”, the second training text information can then be input into the filling language model, and the filling language model is used to predict the entities at the mask position in the second training text information to obtain the target entity, and the entity in the reference summary is replaced with the target entity to obtain the non-factual summary of the training document.

[0057] Furthermore, the correction model can be supervised and trained by the constructed negative samples. Specifically, the non-factual summary and the training document can be concatenated to obtain the first training text information, the initial correction model can be called to perform text encoding on the first training text information to obtain the text feature vector of the first training text information, the non-factual summary can be corrected based on the text feature vector of the first training text information to obtain the corrected target summary, and the initial correction model can be trained in the direction of reducing the difference between the target summary and the reference summary to obtain the correction model.

[0058] After obtaining the correction model, the correction model can be called to correct the summary of the search results. Specifically, the summary of the search results and the target document can be concatenated to obtain text information, and the text information can be encoded to obtain a text feature vector of the text information, and then the summary can be corrected based on the text feature vector to obtain a corrected summary.

[0059] Since the non-factual summary constructed by the construction method of the non-factual summary disclosed in the embodiment of the present application is representative of real errors, supervised training of the correction model based on the constructed non-factual summary can be trained to obtain a more robust correction model, and then the summary of the search result can be corrected by the correction model to ensure that the corrected summary is more accurate.

[0060] based on Figure 2 For a description of Figure 3 , Figure 3 is a flowchart of a method for correcting the summary of a search result provided by an embodiment of the present application. The method for correcting the summary of a search result can be executed by a search engine, a content publishing platform, a browser or a computer device; Figure 3 The summary correction scheme of the search result shown includes but is not limited to steps S301 to S303, wherein:

[0061] S301, obtaining a summary of search results, where the search results are found in response to a search request, and the search results include a target document.

[0062] For example, a user may input a search request through a search engine, so after detecting the search request, the search request may be responded to to find at least one search result matching the search keyword in the search request. Any search result may include a target document, and the target document may include multiple document sentences. Then, the target document included in any search result may be processed to obtain a summary of the search result.

[0063] Optionally, the target document included in any search result can be processed by a neural network model to obtain a summary of the search result. For example, the sentence features of each document sentence in the target document included in the search result and the search features of the search keyword can be subjected to attention learning by a neural network model to determine the correlation between each document sentence and the search keyword, and based on the correlation between each document sentence and the search keyword, the target document sentence is determined from multiple document sentences, and the target document sentence is used as the summary of the search result. For another example, the document sentences and the search keyword in the target document included in the search result can be spliced ​​by a neural network model to obtain each spliced ​​document sentence, and the search keyword can be feature extracted to obtain the search features of the search keyword, and the spliced ​​document sentences can be feature extracted to obtain the sentence features of each document sentence, and the target document sentence can be determined from multiple document sentences based on the search features and the sentence features of each document sentence, and the target document sentence can be used as the summary of the search result.

[0064] Among them, the user can input the search request in the search engine by text, voice or image. When the user inputs the search request in the search engine by text, the user can enter the text information in the search box and click the "Search" button. The computer device responds to the user's operation and can generate a search request. The search keyword included in the search request is the text information entered by the user in the search box. When the user inputs the search request in the search engine by voice, the user can click the "Voice Input" button on the search interface, input the voice information through the microphone of the computer device, and click the "Search" button. The computer device responds to the user's operation and can generate a search request. The search keyword included in the search request is the text information converted from the voice information entered by the user. When the user inputs the search request in the search engine by image, the user can click the "Photo" button on the search interface, collect the image through the camera of the computer device or search the image in the image library of the computer device, and click the "Search" button. The computer device responds to the user's operation and can generate a search request. The search keyword included in the search request is the text information obtained by character recognition or content extraction of the image entered by the user.

[0065] S302, concatenating the summary and the target document to obtain text information, and performing text encoding on the text information to obtain a text feature vector of the text information.

[0066] For example, assuming that the abstract includes "XXX" and the document content of the target document includes "AAA#&*123#&", then the abstract and the target document are concatenated, and the obtained text information may include "XXX AAA#&*123#&". Further, the text information may be input into an encoder, and the encoder may extract features of the text information to obtain a text feature vector of the text information. Exemplarily, the encoder may be composed of multiple layers of transformer encoders.

[0067] S303: Correct the summary based on the text feature vector to obtain a corrected summary.

[0068] For example, if the summary is "Then you need to explain whether you have done any research on these backgrounds", the corrected summary can be "Then you need to explain what research you have done on these backgrounds". For another example, if the summary is "A mobile phone is a communication APP", where the target document includes "Mobile phone, the full name is mobile phone or wireless phone, usually called mobile phone, originally just a communication tool...", the corrected summary can be "A mobile phone is a communication tool".

[0069] In one implementation, a correction model may be called to correct the summary based on the text feature vector to obtain a corrected summary. Optionally, the correction model may adopt a text generation model, such as a generation model under a Seq2Seq framework.

[0070] Among them, the Seq2Seq model can be applied to machine translation, speech recognition, text summarization, question-answering systems and other fields. Seq2Seq is actually a network of (encoder-decoder) Encoder-Decoder structure, whose input is a sequence and output is also a sequence. In the Encoder, the sequence is converted into a vector of fixed length, and then the vector is converted into the desired sequence and output through the Decoder. Exemplarily, the Encoder and Decoder can be Recurrent Neural Networks (RNN), such as Long Short-Term Memory (LSTM) or Gate Recurrent Unit (GRU).

[0071] In one implementation, a training method of a correction model may include: obtaining training samples, the training samples include training documents, non-factual summaries of the training documents, and reference summaries of the training documents; concatenating the non-factual summaries and the training documents to obtain first training text information; calling an initial correction model to perform text encoding on the first training text information to obtain a text feature vector of the first training text information; based on the text feature vector of the first training text information, correcting the non-factual summary to obtain a corrected target summary; training the initial correction model in a direction of reducing the difference between the target summary and the reference summary to obtain a correction model.

[0072] In the embodiment of the present application, a non-factual summary refers to a summary that contains factual errors or inconsistent content, that is, a summary that needs to be corrected. A reference summary refers to a summary that maintains factual consistency, that is, a summary that contains correct facts and consistent content, that is, an accurate summary. The embodiment of the present application ensures that the trained correction model can accurately correct non-factual summaries and obtain accurate summaries through supervised training of the initial correction model.

[0073] In one implementation, a method for obtaining a non-factual summary of a training document may include: obtaining a training document and a reference summary of the training document; masking an entity in the reference summary to obtain a masked reference summary; concatenating the training document and the masked reference summary to obtain a second training text information; predicting an entity at a masked position in the second training text information to obtain a target entity; and replacing an entity in the reference summary with a target entity to obtain a non-factual summary of the training document.

[0074] In one implementation, a method of predicting an entity at a mask position in the second training text information to obtain a target entity may include: predicting an entity at a mask position in the second training text information to obtain at least one candidate entity and a prediction probability of each candidate entity; based on the prediction probability of each candidate entity, selecting a target entity from at least one candidate entity, the prediction probability of the target entity is less than the prediction probabilities of other candidate entities, or the prediction probability of the target entity is less than a preset probability threshold.

[0075] In one implementation, predicting an entity at a masked position in the second training text information to obtain at least one candidate entity and a predicted probability for each candidate entity may include: calling a filling language model to predict an entity at a masked position in the second training text information to obtain at least one candidate entity and a predicted probability for each candidate entity.

[0076] In one implementation, entity recognition may be performed on the reference summary to obtain the entity of the reference summary and the position of the entity in the reference summary, and then based on the position of the entity in the reference summary, the entity in the reference summary may be masked to obtain a masked reference summary.

[0077] In one implementation, after the corrected summary is obtained, a search interface may be displayed, and the search interface may include the corrected summary. Optionally, the target document may be displayed in response to a click operation on the corrected summary.

[0078] For example, Figure 1 For example, after the user enters a search request in the search box, the user can respond to the search request and find at least one search result that matches the search keyword XX, including search result 1, search result 2, and search result 3. The summary of each search result can be obtained, and then the summary of each search result can be corrected by the summary correction method of the search result provided in the embodiment of the present application. Assuming that the summary of search result 1 is an accurate summary, the summary of search result 1 and the target document contained in search result 1 are spliced ​​to obtain text information, and the text information is text-encoded to obtain a text feature vector of the text information, and then based on the text feature vector, the summary of search result 1 is corrected, and the corrected summary is the summary of search result 1 itself. Assuming that the summary of search result 2 is a non-factual summary, the summary of search result 2 and the target document contained in search result 2 are spliced ​​to obtain text information, and the text information is text-encoded to obtain a text feature vector of the text information, and then based on the text feature vector, the summary of search result 2 is corrected, and the corrected summary is the factual summary of search result 2.

[0079] After obtaining the corrected summaries of each search result, the corrected summaries of each search result can be displayed on the search interface, i.e., the corrected summaries of search result 1, search result 2, and search result 3. Optionally, one or more of the following can also be displayed on the search interface: the document title of the target document included in each search result, the cover image of the target document included in each search result, the publishing author, publishing date, interactive data, etc. of the target document included in each search result. The interactive data can include one or more of the following: the number of likes, the number of shares, the number of comments, the number of favorites, etc. The user determines whether the target document is useful based on the relevant information of each search result displayed in the search interface, and decides whether to perform a click operation. For example, assuming that the user determines that the target document included in search result 1 is useful based on the corrected summary of search result 1, then the user can click on the corrected summary of search result 1, and after detecting the click operation, the target document included in search result 1 can be displayed.

[0080] In an embodiment of the present application, by obtaining a summary of the search results, the search results are found in response to a search request, and the search results include a target document, and then the summary and the target document are spliced ​​to obtain text information, and the text information is text-encoded to obtain a text feature vector of the text information, and based on the text feature vector, the summary is corrected to obtain a corrected summary, which can realize intelligent correction of the summary of the search results to improve the consistency of facts.

[0081] Based on the above description, see Figure 4 , Figure 4 This is a flowchart of a method for generating a non-factual summary provided by an embodiment of the present application. The method for generating a non-factual summary can be executed by a search engine, a content publishing platform, a browser, or a computer device. Among them, the execution subject of constructing the non-factual summary, the execution subject of training the correction model, and the execution subject of calling the correction model to correct the summary of the search result can be the same or different, and are not limited by the embodiments of the present application. Figure 4 The method for generating the non-factual summary shown includes but is not limited to steps S401 to S405, wherein:

[0082] S401, obtaining a training document and a reference summary of the training document.

[0083] Optionally, training documents can be obtained from local storage, or selected from historical documents published to the content publishing platform, or downloaded from the Internet, or manually edited, etc., which is not limited by the embodiments of the present application.

[0084] The reference summary refers to a summary that maintains factual consistency, that is, a summary that contains correct facts and consistent content, that is, an accurate summary. In order to ensure the factual consistency of the reference summary, a document sentence can be selected from the training document as the reference summary of the training document. Optionally, the training document can also be manually annotated to obtain the reference summary of the training document.

[0085] S402: Mask the entity of the reference summary to obtain a masked reference summary.

[0086] In the embodiment of the present application, the entity of the reference summary may include one or more entities, and the entity to be masked may include some or all entities of the reference summary. For example, assuming that the reference summary includes three entities, one entity in the reference summary may be masked to obtain the masked reference summary, or two entities in the reference summary may be masked to obtain the masked reference summary. Optionally, all entities included in the reference summary may be masked to obtain the masked reference summary.

[0087] For example, assuming that the reference summary is "a mobile phone is a communication tool", entity recognition is performed on the reference summary, and the entity of the reference summary is "tool". Then the entity of the reference summary can be masked, that is, the entity in the reference summary is replaced with the character [MASK] to obtain a masked reference summary, for example, the masked reference summary can be "a mobile phone is a communication [MASK]".

[0088] In one implementation, entity recognition may be performed on the reference summary to obtain the entity of the reference summary and the position of the entity in the reference summary, and then based on the position of the entity in the reference summary, the entity in the reference summary may be masked to obtain a masked reference summary.

[0089] S403: Concatenate the training document and the masked reference summary to obtain second training text information.

[0090] In a specific implementation, the training document and the masked reference summary may be concatenated by characters [SEP] to obtain the second training text information. For example, assuming that the training document includes "a mobile phone, the full name of which is a mobile phone or a wireless phone, is usually called a mobile phone, and was originally just a communication tool...", and the masked reference summary includes "a mobile phone is a communication [MASK]", then the training document and the masked reference summary are concatenated, and the obtained second training text information may include "a mobile phone is a communication [MASK][SEP] a mobile phone, the full name of which is a mobile phone or a wireless phone, is usually called a mobile phone, and was originally just a communication tool...".

[0091] S404: predict the entity at the mask position in the second training text information to obtain the target entity.

[0092] In a specific implementation, based on the word vectors of each word in the second training text information and the contextual semantic features, the entity at the mask position in the second training text information can be predicted to obtain the target entity.

[0093] In one implementation, the entity at the mask position in the second training text information can be predicted to obtain at least one candidate entity and the prediction probability of each candidate entity, and the target entity is selected from the at least one candidate entity based on the prediction probability of each candidate entity. The prediction probability of the target entity is less than the prediction probability of other candidate entities, or the prediction probability of the target entity is less than a preset probability threshold.

[0094] For example, assuming that the second training text information includes "a mobile phone is a communication [MASK][SEP] mobile phone, the full name is a mobile phone or wireless phone, commonly known as a mobile phone, originally just a communication tool...", based on the word vectors of each word in the second training text information, and the contextual semantic features, the entities in the mask position in the second training text information are predicted to obtain at least one candidate entity, such as "tool", "APP" and "system", where the prediction probability of the candidate entity "tool" is 90%, the prediction probability of the candidate entity "APP" is 20%, and the prediction probability of the candidate entity "system" is 40%, then the candidate instance with the smallest prediction probability, that is, "APP", can be used as the target entity. Optionally, assuming that the preset probability threshold is 45%, the candidate entity "APP" and the candidate entity "system" can be used as the target entity.

[0095] In one implementation, the filling language model may be called to predict the entities at the masked positions in the second training text information to obtain at least one candidate entity and the prediction probability of each candidate entity.

[0096] Exemplarily, the filling language model may include an autoencoder model, an autoregressive model, an encoder-decoder model, or a general language model with autoregressive blank filling.

[0097] The autoencoder model may include, for example, the BERT model, which stands for Bidirectional Encoder Representation from Transformers. It is a pre-trained language representation model. The BERT model emphasizes that it no longer uses the traditional unidirectional language model or the shallow concatenation of two unidirectional language models for pre-training as in the past, but instead uses a new masked language model (MLM) to generate deep bidirectional language representation.

[0098] An autoregressive model may include a GPT model, for example. The full name of the GPT model is Generative Pre-Training, which is a generative pre-training model. The GPT pre-training method is the same as that of a traditional language model. It predicts the next word based on the previous context. Because the GPT model uses a traditional language model, it is more suitable for natural language generation tasks.

[0099] Encoder-decoder models can include T5 (Transfer Text-to-Text Transformer) for example. The core idea of ​​the T5 model is to find an abstract model that can be like humans. We communicate through language with a word or a group of words that we call "text. When we try to understand an article, we pay attention to the words in all directions in the sentence. We try to measure the importance of each word. When we don't understand a sentence, we focus on a word and then query other keywords in the sentence to determine their meaning and where we must pay attention, which defines the attention layer of the Transformer. The T5 model can be summarized as a Transformer for text-to-text transfer, so that all Neuro-Linguistic Programming (NLP) tasks can be described as text-to-text problems to solve.

[0100] The general language model of autoregressive blank filling can include, for example, the generalized linear model (General Linear Model, GLM). The generalized linear model is a generalization of the linear regression model, which was created to overcome the shortcomings of the linear regression model. First of all, the independent variable can be discrete or continuous. Discrete variables can be 0-1 variables or variables with multiple values. The generalized linear model cancels the requirement that the residual (dependent variable) obeys the normal distribution. The residual does not have to obey the normal distribution, but can obey binomial, Poisson, negative binomial, normal, gamma, inverse Gaussian and other distributions.

[0101] S405: Replace the entity in the reference summary with the target entity to obtain a non-factual summary of the training document.

[0102] In a specific implementation, if a mask is performed on an entity in the reference summary, then after the target entity is obtained, the entity in the reference summary can be replaced with the target entity to obtain a non-factual summary of the training document. If mask is performed on multiple entities in the reference summary, then after the target entity is predicted for an entity at any mask position in the second training text information, the corresponding entity in the reference summary can be replaced with the target entity to obtain a non-factual summary of the training document. For example, assuming that N entities in the reference summary are masked, wherein the first entity is at the first mask position in the second training text information, and the Nth entity is at the Nth mask position in the second training text information, then after predicting the entity at the first mask position in the second training text information to obtain the target entity, the first entity in the reference summary can be replaced with the target entity, and after predicting the entity at the second mask position in the second training text information to obtain the target entity, the second entity in the reference summary can be replaced with the corresponding target entity, until after predicting the entity at the Nth mask position in the second training text information to obtain the target entity, the Nth entity in the reference summary can be replaced with the corresponding target entity to obtain a non-factual summary of the training document. Where N is a positive integer.

[0103] In one implementation, the number of target entities obtained by predicting any entity at any mask position may be one or more. If the number of target entities obtained by predicting any entity at any mask position is one, then the entity in the reference summary is replaced with the target entity to obtain a non-factual summary of the training document. If the number of target entities obtained by predicting any entity at any mask position is K, then the entities in the reference summary are replaced with K target entities respectively to obtain K non-factual summaries of the training document. Where K is a positive integer. For example, the second training text information includes "a mobile phone is a communication [MASK][SEP] mobile phone, the full name is a mobile phone or wireless phone, commonly known as a mobile phone, originally just a communication tool...", and the entities at the mask position in the second training text information are predicted, and the target entities obtained include "APP" and "system", then the entity "tool" in the reference summary "a mobile phone is a communication tool" can be replaced with "APP" to obtain a non-factual summary of the training document, that is, "a mobile phone is a communication APP". You can also replace the entity "tool" in the reference summary "a mobile phone is a communication tool" with "system" to obtain another non-factual summary of the training document, namely "a mobile phone is a communication system".

[0104] Since the reference summary in the embodiment of the present application is a sentence obtained from a training document, or a sentence obtained by manually annotating a training document, the non-factual summary generated based on the sentence by filling the language model is representative of the real error. Based on the non-factual summary, a more robust correction model can be trained to accurately correct the summary of the search result.

[0105] In an embodiment of the present application, a training document and a reference summary of the training document are obtained, entities in the reference summary are masked to obtain a masked reference summary, the training document and the masked reference summary are concatenated to obtain a second training text information, entities in the masked position in the second training text information are predicted to obtain a target entity, the entity in the reference summary is replaced with the target entity, and a non-factual summary of the training document is obtained, which can ensure that the constructed non-factual summary is representative of real errors.

[0106] An embodiment of the present application further provides a computer storage medium, in which program instructions are stored. When the program instructions are executed, they are used to implement the corresponding methods described in the above embodiments.

[0107] See also Figure 5 , Figure 5 It is a structural schematic diagram of a device for correcting a summary of a search result provided in an embodiment of the present application.

[0108] In one implementation of the device for correcting a summary of a search result according to an embodiment of the present application, the device for correcting a summary of a search result includes the following structure.

[0109] The acquisition unit 501 is used to acquire a summary of the search results; wherein the search results are found in response to the search request, and the search results include a target document;

[0110] A concatenation unit 502 is used to concatenate the summary and the target document to obtain text information;

[0111] The encoding unit 503 is used to perform text encoding on the text information to obtain a text feature vector of the text information;

[0112] The correction unit 504 is configured to perform correction processing on the summary based on the text feature vector to obtain a corrected summary.

[0113] In one embodiment, the corrected summary is obtained by correcting the model;

[0114] The acquisition unit 501 is further used to acquire a training sample; wherein the training sample includes a training document, a non-factual summary of the training document, and a reference summary of the training document;

[0115] The concatenation unit 502 is further configured to concatenate the non-factual summary and the training document to obtain first training text information;

[0116] The encoding unit 503 is further used to call the initial correction model to perform text encoding on the first training text information to obtain a text feature vector of the first training text information;

[0117] The correction unit 504 is further configured to correct the non-factual summary based on the text feature vector of the first training text information to obtain a corrected target summary;

[0118] The search result summary correction device may further include:

[0119] The training unit 505 is configured to train the initial correction model in a direction of reducing the difference between the target summary and the reference summary to obtain the correction model.

[0120] In one embodiment, the acquisition unit 501 is further configured to acquire the training document and a reference summary of the training document;

[0121] The search result summary correction device may further include a mask unit 506, a prediction unit 507 and a replacement unit 508, wherein:

[0122] A masking unit 506, configured to perform masking processing on the entity of the reference digest to obtain a masked reference digest;

[0123] The concatenation unit 502 is further used to concatenate the training document and the masked reference summary to obtain second training text information;

[0124] A prediction unit 507, configured to predict an entity at a mask position in the second training text information to obtain a target entity;

[0125] A replacement unit 508 is configured to replace the entity in the reference summary with the target entity to obtain a non-factual summary of the training document.

[0126] In one embodiment, the prediction unit 507 predicts the entity at the mask position in the second training text information to obtain the target entity, including:

[0127] Predicting the entity at the mask position in the second training text information to obtain at least one candidate entity and a prediction probability of each candidate entity;

[0128] Based on the predicted probabilities of the candidate entities, a target entity is selected from the at least one candidate entity; wherein the predicted probability of the target entity is less than the predicted probabilities of other candidate entities, or the predicted probability of the target entity is less than a preset probability threshold.

[0129] In one embodiment, the prediction unit 507 predicts the entity at the mask position in the second training text information to obtain at least one candidate entity and the prediction probability of each candidate entity, including:

[0130] The filling language model is called to predict the entity at the mask position in the second training text information to obtain at least one candidate entity and the prediction probability of each candidate entity.

[0131] In one embodiment, the search result summary correction device may further include an entity recognition unit 509, wherein:

[0132] An entity recognition unit 509, configured to perform entity recognition on the reference abstract to obtain an entity of the reference abstract and a position of the entity in the reference abstract;

[0133] The masking unit 506 performs masking processing on the entity of the reference digest to obtain a masked reference digest, including:

[0134] Based on the position of the entity in the reference digest, mask processing is performed on the entity in the reference digest to obtain the masked reference digest.

[0135] In one embodiment, the search result summary correction device may further include a display unit 510, wherein:

[0136] A display unit 510, configured to display a search interface, wherein the search interface includes the corrected summary;

[0137] The display unit 510 is further configured to display the target document in response to a click operation on the corrected summary.

[0138] In an embodiment of the present application, a summary of the search results is obtained by an acquisition unit 501. The search results are found in response to a search request. The search results include a target document. Then, a splicing unit 502 splices the summary and the target document to obtain text information. An encoding unit 503 performs text encoding on the text information to obtain a text feature vector of the text information. A correction unit 504 corrects the summary based on the text feature vector to obtain a corrected summary. This enables intelligent correction of the summary of the search results to improve the consistency of facts.

[0139] See also Figure 6 , Figure 6 6 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device in the embodiment of the present application includes a power supply module and other structures, and includes a processor 601, a storage device 602 and a communication interface 603. The processor 601, the storage device 602 and the communication interface 603 can exchange data, and the processor 601 implements the corresponding search result summary correction method.

[0140] The storage device 602 may include a volatile memory, such as a random-access memory (RAM); the storage device 602 may also include a non-volatile memory, such as a flash memory, a solid-state drive (SSD), etc.; the storage device 602 may also include a combination of the above types of memory.

[0141] The processor 601 may be a central processing unit (CPU). The processor 601 may also be a combination of a CPU and a GPU. In the server, multiple CPUs and GPUs may be included as needed to correct the summary of the corresponding search results. In one embodiment, the storage device 602 is used to store program instructions. The processor 601 may call program instructions to implement the various methods involved in the embodiments of the present application.

[0142] In a first possible implementation, the processor 601 of the computer device calls the program instructions stored in the storage device 602 to obtain a summary of the search results; wherein the search results are found in response to a search request, and the search results include a target document; the summary and the target document are concatenated to obtain text information; the text information is text-encoded to obtain a text feature vector of the text information; and based on the text feature vector, the summary is corrected to obtain a corrected summary.

[0143] In one embodiment, the corrected summary is obtained by correcting the model; the processor 601 may also perform the following operations:

[0144] Acquire a training sample; wherein the training sample includes a training document, a non-factual summary of the training document, and a reference summary of the training document;

[0145] Concatenating the non-factual summary and the training document to obtain first training text information;

[0146] Calling the initial correction model to perform text encoding on the first training text information to obtain a text feature vector of the first training text information;

[0147] Based on the text feature vector of the first training text information, correcting the non-factual summary to obtain a corrected target summary;

[0148] The initial correction model is trained in a direction of reducing the difference between the target summary and the reference summary to obtain the correction model.

[0149] In one embodiment, the processor 601 is further configured to perform the following operations:

[0150] Obtaining the training document and a reference summary of the training document;

[0151] Masking the entity of the reference summary to obtain a masked reference summary;

[0152] Concatenating the training document and the masked reference summary to obtain second training text information;

[0153] Predicting the entity at the mask position in the second training text information to obtain a target entity;

[0154] The entity in the reference summary is replaced with the target entity to obtain a non-factual summary of the training document.

[0155] In one embodiment, when the processor 601 predicts the entity at the mask position in the second training text information to obtain the target entity, the processor 601 may perform the following operations:

[0156] Predicting the entity at the mask position in the second training text information to obtain at least one candidate entity and a prediction probability of each candidate entity;

[0157] Based on the predicted probabilities of the candidate entities, a target entity is selected from the at least one candidate entity; wherein the predicted probability of the target entity is less than the predicted probabilities of other candidate entities, or the predicted probability of the target entity is less than a preset probability threshold.

[0158] In one embodiment, when the processor 601 predicts the entity at the mask position in the second training text information to obtain at least one candidate entity and the prediction probability of each candidate entity, the processor 601 may perform the following operations:

[0159] The filling language model is called to predict the entity at the mask position in the second training text information to obtain at least one candidate entity and the prediction probability of each candidate entity.

[0160] In one embodiment, the processor 601 may further perform the following operations:

[0161] Performing entity recognition on the reference abstract to obtain an entity of the reference abstract and a position of the entity in the reference abstract;

[0162] When the processor 601 performs masking on the entity of the reference digest to obtain the masked reference digest, the processor 601 may perform the following operations:

[0163] Based on the position of the entity in the reference digest, mask processing is performed on the entity in the reference digest to obtain the masked reference digest.

[0164] In one embodiment, the processor 601 may further perform the following operations:

[0165] displaying a search interface, wherein the search interface includes the corrected summary;

[0166] In response to a click operation on the corrected summary, the target document is displayed.

[0167] In an embodiment of the present application, a summary of search results is obtained by processor 601. The search results are found in response to a search request. The search results include a target document. The summary and the target document are then concatenated to obtain text information. The text information is text-encoded to obtain a text feature vector of the text information. Based on the text feature vector, the summary is corrected to obtain a corrected summary. This enables intelligent correction of the summary of the search results to improve the consistency of facts.

[0168] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the computer-readable storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM). The computer-readable storage medium can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the blockchain node, etc.

[0169] The above disclosure is only part of the embodiments of the present application, which certainly cannot be used to limit the scope of rights of the present application. Ordinary technicians in this field can understand that all or part of the processes of implementing the above embodiments and making equivalent changes according to the claims of this application are still within the scope of the present invention.

Claims

1. A method for correcting an abstract of search results, characterized in that, it includes: Obtain the abstract of the search results; wherein, the search results are found in response to a search request, and the search results include target documents; Concatenate the abstract and the target document to obtain text information, and perform text encoding on the text information to obtain a text feature vector of the text information; Based on the text feature vector, perform correction processing on the abstract to obtain a corrected abstract; wherein, the corrected abstract is obtained through a correction model; the training method of the correction model includes: Obtain training samples; wherein, the training samples include training documents, non-factual abstracts of the training documents, and reference abstracts of the training documents; Call an initial correction model to perform correction processing on the non-factual abstract based on the non-factual abstract and the training document to obtain a corrected target abstract; Train the initial correction model in the direction of reducing the difference between the corrected target abstract and the reference abstract to obtain the correction model; The obtaining method of the non-factual abstract of the training document includes: Perform masking processing on the entities of the reference abstract to obtain a masked reference abstract; Concatenate the training document and the masked reference abstract to obtain second training text information; Predict the entities at the masked positions in the second training text information to obtain at least one candidate entity and the prediction probability of each candidate entity; Based on the prediction probabilities of the candidate entities, select a target entity from the at least one candidate entity; wherein, the prediction probability of the target entity is less than the prediction probabilities of other candidate entities, or the prediction probability of the target entity is less than a preset probability threshold; Replace the entity in the reference abstract with the target entity to obtain the non-factual abstract of the training document.

2. The method according to claim 1, characterized in that, The step of calling an initial correction model to perform correction processing on the non-factual abstract based on the non-factual abstract and the training document to obtain a corrected target abstract includes: Concatenate the non-factual abstract and the training document to obtain first training text information; Call the initial correction model to perform text encoding on the first training text information to obtain a text feature vector of the first training text information; Based on the text feature vector of the first training text information, perform correction processing on the non-factual abstract to obtain the corrected target abstract.

3. The method according to claim 1, characterized in that, The step of predicting the entities at the masked positions in the second training text information to obtain at least one candidate entity and the prediction probability of each candidate entity includes: Call a filling language model to predict the entities at the masked positions in the second training text information to obtain at least one candidate entity and the prediction probability of each candidate entity.

4. The method according to claim 1, characterized in that, The method further includes: Perform entity recognition on the reference abstract to obtain the entities of the reference abstract and the positions of the entities in the reference abstract; The masking process for the entities of the reference abstract to obtain the masked reference abstract includes: Based on the positions of the entities in the reference abstract, perform a masking process on the entities in the reference abstract to obtain the masked reference abstract.

5. The method according to claim 1, wherein, the method further includes: Display a search interface, where the search interface includes the corrected abstract; In response to a click operation on the corrected abstract, display the target document.

6. An apparatus for correcting an abstract of a search result, wherein, the apparatus includes: An acquisition unit for acquiring an abstract of a search result; wherein, the search result is found in response to a search request, and the search result includes a target document; A splicing unit for splicing the abstract and the target document to obtain text information; An encoding unit for performing text encoding on the text information to obtain a text feature vector of the text information; A correction unit for correcting the abstract based on the text feature vector to obtain a corrected abstract; wherein, the corrected abstract is obtained through a correction model; the training method of the correction model includes: Obtain training samples; wherein, the training samples include training documents, non-factual abstracts of the training documents, and reference abstracts of the training documents; Call an initial correction model to correct the non-factual abstract based on the non-factual abstract and the training document to obtain a corrected target abstract; Train the initial correction model in the direction of reducing the difference between the corrected target abstract and the reference abstract to obtain the correction model; The acquisition method of the non-factual abstract of the training document includes: Perform a masking process on the entities of the reference abstract to obtain a masked reference abstract; Splice the training document and the masked reference abstract to obtain second training text information; Predict the entities at the masked positions in the second training text information to obtain at least one candidate entity and the prediction probabilities of each candidate entity; Based on the prediction probabilities of each candidate entity, select a target entity from the at least one candidate entity; wherein, the prediction probability of the target entity is less than the prediction probabilities of other candidate entities, or the prediction probability of the target entity is less than a preset probability threshold; Replace the entities in the reference abstract with the target entity to obtain the non-factual abstract of the training document.

7. A computer device, wherein, the computer device includes a processor, a storage device, and a communication interface, and the processor, the storage device, and the communication interface are interconnected, wherein: The storage device is used to store a computer program, and the computer program includes program instructions; The processor is used to call the program instructions to execute the search result abstract correction method according to any one of claims 1 to 5.

8. A computer-readable storage medium, wherein, The computer-readable storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, they are used to execute the method for correcting the abstract of the search result according to any one of claims 1 to 5.

9. A computer program product, characterized in that the computer program product includes a computer program, and the computer program is adapted to be loaded and executed by a processor to execute the method for correcting the abstract of the search result according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Text error correction model training method and device and text error correction processing method and device

    CN111950292A

  • Generative abstract error correction method for fact consistency

    CN115358215A