Automatic patent document generation method and system based on retrieval enhancement

By introducing a search enhancement method in the automatic patent document generation technology, and using text and vector database search to assist in the enhancement of documents, the problem of limited user input dependence and generation capabilities in the prior art is solved, and higher quality and efficiency patent document generation is achieved.

CN119886098APending Publication Date: 2025-04-25FOSHAN ZHIQING TECHNOLOGY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510042207.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing automatic patent document generation technology relies on user input, and the large language model has limited generation capabilities when it is not trained in specific fields of data, resulting in poor quality of the generated patent documents.

Method used

Using a search enhancement method, by extracting the text content input by the user, searching text and vector databases, obtaining auxiliary enhancement documents, and inputting the text content input by the user with the auxiliary enhancement documents to a large language model to generate patent documents that meet the standard template.

Benefits of technology

It improves the quality and efficiency of patent document generation, reduces document quality problems caused by unclear or inaccurate user input, and the generated documents are more standardized and professional.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119886098A_ABST
    Figure CN119886098A_ABST
Patent Text Reader

Abstract

The invention relates to an automatic patent document generation method and system based on retrieval enhancement, and the method comprises the steps: carrying out the feature extraction of text content inputted by a user, and obtaining keywords and key sentences of the text content; based on the keywords, performing text retrieval in a pre-constructed text database, and sorting text retrieval results; based on the key sentences, vector retrieval is carried out in a pre-constructed vector database, and vector retrieval results are sorted; reordering the text retrieval result and the vector retrieval result through a reciprocal ordering algorithm; determining an auxiliary enhanced document in the reordering result; inputting the text content input by the user and the auxiliary enhanced document into the large language model, and outputting a patent document conforming to the standard template through the large language model; wherein patent documents in a text format are stored in the text database; vectorized patent documents are stored in the vector database; the large language model is trained based on a text database and a vector database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information processing technology, and in particular to a method and system for automatically generating patent documents based on retrieval enhancement. Background Art

[0002] With the development of artificial intelligence technology, natural language processing technology has been widely used in various fields, including the generation of patent documents. Patent documents are important documents to protect the rights and interests of inventors, and their quality directly affects the interests of inventors. However, the writing of patent documents requires high professional skills, which is a huge challenge for ordinary users. Therefore, how to use artificial intelligence technology to realize the automatic generation of patent documents has become one of the current research hotspots.

[0003] Existing automatic patent document generation technology is mainly achieved through large language models. Large language models refer to Transformer language models containing tens of billions (or more) parameters. These models are trained on large-scale text data, such as GPT-3, PaLM, Galactica, and LLaMA. LLMs have powerful capabilities for understanding natural language and solving complex tasks (through text generation). In the prior art, the user's basic idea of ​​patent technology is used as the input problem of the large language model, and the large language model generates the corresponding technical briefing document. This method solves the problem of patent document generation to a certain extent and reduces the user's workload.

[0004] However, there are still some problems with the existing patent document automatic generation technology. First, the existing technology mainly relies on user input. If the user input is unclear or inaccurate, the quality of the generated patent document will also be affected.

[0005] Secondly, large language models are generally trained on general tasks and rarely learn from domain-specific data. Therefore, their generative capabilities are limited without training on domain-specific data. Summary of the invention

[0006] In order to at least overcome to some extent the problem in the related art that the generation of patent documents through large language models is affected by the quality of the text input by the user, and the generation ability of the large language model is relatively weak without being trained with data in a specific field, the present application provides a method and system for automatic generation of patent documents based on retrieval enhancement.

[0007] The scheme of this application is as follows:

[0008] According to a first aspect of an embodiment of the present application, a method for automatically generating patent documents based on retrieval enhancement is provided, comprising:

[0009] Extract features from the text content input by the user to obtain keywords and key sentences of the text content;

[0010] Based on the keywords, perform text search in a pre-built text database and sort the text search results;

