Control method, device, equipment and readable medium for retrieval enhancement generation model

Through deep learning models, a dynamic adaptive keyword collection and feature extraction algorithm based on graph neural network are generated, a search-enhanced generation model is constructed, and the generation strategy is optimized based on user feedback, which solves the challenges of traditional models when processing specific domain knowledge or latest information, and improves the accuracy and relevance of generated results.

CN119226439BActive Publication Date: 2025-04-01GUANGZHOU ZHONGCHANG KANGDA INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411343164.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-04-01
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

Retrieving enhanced generative models has challenges in processing specific domain knowledge or latest information. Traditional models cannot access external data sources, resulting in insufficient accuracy and relevance of generated results and inability to meet users' specific expectations and needs.

Method used

A dynamic adaptive keyword collection is generated through a deep learning model, and a feature extraction algorithm based on graph neural network is combined to build a search-enhanced generation model. Adjust keyword generation rules and document feature extraction strategies based on user feedback data to form a self-learning mechanism and optimize the generation strategy.

Benefits of technology

The accuracy and relevance of the generation results of the retrieval enhancement of the generative model can be better met by users' specific expectations and needs, and precise control and personalized customization of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226439B_ABST
    Figure CN119226439B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a control method, device, equipment and readable medium for a retrieval enhancement generation model, the method comprising generating a dynamic adaptive keyword set using a deep learning model according to context information input by a user and historical interaction data, and extracting document features of each document by calling a feature extraction algorithm based on a graph neural network for a retrieval document set; constructing the retrieval enhancement generation model according to the dynamic adaptive keyword set and the document features; adjusting the keyword generation rules of the deep learning model and the document feature extraction strategy of the feature extraction algorithm based on the graph neural network according to user feedback data on the generation results of the retrieval enhancement generation model, so as to realize the control of the retrieval enhancement generation model. By adopting the embodiment of the present application, the accuracy and relevance of the generation results of the retrieval enhancement generation model can be improved, so as to better meet the specific expectations and needs of users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a control method, device, equipment and readable medium for a retrieval enhancement generation model. Background Art

[0002] Retrieval-Augmented Generation (RAG) is a method that combines information retrieval techniques and natural language generation techniques to improve the accuracy and contextual relevance of generative models. Traditional natural language generation models usually rely on large-scale training data to learn language patterns and contextual associations, but they may encounter challenges when dealing with specific domain knowledge or the latest information. This is mainly because these models can only generate based on the information in their training data, and cannot access external data sources to obtain new information.

[0003] To address this limitation, retrieval-augmented generation methods introduce an information retrieval component that enables the model to not only leverage its own knowledge base, but also retrieve relevant information from an external document collection based on the input query. This approach enhances the accuracy and contextual relevance of the generated content by combining the retrieved relevant document fragments with the model's internal knowledge. For example, in a question-answering system, RAG can help the model answer specific questions more accurately because it not only leverages a pre-trained language model, but also retrieves the specific text paragraph containing the answer in real time.

[0004] However, due to the introduction of information retrieval components, the amount of information and data that needs to be processed has greatly increased, and redundant and invalid data has also greatly affected the accuracy and relevance of the generated results, resulting in the final generated results being unable to meet the specific expectations and needs of users. Summary of the invention

[0005] The embodiments of the present application provide a control method, device, equipment and readable medium for a retrieval enhancement generation model, which can improve the accuracy and relevance of the generation results of the retrieval enhancement generation model, thereby better meeting the specific expectations and needs of users.

[0006] A first aspect of an embodiment of the present application provides a control method for a retrieval enhancement generation model, the method comprising:

[0007] A deep learning model is used to generate a dynamic adaptive keyword set based on the contextual information input by the user and historical interaction data, and a feature extraction algorithm based on a graph neural network is called to extract document features of each document for the retrieved document set;

[0008] Constructing the retrieval enhancement generation model according to the dynamic adaptive keyword set and the document features;

[0009] According to the user's feedback data on the generation results of the retrieval enhancement generation model, the keyword generation rules of the deep learning model and the document feature extraction strategy of the graph neural network-based feature extraction algorithm are adjusted to achieve control of the retrieval enhancement generation model.

[0010] In one embodiment provided in the present application, the method further includes:

[0011] According to the feedback data of the users on the generation result of the retrieval enhancement generation model, the generation strategy of the retrieval enhancement generation model is optimized and adjusted by using the reinforcement learning algorithm.

[0012] In one embodiment provided in the present application, the step of generating a dynamic adaptive keyword set using a deep learning model according to context information input by a user and historical interaction data includes:

