An Agent-based Intelligent Patent Retrieval Method and System
Through the intelligent patent search method based on Agent, using problem generation and vector search technology, the limitations of traditional search methods in handling fuzzy queries and complex intentions are solved, and efficient and accurate patent document search is achieved, which improves user satisfaction and Quality of search results.
Patent Information
- Application Number
- CN202411238958.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-09-05
AI Technical Summary
Traditional patent search methods have limitations in handling fuzzy queries, analyzing complex user intentions, and improving the correlation of results, resulting in inefficient search efficiency and insufficient accuracy, especially in large-scale patent datasets, which are difficult to meet the needs of fast and accurate searches.
Using the intelligent patent search method based on Agent, the user input information is rewritten into specific query questions through the problem generation module, and the trained problem generation model is used for preprocessing and optimization, and the search results are combined with IPC classification number and patent vector spatial distance. Evaluate, dynamically adjust the search strategy until it meets user needs.
The search accuracy and user satisfaction are significantly improved, and the search process and user experience are optimized through a multi-angle evaluation system to accurately screen and recommend patent documents that meet user needs.
Smart Images

Figure CN118760761B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of document recognition and processing, and in particular to an agent-based intelligent patent retrieval method and system. Background Art
[0002] In the current information age, the pace of technological innovation is accelerating, and the number of patent documents is growing dramatically, which has brought unprecedented challenges to patent search systems. Although traditional search methods, such as keyword search and Boolean logic query, provide users with basic search tools, these technologies have shown obvious limitations in processing fuzzy queries, parsing complex user intentions, and improving the relevance of results. Especially when patent data is becoming increasingly large and in various formats, these methods are often unable to effectively process and analyze large-scale patent data sets, resulting in low search efficiency and insufficient result accuracy. In addition, with the increase in innovation activities, the demand of enterprises and R&D personnel for the ability to quickly and accurately retrieve the latest patent information continues to grow. Traditional methods are complicated to operate for non-professional users, and it is often difficult to accurately express search requirements, which further reduces the practicality and efficiency of the search system. Therefore, it has become an inevitable trend in technological development to develop a system aimed at improving the automation and adaptability of search, improving the efficiency and accuracy of patent search, and improving the user interaction experience. Summary of the invention
[0003] In view of this, the present invention provides an agent-based intelligent patent search method and system to efficiently search for relevant documents from massive patent databases, thereby greatly improving the accuracy of the search and user satisfaction.
[0004] In order to achieve the above object, the present invention provides the following technical solutions:
[0005] In one aspect, the present invention provides an agent-based intelligent patent search method, comprising the following steps:
[0006] Rewrite the information related to the search target input by the user to generate a specific query question, and preprocess the query question, including text cleaning, word segmentation, and encoding word vectors; use the trained question generation model to generate a rewritten question from the original input question;
[0007] Evaluate the query rewriting effect, optimize according to the evaluation result, and continuously perform generation, evaluation and optimization cycle until the expected standard is achieved;
[0008] Patent documents are retrieved using the original user input and the rewritten query questions, and the retrieved patents are analyzed and counted to obtain the IPC classification number information and patent vector space distance of the retrieved patents;
[0009] Based on the IPC classification number concentration degree and patent vector space distance of the retrieved patents, it is judged whether the patent search results meet the requirements.
[0010] Another aspect of the present invention provides an agent-based intelligent patent search system, characterized in that it includes:
[0011] The question generation module rewrites the information related to the search target input by the user to generate a specific query question, and preprocesses the query question, including text cleaning, word segmentation, and encoding word vectors; uses the trained question generation model to generate a rewritten question from the original input question;
[0012] The Agent discrimination module evaluates the query rewriting effect, optimizes according to the evaluation result, and continuously performs generation, evaluation and optimization cycles until the expected standard is reached;
[0013] The search module uses the original input of the user and the rewritten query questions to search the patent documents;
[0014] A feature statistics module performs feature analysis and statistics on the patents retrieved by the search module to obtain the IPC classification number information and patent vector space distance of the retrieved patents;
[0015] The judgment module judges whether the patent search results meet the requirements based on the IPC classification number concentration degree and patent vector space distance of the retrieved patents.
[0016] The present invention has the following advantages:
[0017] In the technical solution provided by the present invention, rewriting is performed based on the user's original query and rewriting direction to generate more specific or diversified question rewriting results. After the query is successfully rewritten, relevant documents are efficiently retrieved from a large-scale patent database based on vector retrieval technology. By introducing the Agent decision-making module, the system can dynamically evaluate and adjust the question rewriting strategy and optimize the rewriting process in real time according to the quality score. The Agent determines whether the rewriting result is reasonable. If not, it gives the question generation module a more accurate rewriting direction and regenerates the rewriting result. Evaluate the relevance of the retrieval results, and decide whether to regenerate the question rewriting results as needed, and then perform another round of operations until the patent information that best meets the user's needs is found, thereby significantly improving user satisfaction and optimizing the overall retrieval process. This intelligent dynamic response mechanism greatly improves the accuracy of retrieval and user satisfaction.
[0018] The applicability of the search documents is judged by using two evaluation dimensions: the concentration of IPC classification numbers and the distance in patent vector space. This multi-angle evaluation system helps to more accurately screen and recommend patent documents that meet user needs, thereby improving the quality of search results.
[0019] The present invention adopts a multi-module collaboration approach, clearly divides tasks to reduce conflicts, dynamically adjusts to meet user needs, comprehensively considers user feedback to optimize the system, and improves user satisfaction and usage experience.
[0020] The patent information retrieval system provided by the present invention significantly improves the efficiency and accuracy of patent retrieval by integrating multiple modules. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the drawings required for the implementation methods or the description of the prior art are briefly introduced below. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0022] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with the technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantial technical significance. Any structural modification, change in proportion or adjustment of size shall still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.
[0023] Figure 1 The embodiments of the present invention provide Figure 1 A flow chart of an agent-based intelligent patent search method provided by an embodiment of the present invention;
[0024] Figure 2 A schematic diagram of the architecture of an agent-based intelligent patent search system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] In view of the current development trend and the challenge of the demand for patent information, the purpose of the present invention is to propose a method for patent retrieval based on user questions using Agent technology, which can effectively solve the problems of processing ambiguous queries and identifying complex user intentions, and at the same time provide a better solution for the precise retrieval needs of non-professional users, thereby improving the efficiency and accuracy of retrieval. Specifically, a patent retrieval model combining question generation and Agent intelligent discrimination is proposed. After the model receives the user input, the question generation module and the discrimination optimize the question rewriting result through the PPO algorithm based on the Actor-Critic architecture, and record the question rewriting result at this time. Then the Agent calls the retrieval module to retrieve the patent. Next, feature statistics are performed, and the international patent classification number (IPC number) of the retrieved patent and the vector distance between the patent documents are counted, and a judgment is made. If the judgment is no, the question generation module is returned to regenerate. After that, the retrieval module will search again until it is finally determined that the retrieval result meets the user's needs.
[0027] Through this combined mechanism, the model can not only automatically optimize user questions, but also accurately adjust the search strategy to ensure that the final search results are more in line with the user's actual needs. This method can improve the efficiency and accuracy of patent retrieval.
[0028] The significant advantages of the present invention lie in its deep understanding of user search queries and its ability to respond in a personalized manner. First, the present invention aims to significantly improve the accuracy and efficiency of patent searches and help users quickly locate the required patent information. Secondly, the effect of question rewriting is judged by the vector space distance between the IPC number and the search document, and the evaluation index is relatively complete and accurate, confirming the effectiveness of the search system of this study. In addition, the design and implementation of this system has also promoted the application of artificial intelligence technology in the field of patent information services, providing new directions and possibilities for the development of future search systems.
[0029] Embodiment 1
[0030] Figure 1 A flow chart of an agent-based intelligent patent search method provided by an embodiment of the present invention, referring to Figure 1 The present invention provides an agent-based intelligent patent search method, comprising the following steps:
[0031] S01, rewriting the information related to the search target input by the user to generate a specific query question, and preprocessing the query question, including text cleaning, word segmentation, and encoding word vectors; using the trained question generation model, generating a rewritten question from the original input question;
[0032] S02, evaluating the query question rewriting effect, optimizing according to the evaluation result, and continuously performing the generation, evaluation and optimization cycle until the expected standard is reached;
[0033] S03, searching patent documents using the original input of the user and the rewritten query questions respectively;
[0034] S04, performing feature analysis and statistics on the retrieved patents to obtain the IPC classification number information and patent vector space distance of the retrieved patents;
[0035] S05: Based on the IPC classification number concentration degree and patent vector space distance of the retrieved patents, determine whether the patent search results meet the requirements.
[0036] In a specific implementation scheme, the question generation model described in step S01 generates a question rewriting result through the original sentence expression and the rewriting direction, using a sequence-to-sequence Seq2Seq model, which includes an encoder and a decoder, and the model training steps include:
[0037] Input: Encoded original question, rewritten direction and rewritten question;
[0038] The encoder receives the original question and generates a vector encoding of the original question;
[0039] The decoder generates a rewrite question based on the encoder's vector code generation attempt;
[0040] Calculate the cross entropy loss between the generated question and the true rephrased question;
[0041] Use optimizers to adjust model parameters to reduce loss;
[0042] Output: The trained model generates a rewritten question based on the original input question;
[0043] The cross entropy loss function is used to compare the questions generated by the model with the real rewritten questions. The cross entropy loss function measures the difference between two probability distributions. The formula is:
[0044]
[0045] in, is the observed value (true value, 0 or 1), is the predicted probability and M is the number of categories.
[0046] In a specific implementation scheme, step S02 evaluates the query question rewriting effect, optimizes according to the evaluation result, dynamically evaluates and adjusts the question rewriting strategy, and optimizes the rewriting process in real time according to the quality score, specifically including:
[0047] According to the current rewrite strategy As well as the original question and the rewriting direction, generate the rewritten question, evaluate the generated rewritten question, and output a quality score;
[0048] Calculate reward / loss: Calculate a reward or loss signal R based on the comparison between the score of the Agent discrimination module and the manual score t ;
[0049] Perform strategy optimization—update the strategy objective function;
[0050] Calculate the advantage function: Use the score to calculate the advantage function A t , the value function V(s) is the expected return in a given state, γ is the discount factor, a constant between 0 and 1, At represents the advantage function at time t, which is used to quantify how better or worse taking an action is than the average, Rt is the reward at time t, V(St+1) is the value of the next state, and V(St) is the value of the current state.
[0051]
[0052] Strategy function: , represents the policy probability of taking action a in a given state s, where s is the user's original query and rewriting direction, a is the generated rewriting question, and θ is the parameter of the policy network;
[0053] Optimization goal:
[0054] ,
[0055] in, is the probability ratio of the new question generation result to the old question generation result, A t is the advantage function, is a hyperparameter that controls the clipping bound on the probability ratio.
[0056] Specifically, the rewriting strategy is:
[0057] Let θ be the score obtained by the generated rewriting problem after discrimination, set two thresholds θ1 and θ2, satisfy θ1 > θ2, and define a function, f(θ), to determine the strategy to be adopted by the score θ value, as follows:
[0058]
[0059] If θ exceeds the threshold θ1, the result generated by the model is recognized and put into the question generation result set;
[0060] If θ is between the thresholds θ1 and θ2, extract the keywords in the question rewriting result set as the rewriting direction, and then enter the question rewriting module for rewriting;
[0061] If θ is greater than the threshold θ2, the current result is discarded directly;
[0062] For the question generation results whose score value θ is between θ1 and θ2, the next step of correction is performed: a keyword extraction model is applied to obtain the keywords in the question generation result set, which are used as the rewriting direction of the next question generation process to continue rewriting the question.
[0063] In a specific implementation scheme, in step S03, the original input of the user and the rewritten query question are used to search for patent documents, and the search method is vector search;
[0064] A model based on the Transformer architecture is used to learn high-dimensional vector representations of queries and patent documents. Rich language representations are learned through pre-training on a large amount of text, and then fine-tuned to adapt to specific retrieval tasks.
[0065] In step S04 of the specific implementation scheme, based on the IPC classification number concentration degree and patent vector space distance of the retrieved patents, it is judged whether the patent search results meet the requirements, specifically including:
[0066] (1) IPC classification number statistics
[0067] The Herfindahl-Hirschman Index (HHI) method is used to statistically quantify the IPC classification code concentration. First, the number of patents in each IPC category is determined, and the “share” of each IPC category is calculated. i , that is, the number of patents in this category divided by the total number of patents, and finally the sum of the squares of all “shares”;
[0068] The calculation formula is as follows:
[0069]
[0070] Among them, s i is the “share” of the ith IPC classification number, n is the total number of IPC categories, and the value of HHI ranges from 0 to 1. The higher the value of HHI, the higher the concentration of IPC classification numbers;
[0071] (2) Vector space distance of patent documents
[0072] After the patent document text is vectorized, the vector distance between the retrieved documents is calculated to determine the degree of aggregation of the documents. Based on the vector space model, the Euclidean distance is used to calculate the distance or difference between the vector representations of the patent documents.
[0073] The calculation formula is as follows:
[0074]
[0075] where p i represents the coordinate value of the patent vector in the i-th dimension, q i The patent vector represents the coordinate value in the i-th dimension, and n is the dimension of the vector.
[0076] In order to make the technical solution of the present invention clearer and easier to understand, the specific implementation scheme of the present invention is described in detail below.
[0077] The following is an example of step S01 "rewriting the information related to the search target input by the user to generate a specific query question, and preprocessing the query question; using the trained question generation model to generate a rewritten question from the original input question":
[0078] Scenario setting: Assume that you are developing a new type of autonomous driving technology, with a particular focus on collision avoidance algorithms.
[0079] Detailed process:
[0080] (1) User input: The user enters “autonomous driving vehicle safety” in the patent search system.
[0081] (2) Problem generation (Actor):
[0082] The model automatically generates multiple rewrite results:
[0083] “Safety technologies for autonomous driving systems”
[0084] “Implementation of autonomous driving system”
[0085] “Collision Avoidance Technology for Autonomous Vehicles”
[0086] “Braking systems for autonomous vehicles”
[0087] “Market reputation of autonomous vehicles”
[0088] (3) Agent Intelligent Criticism:
[0089] The queries generated by model evaluation:
[0090] If the "braking technology of the autonomous driving system" and "collision avoidance technology of the autonomous driving vehicle" are greater than the threshold value 1 according to the conditional settings, then the answer is more accurate.
[0091] The “implementation plan of the autonomous driving system” is set between threshold 1 and threshold 2 according to the conditions and needs to be improved.
[0092] The “market reputation of autonomous vehicles” is set below the threshold of 2 according to the condition, and the rewriting fails and is automatically removed.
[0093] (4) Regeneration of the question generation module
[0094] The agent feeds this evaluation back to the question generation module, pointing out that the "autonomous driving system implementation plan" needs to be rewritten to better meet user needs. After receiving the feedback, it begins intelligent optimization based on the original input "autonomous driving vehicle" and the rewriting direction. The module may consider focusing more clearly on the safety of autonomous driving, for example, generating the following new rewriting results:
[0095] “Safety technologies for autonomous driving systems”
[0096] “Collision Avoidance Technology for Autonomous Vehicles”
[0097] "Obstacle Detection Technology in Autonomous Driving Vehicles"
[0098] “Navigation Algorithms for Autonomous Driving Systems”
[0099] (5) Agent intelligent judgment
[0100] The agent analyzes the rewriting results and calls the retrieval module if they meet the requirements.
[0101] (6) Search execution:
[0102] The model performs a search based on the validated query and finds N (e.g., 50) relevant patent documents.
[0103] (7) Feature statistics and analysis:
[0104] The statistical results show that:
[0105] 30 patents were retrieved for “Navigation algorithm of autonomous driving system”, and the IPC numbers are mainly concentrated in G01S19 / 37 and G01C21 / 34.
[0106] 20 patents were retrieved for “Collision avoidance technology for autonomous driving vehicles”, with the IPC numbers concentrated in B60W50 / 00 (autonomous driving technology control system).
[0107] At the same time, the vector space distance of patent documents is calculated and counted.
[0108] (8) Identification:
[0109] If the IPC numbers are concentrated and the vector space aggregation of the patent documents is high, then the conditions are met.
[0110] (9) Output results:
[0111] The model provides a detailed report listing all highly relevant patents.
[0112] Embodiment 2
[0113] Figure 2 FIG. 1 is a schematic diagram of the intelligent patent search system architecture of the Agent in the embodiment of the present invention. Figure 2 The embodiment of the present invention provides an agent-based intelligent patent search system 200, comprising:
[0114] The question generation module 210 rewrites the information related to the search target input by the user to generate a specific query question, and preprocesses the query question, including text cleaning, word segmentation, and encoding word vectors; uses the trained question generation model to generate a rewritten question from the original input question;
[0115] The Agent identification module 220 evaluates the query rewriting effect, optimizes according to the evaluation result, and continuously performs generation, evaluation and optimization cycles until the expected standard is reached;
[0116] A search module 230 uses the original input of the user and the rewritten query question to search for patent documents;
[0117] A feature statistics module 240 performs feature analysis and statistics on the patents retrieved by the search module to obtain the IPC classification number information and patent vector space distance of the retrieved patents;
[0118] The judgment module 250 judges whether the patent search results meet the requirements based on the IPC classification number concentration degree and the patent vector space distance of the retrieved patents.
[0119] The principle and implementation of the intelligent patent search system 200 are similar to the intelligent patent search method described in the first embodiment and are described below.
[0120] The model is implemented as follows:
[0121] Question generation module
[0122] In this stage, the PPO algorithm (Proximal Policy Optimization) based on the Actor-Critic architecture is applied to the intelligent patent search system. The question generation module (QGM) can be regarded as the "Actor (executor)", and the agent discrimination module (AGM) can be regarded as the "Critic (evaluator)". This architecture can form a dynamic confrontation relationship between the two modules when generating and evaluating the results of question rewriting, optimizing their efficiency and accuracy.
[0123] (1) Training data:
[0124] Several training data, each of which contains the following content: user questions, rewriting directions, and multiple rewritten question results obtained based on the user's questions, and professional annotation scores for the rewriting results based on the rewriting directions (1-10 points, 10 points is the most relevant).
[0125] The core task of the question generation module is to rewrite the user's original input (information related to the retrieval target, which may be vague keywords, a descriptive text, or a specific question) into a clearer and more specific query question. The goal is to automatically generate optimized question rewriting results to maximize the expected reward from the Critic.
[0126] (2) Data processing
[0127] Input: original question, rewriting directions and corresponding rewritten question.
[0128] Processing: First, these problems need to be preprocessed, including text cleaning, word segmentation, and encoding word vectors.
[0129] Output: The processed dataset, where each sample contains an original question, the rewritten direction, and one or more rewritten questions, all of which are converted into a numerical format that the model can directly process.
[0130] Defining the Model
[0131] Input: preprocessed data.
[0132] Model construction: Define a generative model to generate the result of question rewriting through the original sentence expression and rewriting direction. Usually a sequence-to-sequence (Seq2Seq) model is used, which includes an encoder and a decoder. The encoder reads the original question and encodes it into a fixed representation, and the decoder generates the rewritten question from this representation.
[0133] The actor is responsible for generating the problem rewriting results based on the current strategy. The actor's actions (outputs) are directly affected by its strategy, where the strategy is the rule learned by the model on how to generate the rewritten problem from the original problem, that is, the rewriting direction.
[0134] Output: Untrained Seq2Seq model.
[0135] (3) Loss Function and Optimizer
[0136] Input: Model output and actual rewrite problem.
[0137] The cross entropy loss function is used to compare the questions generated by the model with the real rewritten questions. The cross entropy loss function measures the difference between two probability distributions. The formula is:
[0138]
[0139] in, is the observed value (true value, 0 or 1), is the predicted probability and M is the number of categories.
[0140] (4) Training model
[0141] Input: the encoded original question, the rewritten directions and the rewritten question.
[0142] Training process:
[0143] The encoder receives the original question and produces a vector encoding of the original question.
[0144] The decoder generates a rewriting question based on the encoder's vector encoding generation attempt.
[0145] Compute the cross entropy loss between the generated question and the true rephrased question.
[0146] Use an optimizer to tune the model parameters to reduce the loss.
[0147] Output: A trained model that can generate rephrased questions based on the original input question.
[0148] The Agent determines the rewriting result:
[0149] Evaluate the effectiveness of the rephrased questions generated by the actor, and provide reward signals based on the performance of the query to guide the actor's training.
[0150] (1) Define the model
[0151] Input: preprocessed data.
[0152] Model construction: Build a model for evaluating the quality of questions, usually a regression model that can output a score based on the characteristics of the question. This model can include fully connected layers, convolutional layers, or recurrent layers.
[0153] Output: Untrained evaluation model.
[0154] (2) Loss Function and Optimizer
[0155] Input: The model’s predicted rating and the actual human-annotated rating.
[0156] Loss function: The mean square error (MSE) loss is usually used to evaluate the difference between the predicted score and the actual score. The calculation formula of the mean square error is:
[0157]
[0158] in, is the actual value, is the predicted value.
[0159] (3) Training model
[0160] Input: preprocessed question data and corresponding human-annotated scores.
[0161] Training process:
[0162] The model receives as input the characteristics of the problem.
[0163] The model outputs a prediction quality score for the question.
[0164] Calculate the loss function value, which is the mean squared error between the predicted rating and the actual rating.
[0165] Use an optimizer to update the model parameters to reduce the loss.
[0166] Output: A trained evaluation model that can provide quality scores for generated questions.
[0167] (4) Evaluation and feedback
[0168] Input: Questions and annotation scores from the test dataset.
[0169] Process: Use the trained model to evaluate the quality of the questions and compare with the human-annotated scores to assess the accuracy and effectiveness of the model.
[0170] Output: Evaluation results, which can be used to further adjust the model and provide more accurate quality feedback to the Actor.
[0171] The joint training process of the question rewriting module and the agent discrimination module is as follows:
[0172] (1) Initialize the strategy parameter θ of the question generation module, and the question rewriting module uses the current strategy The agent discriminator module receives the rewritten question and outputs a quality score.
[0173] (2) Calculate reward / loss: Calculate a reward or loss signal R based on the score of the Agent Discriminant Module and possible additional information (such as comparison with manual scores) t ;
[0174] (3) This is followed by policy optimization in the question generation module—updating the policy objective function.
[0175] Calculate the advantage function: Use the score to calculate the advantage function A t , the value function V(s) is the expected return in a given state, γ is the discount factor, a constant between 0 and 1, At represents the advantage function at time t, which is used to quantify how better or worse taking an action is than the average, Rt is the reward at time t, V(St+1) is the value of the next state, and V(St) is the value of the current state.
[0176]
[0177] Strategy function: , represents the policy probability of taking action a in a given state s, where s is the user's original query and rewriting direction, a is the generated rewriting question, and θ is the parameter of the policy network;
[0178] Optimization goal:
[0179] ,
[0180] in, is the probability ratio of the new question generation result to the old question generation result, A t is the advantage function, is a hyperparameter that controls the clipping bound on the probability ratio.
[0181] (4) Strategy update:
[0182] Use the gradient ascent method to update the policy parameter θ of the question generation module, where is the learning rate:
[0183]
[0184] (5) The generation, evaluation, and optimization cycle is continuously performed to minimize the loss function until the predetermined performance standard is reached and training is stopped.
[0185] In summary, in each iteration, the question generation module generates question rewriting results, and the agent discriminator module evaluates the performance of these results and calculates rewards. The question generation module uses these rewards to update its strategy to generate better rewriting results that can obtain higher rewards. This process is repeated until the predetermined performance standard is reached and training is stopped.
[0186] This PPO-based Actor-Critic architecture enables the query generation and evaluation process to self-optimize in an internal feedback loop, thereby achieving adaptation and optimization to complex query environments. Through such a setting, the system can not only improve the quality of queries, but also gradually learn and adapt to changing user needs and search environments.
[0187] For example, for the original input "solar efficiency", the model is ultimately rewritten as "How to improve the conversion efficiency of solar photovoltaic panels?" through the Actor-Critic architecture. This rewriting not only retains the core elements of the original query, but also makes the query more precise by concretizing and clarifying it.
[0188] Joint reasoning of question rewriting module and agent identification module
[0189] (1) Let θ be the score of the question generated by the question generation module and judged by the agent discrimination module. Set two thresholds θ1 and θ2, satisfying θ1 > θ2. Define a function, f(θ), which determines the strategy to be adopted by the score θ. The joint reasoning process of the question generation module and the agent discrimination module is expressed as follows:
[0190]
[0191] To summarize:
[0192] Strategy 1: If θ exceeds the threshold θ1, the result generated by the model is recognized and put into the problem generation result set;
[0193] Strategy 2: If θ is between the thresholds θ1 and θ2, extract the keywords in the question rewriting result set as the rewriting direction, and then enter the question rewriting module for rewriting;
[0194] Strategy 3: If θ is greater than the threshold θ2, the current result is discarded directly;
[0195] (2) For the question generation results whose score value θ is between θ1 and θ2, perform the next step of correction: apply a keyword extraction model to obtain the keywords in the question generation result set, use them as the rewriting direction of the next question generation process, continue to rewrite the questions, and put the rewritten results that meet the conditions into the original set.
[0196] The following is a complete example of how to use the PPO algorithm for joint training.
[0197] Explain the question generation module (actor) and the agent discrimination module as the critic and reward model.
[0198] 1. Model initialization
[0199] First, we need to initialize three key components:
[0200] Actor: Question generation module, responsible for generating rewritten questions based on the original input questions.
[0201] Critic: Based on the Agent Discriminant Module (which has the same underlying architecture as the Agent Discriminant Module, but with a different final fully connected layer), it is used to predict the long-term value of rewriting questions.
[0202] Reward Model: Agent discriminant module, used to provide a score for each generated question.
[0203] About the training loop
[0204] Outer training loop (Train Epochs):
[0205] For each epoch, a batch of original questions (prompts) are sampled from the dataset.
[0206] Use an actor to generate a series of rephrased questions based on these prompts.
[0207] Seq=Actor(prompt)
[0208] seq: represents the question sequence generated by the actor model.
[0209] Actor: Question generation module, responsible for generating rewriting questions based on input.
[0210] prompt: The original question input to the actor model, used to generate the rewritten question.
[0211] The generated questions are input into the Reward Model, which evaluates the quality of the questions and returns the reward score.
[0212] R=Reward Mode(seq)
[0213] R: represents the instant score calculated by the reward model for the generated question.
[0214] Reward Model: Reward model, used to provide instant scores for generated questions.
[0215] Inner PPO training loop (PPO Epochs):
[0216] Value Score (Long-Term Value):
[0217] The Critic provides an estimate of the value of the current state, predicting the total reward that can be obtained starting from this state.
[0218]
[0219] V(s t ): The long-term value estimated by the critic model in state s at time t.
[0220] Critic(seq): A module that evaluates the value of generating questions, usually based on the Agent discriminant module + a specific fully connected layer.
[0221] Advantage calculation
[0222] Advantage calculation is determined based on the immediate reward and predicted value and is used to guide the PPO optimization process:
[0223]
[0224] A t : The advantage function at time t, which indicates how much better or worse a particular action is than the average.
[0225] R t : The immediate reward obtained at time t.
[0226] γ: A discount factor that weighs the importance of future rewards, usually between 0 and 1.
[0227] V(s t+1 ): The long-term value estimated by the critic model in state s at time t+1.
[0228] V(s t ): The long-term value estimated by the critic model in state s at time t.
[0229] Parameter Update
[0230] Actor Updates:
[0231] Calculate strategy ratio:
[0232]
[0233] rt (θ): The policy ratio at time t, which represents the probability ratio of the current policy to the old policy.
[0234] π θ (a t |s t ): Under the policy parameters θ, given the state s t Take action t probability.
[0235] π θold (a t |s t ): In the old policy parameter θ old Next, given the state s t Take action t probability.
[0236] Update the strategy to minimize the loss function, that is, update the Actor:
[0237]
[0238] : PPO's "clipping" loss function, used to optimize the actor model.
[0239] : An estimate of the expected value at all time steps t.
[0240] Limiting strategy ratios in The shear function in the range, is a small positive number that controls the amplitude of the shearing.
[0241] Critic Update:
[0242] Use the mean squared error (MSE) loss to update the critic to make its value prediction more accurate:
[0243]
[0244] L critic : The loss function of the critic model calculated using mean squared error.
[0245] V predicted : The value predicted by the critic model.
[0246] V actual : The actual or advantage-calculated target value.
[0247] This training process will be repeated in multiple cycles, each cycle includes generating questions, calculating rewards and values, advantage calculation, and parameter update using PPO. This approach allows the actor to generate higher quality questions, and the critic to provide more accurate value predictions, optimizing the overall problem generation and evaluation effect.
[0248] Search module
[0249] In the retrieval module, the system will use both the user's original input and the query rewritten by the question generation module (QGM) (or the user's intention description obtained by the interaction module) to retrieve patent documents.
[0250] Search method: vector search
[0251] In retrieval, models based on the Transformer architecture are used to learn high-dimensional vector representations of queries and patent documents. Such models, such as BERT or its variants, learn rich language representations through pre-training on a large amount of text, and can then be fine-tuned to adapt to specific retrieval tasks.
[0252] Vector Representation
[0253] For a given query Q (including the user's original input and the text rewritten by the question generation module) and patent document D, we first use the Transformer model to convert them into high-dimensional vector representations , :
[0254]
[0255]
[0256] Transformer(·) means inputting text into the Transformer model and obtaining the corresponding vector representation. Usually, this representation can be obtained from the last layer of the model or a specific output layer (such as the [CLS] tag).
[0257] Similarity calculation
[0258] Using the vector representation of the query and document, calculate the similarity between them, usually using cosine similarity as a metric:
[0259]
[0260] here is the vector representation of document D, is the vector representation of the query Q, Represents the Euclidean norm of a vector.
[0261] Based on the deep semantic understanding capability of Transformer's vector retrieval, the retrieval module can provide high-quality and high-accuracy retrieval results to meet users' needs for patent document retrieval.
[0262] Feature statistics module
[0263] Before judging a patent, it is necessary to perform feature statistics on the patent. This step mainly involves detailed feature analysis of the retrieved patents to ensure that the subsequent discrimination module can more effectively evaluate the question generation results. The main indicators examined are the IPC classification number of the patent and the vector space distance of the patent document.
[0264] IPC classification number statistics
[0265] The Herfindahl-Hirschman Index (HHI) method is used to statistically quantify the concentration of IPC classification codes. First, the number of patents in each IPC category is determined, and the “market share” (s i ), that is, the number of patents in this category divided by the total number of patents, and finally the sum of the squares of all “shares” is calculated as follows:
[0266]
[0267] Among them, s i is the “market share” of IPC classification codes, and n is the total number of IPC classes. HHI values range from 0 to 1, with values close to 1 indicating extremely high concentration, indicating that most patents are concentrated in a few IPC classes.
[0268] Vector space distance of patent documents
[0269] After the patent document text is vectorized, the vector distance between the retrieved documents is calculated to determine the degree of aggregation of the documents. Usually, based on the vector space model, the Euclidean distance is used to calculate the distance or difference between the vector representations of patent documents.
[0270] The calculation formula is as follows:
[0271]
[0272] Where pi represents the coordinate value of the patent vector in the i-th dimension, qi represents the coordinate value of the patent vector in the i-th dimension, and n is the dimension of the vector.
[0273] Judgment module
[0274] For the patent documents generated by the search module, the results of feature statistics are obtained, namely, the concentration of IPC classification numbers and the vector space distance between patent documents.
[0275] Condition 1: Calculate the HHI value of the entire patent group. If it exceeds a certain threshold θ3, it indicates that the technical fields of these patents have a high degree of concentration.
[0276] Condition 2: Calculate and compare the average vector distance between patent documents. If the value is lower than the threshold θ4, it is considered that these documents are highly aggregated in content.
[0277] Define a logic function L that takes into account both the HHI value and the vector space distance. The function L is defined as follows:
[0278]
[0279] when and When the search result meets the conditions for issuing a patent report, L returns 1. Otherwise, L returns 0, indicating that the search result does not meet the conditions and needs to return to the question generation module for further processing.
[0280] Through the statistics of IPC number and distance in patent document vector space, we can judge whether the patent search results meet the requirements from different angles. This judgment method ensures that the selected patents are not only concentrated in technology, but also closely related in content. The evaluation conditions are diversified and have a certain degree of explanatory power, thus ensuring the validity of the search results.
[0281] Embodiment 3
[0282] This embodiment provides an electronic device, including: at least one processor and at least one memory;
[0283] The memory is used to store one or more program instructions;
[0284] The processor is used to run one or more program instructions to execute the intelligent patent search method as described above.
[0285] Embodiment 4
[0286] This embodiment provides a computer-readable storage medium, which contains one or more program instructions, and the one or more program instructions are used to execute the intelligent patent search method as described above.
[0287] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.
Claims
1. An agent-based intelligent patent search method, characterized in that: The steps include: Rewrite the information related to the search target input by the user to generate a specific query question, and preprocess the query question, including text cleaning, word segmentation, and encoding word vectors; Using the trained question generation model, the original input question is generated into a rewritten question; Evaluate the query rewriting effect and optimize based on the evaluation results, and continue the generation, evaluation and optimization cycle until the expected standards are met; Patent documents are retrieved using the original user input and the rewritten query questions, and the retrieved patents are analyzed and counted to obtain the IPC classification number information and patent vector space distance of the retrieved patents; Based on the IPC classification number concentration of the retrieved patents and the patent vector space distance, determine whether the patent search results meet the requirements; The evaluation of the query question rewriting effect and optimization based on the evaluation results is to dynamically evaluate and adjust the question rewriting strategy and optimize the rewriting process in real time based on the quality score, which specifically includes: According to the current rewriting strategy π θ As well as the original question and the rewriting direction, generate the rewritten question, evaluate the generated rewritten question, and output a quality score; Calculate reward / loss: Calculate a reward or loss signal R based on the comparison between the score of the Agent discrimination module and the manual score t ; Perform strategy optimization—update the strategy objective function; Calculate the advantage function: Use the score to calculate the advantage function A t , the value function V(s) is the expected return in a given state, γ is the discount factor, a constant between 0 and 1, At represents the advantage function at time t, which is used to quantify how better or worse taking an action is than the average, Rt is the reward at time t, V(St+1) is the value of the next state, and V(St) is the value of the current state. , Strategy function: , represents the policy probability of taking action a in a given state s, where s is the user's original query and rewriting direction, a is the generated rewriting question, and θ is the parameter of the policy network; Optimization goal: , in, is the probability ratio of the new question generation result to the old question generation result, A t is the advantage function, is a hyperparameter that controls the clipping bound on the probability ratio.
2. The intelligent patent search method according to claim 1, characterized in that: The question generation model generates a question rewriting result through the original sentence expression and the rewriting direction, using a sequence-to-sequence Seq2Seq model, which includes an encoder and a decoder. The model training steps include: Input: Encoded original question, rewritten direction and rewritten question; The encoder receives the original question and generates a vector encoding of the original question; The decoder generates a rewrite question based on the encoder's vector code generation attempt; Calculate the cross entropy loss between the generated question and the true rephrased question; Use optimizers to adjust model parameters to reduce loss; Output: The trained model generates a rewritten question based on the original input question; The cross entropy loss function is used to compare the questions generated by the model with the real rewritten questions. The cross entropy loss function measures the difference between two probability distributions. The formula is: , in, is the observed value, is the predicted probability and M is the number of categories.
3. The intelligent patent search method according to claim 1, characterized in that: The strategy adopted for rewriting the information related to the search target input by the user is: Let θ be the score obtained by the generated rewriting problem, set two thresholds θ1 and θ2, satisfy θ1 > θ2, and define a function, f(θ), which determines the strategy to be adopted by the score θ value, as follows: , If θ exceeds the threshold θ1, the result generated by the model is recognized and put into the question generation result set; If θ is between the thresholds θ1 and θ2, extract the keywords in the question rewriting result set as the rewriting direction, and then enter the question rewriting module for rewriting; If θ is greater than the threshold θ2, the current result is discarded directly; For the question generation results whose score value θ is between θ1 and θ2, the next step of correction is performed: a keyword extraction model is applied to obtain the keywords in the question generation result set, which are used as the rewriting direction of the next question generation process to continue rewriting the question.
4. The intelligent patent search method according to claim 1, characterized in that: The patent document is searched by using the original input of the user and the rewritten query question, and the search method is vector search; A model based on the Transformer architecture is used to learn high-dimensional vector representations of queries and patent documents. Rich language representations are learned through pre-training on a large amount of text, and then fine-tuned to adapt to specific retrieval tasks.
5. The intelligent patent search method according to claim 1, characterized in that: Based on the concentration of IPC classification numbers of the retrieved patents and the distance in patent vector space, it is determined whether the patent search results meet the requirements, including: (1) IPC classification number statistics The HHI method is used to quantify the concentration of IPC classification codes. First, the number of patents in each IPC category is determined, and the "share" of each IPC category is calculated. i , that is, the number of patents in this category divided by the total number of patents, and finally the sum of the squares of all "shares" is calculated as follows: , Among them, s i is the "share" of the ith IPC classification number, n is the total number of IPC categories, and the value of HHI ranges from 0 to 1. The higher the value of HHI, the higher the concentration of IPC classification numbers; (2) Vector space distance of patent documents After the patent document text is vectorized, the vector distance between the retrieved documents is calculated to determine the degree of aggregation of the documents. Based on the vector space model, the Euclidean distance is used to calculate the distance or difference between the vector representations of the patent documents. The calculation formula is as follows: , where p i represents the coordinate value of the patent vector in the i-th dimension, q i The patent vector represents the coordinate value in the i-th dimension, and n is the dimension of the vector.
6. An agent-based intelligent patent search system, characterized in that: include: The question generation module rewrites the information related to the search target input by the user to generate a specific query question, and preprocesses the query question, including text cleaning, word segmentation, and encoding word vectors; Using the trained question generation model, the original input question is generated into a rewritten question; The Agent discrimination module evaluates the query rewriting effect and optimizes it based on the evaluation results, and continuously performs the generation, evaluation and optimization cycle until the expected standard is achieved; The search module uses the original input of the user and the rewritten query questions to search the patent documents; A feature statistics module performs feature analysis and statistics on the patents retrieved by the search module to obtain the IPC classification number information and patent vector space distance of the retrieved patents; A judgment module determines whether the patent search results meet the requirements based on the IPC classification number concentration degree and patent vector space distance of the retrieved patents; The evaluation of the query question rewriting effect and optimization based on the evaluation results is to dynamically evaluate and adjust the question rewriting strategy and optimize the rewriting process in real time based on the quality score, which specifically includes: According to the current rewriting strategy π θ As well as the original question and the rewriting direction, generate the rewritten question, evaluate the generated rewritten question, and output a quality score; Calculate reward / loss: Calculate a reward or loss signal R based on the comparison between the score of the Agent discrimination module and the manual score t ; Perform strategy optimization—update the strategy objective function; Calculate the advantage function: Use the score to calculate the advantage function A t The value function V(s) is the expected return in a given state, γ is the discount factor, a constant between 0 and 1, At represents the advantage function at time t, which is used to quantify how better or worse an action is than the average, Rt is the reward at time t, V(St+1) is the value of the next state, and V(St) is the value of the current state. , Policy function: π θ (a|s), represents the policy probability of taking action a in a given state s, where s is the user’s original query and rewrite direction, a is the generated rewrite question, and θ is the parameter of the policy network; Optimization goal: , in, is the probability ratio of the new question generation result to the old question generation result, A t is the advantage function, is a hyperparameter that controls the clipping bound on the probability ratio.
7. The intelligent patent search system according to claim 6, characterized in that: The patent document is searched by using the original input of the user and the rewritten query question, and the search method is vector search; A model based on the Transformer architecture is used to learn high-dimensional vector representations of queries and patent documents. Rich language representations are learned through pre-training on a large amount of text, and then fine-tuned to adapt to specific retrieval tasks.
8. The intelligent patent search system according to claim 6, characterized in that: Based on the concentration of IPC classification numbers of the retrieved patents and the distance in patent vector space, it is determined whether the patent search results meet the requirements, including: (1) IPC classification number statistics The HHI method is used to quantify the concentration of IPC classification codes. First, the number of patents in each IPC category is determined, and the "share" of each IPC category is calculated. i , that is, the number of patents in this category divided by the total number of patents, and finally the sum of the squares of all "shares"; The calculation formula is as follows: , Among them, s i is the "share" of the ith IPC classification number, n is the total number of IPC categories, and the value of HHI ranges from 0 to 1. The higher the value of HHI, the higher the concentration of IPC classification numbers; (2) Vector space distance of patent documents After the patent document text is vectorized, the vector distance between the retrieved documents is calculated to determine the degree of aggregation of the documents. Based on the vector space model, the Euclidean distance is used to calculate the distance or difference between the vector representations of the patent documents. The calculation formula is as follows: , where p i represents the coordinate value of the patent vector in the i-th dimension, q i The patent vector represents the coordinate value in the i-th dimension, and n is the dimension of the vector.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor and at least one memory; The memory is used to store one or more program instructions; The processor is used to run one or more program instructions to execute the method according to any one of claims 1-5.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium contains one or more program instructions, and the one or more program instructions are used to execute the method according to any one of claims 1 to 5.