[0011] Based on the key sentence, perform vector search in a pre-built vector database, and sort the vector search results;

[0012] Reordering the text search results and the vector search results by using a reciprocal sorting algorithm;

[0013] determining auxiliary enhancement documents in the re-ranking results;

[0014] Inputting the text content input by the user and the auxiliary enhanced document into a large language model, and outputting a patent document conforming to a standard template through the large language model;

[0015] Wherein, the text database stores patent documents in text format;

[0016] The vector database stores vectorized patent documents;

[0017] The large language model is trained based on the text database and the vector database.

[0018] Preferably, the method further comprises:

[0019] Storing historical patent documents in text format in the text database;

[0020] The historical patent documents in the text database are segmented one by one according to the claims, the segmented claims are vectorized, and the vectorized claims and the patent numbers corresponding to the historical patent documents are stored in the vector database.

[0021] Preferably, the method further comprises:

[0022] A search index is constructed by specifying a vector field name and index parameters in the vector database.

[0023] Preferably, based on the key sentence, performing a vector search in a pre-built vector database and sorting the vector search results includes:

[0024] Calculating the Euclidean distance between each vectorized claim and the key sentence in the vector database;

[0025] The patent numbers corresponding to the vectorized claims whose Euclidean distance with the key sentence meets a preset threshold are sorted.

[0026] Preferably, the method further comprises:

[0027] A vector search is performed in the vector database based on a set search accuracy and search speed.

[0028] Preferably, based on the keywords, text retrieval is performed in a pre-built text database, and the text retrieval results are sorted, including:

[0029] The historical patent documents in the text database are searched using the BM25 algorithm, and the search results are sorted according to the BM25 scores.

[0030] Preferably, the large language model is used to expand the text content input by the user according to the auxiliary enhanced document, and output a patent document that conforms to the standard template.

[0031] Preferably, the method further comprises:

[0032] The text content input by the user is reorganized according to the auxiliary enhanced document to correct semantic errors and missing content in the text content input by the user.

[0033] Preferably, the method further comprises:

[0034] The reorganized text content input by the user is stored in the text database as a historical patent document.

[0035] According to a second aspect of an embodiment of the present application, a system for automatically generating patent documents based on retrieval enhancement is provided, comprising:

[0036] A feature extraction module is used to extract features from the text content input by the user to obtain keywords and key sentences of the text content;

[0037] A text retrieval module, used to perform text retrieval in a pre-built text database based on the keywords and sort the text retrieval results;

[0038] A vector search module, used to perform vector search in a pre-built vector database based on the key sentence and sort the vector search results;

[0039] A sorting module, used for re-sorting the text search results and the vector search results by a reciprocal sorting algorithm;

[0040] A determination module, used for determining auxiliary enhancement documents in the re-ranking results;

[0041] An output module, used for inputting the text content input by the user and the auxiliary enhanced document into a large language model, and outputting a patent document conforming to a standard template through the large language model;

[0042] Wherein, the text database stores patent documents in text format;

[0043] The vector database stores vectorized patent documents;

[0044] The large language model is trained based on the text database and the vector database.

[0045] The technical solution provided by this application may have the following beneficial effects:

[0046] The patent document automatic generation method based on retrieval enhancement in the present application includes: extracting features from the text content input by the user to obtain keywords and key sentences of the text content; based on the keywords, performing text retrieval in a pre-built text database and sorting the text retrieval results; based on the key sentences, performing vector retrieval in a pre-built vector database and sorting the vector retrieval results; re-sorting the text retrieval results and the vector retrieval results by a reciprocal sorting algorithm; determining the auxiliary enhanced document in the re-sorted results; inputting the text content and the auxiliary enhanced document input by the user into a large language model, and outputting a patent document that conforms to a standard template through the large language model; wherein the text database stores patent documents in text format; the vector database stores vectorized patent documents; and the large language model is trained based on the text database and the vector database.