[0013] Preprocessing the context information and historical interaction data input by the user to obtain a context information vector and a historical interaction data vector, wherein the context information vector includes a plurality of first vocabulary vector sequences arranged in a sentence order, and the historical interaction data vector includes a plurality of second vocabulary vector sequences arranged in a sentence order;

[0014] Determine a first target vocabulary vector and a second target vocabulary vector according to the long-distance dependency and time series characteristics of the first vocabulary vector sequence and the second vocabulary vector sequence;

[0015] The context information vocabulary corresponding to the target first vocabulary vector and the historical interaction data vocabulary corresponding to the target second vocabulary vector are used as elements in a dynamic adaptive keyword set to obtain the dynamic adaptive keyword set.

[0016] In one embodiment provided in the present application, the calling of a feature extraction algorithm based on a graph neural network for the retrieved document set to extract document features of each document includes:

[0017] Constructing a document graph, wherein nodes in the document graph represent documents in the retrieved document set, and edges in the document graph represent relationships between documents in the retrieved document set;

[0018] Initializing a graph feature vector in the document graph, wherein the graph feature vector includes at least two dimensions: a feature of the node and a feature of the edge;

[0019] Propagate and update the graph feature vector using a graph neural network to reconstruct the document graph;

[0020] Determine document features of each document in the reconstructed document graph.

[0021] In one embodiment provided in the present application, the step of constructing the retrieval enhancement generation model according to the dynamic adaptive keyword set and the document features includes:

[0022] Constructing a retrieval enhancement model, the retrieval enhancement model is used to assign weights to the dynamic adaptive keywords in the dynamic adaptive keyword set and the document features according to an adaptive weighting mechanism; matching each dynamic adaptive keyword in the dynamic adaptive keyword set with the document features according to the weights of the dynamic adaptive keywords and the document features to calculate the similarity between the dynamic adaptive keyword set and the document features; sorting the retrieval document set according to the similarity between the dynamic adaptive keyword set and the document features to obtain a sorting result; determining a target retrieval document according to the sorting result;

[0023] A conditional generation model is constructed, wherein the conditional generation model is used to output a generation result according to the target retrieval document.

[0024] In one embodiment provided in the present application, the keyword generation rule of the deep learning model and the document feature extraction strategy of the graph neural network-based feature extraction algorithm are adjusted according to the user's feedback data on the generation result of the retrieval enhancement generation model, including:

[0025] Calculating user satisfaction based on user feedback data on the generation results of the retrieval enhancement generation model;

[0026] Calculating the effectiveness of the generated results according to user satisfaction;

[0027] When the validity of the generated result is lower than a preset threshold, the keyword generation rule of the deep learning model and the document feature extraction strategy of the graph neural network-based feature extraction algorithm are adjusted.

[0028] In one embodiment provided in the present application, the generation strategy of the retrieval enhancement generation model is optimized and adjusted using a reinforcement learning algorithm according to user feedback data on the generation result of the retrieval enhancement generation model, including:

[0029] The context information input by the user, the retrieved documents and the generated results are used as the state space of the reinforcement learning algorithm, the next generated result, the continued retrieval of documents and the end of the retrieval and generation operations are used as the action space, and the user's satisfaction, the effectiveness of the generated results and the richness of the generated results are used as the reward function;

[0030] The generation strategy of the retrieval enhancement generation model is optimized and adjusted using a reinforcement learning algorithm according to the state space, the action space and the reward function.

[0031] A second aspect of an embodiment of the present application provides a control device for a retrieval enhancement generation model, the device comprising:

[0032] A keyword generation unit, which is used to generate a dynamic adaptive keyword set using a deep learning model according to the context information input by the user and the historical interaction data, and a feature extraction unit, which is used to extract the document features of each document by calling a feature extraction algorithm based on a graph neural network for the retrieved document set;

[0033] A model generation unit, used for constructing the retrieval enhancement generation model according to the dynamic adaptive keyword set and the document features;

[0034] A model adjustment unit is used to adjust the keyword generation rules of the deep learning model and the document feature extraction strategy of the graph neural network-based feature extraction algorithm according to user feedback data on the generation results of the retrieval enhancement generation model, so as to achieve control of the retrieval enhancement generation model.

[0035] A third aspect of the embodiments of the present application provides an electronic device, including: a processor and a memory;

[0036] The processor is connected to the memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program to execute the method in the first aspect of the embodiment of the present application.

[0037] A fourth aspect of 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 method in the first aspect of the embodiment of the present application is executed.

