Information retrieval method and device

By applying a large language model in information retrieval and using predefined prompt templates to obtain the entity and ontology information of the file, the accuracy and efficiency problems of traditional information retrieval methods are solved when dealing with complex language structures and rapidly changing terms, and the search effect is achieved with high accuracy and high efficiency.

CN120144690APending Publication Date: 2025-06-13ALIBABA (CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510239317.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

Traditional information retrieval methods perform poorly in dealing with complex language structures, rapidly changing technical terms and interdisciplinary knowledge associations, resulting in low accuracy and high noise in search results, making it difficult to adapt to the speed of change of emerging terms.

Method used

Information retrieval is performed using the large language model (LLM), and input information is generated through predefined prompt templates to obtain entity information and ontology information of the files to be checked and candidate files, and to obtain the target file in the candidate files.

Benefits of technology

It realizes high-accuracy and efficient information retrieval without training, reducing the difficulty of data acquisition and training costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144690A_ABST
    Figure CN120144690A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an information retrieval method and device. A to-be-queried file and a plurality of candidate files are obtained, the candidate files are files needing to be matched with the to-be-queried file, entity information corresponding to the to-be-queried file and the candidate files is obtained through a large language model, and the entity information is text content information; the ontology information corresponding to the to-be-searched file and the candidate file is obtained through a large language model, the ontology information is file classification information, and a target file is obtained from the candidate file through the large language model according to the entity information and the ontology information of the to-be-searched file and the candidate file, the target file is a file matched with the to-be-checked file. Therefore, high-accuracy and high-efficiency retrieval can be completed without training, and the problems of high data acquisition difficulty and high training cost are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular, to an information retrieval method and apparatus. Background Art

[0002] With the development of information technology, it has become particularly important to retrieve various technical documents efficiently and accurately, including but not limited to patent documents, academic papers, and technical reports. However, in the face of the rapid growth of the number of documents, especially in the field of cutting-edge technologies, traditional methods based on keyword matching and text similarity calculation have gradually shown their limitations. These methods perform poorly in dealing with complex language structures, rapidly evolving technical terms, and interdisciplinary knowledge associations, resulting in low-precision and high-noise retrieval results. They often miss relevant documents described using different terms and are difficult to adapt to the changing speed of emerging terms.

[0003] To overcome the above challenges and improve the accuracy and efficiency of document retrieval, large language models (LLMs) have gradually been applied to the field of information retrieval. Nevertheless, in existing retrieval schemes that utilize LLMs, it is usually necessary to pre-train the model and further optimize it through methods such as supervised fine-tuning (SFT) and reinforcement learning from human feedback (RLHF). However, this approach not only requires obtaining a large amount of domain-specific data but also faces problems such as difficult data acquisition and high training costs. Summary of the Invention

[0004] In view of this, the purpose of the embodiments of the present invention is to provide an information retrieval method and apparatus that can complete high-accuracy and high-efficiency retrieval without training, and solve the problems of difficult data acquisition and high training costs.

[0005] In a first aspect, an embodiment of the present invention provides an information retrieval method, the method comprising:

[0006] Obtain a patent to be searched and a plurality of candidate patents, where the candidate patents are patents that need to be matched with the patent to be searched;

[0007] Generate first input information through a predetermined first prompt template, so that a large language model obtains entity information corresponding to the patent to be searched and the candidate patents according to the first input information, where the entity information is text content information;

[0008] Generate second input information through a predetermined second prompt template, so that the large language model obtains the ontology information corresponding to the patent to be searched and the candidate patents according to the second input information, and the ontology information is patent classification information;

[0009] Obtain a first intermediate parameter and a second intermediate parameter, where the first intermediate parameter is the entity information of the patent to be searched, and the second intermediate parameter is a set of the ontology information of the patent to be searched and the candidate patents;

[0010] Obtain an intermediate retrieval result according to the original content of the patent to be searched and the first intermediate parameter, and the intermediate retrieval result includes multiple intermediate patents;

[0011] Generate third input information through a third prompt template according to the second intermediate parameter and the intermediate retrieval result, so that the large language model obtains a target patent from the intermediate patents according to the third input information, and the target patent is a patent that matches the patent to be searched.

[0012] In a second aspect, an embodiment of the present invention provides an information retrieval method, and the method includes:

[0013] Obtain a file to be searched and multiple candidate files, where the candidate files are files that need to be matched with the file to be searched;

[0014] Obtain the entity information corresponding to the file to be searched and the candidate files through the large language model, and the entity information is text content information;

[0015] Obtain the ontology information corresponding to the file to be searched and the candidate files through the large language model, and the ontology information is file classification information;

[0016] Obtain a target file from the candidate files through the large language model according to the entity information and ontology information of the file to be searched and the candidate files, and the target file is a file that matches the file to be searched.

[0017] In some embodiments, the obtaining the entity information corresponding to the file to be searched and the candidate files through the large language model includes:

[0018] Generate first input information according to the file to be searched and multiple candidate files through a predetermined first prompt template;

[0019] Obtain the entity information corresponding to the file to be searched and the candidate files through the large language model according to the first input information.

[0020] In some embodiments, the obtaining the ontology information corresponding to the file to be searched and the candidate files through the large language model includes:

[0021] Generate second input information based on the file to be searched, multiple candidate files, and the entity information corresponding to each file according to a predetermined second prompt template;

[0022] Obtain the ontology information corresponding to the file to be searched and the candidate files through a large language model according to the second input information.

[0023] In some embodiments, the obtaining of the target file from the candidate files through the large language model according to the entity information and ontology information of the file to be searched and the candidate files includes:

[0024] Generate a first intermediate parameter and a second intermediate parameter according to the entity information and ontology information of the file to be searched and the candidate files, where the first intermediate parameter is the entity information of the file to be searched, and the second intermediate parameter is a set of the ontology information of the file to be searched and the candidate files;

[0025] Obtain an intermediate retrieval result according to the original content of the file to be searched and the first intermediate parameter, where the intermediate retrieval result includes multiple intermediate files;

[0026] Obtain the target file from the intermediate files through a large language model according to the second intermediate parameter and the intermediate retrieval result.

[0027] In some embodiments, the obtaining of the target file from the intermediate files through the large language model according to the second intermediate parameter and the intermediate retrieval result includes:

[0028] Generate third input information according to the second intermediate parameter and the intermediate retrieval result through a third prompt template;

[0029] Obtain the target file from the intermediate files through a large language model according to the third input information.

[0030] In a third aspect, an embodiment of the present invention provides an information retrieval device, and the device includes:

[0031] A first input unit, configured to obtain a patent to be searched and multiple candidate patents, where the candidate patents are patents that need to be matched with the patent to be searched;

[0032] A first obtaining unit, configured to generate first input information through a predetermined first prompt template, so that a large language model obtains the entity information corresponding to the patent to be searched and the candidate patents according to the first input information, where the entity information is text content information;

[0033] A second obtaining unit, configured to generate second input information through a predetermined second prompt template, so that a large language model obtains the ontology information corresponding to the patent to be searched and the candidate patents according to the second input information, where the ontology information is patent classification information;

[0034] A third acquisition unit, configured to acquire a first intermediate parameter and a second intermediate parameter, where the first intermediate parameter is the entity information of the patent to be searched, and the second intermediate parameter is a set of ontology information of the patent to be searched and the candidate patents;

[0035] A fourth acquisition unit, configured to acquire a third intermediate parameter according to the original content of the patent to be searched and the first intermediate parameter, where the third intermediate parameter is the relevant reference knowledge of the patent to be searched;

[0036] A first matching unit, configured to generate third input information according to the second intermediate parameter and the third intermediate parameter through a third prompt template, so that a large language model acquires a target patent from the candidate patents according to the third input information, where the target patent is a patent that matches the patent to be searched.

[0037] In a fourth aspect, an embodiment of the present invention provides an information retrieval device, where the device includes:

[0038] A second input unit, configured to acquire a file to be searched and multiple candidate files, where the candidate files are files that need to be matched with the file to be searched;

[0039] A fifth acquisition unit, configured to acquire entity information corresponding to the file to be searched and the candidate files through a large language model, where the entity information is text content information;

[0040] A sixth acquisition unit, configured to acquire ontology information corresponding to the file to be searched and the candidate files through a large language model, where the ontology information is file classification information;

[0041] A second matching unit, configured to acquire a target file from the candidate files through a large language model according to the entity information and ontology information of the file to be searched and the candidate files, where the target file is a file that matches the file to be searched.

[0042] In a fifth aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory is used to store one or more computer program instructions, and where the one or more computer program instructions are executed by the processor to implement the methods described in the first aspect and the second aspect.

[0043] In a sixth aspect, an embodiment of the present invention provides a computer program product, where the computer program product includes a computer program, and when the computer program runs on a computer, the computer executes the methods described in the first aspect and the second aspect.

[0044] In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the methods described in the first aspect and the second aspect are implemented.

[0045] The technical solution of the embodiment of the present invention obtains a file to be searched and a plurality of candidate files, where the candidate files are files that need to be matched with the file to be searched, obtains entity information corresponding to the file to be searched and the candidate files through a large language model, where the entity information is text content information, obtains ontology information corresponding to the file to be searched and the candidate files through a large language model, where the ontology information is file classification information, and obtains a target file from the candidate files through the large language model according to the entity information and ontology information of the file to be searched and the candidate files, where the target file is a file that matches the file to be searched. Thus, high-accuracy and high-efficiency retrieval can be completed without training, and the problems of difficult data acquisition and high training cost can be solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Through the following description of the embodiments of the present invention with reference to the accompanying drawings, the above and other objects, features, and advantages of the present invention will become clearer. In the drawings:

[0047] Figure 1 is a flowchart of an information retrieval system according to an embodiment of the present invention;

[0048] Figure 2 is a flowchart of an information retrieval method according to a first embodiment of the present invention;

[0049] Figure 3 is a flowchart of obtaining entity information according to an embodiment of the present invention;

[0050] Figure 4 is a flowchart of obtaining ontology information according to an embodiment of the present invention;

[0051] Figure 5 is a flowchart of obtaining a target file from candidate files according to an embodiment of the present invention;

[0052] Figure 6 is a flowchart of obtaining a target file from intermediate files according to an embodiment of the present invention;

[0053] Figure 7 is a flowchart of an information retrieval method according to a second embodiment of the present invention;

[0054] Figure 8 is a schematic diagram of an information retrieval device according to a first embodiment of the present invention;

[0055] Figure 9 is a schematic diagram of an information retrieval device according to a second embodiment of the present invention;

[0056] Figure 10 It is a schematic diagram of the electronic device according to an embodiment of the present invention. Specific embodiments

[0057] The following describes the present application based on embodiments, but the present application is not limited to these embodiments. In the following detailed description of the present application, some specific details are described in detail. Those skilled in the art can fully understand the present application without the description of these details. In order to avoid obscuring the essence of the present application, well-known methods, processes, procedures, components, and circuits are not described in detail.

[0058] In addition, those of ordinary skill in the art should understand that the accompanying drawings provided herein are all for illustrative purposes and are not necessarily drawn to scale.

[0059] Unless the context clearly requires otherwise, words such as "including" and "comprising" in the entire application document should be interpreted as having an inclusive meaning rather than an exclusive or exhaustive meaning; that is, it is the meaning of "including but not limited to".

[0060] In the description of the present application, it should be understood that terms such as "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance. In addition, in the description of the present application, unless otherwise specified, the meaning of "a plurality" is two or more.

[0061] For the solutions described in this specification and the embodiments, if they involve personal information processing, they will all be processed on the premise of having a legal basis (such as obtaining the consent of the personal information subject, or being necessary for performing a contract, etc.), and will only be processed within the specified or agreed scope. If the user refuses to process personal information other than the necessary information required for basic functions, it will not affect the user's use of basic functions.

[0062] With the rapid development of information technology, it has become particularly important to retrieve various technical documents efficiently and accurately, especially in the fields of patent literature, academic papers, and technical reports. However, in the face of the rapid growth of document quantities, especially in the content of cutting-edge technology fields, traditional methods based on keyword matching and text similarity calculation are gradually showing their limitations. These methods perform poorly in dealing with complex language structures, rapidly evolving technical terms, and interdisciplinary knowledge associations, resulting in low-precision and high-noise retrieval results. They often miss relevant documents described using different terms and are difficult to adapt to the changing speed of emerging terms.

[0063] In view of this, although large language models (LLMs) offer new possibilities for improving patent matching, directly applying these models still faces many challenges, including high training costs and difficulties in data acquisition. Existing solutions, although performing well in a wide range of patent tasks, their high training costs and strong dependence on domain-specific data limit their broader applications.

[0064] The present invention aims to overcome the above challenges and proposes an information retrieval method based on large language models, which can achieve efficient and accurate patent matching without additional training, reducing costs while improving the efficiency and accuracy of information retrieval.

[0065] Figure 1 is a flowchart of the information retrieval system according to an embodiment of the present invention. Specifically, as Figure 1 shown, the information retrieval system according to an embodiment of the present invention includes at least one client 1, a network 2, and a server 3. Among them, the client 1 can be communicatively connected to the server 3 via the network 2.

[0066] In this embodiment, the client 1 is used to provide an interface for the user to interact with the information retrieval system, which can be implemented through various terminal devices, such as a desktop computer, a laptop computer, a tablet computer, a mobile phone, or other data processing terminals, etc. The client is responsible for receiving the retrieval request input by the user and sending the retrieval request to the server 3. In addition, the client 1 is also responsible for receiving the retrieval results sent by the server 3 and presenting them.

[0067] The server 3 stores candidate files and, after receiving the retrieval request sent by the client, obtains the target file from the candidate files and pushes it to the client 1. Among them, the server 3 can be a local server or a cloud server, and the server 3 can be implemented by an independent server or a server cluster composed of multiple servers.

[0068] Furthermore, the server 3 includes a database 31 and a retrieval component 32.

[0069] Among them, the database 31 stores candidate files available for query, such as patent documents, academic papers, and technical reports, etc.

[0070] In some embodiments, the database 11 may include a mass storage device, a removable storage device, a volatile read-write memory, or a read-only memory (ROM), etc., or any combination thereof. By way of example, the mass storage device may include a magnetic disk, an optical disk, a solid state drive, etc.; the removable storage device may include a flash drive, a floppy disk, an optical disk, a memory card, a zip disk, a magnetic tape, etc.; the volatile read-write memory may include a random access memory (RAM); the RAM may include a dynamic RAM (DRAM), a double data rate synchronous dynamic RAM (DDR SDRAM); a static RAM (SRAM), a thyristor-based random access memory (T-RAM), and a zero-capacitor RAM (Zero-RAM), etc. By way of example, the ROM may include a mask ROM (MROM), a programmable ROM (PROM), a programmable erasable ROM (PEROM), an electrically erasable programmable ROM (EEPROM), a CD-ROM, and a digital versatile disk ROM, etc.

[0071] In some embodiments, the database 31 may be implemented on a cloud platform. By way of example only, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, a cross cloud, a multi-cloud, or other similar ones, etc., or any combination thereof.

[0072] The retrieval component 32 is configured to receive a retrieval request sent by the client 1, execute a retrieval task to obtain a retrieval result, and send the retrieval result to the client 1.

[0073] In some embodiments, the retrieval component 32 includes a memory and a processor, the memory is configured to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the information retrieval method of the embodiments of the present invention.

[0074] Network 2 can be used for the exchange of information and / or data. Among them, network 2 can be any type of wired or wireless network, or a combination thereof. In some embodiments, network 2 may include a wired network, a wireless network, an optical fiber network, a telecommunications network, an intranet, the Internet, a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a metropolitan area network (MAN), a wide area network (WAN), a public switched telephone network (PSTN), a Bluetooth network, a ZigBee network, or a near field communication (NFC) network, etc., or any combination thereof. In some embodiments, network 2 may include one or more network access points. For example, network 2 may include a wired or wireless network access point, such as a base station and / or a network switching node, and one or more components of the data processing system may be connected to the network through the access point to exchange data and / or information.

[0075] Figure 2 is a flowchart of the information retrieval method according to the first embodiment of the present invention. Specifically, as Figure 2 shown, the information retrieval method according to the embodiment of the present invention includes the following steps:

[0076] Step S110, obtain the file to be searched and multiple candidate files.

[0077] In this embodiment, the candidate file is a file that needs to be matched with the file to be searched.

[0078] Specifically, when the user has a retrieval requirement, enter the retrieval interface through the client, and input the file that the user needs to retrieve through the retrieval interface. This file is the file to be searched. After the user submits, the client generates a retrieval request and sends the retrieval request to the server, and the retrieval request includes the file to be searched.

[0079] Among them, the files to be searched submitted by the user can be web links, file identifiers, or file contents. For web links, if the user wants to retrieve the content of a certain web page, the corresponding web link can be submitted. For file identifiers, if the file to be searched by the user can be found in the server's database, the corresponding file identifier can be submitted, such as information like file name, file number, etc. Specifically in the field of patent retrieval, the file identifier can also be one or more of the application number, publication number, patent name, etc. For file contents, the user can also send the file contents in a predetermined format to the server, such as files in doc, pdf, etc. formats.

[0080] The candidate files are the files stored in the database.

[0081] Step S120: Obtain the entity information corresponding to the file to be searched and the candidate files through a large language model, where the entity information is text content information.

[0082] In this embodiment, after the server obtains the patent to be searched and the candidate patents, it obtains the entity information of each patent through a large language model, and the entity information is text content information. That is, the server obtains the entity information of the patent to be searched through a large language model and obtains the entity information of each candidate patent.

[0083] Specifically, Figure 3 is the flowchart of obtaining entity information in an embodiment of the present invention. As Figure 3 shown, obtaining the entity information corresponding to the file to be searched and the candidate files through a large language model includes the following steps:

[0084] Step S121: Generate first input information according to the file to be searched and multiple candidate files through a predetermined first prompt template.

[0085] In this embodiment, a first prompt template is pre-configured, and first input information is generated according to the file to be searched and multiple candidate files through the predetermined first prompt template. The first input information is a set of text segments that guide the large language model to generate entity information extracted from the files.

[0086] Taking the file as a patent as an example for illustration, as an example, the implementation method of the first prompt template can be as follows:

[0087] "Entity generation:

[0088] You are an AI assistant specialized in patent analysis. Your task is to extract key technical entities from the given patent abstract. These entities should be specific technical concepts, components, or methods that are the core of the patent innovation.

[0089] Instruction:

[0090] Read the provided patent abstract carefully.

[0091] Identify and list the most important technical entities mentioned in the patent.

[0092] Focus on entities in the following aspects:

[0093] Specific to the described technology;

[0094] Located at the core of the patent claims or innovative aspects;

[0095] Useful for understanding the technical field of the patent;

[0096] Provide each entity as a concise phrase or term (usually 1 - 5 words);

[0097] If the number of listed entities is less than 10, prioritize the most important ones;

[0098] Do not include general or broad categories; focus on specific technical concepts;

[0099] Output format: "[Entity E1], [Entity E2], [Entity E3] ……".

[0100] Step S122: Obtain the entity information corresponding to the file to be searched and the candidate files through the large - language model according to the first input information.

[0101] In this embodiment, the first input information generated by the first prompt template is provided to the large - language model to guide the large - language model to obtain the entity information corresponding to the file to be searched and the candidate files from the file.

[0102] The first prompt template of the embodiment of the present invention is carefully designed to activate the technical field knowledge obtained by the large - language model during the pre - training process, ensuring that the large - language model can accurately identify technical entities such as core technical components, innovative methods, and technical features in the file. At the same time, this entity information includes not only specific technical terms but also the association relationships between these terms, providing an important semantic basis for subsequent file matching.

[0103] Step S130: Obtain the ontology information corresponding to the file to be searched and the candidate files through the large - language model.

[0104] In this embodiment, the ontology information is file classification information. For patent documents, the file classification information is the International Patent Classification (IPC); for academic papers, the file classification information can be a subject classification system or a topic classification; for technical reports, the classification information can be the application field, research topic, or the type of institution that generated the report, etc.

[0105] Specifically, Figure 4 is a flowchart for obtaining ontology information according to an embodiment of the present invention. As Figure 4 shown, obtaining the ontology information corresponding to the file to be searched and the candidate files through a large language model includes the following steps:

[0106] Step S131, generate second input information according to the file to be searched, multiple candidate files, and the entity information corresponding to each file through a predetermined second prompt template.

[0107] In this embodiment, for each file (including the file to be searched and the candidate files), according to the original content of the file and the corresponding entity information, generate second input information through a predetermined second prompt template. Specifically, pre-configure the second prompt template, and generate second input information according to the original content and entity information of each file through the predetermined second prompt template. The second input information is a set of text fragments that guide the large language model to generate ontology information extracted from the file.

[0108] Taking a patent as an example for illustration, as an example, the implementation manner of the second prompt template can be as follows:

[0109] "Ontology generation:

[0110] You are a patent classification expert in the patent examination and search process and usually need to compare the technical fields of multiple related patents. I will provide an original patent abstract and its related technical entities, as well as multiple potentially related patent abstracts (Options A, B, C, D) and their respective technical entities. The original abstract represents the patent under examination, while Options A - D represent potentially related existing patents found in the database. Your task is to generate multi-level technical classifications for the original abstract and each option, referring to but not limited to the methods of the International Patent Classification (IPC) system. These classifications will be used to evaluate the technical relevance between the original patent and the existing patents, and help determine the novelty and inventiveness of the patent.

[0111] Input: {original abstract, original abstract entity, Options A - D abstracts, Options A - D abstract entities};

[0112] Please output the classification results in the following format: {type}: major category]>[subcategory]>[specific category], where type ∈ {original patent, Option A, Option B, Option C, Option D};