[0047] In this technical solution, firstly, a patent document similar to the text content input by the user is retrieved from the text database and the vector database as an auxiliary enhanced document, and the text content input by the user is input into the large language model together with the auxiliary enhanced document. The text content input by the user can be enhanced through the auxiliary enhanced document to expand the user's original ideas, so as to more accurately and comprehensively express the user's purpose to the large language model, and then generate a patent document that is closest to the user's technical ideas, thereby improving the quality of the generated text. The user only needs to enter the technical details, and the large language model can generate the final technical briefing book without excessive manual intervention, which greatly improves work efficiency. After the user enters the technical details, this technical solution can more accurately express the user's technical ideas through the three steps of retrieval, enhancement and generation, avoiding the problem of poor quality of the generated patent document due to unclear or inaccurate user input. When generating patent documents, this technical solution takes into account the structure and format of the patent documents, and outputs patent documents that conform to the standard template through the large language model. The generated patent documents are more standardized and professional, which improves the quality and completeness of the patent documents. The large language model in this technical solution is trained based on the text database and the vector database, so the large language model in this technical solution can be used to process the generation of patent documents. In summary, this technical solution can express the user's purpose to the large language model more clearly and in detail, generate patent documents that are closest to the user's technical ideas, improve the quality of the generated text, maximize the use of the large language model capabilities, and save labor costs.

[0048] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0050] Figure 1 It is a flowchart of a method for automatically generating patent documents based on retrieval enhancement provided by an embodiment of the present application;

[0051] Figure 2 It is a flowchart of a method for automatically generating patent documents based on retrieval enhancement provided by another embodiment of the present application;

[0052] Figure 3 It is a structural diagram of a patent document automatic generation system based on retrieval enhancement provided by an embodiment of the present application.

[0053] Figure numerals: feature extraction module-31; text retrieval module-32; vector retrieval module-33; sorting module-34; determination module-35; output module-36. DETAILED DESCRIPTION

[0054] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0055] Figure 1 is a flowchart of a method for automatically generating patent documents based on retrieval enhancement provided by an embodiment of the present application, with reference to Figure 1 , a patent document automatic generation method based on retrieval enhancement, comprising:

[0056] S11: extracting features of the text content input by the user to obtain keywords and key sentences of the text content;

[0057] It should be noted that the text content input by the user is generally the basic idea of ​​the user's patent technology.

[0058] For example, the text content input by the user is: "Please help me write a briefing book. The main problem to be solved is to solve the problem of AI intelligent writing of patent documents. At present, the automatic generation process of patent documents is mostly: the user's basic patent technology idea is used as the input problem of the large language model, and the large language model generates the corresponding technical briefing book. The present invention will add a retrieval enhanced generation model (RAG model) to the original technical briefing book generation process. After the user enters the technical details, the input content will be first processed by the RAG model."

[0059] The text content input by the user is then feature extracted, and the keywords of the text content are obtained as follows: "AI intelligent writing of patent documents", "search enhancement generation model", etc.

[0060] The key sentences in the text content are: "The problem to be solved is to solve the problem of AI intelligent writing of patent documents", "Add the retrieval enhanced generation model (RAG model)", "After the user enters the technical details, the input content is first processed by the RAG model."

[0061] S12: Based on keywords, perform text search in a pre-built text database and sort the text search results;

[0062] S13: Based on the key sentence, perform vector search in the pre-built vector database and sort the vector search results;

[0063] It should be noted that the process of performing text retrieval in a pre-built text database based on keywords and the process of performing vector retrieval in a pre-built vector database based on key sentences are performed simultaneously.

[0064] S14: re-ranking the text search results and the vector search results by using a reciprocal sorting algorithm;

[0065] S15: determining the auxiliary enhanced document in the re-ranking result;

[0066] It should be noted that in this technical solution, a reciprocal sorting algorithm is used to reorder the text retrieval results and the vector retrieval results to obtain a list of IDs of the most similar one or more patent documents, and the ID is used as a query condition to recall the corresponding patent document as an auxiliary enhanced document.