[0038] This application uses a deep learning model to generate a dynamic adaptive keyword set based on the contextual information input by the user and the historical interaction data, so as to ensure that the generated keywords can reflect the user's real-time needs and intentions, thereby enhancing the relevance of the retrieval; calls a feature extraction algorithm based on a graph neural network to extract the document features of each document for the retrieval document set, so as to ensure that the document features can fully reflect the essence of its content and improve the accuracy of subsequent generation strategies; constructs the retrieval enhancement generation model based on the dynamic adaptive keyword set and the document features; adjusts the keyword generation rules of the deep learning model and the document feature extraction strategy of the feature extraction algorithm based on the graph neural network according to the user's feedback data on the generation results of the retrieval enhancement generation model, forming a self-learning mechanism, so that the model gradually adapts to the user's changing needs in continuous interaction, thereby realizing precise control and personalized customization, improving the accuracy and relevance of the generation results of the retrieval enhancement generation model, thereby better meeting the specific expectations and needs of the user, and finally realizing the control of the retrieval enhancement generation model. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] 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 invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 A schematic diagram showing a control application program operating environment of a retrieval enhancement generation model provided by an embodiment of the present application;

[0041] Figure 2 A schematic flow chart of a method for controlling a retrieval enhancement generation model provided by an embodiment of the present application is shown;

[0042] Figure 3 A schematic diagram showing the structure of a control device for a retrieval enhancement generation model provided by an embodiment of the present application is shown;

[0043] Figure 4 A schematic diagram of the structure of a computer device provided in one embodiment of the present application is shown. DETAILED DESCRIPTION

[0044] 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.

[0045] Please refer to Figure 1 , which shows a schematic diagram of a control application program operating environment of a search enhancement generation model provided by an embodiment of the present application. The application program operating environment may include: a terminal 10 and a server 20.

[0046] The terminal 10 includes, but is not limited to, electronic devices such as mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, game consoles, e-book readers, multimedia playback devices, wearable devices, etc. The terminal 10 may be installed with a client of an application program.

[0047] In an embodiment of the present application, the above-mentioned application may be any application that can provide a control service for retrieving an enhanced generation model. Typically, the application is an industrial application. Of course, in addition to industrial applications, other types of applications may also provide services that rely on the control of the retrieval enhanced generation model. For example, scientific research applications, browser applications, virtual reality (VR) applications, augmented reality (AR) applications, etc., are not limited to this in the embodiment of the present application. This is not limited in the embodiment of the present application. Optionally, a client of the above-mentioned application is running in the terminal 10.

[0048] The server 20 is used to provide background services for the client of the application in the terminal 10. For example, the server 20 can be the background server of the above application. The server 20 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 (Content Delivery Network, content distribution network), and big data and artificial intelligence platforms. Optionally, the server 20 provides background services for applications in multiple terminals 10 at the same time.

[0049] Optionally, the terminal 10 and the server 20 may communicate with each other via a network 30. The terminal 10 and the server 20 may be directly or indirectly connected via wired or wireless communication, which is not limited in the present application.

[0050] Please refer to Figure 2 , which shows a flow chart of a control method for a search enhancement generation model provided by an embodiment of the present application. The method can be applied to a computer device, which refers to an electronic device with data calculation and processing capabilities. For example, the execution subject of each step can be Figure 1 The terminal 10 or server 20 in the application running environment shown. The method may include the following steps:

[0051] Step 201: Generate a dynamic adaptive keyword set using a deep learning model based on contextual information input by the user and historical interaction data.

[0052] Step 202: Calling a graph neural network-based feature extraction algorithm to extract document features of each document in the retrieved document set.

[0053] Step 203: construct the retrieval enhancement generation model according to the dynamic adaptive keyword set and the document features.

[0054] Step 204: Adjust the keyword generation rules of the deep learning model and the document feature extraction strategy of the graph neural network-based feature extraction algorithm according to the user's feedback data on the generation results of the retrieval enhancement generation model to achieve control of the retrieval enhancement generation model.

[0055] Contextual information refers to the specific environment or background information of a word, sentence or paragraph in a text or conversation. Understanding contextual information is crucial for accurately interpreting semantics, understanding intent, and generating appropriate responses.

[0056] Among them, historical interaction data refers to the past communication records between users and retrieval enhancement generation models or systems. Historical interaction data contains rich information, such as user behavior patterns, preferences, needs, and system response methods.

[0057] Among them, dynamic adaptive keywords refer to keywords related to users' behaviors that can be flexibly adjusted when users interact with the retrieval enhancement generation model or system and face the update and change of the retrieval enhancement generation model or system. Such dynamic adaptive keywords can maintain effectiveness or efficiency under different conditions, rather than being rigid and unchanging.

[0058] Among them, the retrieval document set refers to a set of related documents used for retrieval and analysis in the field of information retrieval and natural language processing. These document sets can come from a variety of sources, including web pages, databases, books, articles, etc.