[0113] Note:

[0114] The classification should be completed within three levels;

[0115] Refer to but not limited to the methods of the IPC classification system, and describe the technical categories using general and intuitive terms;

[0116] Use 1 - 3 words to describe each level, refining step by step from the main category to the specific category;

[0117] The classification should reflect the core technical features, application fields, and innovation highlights of the patent;

[0118] Make full use of the provided technical entities, which contain important technical information;

[0119] Maintain consistency: If two patents belong to similar fields, they should be given similar classifications;

[0120] Only output the classification results without adding any additional explanations. Based on the above information, please provide accurate and concise three - level technical classifications for the given original patent abstract and each option. Before starting the classification, please carefully read all the abstracts and technical entities to ensure the consistency and relevance of the classification.

[0121] Step S132: Obtain the ontology information corresponding to the file to be searched and the candidate files through the large - language model according to the second input information.

[0122] In this embodiment, the second input information generated by the second prompt template is provided to the large - language model to guide the large - language model to obtain the ontology information corresponding to the file to be searched and the candidate files from the files.

[0123] In the embodiment of the present invention, through the ontology prompt tuning module, the large - language model is guided to perform hierarchical analysis on the file to be searched and the candidate files. This module designs a unique prompt template based on the International Patent Classification (IPC) system, aiming to activate the large - language model's in - depth understanding of the technical field classification system. Through these carefully designed prompt strategies, the model can accurately locate the patent into the appropriate technical classification framework, identify its position and role in the entire technical development pedigree. This hierarchical analysis method enables the model to go beyond the surface text similarity and deeply understand the significance of the patent in the technical evolution path, thus providing more comprehensive and accurate semantic understanding support for the subsequent matching process.