[0067] S16: inputting the text content input by the user and the auxiliary enhanced document into the large language model, and outputting a patent document conforming to the standard template through the large language model;

[0068] It should be noted that, considering the structure and format of the patent document, in order to make the generated patent document meet the requirements, the standard template provided by the Patent Office is used here, including the title, abstract, background technology, invention content, illustrations, specific implementation methods and other parts.

[0069] Wherein, the text database stores patent documents in text format;

[0070] The vectorized patent documents are stored in the vector database;

[0071] The large language model is trained based on the text database and the vector database.

[0072] Reference Figure 2 , the method further comprises:

[0073] S21: storing the historical patent documents in a text database in a text format;

[0074] S22: Segment the historical patent documents in the text database one by one according to the claims, vectorize the segmented claims, and store the vectorized claims and the patent numbers corresponding to the historical patent documents in the vector database.

[0075] Before the implementation of this technical solution, data preparation is required to store the current stock of patent documents as historical patent documents in a text database.

[0076] Preferably, the Elastic Search database is used as the text database in this embodiment.

[0077] Then, the historical patent documents in the text database are segmented one by one according to the claims, and the segmented claims are vectorized using the word2Vec algorithm. The vectorized claims and the patent numbers corresponding to the historical patent documents are stored in the vector database.

[0078] Preferably, the Milvus database is used as the vector database in this embodiment.

[0079] The resulting text database and vector database are used as local knowledge bases for training large language models.

[0080] It should be noted that the text database and vector database in this embodiment can be used as private databases of each company and not disclosed to the outside world, and the large language model trained using the private database is also only open to the company for use.

[0081] It should be noted that the method also includes:

[0082] Build a search index by specifying the vector field name and index parameters in the vector database.

[0083] Based on the key sentence, perform vector search in the pre-built vector database and sort the vector search results, including:

[0084] Calculate the Euclidean distance between each vectorized claim and the key sentence in the vector database;

[0085] The patent numbers corresponding to the vectorized claims whose Euclidean distance to the key sentence meets the preset threshold are sorted.

[0086] It should be noted that the method also includes:

[0087] Perform vector search in the vector database based on the set search accuracy and search speed.

[0088] In specific practice, a vector index is constructed.

[0089] Specify the vector field name and index parameters in the code to build a search index. The field_name parameter is used to define the field name, and the index_params parameter is used to specify the vector parameters, including:

[0090] metric_type: used to specify the vector distance calculation method. In this technical solution, Euclidean distance is used to measure the distance of vectors.

[0091] index_type: used to specify the index type. In this technical solution, the IVY_FLAT index type is used to seek an ideal balance between accuracy and query speed.

[0092] Through vector indexing, the system can process large-scale data sets and perform fast similarity searches, reducing system time consumption.

[0093] It should be noted that based on keywords, text retrieval is performed in a pre-built text database, and the text retrieval results are sorted, including:

[0094] The BM25 algorithm is used to perform text retrieval on historical patent documents in the text database, and the retrieval results are sorted according to the BM25 score.

[0095] The BM25 algorithm is a similarity algorithm used for information retrieval. It calculates the relevance score between a document and a query by considering factors such as word frequency, document length, and average document length. The BM25 algorithm can be considered an optimized version of the TF-IDF algorithm. It adds a normalization process for word frequency upper limits and field lengths on the basis of TF-IDF, making the algorithm more flexible and practical in applications. The use of the BM25 algorithm in this technical solution is more targeted for text retrieval of historical patent documents in a text database.

[0096] At this point, the input data of the large language model is obtained, including: the text content input by the user and the auxiliary enhanced documents.

[0097] Preferably, the user can also set the document type to be written and enter the explanation of the proper nouns as input data for the large language model.