[0059] Keyword generation rules refer to a series of guiding principles formulated to increase the probability of content being searched. These rules can help content creators or merchants better understand and apply keywords to improve the visibility and ranking of their content or products.

[0060] Feature extraction is an important step in machine learning and data science, which involves extracting useful features from raw data for model training and prediction. An effective feature extraction strategy can significantly improve the performance and accuracy of the model.

[0061] It should be noted that step 201 and step 202 may be executed simultaneously or at different times, and there is no specific order of execution between the two.

[0062] This application uses a deep learning model to generate a dynamic adaptive keyword set based on the contextual information input by the user and the historical interaction data, so as to ensure that the generated keywords can reflect the user's real-time needs and intentions, thereby enhancing the relevance of the retrieval; calls a feature extraction algorithm based on a graph neural network to extract the document features of each document for the retrieval document set, so as to ensure that the document features can fully reflect the essence of its content and improve the accuracy of subsequent generation strategies; constructs the retrieval enhancement generation model based on the dynamic adaptive keyword set and the document features; adjusts the keyword generation rules of the deep learning model and the document feature extraction strategy of the feature extraction algorithm based on the graph neural network according to the user's feedback data on the generation results of the retrieval enhancement generation model, forming a self-learning mechanism, so that the model gradually adapts to the user's changing needs in continuous interaction, thereby realizing precise control and personalized customization, improving the accuracy and relevance of the generation results of the retrieval enhancement generation model, thereby better meeting the specific expectations and needs of the user, and finally realizing the control of the retrieval enhancement generation model.

[0063] Furthermore, the method described in this application also includes:

[0064] According to the feedback data of the users on the generation result of the retrieval enhancement generation model, the generation strategy of the retrieval enhancement generation model is optimized and adjusted by using the reinforcement learning algorithm.

[0065] Among them, generation strategy refers to the method of designing and implementing generative models in natural language processing (NLP) and machine learning to generate high-quality text or other types of data.

[0066] In an embodiment of the present application, not only are the keyword generation rules of the deep learning model and the document feature extraction strategy of the graph neural network-based feature extraction algorithm adjusted according to the user's feedback data on the generation results of the retrieval enhancement generation model, but the generation strategy of the retrieval enhancement generation model is also optimized and adjusted using a reinforcement learning algorithm according to the user's feedback data on the generation results of the retrieval enhancement generation model, so that both the retrieval part and the generation part are adjusted, so that both parts can continuously self-learn and optimize, and ultimately the generation results output by the constructed retrieval enhancement generation model are more accurate and relevant, thereby better meeting the specific expectations and needs of users.

[0067] In one embodiment provided in the present application, the step of generating a dynamic adaptive keyword set using a deep learning model according to context information input by a user and historical interaction data includes:

[0068] Preprocessing the context information and historical interaction data input by the user to obtain a context information vector and a historical interaction data vector, wherein the context information vector includes a plurality of first vocabulary vector sequences arranged in a sentence order, and the historical interaction data vector includes a plurality of second vocabulary vector sequences arranged in a sentence order;

[0069] Determine a first target vocabulary vector and a second target vocabulary vector according to the long-distance dependency and time series characteristics of the first vocabulary vector sequence and the second vocabulary vector sequence;

[0070] The context information vocabulary corresponding to the target first vocabulary vector and the historical interaction data vocabulary corresponding to the target second vocabulary vector are used as elements in a dynamic adaptive keyword set to obtain the dynamic adaptive keyword set.

[0071] Among them, preprocessing includes steps such as data cleaning, word segmentation, and standardization. Data cleaning is used to remove noise and irrelevant information in context information and historical interaction data; word segmentation is used to divide the text in context information and historical interaction data into words or phrases; standardization is used to unify the case of English and Chinese in words or phrases, remove special characters, etc.

[0072] Furthermore, after preprocessing the context information and historical interaction data input by the user to obtain the context information vector and the historical interaction data vector, the method further includes:

[0073] Calculate the term frequency-inverse document frequency and the occurrence frequency of each word corresponding to the first word vector and the second word vector;

[0074] The first vocabulary vector and the second vocabulary vector are filtered according to the word frequency-inverse document frequency and the occurrence frequency to obtain the filtered context information vector and the historical interaction data vector.

[0075] Furthermore, before determining the first target vocabulary vector and the second target vocabulary vector according to the long-distance dependency and time series characteristics of the first vocabulary vector sequence and the second vocabulary vector sequence, the method further includes:

[0076] Capturing the long-distance dependency of the first vocabulary in the first vocabulary vector sequence after the screening according to the Transformer model, and capturing the long-distance dependency of the second vocabulary in the second vocabulary vector sequence after the screening;