[0124] Step S140: Obtain the target file in the candidate files through the large - language model according to the entity information and ontology information of the file to be searched and the candidate files.

[0125] In this embodiment, after obtaining the ontology information and entity information corresponding to each file, the matching stage can be carried out. The large - language model is used to obtain the target file in the candidate files according to the entity information and ontology information of the file to be searched and the candidate files, and the target file is the file that matches the file to be searched.

[0126] Figure 5It is a flowchart of obtaining a target file from candidate files in an embodiment of the present invention. As Figure 5 shown, obtaining a target file from the candidate files by a large language model according to the entity information and ontology information of the file to be searched and the candidate files includes the following steps:

[0127] Step S141, generating a first intermediate parameter and a second intermediate parameter according to the entity information and ontology information of the file to be searched and the candidate files.

[0128] In this embodiment, the first intermediate parameter is the entity information of the file to be searched, and the second intermediate parameter is a set of the ontology information of the file to be searched and the candidate files.

[0129] Specifically, assume that the file to be searched is denoted as q, and multiple candidate files are denoted as p 1 -p n . The entity information of the file to be searched is denoted as V e (q)=[E 1 ,E 2 ,E 3 ,……,E m , where V e (q) represents the entity information of the file to be searched, and E i represents the i-th entity, i = 1, 2, 3, ……, m. The ontology information of the file to be searched is denoted as V O (q)=[O 1 ,O 2 ,O 3 ,……,O r , where V O (q) represents the ontology information of the file to be searched, and O i represents the i-th ontology, i = 1, 2, 3, ……, r. The ontology information of the j-th candidate file is denoted as V O (p j )=[O 1 ,O 2 ,O 3 ,……,O r , where V O (p j ) represents the ontology information of the j-th candidate file, and O i represents the i-th ontology, i = 1, 2, 3, ……, r.

[0130] Then the first intermediate parameter The second intermediate parameter

[0131] Step S142, obtaining an intermediate retrieval result according to the original content of the file to be searched and the first intermediate parameter.

[0132] In this embodiment, the intermediate retrieval result includes multiple intermediate documents. Specifically, the entity information of the document to be searched is concatenated with the original content to obtain concatenated information, and then a preliminary retrieval is performed in the candidate documents according to the concatenated information by a BGE (BAAI General Embedding) retriever to obtain the intermediate retrieval result, which includes multiple intermediate patents. Among them, BGE is a general semantic vector model that can be used for various information retrieval tasks, including but not limited to search, question answering systems, and retrieval augmentation (RAG) of large language models, etc.

[0133] Specifically, the concatenated information composed of the original content and entity information of the document to be searched is sent into the BGE retriever. Utilizing the powerful vector representation ability of BGE, the documents most relevant to the document to be searched can be found among a large number of candidate documents, and these documents are used as intermediate documents.

[0134] Step S143: Obtain the target document from the intermediate documents through a large language model according to the second intermediate parameter and the intermediate retrieval result.

[0135] In this embodiment, after obtaining the intermediate retrieval result, a further retrieval is performed in the intermediate retrieval result according to the second intermediate parameter through a large language model to obtain the target document from the intermediate documents.

[0136] Specifically, Figure 6 is the flowchart of obtaining the target document from the intermediate documents in an embodiment of the present invention. As Figure 6 shown, obtaining the target document from the intermediate documents through a large language model according to the second intermediate parameter and the intermediate retrieval result includes the following steps:

[0137] Step S1431: Generate the third input information according to the second intermediate parameter and the intermediate retrieval result through a third prompt template.

[0138] In this embodiment, the third input information is generated through a predetermined third prompt template. Specifically, the third prompt template is pre-configured, and the third input information is generated according to the second intermediate parameter and the intermediate retrieval result through the predetermined third prompt template. The third input information is a set of text fragments that guide the large language model to obtain the target document from the intermediate documents.

[0139] Taking the document as a patent as an example for illustration, as an example, the implementation method of the third prompt template can be as follows:

[0140] "Matching process:

[0141] Please refer to the following patent abstract to answer the subsequent questions:

[0142] {rag_passage};

[0143] The question is as follows:

[0144] {question};

[0145] The classification information of the patent abstract is as follows:

[0146] {ontology};

[0147] Select only from options A / B / C / D without providing additional analysis.

[0148] Answer: ".

[0149] Among them, rag_passage represents the intermediate retrieval result retrieved by the BGE retriever, question represents the matching problem composed of the file to be searched and the list of intermediate files that need to be matched and sorted with the intermediate files, including <prompt words "Please select the most similar patent number from A, B, C..., Which number is...?", the file to be searched, and the list of intermediate patents that need to be matched and sorted with the file to be searched>, and ontology represents the ontology information generated for the file to be searched and the list of intermediate files that need to be matched and sorted with the file to be searched.

[0150] Step S1432, obtain the target file from the intermediate files by the large language model according to the third input information.

[0151] In this embodiment, the third input information is provided to the large language model, and the target file is obtained from the intermediate files by the large language model.

[0152] In the embodiment of the present invention, the large language model is guided by the third prompt template to deeply analyze the file to be searched and the list of intermediate files that need to be matched and sorted with the file to be searched in combination with the retrieved intermediate retrieval result. In this process, the large language model will spontaneously combine the given rich information and comprehensively consider the actual matching degree between texts. Through this in-depth analysis, the system can accurately identify the target file most relevant to the file to be searched.

[0153] In an embodiment of the present invention, by obtaining a file to be searched and multiple candidate files, where the candidate files are files that need to be matched with the file to be searched, entity information corresponding to the file to be searched and the candidate files is obtained through a large language model, the entity information being text content information, ontology information corresponding to the file to be searched and the candidate files is obtained through the large language model, the ontology information being file classification information, and a target file is obtained from the candidate files through the large language model according to the entity information and ontology information of the file to be searched and the candidate files, the target file being a file that matches the file to be searched. Thus, high-accuracy and high-efficiency retrieval can be completed without training, solving the problems of difficult data acquisition and high training costs.

[0154] It should be noted that the information retrieval method in the embodiment of the present invention can be applied to various types of information retrieval systems. Especially in the field of patent retrieval, traditional retrieval methods mainly rely on keyword matching and simple text similarity calculation. In the face of the unique language characteristics of patent documents, such as complex language structures, rapidly evolving technical terms, ambiguous description methods, and cross-domain technical associations, it is often difficult to achieve ideal results, easily generating a large number of noisy results and missing relevant information, increasing the difficulty of accurate retrieval.

[0155] Figure 7 It is a flowchart of the information retrieval method according to the second embodiment of the present invention. Specifically, as Figure 7 shown, the information retrieval method in the embodiment of the present invention includes the following steps:

[0156] Step S210: Obtain a patent to be searched and multiple candidate patents.

[0157] In this embodiment, the candidate patents are patents that need to be matched with the patent to be searched. Specifically, when a user has a patent retrieval requirement, the user enters the retrieval interface through the client and inputs the patent that the user needs to retrieve through the retrieval interface, and this patent is the file to be searched. After the user submits, the client generates a retrieval request and sends the retrieval request to the server, and the retrieval request includes the patent to be searched. Among them, the candidate patents are the patents stored in the database.

[0158] Step S220: Generate first input information through a predetermined first prompt template, so that the large language model obtains the entity information corresponding to the patent to be searched and the candidate patents according to the first input information.

[0159] In this embodiment, the entity information is text content information. Specifically, after the server obtains the patent to be searched and the candidate patents, it generates first input information according to the patent to be searched and multiple candidate patents through a predetermined first prompt template. The first input information is a set of text fragments that guides the large language model to generate entity information extracted from the patents. The first input information generated by the first prompt template is provided to the large language model to guide the large language model to obtain the entity information corresponding to the patent to be searched and the candidate patents from each patent. The entity information includes technical entities such as core technical components, innovative methods, and technical features.

[0160] Step S230: Generate second input information through a predetermined second prompt template so that the large language model obtains the ontology information corresponding to the patent to be searched and the candidate patents according to the second input information.

[0161] In this embodiment, the ontology information is patent classification information. The second prompt template is pre-configured, and second input information is generated according to the original content of each patent and the entity information extracted in the previous step through the predetermined second prompt template. The second input information is a set of text fragments that guides the large language model to generate ontology information extracted from the patents. The second input information generated by the second prompt template is provided to the large language model to guide the large language model to obtain the ontology information corresponding to the file to be searched and the candidate files from the file. Among them, the file classification information is the International Patent Classification (IPC).

[0162] Step S240: Obtain a first intermediate parameter and a second intermediate parameter.

[0163] In this embodiment, the first intermediate parameter is the entity information of the patent to be searched. The second intermediate parameter is a set of ontology information of the patent to be searched and the candidate patents.

[0164] Step S250: Obtain an intermediate retrieval result according to the original content of the patent to be searched and the first intermediate parameter.

[0165] In this embodiment, the intermediate retrieval result includes multiple intermediate patents. Specifically, the entity information of the patent to be searched is spliced with the original content to obtain spliced information, and then a preliminary search is performed in the candidate patents through a BGE (BAAI General Embedding) retriever according to the spliced information to obtain the intermediate retrieval result.

[0166] Step S260: Generate third input information through a third prompt template according to the second intermediate parameter and the intermediate retrieval result so that the large language model obtains the target patent from the intermediate patents according to the third input information.

[0167] In this embodiment, the target patent is a patent that matches the patent to be searched. Specifically, a third prompt template is pre-configured, and third input information is generated according to the second intermediate parameter and the intermediate retrieval result through the predetermined third prompt template. The third input information is a set of text fragments that guide the large language model to obtain the target patent from the intermediate patents. The third input information is provided to the large language model, and the target file is obtained from the intermediate files through the large language model.

[0168] In the embodiment of the present invention, a file to be searched and multiple candidate files are obtained. The candidate files are files that need to be matched with the file to be searched. The entity information corresponding to the file to be searched and the candidate files is obtained through the large language model. The entity information is text content information. The ontology information corresponding to the file to be searched and the candidate files is obtained through the large language model. The ontology information is file classification information. The target file is obtained from the candidate files through the large language model according to the entity information and the ontology information of the file to be searched and the candidate files. The target file is a file that matches the file to be searched. Thus, high-accuracy and high-efficiency retrieval can be completed without training, and the problems of difficult data acquisition and high training cost can be solved.

[0169] Figure 8 It is a schematic diagram of the information retrieval device according to the first embodiment of the present invention. Specifically, as Figure 8 shown, the information retrieval device according to the embodiment of the present invention includes a second input unit 81, a fifth acquisition unit 82, a sixth acquisition unit 83, and a second matching unit 84. Among them, the second input unit 81 is used to obtain a file to be searched and multiple candidate files. The candidate files are files that need to be matched with the file to be searched. The fifth acquisition unit 82 is used to obtain the entity information corresponding to the file to be searched and the candidate files through the large language model. The entity information is text content information. The sixth acquisition unit 83 is used to obtain the ontology information corresponding to the file to be searched and the candidate files through the large language model. The ontology information is file classification information. The second matching unit 84 is used to obtain the target file from the candidate files through the large language model according to the entity information and the ontology information of the file to be searched and the candidate files. The target file is a file that matches the file to be searched.

[0170] In an embodiment of the present invention, by obtaining a file to be searched and multiple candidate files, where the candidate files are files that need to be matched with the file to be searched, obtaining entity information corresponding to the file to be searched and the candidate files through a large language model, where the entity information is text content information, obtaining ontology information corresponding to the file to be searched and the candidate files through a large language model, where the ontology information is file classification information, and obtaining a target file from the candidate files through the large language model according to the entity information and ontology information of the file to be searched and the candidate files, where the target file is a file that matches the file to be searched. Thus, high-accuracy and high-efficiency retrieval can be completed without training, solving the problems of difficult data acquisition and high training costs.

[0171] Figure 9 It is a schematic diagram of an information retrieval device according to a second embodiment of the present invention. Specifically, as Figure 9 shown, the information retrieval device according to an embodiment of the present invention includes a first input unit 91, a first acquisition unit 92, a second acquisition unit 93, a third acquisition unit 94, a fourth acquisition unit 95, and a first matching unit 96. Among them, the first input unit 91 is used to obtain a patent to be searched and multiple candidate patents, where the candidate patents are patents that need to be matched with the patent to be searched. The first acquisition unit 92 is used to generate first input information through a predetermined first prompt template, so that the large language model obtains entity information corresponding to the patent to be searched and the candidate patents according to the first input information, where the entity information is text content information. The second acquisition unit 93 is used to generate second input information through a predetermined second prompt template, so that the large language model obtains ontology information corresponding to the patent to be searched and the candidate patents according to the second input information, where the ontology information is patent classification information. The third acquisition unit 94 is used to obtain a first intermediate parameter and a second intermediate parameter, where the first intermediate parameter is the entity information of the patent to be searched, and the second intermediate parameter is a set of ontology information of the patent to be searched and the candidate patents. The fourth acquisition unit 95 is used to obtain a third intermediate parameter according to the original content of the patent to be searched and the first intermediate parameter, where the third intermediate parameter is relevant reference knowledge of the patent to be searched. The first matching unit 96 is used to generate third input information according to the second intermediate parameter and the third intermediate parameter through a third prompt template, so that the large language model obtains a target patent from the candidate patents according to the third input information, where the target patent is a patent that matches the patent to be searched.

[0172] In an embodiment of the present invention, by obtaining a file to be searched and multiple candidate files, where the candidate files are files that need to be matched with the file to be searched, entity information corresponding to the file to be searched and the candidate files is obtained through a large language model, the entity information being text content information, ontology information corresponding to the file to be searched and the candidate files is obtained through a large language model, the ontology information being file classification information, and a target file is obtained from the candidate files through the large language model according to the entity information and ontology information of the file to be searched and the candidate files, the target file being a file that matches the file to be searched. Thus, high-accuracy and high-efficiency retrieval can be completed without training, solving the problems of difficult data acquisition and high training costs.

[0173] Figure 10 It is a schematic diagram of an electronic device according to an embodiment of the present invention. In this embodiment, the electronic device 10 includes a server, a terminal, etc. As Figure 10 shown, the electronic device 10: includes at least one processor 101; and, a memory 102 communicatively connected to at least one processor 101; and, a communication component 103 communicatively connected to a scanning device, the communication component 103 receiving and sending data under the control of the processor 101; wherein, the memory 102 stores instructions executable by at least one processor 101, and the instructions are executed by at least one processor 101 to implement the above information retrieval method.

[0174] Specifically, the electronic device includes: one or more processors 101 and a memory 102, Figure 10 taking one processor 101 as an example. The processor 101 and the memory 102 can be connected through a bus or other means, Figure 10 taking connection through a bus as an example. The memory 102, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The processor 101 executes various functional applications and data processing of the device by running the non-volatile software programs, instructions, and modules stored in the memory 102, that is, implements the above information retrieval method.

[0175] The memory 102 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store an option list, etc. In addition, the memory 102 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 102 may optionally include a memory remotely provided with respect to the processor 101, and these remote memories can be connected to external devices through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0176] One or more modules are stored in the memory 102 and, when executed by one or more processors 101, perform the information retrieval method in any of the above method embodiments.

[0177] The above product can execute the method provided in the embodiments of the present application, and has the corresponding functional modules and beneficial effects of the executed method. For technical details not described in detail in this embodiment, reference can be made to the method provided in the embodiments of the present application.

[0178] In an embodiment of the present invention, by obtaining a file to be searched and a plurality of candidate files, where the candidate files are files that need to be matched with the file to be searched, entity information corresponding to the file to be searched and the candidate files is obtained through a large language model, the entity information being text content information, ontology information corresponding to the file to be searched and the candidate files is obtained through a large language model, the ontology information being file classification information, and a target file is obtained from the candidate files through the large language model according to the entity information and the ontology information of the file to be searched and the candidate files, the target file being a file that matches the file to be searched. Thus, high-accuracy and high-efficiency retrieval can be completed without training, solving the problems of difficult data acquisition and high training costs.

[0179] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program, and the computer-readable program is used for a computer to execute some or all of the above method embodiments.

[0180] That is, those skilled in the art can understand that all or part of the steps in the methods of the above embodiments can be completed by instructing relevant hardware through a program. The program is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs.

[0181] The foregoing are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. An information retrieval method, characterized in that: The method comprises: Obtaining a patent to be checked and multiple candidate patents, wherein the candidate patents are patents that need to be matched with the patent to be checked; Generate first input information through a predetermined first prompt template, so that the large language model obtains entity information corresponding to the patent to be checked and the candidate patent according to the first input information, and the entity information is text content information; Generate second input information through a predetermined second prompt template, so that the large language model obtains the ontology information corresponding to the patent to be checked and the candidate patent according to the second input information, and the ontology information is patent classification information; Obtaining a first intermediate parameter and a second intermediate parameter, wherein the first intermediate parameter is entity information of the patent to be checked, and the second intermediate parameter is a collection of entity information of the patent to be checked and candidate patents; Obtaining an intermediate search result according to the original content of the patent to be searched and the first intermediate parameter, wherein the intermediate search result includes a plurality of intermediate patents; A third input information is generated according to the second intermediate parameter and the intermediate search result through a third prompt template, so that the large language model obtains a target patent from the intermediate patents according to the third input information, and the target patent is a patent that matches the patent to be checked.

2. An information retrieval method, characterized in that: The method comprises: Obtaining a file to be checked and multiple candidate files, wherein the candidate files are files that need to be matched with the file to be checked; Acquire entity information corresponding to the to-be-searched file and the candidate file through a large language model, wherein the entity information is text content information; Acquire ontology information corresponding to the to-be-searched file and the candidate file through a large language model, wherein the ontology information is file classification information; A target file is obtained from the candidate files according to the entity information and ontology information of the file to be checked and the candidate files through a large language model, and the target file is a file matching the file to be checked.

3. The method according to claim 2, characterized in that The acquiring of entity information corresponding to the to-be-searched file and the candidate file by using the large language model includes: Generate first input information according to the to-be-checked file and a plurality of candidate files by using a predetermined first prompt template; The entity information corresponding to the to-be-searched file and the candidate file is obtained according to the first input information through a large language model.

4. The method according to claim 2, characterized in that: The acquiring of the ontology information corresponding to the to-be-checked file and the candidate file by using the large language model includes: Generate second input information according to the to-be-checked file, multiple candidate files, and entity information corresponding to each file by using a predetermined second prompt template; The ontology information corresponding to the to-be-searched file and the candidate file is obtained according to the second input information through a large language model.

5. The method according to claim 2, characterized in that: The method of obtaining the target file from the candidate files according to the entity information and ontology information of the to-be-checked file and the candidate files by using the large language model comprises: Generate a first intermediate parameter and a second intermediate parameter according to the entity information and the ontology information of the to-be-checked file and the candidate file, wherein the first intermediate parameter is the entity information of the to-be-checked file, and the second intermediate parameter is a set of the ontology information of the to-be-checked file and the candidate file; Acquire an intermediate search result according to the original content of the to-be-searched file and the first intermediate parameter, wherein the intermediate search result includes a plurality of intermediate files; The target file is obtained from the intermediate file according to the second intermediate parameter and the intermediate search result by using a large language model.

6. The method according to claim 5, characterized in that The acquiring of the target file from the intermediate file according to the second intermediate parameter and the intermediate search result by using the large language model comprises: Generate third input information according to the second intermediate parameter and the intermediate search result through a third prompt template; The target file is obtained from the intermediate file according to the third input information by using the large language model.

7. An information retrieval device, characterized in that: The device comprises: A first input unit is used to obtain a patent to be checked and a plurality of candidate patents, wherein the candidate patents are patents that need to be matched with the patent to be checked; A first acquisition unit, configured to generate first input information through a predetermined first prompt template, so that the large language model acquires entity information corresponding to the patent to be checked and the candidate patent according to the first input information, wherein the entity information is text content information; A second acquisition unit, configured to generate second input information through a predetermined second prompt template, so that the large language model acquires ontology information corresponding to the patent to be checked and the candidate patent according to the second input information, wherein the ontology information is patent classification information; A third acquisition unit is used to acquire a first intermediate parameter and a second intermediate parameter, wherein the first intermediate parameter is entity information of the patent to be checked, and the second intermediate parameter is a collection of entity information of the patent to be checked and candidate patents; A fourth acquisition unit, configured to acquire a third intermediate parameter according to the original content of the patent to be checked and the first intermediate parameter, wherein the third intermediate parameter is the relevant reference knowledge of the patent to be checked; The first matching unit is used to generate third input information according to the second intermediate parameter and the third intermediate parameter through a third prompt template, so that the large language model obtains a target patent from the candidate patents according to the third input information, and the target patent is a patent that matches the patent to be checked.

8. An information retrieval device, characterized in that: The device comprises: A second input unit is used to obtain a file to be checked and multiple candidate files, wherein the candidate files are files that need to be matched with the file to be checked; A fifth acquisition unit, configured to acquire entity information corresponding to the to-be-searched file and the candidate file through a large language model, wherein the entity information is text content information; A sixth acquisition unit, configured to acquire ontology information corresponding to the to-be-checked file and the candidate file through a large language model, wherein the ontology information is file classification information; The second matching unit is used to obtain a target file from the candidate file according to the entity information and ontology information of the to-be-checked file and the candidate file through a large language model, wherein the target file is a file matching the to-be-checked file.

9. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that: When the computer program is executed on a computer, the computer executes the method according to any one of claims 1 to 6.

11. A computer-readable storage medium storing computer program instructions, characterized in that: The computer program instructions implement the method according to any one of claims 1 to 6 when executed by a processor.