[0098] After the text content input by the user, auxiliary enhanced documents, written document types and special term explanations are entered into the large language model, the large language model expands the text content input by the user according to the auxiliary enhanced documents and outputs a patent document that conforms to the standard template.

[0099] Preferably, the large language model used in this embodiment is Baichuan2-13.

[0100] It should be noted that the method also includes:

[0101] The text content input by the user is reorganized according to the auxiliary enhancement document to correct semantic errors and missing content in the text content input by the user.

[0102] Taking into account that the text content input by the user may have formal problems, such as typos, semantic errors, missing content, etc., this technical solution also reorganizes the text content input by the user according to the auxiliary enhancement document, corrects the semantic errors and missing content in the text content input by the user, and makes up for the original defects of the text content input by the user.

[0103] An example of an existing large language model is given below:

[0104] Existing large language models mainly rely on user input. If the user input is unclear or inaccurate, the quality of the generated patent document will also be affected. For example:

[0105] The text content entered by the user is "Please help me write a briefing document. The main problem to be solved is to solve the problem of AI intelligent writing of patent documents. At present, the automatic generation process of patent documents is mostly: the user's basic idea of ​​patent technology is used as the input problem of the large language model, and the large language model generates the corresponding technical briefing document. The present invention will add a retrieval enhanced generation model (RAG model) to the original technical briefing document generation process. After the user enters the technical details, the input content will be first processed by the RAG model."

[0106] The output of the existing large language model is:

[0107] "Briefing Book

[0108] Date: [insert date]

[0109] Project name: AI intelligent patent document writing

[0110] Problem description:

[0111] At present, there are some problems in the automatic generation process of patent documents, including the problem that the user's basic idea of ​​patent technology is used as the input of the large language model, and the large language model generates the corresponding technical briefing document. In order to solve this problem, the present invention will add a retrieval enhanced generation model (RAG model) on the basis of the original technical briefing document generation process. Specifically, after the user enters the technical details, the input content is first submitted to the RAG model for processing to improve the accuracy and efficiency of the generated document.

[0112] Solution:

[0113] 1. User enters technical details;

[0114] 2. The technical details are handled by the RAG model;

[0115] 3. The RAG model generates the corresponding technical briefing document;

[0116] 4. The user reviews and modifies the briefing document;

[0117] 5. Finally generate patent documents that meet the requirements.

[0118] Expected results:

[0119] By introducing the RAG model, we hope to improve the quality and efficiency of patent document generation, reduce the workload of manual writing, and ensure the accuracy and completeness of the documents. This will bring users a better user experience and improve work efficiency, while also helping to promote the optimization and intelligent development of the patent application process.

[0120] Note: Please continue to optimize and improve this technology in actual applications to better meet user needs and enhance product competitiveness. ”

[0121] It can be seen that the above content generated by the large language model is very brief and is far from enough as a patent briefing document.

[0122] Existing large language models are generally trained on general tasks and rarely learn from domain-specific data, let alone a company's private data. Therefore, their generative capabilities are limited when they are not trained on domain-specific data. For example:

[0123] The text content input by the user is "I want to write a briefing book. The main problem to be solved is to solve the problem of AI intelligent writing of patent documents. At present, the automatic generation process of patent documents is mostly: the basic idea of ​​the user's patent technology is used as the input problem of the large language model, and the large language model generates the corresponding technical briefing book. On the basis of the original technical briefing book generation process, the present invention will add a retrieval enhanced generation model (RAG model). After the user enters the technical details, the input content will be first processed by the RAG model.

[0124] The RAG model processing flow is divided into three steps. The first step is retrieval, which first embeds and vectorizes the text content input by the user, and then calculates the cosine similarity between the input text vector and each piece of data in the vector database, and then finds the content most similar to the text vector (the closer the cosine similarity is to 1, the higher the similarity between the two vectors); the second step is enhancement, after locating the content most similar to the text, the sentence-window retrieval method is used to obtain the context of similar content; the third step is generation, which inputs the original input data together with the relevant content retrieved in the second step into the large language model, and the large language model generates the final technical briefing.