[0077] The time series features of the first vocabulary in the first vocabulary vector sequence and the time features of the second vocabulary in the second vocabulary vector sequence are captured according to the long short-term memory network or the gated recurrent unit.

[0078] In one embodiment provided in the present application, the calling of a feature extraction algorithm based on a graph neural network for the retrieved document set to extract document features of each document includes:

[0079] Constructing a document graph, wherein nodes in the document graph represent documents in the retrieved document set, and edges in the document graph represent relationships between documents in the retrieved document set;

[0080] Initializing a graph feature vector in the document graph, wherein the graph feature vector includes at least two dimensions: a feature of the node and a feature of the edge;

[0081] Propagate and update the graph feature vector using a graph neural network to reconstruct the document graph;

[0082] Determine document features of each document in the reconstructed document graph.

[0083] Among them, document features or node features can be represented by vectors such as the number of pages, titles, abstracts, keywords, paragraphs, etc. of the document, and the relationship between documents can include, for example, reference relationships, parallel relationships, similarity relationships, etc. Specifically, the graph feature vector is initialized, including initializing node features and edge features, and the weights of edge features can also be defined by similarity. After the graph feature vector is propagated and updated, each node integrates the features of adjacent nodes. When reconstructing the document graph, redundant nodes or invalid nodes can be deleted based on the above node features and edge features. For example, if the similarity is too high, it is confirmed that the contents of the two documents are the same, and only one is retained. If it is a reference relationship, it proves that there is a strong connection between the two documents, so both documents need to be saved, so that the subsequent generation results can be better generated based on the multiple strongly related documents.

[0084] In one embodiment provided in the present application, the step of constructing the retrieval enhancement generation model according to the dynamic adaptive keyword set and the document features includes:

[0085] Constructing a retrieval enhancement model, the retrieval enhancement model is used to assign weights to the dynamic adaptive keywords in the dynamic adaptive keyword set and the document features according to an adaptive weighting mechanism; matching each dynamic adaptive keyword in the dynamic adaptive keyword set with the document features according to the weights of the dynamic adaptive keywords and the document features to calculate the similarity between the dynamic adaptive keyword set and the document features; sorting the retrieval document set according to the similarity between the dynamic adaptive keyword set and the document features to obtain a sorting result; determining a target retrieval document according to the sorting result;

[0086] A conditional generation model is constructed, wherein the conditional generation model is used to output a generation result according to the target retrieval document.

[0087] Specifically, weights are assigned to the dynamic adaptive keywords in the dynamic adaptive keyword set and the document features according to an adaptive weighting mechanism. TF-IDF or other statistical methods may be used to assign weights to each keyword in the context information and historical interaction data, and similarity scores or other feature importance scores may be used to calculate document feature weights.

[0088] The similarity calculation may be to use cosine similarity, Jaccard similarity or other similarity measurement methods to calculate the similarity score between the keyword and the document feature, and then sort the document set according to the similarity score. Since both the context information and the historical interaction data include multiple keywords and multiple text features, the calculated similarity score may be a comprehensive similarity score, which is a weighted sum of the similarity scores of the keywords and the document features.

[0089] In one embodiment provided in the present application, the keyword generation rule of the deep learning model and the document feature extraction strategy of the graph neural network-based feature extraction algorithm are adjusted according to the user's feedback data on the generation result of the retrieval enhancement generation model, including:

[0090] Calculating user satisfaction based on user feedback data on the generation results of the retrieval enhancement generation model;

[0091] Calculating the effectiveness of the generated results according to user satisfaction;

[0092] When the validity of the generated result is lower than a preset threshold, the keyword generation rule of the deep learning model and the document feature extraction strategy of the graph neural network-based feature extraction algorithm are adjusted.

[0093] Specifically, the user satisfaction is calculated based on the user feedback data on the generated results of the retrieval enhancement generation model, including: collecting user feedback data and calculating average satisfaction. The user feedback data can be, for example, a satisfaction score or binary feedback. The satisfaction score can be a 5-point system, a 10-point system, or a 100-point system, which is not limited here. The binary feedback can be satisfied or dissatisfied. Calculating the average satisfaction is to calculate the average satisfaction score of all user feedback.

[0094] Specifically, calculating the effectiveness of the generated results includes: defining effectiveness indicators and calculating effectiveness, wherein the effectiveness indicators can define the effectiveness of the generated results as an average satisfaction score, and calculating the effectiveness is to use the average satisfaction score as the effectiveness score of the generated results.