[0125] This processing can express the user's purpose to the large language model more clearly and in detail, generate patent documents that are closest to the user's technical ideas, improve the quality of generated text, and maximize the use of the large language model. At the same time, it can save labor costs and communication costs. "

[0126] The output of the existing large language model is:

[0127] "Briefing Book

[0128] Date: [insert date]

[0129] Project name: AI intelligent patent document writing

[0130] Problem description:

[0131] There are some challenges in the current automatic patent document generation process, including that the user's basic patent technology ideas are directly used as the input of the large language model, and the large language model generates the corresponding technical briefing document. To solve this problem, we proposed a new method, which is to add a retrieval enhanced generation model (RAG model) to the original technical briefing document generation process. This method aims to improve the quality and efficiency of generated documents while maximizing the capabilities of the large language model.

[0132] Solution:

[0133] The RAG model processing flow is divided into three steps:

[0134] Retrieval: First, embed the text content entered by the user, and then calculate the cosine similarity between the input text vector and each piece of data in the vector database to find the content most similar to the text vector. A cosine similarity close to 1 indicates that the two vectors are highly similar.

[0135] Enhancement: After locating the content most similar to the text, use the sentence-window retrieval method to obtain the contextual information of similar content.

[0136] Generation: The original input data and the relevant content retrieved in the second step are input into the large language model, which generates the final technical briefing document.

[0137] Through this process, we can convey the user's purpose to the large language model more clearly and in detail, generate patent documents that best meet the user's technical ideas, improve the quality of text generation, and make full use of the capabilities of the large language model. At the same time, this method can also save labor costs and reduce communication costs.

[0138] Expected results: We expect this approach to improve the patent document generation process, making the generated documents more accurate, effective, and in line with user needs. By improving document quality and efficiency, we will provide users with a better experience while saving costs and improving work efficiency for the company.

[0139] Note: Please continue to optimize and improve this method in actual applications to better meet user needs and enhance product competitiveness. ”

[0140] From this example, we can see that the content generated by the large model is completely based on the input prompt, and the patent document it generates only serves as a summary, and does not expand or enrich the technical ideas provided by the user.

[0141] In this technical solution, firstly, the patent documents similar to the text content input by the user are retrieved from the text database and the vector database as auxiliary enhanced documents, and the text content input by the user is input into the large language model together with the auxiliary enhanced documents. The text content input by the user can be enhanced through the auxiliary enhanced documents to expand the original ideas of the user, so as to express the user's purpose to the large language model more accurately and in detail, and then generate patent documents that are closest to the user's technical ideas, thereby improving the quality of the generated text. The user only needs to enter the technical details, and the large language model can generate the final technical briefing book without too much manual intervention, which greatly improves work efficiency. After the user enters the technical details, this technical solution can more accurately express the user's technical ideas through the three steps of retrieval, enhancement and generation, avoiding the problem of poor quality of the generated patent documents due to unclear or inaccurate user input. When generating patent documents, this technical solution takes into account the structure and format of the patent documents, and outputs patent documents that conform to the standard template through the large language model. The generated patent documents are more standardized and professional, which improves the quality and completeness of the patent documents. The large language model in this technical solution is trained based on the text database and the vector database, so the large language model in this technical solution can be used to process the generation of patent documents. In summary, this technical solution can express the user's purpose to the large language model more clearly and in detail, generate patent documents that are closest to the user's technical ideas, improve the quality of the generated text, maximize the use of the large language model capabilities, and save labor costs.

[0142] It should be noted that the method also includes:

[0143] The reorganized text content input by the user is stored in the text database as a historical patent document.

[0144] The existing large language models are static after deployment and have no mechanism to update themselves or adapt to changes in the environment. If you ask a large language model that has not been trained with the latest data about what just happened, the large language model will also experience "hallucination". If you want the large model to learn new knowledge instantly, you need to modify its parameters and replace the implicit stock knowledge in the model with the new knowledge to retrain it. This process is costly and consumes a lot of manpower and material resources.

[0145] In this technical solution, by storing the reorganized user-entered text content as historical patent documents in the text database, the text database and vector database have an update mechanism, which can realize instant knowledge update without retraining the large language model. At the same time, by efficiently utilizing external knowledge, the training is lightweight and the model size remains unchanged.

[0146] Embodiment 2

[0147] Figure 3 is a schematic diagram of a patent document automatic generation system based on retrieval enhancement provided by an embodiment of the present application, with reference to Figure 3 , a patent document automatic generation system based on retrieval enhancement, comprising:

[0148] The feature extraction module 31 is used to extract features from the text content input by the user to obtain keywords and key sentences of the text content;

[0149] A text search module 32, for performing text search in a pre-built text database based on keywords and sorting the text search results;

[0150] A vector search module 33 is used to perform vector search in a pre-built vector database based on key sentences and sort the vector search results;

[0151] A sorting module 34, used to re-sort the text search results and the vector search results by a reciprocal sorting algorithm;

[0152] A determination module 35, configured to determine the auxiliary enhanced document in the re-ranking result;

[0153] Output module 36, used for inputting the text content and auxiliary enhanced document input by the user into the large language model, and outputting the patent document conforming to the standard template through the large language model;

[0154] Wherein, the text database stores patent documents in text format;

[0155] The vectorized patent documents are stored in the vector database;

[0156] The large language model is trained based on the text database and the vector database.

[0157] It should be noted that in this embodiment, a retrieval augmented generation model (RAG) is formed by a feature extraction module 31, a text retrieval module 32, a vector retrieval module 33, a sorting module 34 and a determination module 35. First, a patent document similar to the text content input by the user is retrieved from the text database and the vector database as an auxiliary augmented document, and the text content input by the user and the auxiliary augmented document are input into the large language model together. The text content input by the user can be enhanced by the auxiliary augmented document to expand the user's original idea, so as to express the user's purpose to the large language model more accurately and in detail, and then generate a patent document that is closest to the user's technical idea, thereby improving the quality of the generated text. The user only needs to enter the technical details, and the large language model can generate the final technical briefing book without excessive manual intervention, which greatly improves work efficiency. After the user enters the technical details, this technical solution can more accurately express the user's technical ideas through the three steps of retrieval, enhancement and generation, avoiding the problem of poor quality of the generated patent document due to unclear or inaccurate user input. When generating patent documents, this technical solution takes into account the structure and format of patent documents, and outputs patent documents that conform to standard templates through a large language model. The generated patent documents are more standardized and professional, and the quality and completeness of patent documents are improved. The large language model in this technical solution is trained based on a text database and a vector database, so the large language model in this technical solution can be used to process the generation of patent documents. In summary, this technical solution can express the user's purpose to the large language model more clearly and comprehensively, generate patent documents that are closest to the user's technical ideas, improve the quality of the generated text, and maximize the use of the large language model capabilities, while saving labor costs.

[0158] It should be noted that the system also includes:

[0159] A database building module for storing historical patent documents in a text database in a text format;

[0160] The historical patent documents in the text database are segmented one by one according to the claims, the segmented claims are vectorized, and the vectorized claims and the patent numbers corresponding to the historical patent documents are stored in the vector database.

[0161] It should be noted that the vector retrieval module 33 also specifies the vector field name and index parameters in the vector database to construct a search index.

[0162] The vector search module 33 calculates the Euclidean distance between each vectorized claim and the key sentence in the vector database; and sorts the patent numbers corresponding to the vectorized claims whose Euclidean distance with the key sentence meets a preset threshold.

[0163] The vector search module 33 performs vector search in the vector database based on the set search accuracy and search speed.

[0164] The text retrieval module 32 performs text retrieval on historical patent documents in the text database using the BM25 algorithm, and sorts the retrieval results according to the BM25 score.