[0095] Specifically, adjusting the keyword generation rules may include retraining the keyword generation model or adjusting the keyword weights, and adjusting the document feature extraction strategy may include retraining the graph neural network or adjusting the feature extraction parameters of the graph neural network.

[0096] In one embodiment provided in the present application, the generation strategy of the retrieval enhancement generation model is optimized and adjusted using a reinforcement learning algorithm according to user feedback data on the generation result of the retrieval enhancement generation model, including:

[0097] The context information input by the user, the retrieved documents and the generated results are used as the state space of the reinforcement learning algorithm, the next generated result, the continued retrieval of documents and the end of the retrieval and generation operations are used as the action space, and the user's satisfaction, the effectiveness of the generated results and the richness of the generated results are used as the reward function;

[0098] The generation strategy of the retrieval enhancement generation model is optimized and adjusted using a reinforcement learning algorithm according to the state space, the action space and the reward function.

[0099] Figure 3 A schematic diagram of the structure of a control device for a search enhancement generation model provided by an embodiment of the present application is shown. The device comprises:

[0100] A keyword generation unit 301 is used to generate a dynamic adaptive keyword set using a deep learning model according to context information input by a user and historical interaction data;

[0101] A feature extraction unit 302 is used to extract document features of each document by calling a feature extraction algorithm based on a graph neural network for the retrieved document set;

[0102] A model generation unit 303, configured to construct the retrieval enhancement generation model according to the dynamic adaptive keyword set and the document features;

[0103] The model adjustment unit 304 is used to adjust the keyword generation rules of the deep learning model and the document feature extraction strategy of the graph neural network-based feature extraction algorithm according to the user's feedback data on the generation results of the retrieval enhancement generation model, so as to achieve control of the retrieval enhancement generation model.

[0104] In one embodiment provided in the present application, the model adjustment unit 304 is further configured to:

[0105] According to the feedback data of the users on the generation result of the retrieval enhancement generation model, the generation strategy of the retrieval enhancement generation model is optimized and adjusted by using the reinforcement learning algorithm.

[0106] In one embodiment provided by the present application, in terms of generating a dynamic adaptive keyword set using a deep learning model according to context information input by a user and historical interaction data, the keyword generation unit 301 is specifically used to:

[0107] Preprocessing the context information and historical interaction data input by the user to obtain a context information vector and a historical interaction data vector, wherein the context information vector includes a plurality of first vocabulary vector sequences arranged in a sentence order, and the historical interaction data vector includes a plurality of second vocabulary vector sequences arranged in a sentence order;

[0108] Determine a first target vocabulary vector and a second target vocabulary vector according to the long-distance dependency and time series characteristics of the first vocabulary vector sequence and the second vocabulary vector sequence;

[0109] The context information vocabulary corresponding to the target first vocabulary vector and the historical interaction data vocabulary corresponding to the target second vocabulary vector are used as elements in a dynamic adaptive keyword set to obtain the dynamic adaptive keyword set.

[0110] In one embodiment provided in the present application, in calling a feature extraction algorithm based on a graph neural network for extracting document features of each document from a retrieved document set, the feature extraction unit 302 is specifically used to:

[0111] Constructing a document graph, wherein nodes in the document graph represent documents in the retrieved document set, and edges in the document graph represent relationships between documents in the retrieved document set;

[0112] Initializing a graph feature vector in the document graph, wherein the graph feature vector includes at least two dimensions: a feature of the node and a feature of the edge;

[0113] Propagate and update the graph feature vector using a graph neural network to reconstruct the document graph;

[0114] Determine document features of each document in the reconstructed document graph.

[0115] In one embodiment provided by the present application, in terms of constructing the retrieval enhancement generation model according to the dynamic adaptive keyword set and the document features, the model generation unit 303 is specifically used to:

[0116] Constructing a retrieval enhancement model, the retrieval enhancement model is used to assign weights to the dynamic adaptive keywords in the dynamic adaptive keyword set and the document features according to an adaptive weighting mechanism; matching each dynamic adaptive keyword in the dynamic adaptive keyword set with the document features according to the weights of the dynamic adaptive keywords and the document features to calculate the similarity between the dynamic adaptive keyword set and the document features; sorting the retrieval document set according to the similarity between the dynamic adaptive keyword set and the document features to obtain a sorting result; determining a target retrieval document according to the sorting result;

[0117] A conditional generation model is constructed, wherein the conditional generation model is used to output a generation result according to the target retrieval document.

[0118] In one embodiment provided by the present application, the keyword generation rule of the deep learning model and the document feature extraction strategy of the feature extraction algorithm based on the graph neural network are adjusted according to the user's feedback data on the generation result of the retrieval enhancement generation model, and the model adjustment unit 304 is specifically used to:

[0119] Calculating user satisfaction based on user feedback data on the generation results of the retrieval enhancement generation model;

[0120] Calculating the effectiveness of the generated results according to user satisfaction;

[0121] When the validity of the generated result is lower than a preset threshold, the keyword generation rule of the deep learning model and the document feature extraction strategy of the graph neural network-based feature extraction algorithm are adjusted.

[0122] In one embodiment provided by the present application, in optimizing and adjusting the generation strategy of the retrieval enhancement generation model by using a reinforcement learning algorithm according to the user's feedback data on the generation result of the retrieval enhancement generation model, the model adjustment unit 304 is specifically used to:

[0123] The context information input by the user, the retrieved documents and the generated results are used as the state space of the reinforcement learning algorithm, the next generated result, the continued retrieval of documents and the end of the retrieval and generation operations are used as the action space, and the user's satisfaction, the effectiveness of the generated results and the richness of the generated results are used as the reward function;

[0124] The generation strategy of the retrieval enhancement generation model is optimized and adjusted using a reinforcement learning algorithm according to the state space, the action space and the reward function.

[0125] It should be noted that the specific implementation steps of the embodiment on the device side can refer to the implementation steps on the method side mentioned above, and will not be repeated here.

[0126] Figure 4 A structural schematic diagram of a computer device provided by an embodiment of the present application is shown, including a memory and a processor, the memory stores a computer program, and the processor implements the functions of a computer system of a control method for a retrieval enhancement generation model in any of the above-mentioned embodiments when executing the computer program.

[0127] The embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a computer, the computer executes the functions of the computer system of the control method for retrieving an enhanced generation model in any of the above embodiments.

[0128] The present application also provides a computer program product including instructions, which, when executed by a computer, enables the computer to perform the functions of a computer system of the control method for retrieval enhancement generation model in any of the above-mentioned embodiments.

[0129] It should be understood that the specific examples in this application are only intended to help those skilled in the art to better understand the embodiments of the present application, rather than to limit the scope of the present invention.

[0130] It can be understood that in the various implementations of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the implementation methods of the present application.

[0131] It can be understood that the various embodiments described in this application can be implemented individually or in combination, and the embodiments of this application are not limited to this.

[0132] Unless otherwise stated, all technical and scientific terms used in the embodiments of the present application have the same meaning as those generally understood by those skilled in the art of the technical field of the present application. The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the scope of the present application. The term "and / or" used in the present application includes any and all combinations of one or more related listed items. The singular forms of "a kind of", "above" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0133] It can be understood that the processor of the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method implementation can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (DigitalSignal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiment of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0134] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (programmable ROM, PROM), an erasable programmable read-only memory (erasable PROM, EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0135] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0136] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method implementation methods and will not be repeated here.

[0137] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0138] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0139] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0140] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0141] The above are only specific embodiments of the present application, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A control method for a retrieval enhancement generation model, characterized in that: The method comprises: A deep learning model is used to generate a dynamic adaptive keyword set based on the contextual information input by the user and historical interaction data, and a feature extraction algorithm based on a graph neural network is called to extract document features of each document for the retrieved document set; Constructing a retrieval enhancement generation model according to the dynamic adaptive keyword set and the document features; According to the user's feedback data on the generation result of the retrieval enhancement generation model, the keyword generation rule of the deep learning model and the document feature extraction strategy of the feature extraction algorithm based on the graph neural network are adjusted to realize the control of the retrieval enhancement generation model; wherein: The method of generating a dynamic adaptive keyword set using a deep learning model according to context information input by a user and historical interaction data includes: preprocessing the context information input by the user and the historical interaction data to obtain a context information vector and a historical interaction data vector, wherein the context information vector includes a plurality of first vocabulary vector sequences arranged in sentence order, and the historical interaction data vector includes a plurality of second vocabulary vector sequences arranged in sentence order; determining a first target vocabulary vector and a second target vocabulary vector according to the long-distance dependency and time series characteristics of the first vocabulary vector sequence and the second vocabulary vector sequence; using the context information vocabulary corresponding to the first target vocabulary vector and the historical interaction data vocabulary corresponding to the second target vocabulary vector as elements in the dynamic adaptive keyword set to obtain the dynamic adaptive keyword set; The method calls a feature extraction algorithm based on a graph neural network to extract document features of each document in the retrieved document set, including: constructing a document graph, wherein nodes in the document graph represent documents in the retrieved document set, and edges in the document graph represent relationships between documents in the retrieved document set; initializing a graph feature vector in the document graph, wherein the graph feature vector includes at least two dimensions: features of the nodes and features of the edges; propagating and updating the graph feature vector using a graph neural network to reconstruct the document graph; and determining document features of each document in the reconstructed document graph.