[0165] The output module 36 expands the text content input by the user according to the auxiliary enhanced document through the large language model, and outputs a patent document that conforms to the standard template.

[0166] The system also includes:

[0167] The correction module is used to reorganize the text content input by the user according to the auxiliary enhancement document, and correct the semantic errors and vacant content in the text content input by the user.

[0168] The system also includes:

[0169] The updating module is used to store the reorganized text content input by the user as a historical patent document in the text database.

[0170] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0171] It should be noted that, in the description of this application, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" refers to at least two.

[0172] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0173] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0174] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0175] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0176] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0177] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0178] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for automatically generating patent documents based on retrieval enhancement, characterized in that: include: Extract features from the text content input by the user to obtain keywords and key sentences of the text content; Based on the keywords, perform text search in a pre-built text database and sort the text search results; Based on the key sentence, perform vector search in a pre-built vector database, and sort the vector search results; Reordering the text search results and the vector search results by using a reciprocal sorting algorithm; determining auxiliary enhancement documents in the re-ranking results; Inputting the text content input by the user and the auxiliary enhanced document into a large language model, and outputting a patent document conforming to a standard template through the large language model; Wherein, the text database stores patent documents in text format; The vector database stores vectorized patent documents; The large language model is trained based on the text database and the vector database.

2. The method according to claim 1, characterized in that The method further comprises: Storing historical patent documents in text format in the text database; The historical patent documents in the text database are segmented one by one according to the claims, the segmented claims are vectorized, and the vectorized claims and the patent numbers corresponding to the historical patent documents are stored in the vector database.

3. The method according to claim 2, characterized in that The method further comprises: A search index is constructed by specifying a vector field name and index parameters in the vector database.

4. The method according to claim 3, characterized in that Based on the key sentence, a vector search is performed in a pre-built vector database, and the vector search results are sorted, including: Calculating the Euclidean distance between each vectorized claim and the key sentence in the vector database; The patent numbers corresponding to the vectorized claims whose Euclidean distance with the key sentence meets a preset threshold are sorted.

5. The method according to claim 4, characterized in that The method further comprises: A vector search is performed in the vector database based on a set search accuracy and search speed.

6. The method according to claim 2, characterized in that Based on the keywords, a text search is performed in a pre-built text database, and the text search results are sorted, including: The historical patent documents in the text database are searched using the BM25 algorithm, and the search results are sorted according to the BM25 scores.

7. The method according to claim 1, characterized in that The large language model is used to expand the text content input by the user according to the auxiliary enhanced document, and output a patent document that conforms to the standard template.

8. The method according to claim 1, characterized in that The method further comprises: The text content input by the user is reorganized according to the auxiliary enhanced document to correct semantic errors and missing content in the text content input by the user.

9. The method according to claim 8, characterized in that The method further comprises: The reorganized text content input by the user is stored in the text database as a historical patent document.

10. A patent document automatic generation system based on retrieval enhancement, characterized in that: include: A feature extraction module is used to extract features from the text content input by the user to obtain keywords and key sentences of the text content; A text retrieval module, used to perform text retrieval in a pre-built text database based on the keywords and sort the text retrieval results; A vector search module, used to perform vector search in a pre-built vector database based on the key sentence and sort the vector search results; A sorting module, used for re-sorting the text search results and the vector search results by a reciprocal sorting algorithm; A determination module, used for determining auxiliary enhancement documents in the re-ranking results; An output module, used for inputting the text content input by the user and the auxiliary enhanced document into a large language model, and outputting a patent document conforming to a standard template through the large language model; Wherein, the text database stores patent documents in text format; The vector database stores vectorized patent documents; The large language model is trained based on the text database and the vector database.

Citation Information

Cited By

  • Retrieval enhancement generation method, electronic device and computer program product

    CN121117174A

  • Project declaration auxiliary generation method and system based on multi-source scientific research portrait

    CN122432333A