2. The method according to claim 1, characterized in that The method further comprises: According to the feedback data of the users on the generation result of the retrieval enhancement generation model, the generation strategy of the retrieval enhancement generation model is optimized and adjusted by using the reinforcement learning algorithm.

3. The method according to claim 1 or 2, characterized in that: The step of constructing a retrieval enhancement generation model according to the dynamic adaptive keyword set and the document features includes: Constructing a retrieval enhancement model, the retrieval enhancement model is used to assign weights to the dynamic adaptive keywords in the dynamic adaptive keyword set and the document features according to an adaptive weighting mechanism; matching each dynamic adaptive keyword in the dynamic adaptive keyword set with the document features according to the weights of the dynamic adaptive keywords and the document features to calculate the similarity between the dynamic adaptive keyword set and the document features; sorting the retrieval document set according to the similarity between the dynamic adaptive keyword set and the document features to obtain a sorting result; determining a target retrieval document according to the sorting result; A conditional generation model is constructed, wherein the conditional generation model is used to output a generation result according to the target retrieval document.

4. The method according to claim 1, characterized in that The method of adjusting the keyword generation rules of the deep learning model and the document feature extraction strategy of the feature extraction algorithm based on the graph neural network according to the user's feedback data on the generation result of the retrieval enhancement generation model includes: Calculating user satisfaction based on user feedback data on the generation results of the retrieval enhancement generation model; Calculating the effectiveness of the generated results according to user satisfaction; When the validity of the generated result is lower than a preset threshold, the keyword generation rule of the deep learning model and the document feature extraction strategy of the graph neural network-based feature extraction algorithm are adjusted.

5. The method according to claim 4, characterized in that The step of optimizing and adjusting the generation strategy of the retrieval enhancement generation model by using a reinforcement learning algorithm according to the user's feedback data on the generation result of the retrieval enhancement generation model includes: The context information input by the user, the retrieved documents and the generated results are used as the state space of the reinforcement learning algorithm, the next generated result, the continued retrieval of documents and the end of the retrieval and generation operations are used as the action space, and the user's satisfaction, the effectiveness of the generated results and the richness of the generated results are used as the reward function; The generation strategy of the retrieval enhancement generation model is optimized and adjusted using a reinforcement learning algorithm according to the state space, the action space and the reward function.

6. A control device for a retrieval enhancement generation model, characterized in that: The device comprises: A keyword generation unit, which is used to generate a dynamic adaptive keyword set using a deep learning model according to the context information input by the user and the historical interaction data, and a feature extraction unit, which is used to extract the document features of each document by calling a feature extraction algorithm based on a graph neural network for the retrieved document set; A model generation unit, used to construct the retrieval enhancement generation model according to the dynamic adaptive keyword set and document features; A model adjustment unit, used to adjust the keyword generation rules of the deep learning model and the document feature extraction strategy of the graph neural network-based feature extraction algorithm according to user feedback data on the generation result of the retrieval enhancement generation model, so as to realize the control of the retrieval enhancement generation model; wherein: The method of generating a dynamic adaptive keyword set using a deep learning model according to context information input by a user and historical interaction data includes: preprocessing the context information input by the user and the historical interaction data to obtain a context information vector and a historical interaction data vector, wherein the context information vector includes a plurality of first vocabulary vector sequences arranged in sentence order, and the historical interaction data vector includes a plurality of second vocabulary vector sequences arranged in sentence order; determining a first target vocabulary vector and a second target vocabulary vector according to the long-distance dependency and time series characteristics of the first vocabulary vector sequence and the second vocabulary vector sequence; using the context information vocabulary corresponding to the first target vocabulary vector and the historical interaction data vocabulary corresponding to the second target vocabulary vector as elements in the dynamic adaptive keyword set to obtain the dynamic adaptive keyword set; The method calls a feature extraction algorithm based on a graph neural network to extract document features of each document in the retrieved document set, including: constructing a document graph, wherein nodes in the document graph represent documents in the retrieved document set, and edges in the document graph represent relationships between documents in the retrieved document set; initializing a graph feature vector in the document graph, wherein the graph feature vector includes at least two dimensions: features of the nodes and features of the edges; propagating and updating the graph feature vector using a graph neural network to reconstruct the document graph; and determining document features of each document in the reconstructed document graph.

7. An electronic device, characterized in that: include: Processor and memory; The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program to execute the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method according to any one of claims 1 to 5 is executed.

Citation Information

Patent Citations

  • Knowledge retrieval method and device, equipment and storage medium

    CN114328850A

  • Question and answer method for enhancing large language model generation based on graph neural network retriever

    CN118656475A