Information retrieval method and device, storage medium and computer program product
By generating local vector knowledge base and intention recognition model, combined with cosine similarity algorithm, the problem of low information retrieval accuracy and efficiency in intelligent question-and-answer system is solved, and more efficient information retrieval and output format flexibility is achieved.
Patent Information
- Application Number
- CN202410929042.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-11-12
AI Technical Summary
The accuracy and efficiency of information retrieval in the current intelligent question-and-answer system are mainly due to the fact that local knowledge base maintenance relies on manual labor, information accuracy and reliability are difficult to guarantee, the question-and-answer content cannot be reasonably classified, the model response format is not fixed, and the content of the corresponding format cannot be directly generated. , and it is impossible to intuitively view the key nodes and context information in the original text.
By generating a local vector knowledge base, using the intent recognition model to analyze user input, determining the topic query mode, calling the target information retrieval interface for search, optimizing the search results using the cosine similarity algorithm, and providing output in the original text or fixed format.
It improves the accuracy and efficiency of information retrieval, reduces the additional overhead of human retrieval verification, and enhances the performance and user experience of the system.
Smart Images

Figure CN118939763A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent question answering technology, and in particular to an information retrieval method, device, storage medium and computer program product. Background Art
[0002] With the development of science and technology, intelligent applications have penetrated into all areas of life, making the management and maintenance of knowledge increasingly critical. In order to adapt to this trend, establishing a unified knowledge base has become an important means. In this context, the use of large models is particularly critical. By learning and understanding the content in the knowledge base, large models can conduct intelligent question and answer and answer various complex questions. This intelligent question and answer system based on the knowledge base improves the efficiency of information acquisition and enhances the intelligence and convenience of human-computer interaction. It plays an important role in promoting the progress of the information society. However, intelligent question and answer based on the knowledge base faces the following problems:
[0003] First, the current maintenance of local knowledge bases mainly relies on manual preparation of data. The workload of manually building local knowledge bases is very large, and the accuracy and reliability of this information cannot be ensured, and the knowledge content cannot be reasonably classified. Secondly, most of the current questions and answers are based on intuitive understanding of the input, which affects the retrieval efficiency and the accuracy of the retrieval content. In addition, the model will respond to content without a fixed format based on its own understanding, and cannot directly generate content in the corresponding format based on the intent. Finally, the current question and answer content based on large models cannot directly view the key nodes and contextual information of the relevant retrieval content in the original text, resulting in additional overhead for manual retrieval document verification.
[0004] In short, the current knowledge base intelligent question answering solutions still have problems with low information retrieval accuracy and efficiency.
[0005] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0006] The main purpose of this application is to provide an information retrieval method, device, storage medium and computer program product, aiming to improve the accuracy and efficiency of information retrieval in the implementation of intelligent question and answer solutions.
[0007] To achieve the above purpose, the present application proposes an information retrieval method, which comprises:
[0008] Generate a local vector knowledge base based on pre-acquired expertise documents;
[0009] In response to input of random complex information, performing intent analysis on the random complex information through an intent recognition model to obtain key intent information;
[0010] Determine a subject query mode according to the key intent information;
[0011] The target information retrieval interface is called according to the subject query mode, and the target knowledge base is searched in the local vector knowledge base to obtain a target retrieval information set.
[0012] In one embodiment, the step of generating a local vector knowledge base based on the pre-acquired professional knowledge documents includes:
[0013] In response to the manual preprocessing instruction of the document, the document attribute content input by the front end is obtained and uploaded to the preset knowledge document library;
[0014] In response to the document automatic preprocessing instruction, parsing the pre-acquired professional knowledge document to obtain the document knowledge content;
[0015] Eliminating abnormal contents and dividing paragraph contents of the document knowledge content to obtain document attribute contents;
[0016] The document attribute content is vectorized and stored in a preset vector database to obtain a local vector knowledge base.
[0017] In one embodiment, the intention recognition model has a built-in sentence recognition strategy and an emotional color recognition strategy. In response to the input of random complex information, the step of performing intention analysis on the random complex information through the intention recognition model to obtain key intention information includes:
[0018] In response to input of random complex information, the random complex information is parsed by using the sentence recognition strategy and the emotional color recognition strategy to obtain sentence intention information;
[0019] Parsing information keywords and information key phrases in the sentence intention information;
[0020] Key intent information is generated based on the information keywords and the information key phrases.
[0021] In one embodiment, the step of determining the subject query mode according to the key intent information includes:
[0022] parsing information keywords and information key phrases in the key intent information;
[0023] Determining the information intent type according to the information keywords and information key phrases;
[0024] A target search topic is determined according to the information intent type, and a subject query mode corresponding to the target search topic is determined, wherein the subject query mode includes search content and target knowledge base information.
[0025] In one embodiment, the step of calling the target information retrieval interface according to the subject query mode, searching the target knowledge base in the local vector knowledge base, and obtaining the target retrieval information set includes:
[0026] Determine the corresponding target information retrieval interface according to the subject query mode;
[0027] Transmitting the search content and target knowledge base information into the target information search interface;
[0028] Calling at least one target knowledge base in the local vector knowledge base according to the target knowledge base information through the target information retrieval interface;
[0029] Information retrieval is performed in the target knowledge base according to the retrieval content to obtain a target retrieval information set.
[0030] In one embodiment, the step of performing information retrieval in the target knowledge base according to the retrieval content to obtain a target retrieval information set includes:
[0031] Calculate the first similarity between the search content and the document attribute content in the target knowledge base according to the cosine similarity algorithm;
[0032] Determine the document attribute content whose similarity is greater than a preset threshold as the first pending target information, and obtain a first pending target information set;
[0033] Extracting text features of the first undetermined target information according to a preset rearrangement model and rearrangement evaluation strategy;
[0034] Calculating a second similarity between the search content and the first target information to be determined according to the text feature;
[0035] The first pending target information set is rearranged based on the second similarity to obtain a target retrieval information set.
[0036] In one embodiment, the method further comprises:
[0037] Get pre-configured content output format information;
[0038] If the content output format is the original text output format, returning the original text information of each target search information in the target search information set, wherein the original text information includes document source attributes, information location tags and content reference coordinates;
[0039] If the content output format is a fixed output format, a type output relationship mapping of the target search information set is established based on the fixed output format and returned, wherein the type output relationship mapping includes a curve graph mapping and a list mapping.
[0040] In addition, to achieve the above-mentioned purpose, the present application also proposes an information retrieval device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the information retrieval method described above.
[0041] In addition, to achieve the above objectives, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the information retrieval method described above are implemented.
[0042] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the information retrieval method described above are implemented.
[0043] One or more technical solutions proposed in the present application generate a local vector knowledge base based on pre-acquired professional knowledge documents; in response to the input of random complex information, perform intent analysis on the random complex information through an intent recognition model to obtain key intent information; determine a subject query mode based on the key intent information; call a target information retrieval interface based on the subject query mode, search the target knowledge base in the local vector knowledge base, and obtain a target retrieval information set. Through the above solution, specifically by constructing a local vector knowledge base and parsing the intent of the input complex information, directly calling the target information interface according to the intent classification to retrieve the corresponding knowledge base and obtain the target retrieval information set, the accuracy and efficiency of information retrieval are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] 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.
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0046] Figure 1 A flowchart of the first embodiment of the information retrieval method of the present application is provided;
[0047] Figure 2 A schematic diagram of the mapping framework structure of the subject-knowledge base provided in the embodiment of the present application;
[0048] Figure 3A flowchart of the second embodiment of the information retrieval method of the present application is provided;
[0049] Figure 4 A schematic diagram of the recall rearrangement and response content output process of an embodiment of the present application;
[0050] Figure 5 A brief flowchart of the information retrieval method according to an embodiment of the present application;
[0051] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the information retrieval method in the embodiment of the present application.
[0052] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0053] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0054] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0055] The main solution of the embodiment of the present application is to provide a robot intelligent question-answering solution based on a knowledge base, which aims to solve a series of problems existing in the current intelligent question-answering system. By adopting a combination of manual and automated technical means, professional knowledge documents are first obtained and preprocessed through manual processing, and the knowledge content of public documents is automatically extracted by automated processing, and the documents are automatically classified and uploaded. Subsequently, the model is used to parse the document content and generate a vector knowledge base to quickly and accurately retrieve relevant information.
[0056] Through effective intent recognition technology, the intent of user input content can be accurately understood, and the target information interface can be called according to the intent classification to retrieve the corresponding knowledge base. In addition, similarity information content recall and rearrangement technology is used to improve the relevance and accuracy of retrieval results, and response output that meets a fixed format can be generated according to user intent.
[0057] Finally, through the key information backtracking technology, the robot can backtrack to specific key nodes based on the answer content and verify the context information in time, thus greatly improving the efficiency of verifying the question and answer content. Overall, this solution significantly improves the performance of the intelligent question and answer system by improving the maintenance efficiency of the knowledge base, enhancing the intent recognition and classification capabilities, optimizing the retrieval and output process, and realizing key information backtracking, providing users with a more intelligent and convenient information acquisition experience.
[0058] With the rapid development of science and technology, intelligent applications have penetrated into all areas of our lives, making the management and maintenance of knowledge increasingly critical. In order to adapt to this trend, establishing a unified knowledge base has become an important step. The knowledge base can not only store a large amount of information in a centralized manner, but also ensure the accuracy and consistency of the data, thereby improving the utilization rate of knowledge. In this context, the use of large models is particularly critical. By learning and understanding the content in the knowledge base, they can conduct intelligent question and answer and answer various complex questions. This intelligent question and answer system based on the knowledge base not only improves the efficiency of information acquisition, but also greatly enhances the intelligence and convenience of human-computer interaction, and plays an important role in promoting the progress of the information society. However, intelligent question and answer based on the knowledge base faces the following problems:
[0059] The current maintenance of local knowledge bases mainly relies on manual data preparation. The workload of manually building local knowledge bases is very large. The diversity of data content and the continuous generation and updating of knowledge require a lot of human effort in data cleaning and maintenance. At present, some conventional technologies directly search for public content on the Internet as a knowledge base, but they cannot ensure the accuracy and reliability of this information, and the knowledge content cannot be reasonably classified.
[0060] Effective recognition of input intent is one of the core prerequisites for accurate content retrieval, and directly affects whether the dialogue system can provide accurate and relevant responses. Currently, most questions and answers are based on intuitive understanding of the input, and the input information is not classified. When the matching model performs similarity retrieval, it is necessary to search the entire knowledge base, which directly affects the retrieval efficiency. If the retrieval knowledge base is very large, it will further affect the accuracy of the retrieved content. After the intent is recognized, the system retrieves relevant information based on the intent and generates a suitable answer. For information output, users need to limit the content output format each time they input, otherwise the model will respond with content in an unfixed format based on its own understanding, and cannot directly generate content in the corresponding format based on the intent.
[0061] Information backtracking of question and answer content is an effective means to verify the accuracy of robot answers. Although the current question and answer content based on large models can obtain information sources from the retrieval source, it still requires manual retrieval of the original full-text search for key information content. It is impossible to directly view the key nodes and context information of the relevant retrieval content in the original text, resulting in additional overhead for manual retrieval document verification.
[0062] The present application provides a solution, which generates a local vector knowledge base based on pre-acquired professional knowledge documents; in response to the input of random complex information, performs intent analysis on the random complex information through an intent recognition model to obtain key intent information; determines a subject query mode according to the key intent information; calls a target information retrieval interface according to the subject query mode, searches the target knowledge base in the local vector knowledge base, and obtains a target retrieval information set. Through the above solution, specifically by constructing a local vector knowledge base and parsing the intent of the input complex information, the target information interface is directly called according to the intent classification to retrieve the corresponding knowledge base, and the target retrieval information set is obtained, thereby improving the accuracy and efficiency of information retrieval.
[0063] It can be seen from the above embodiments that the present application overcomes the problems of low accuracy and low efficiency of content retrieval in traditional information retrieval methods by adopting the technical means of combining information retrieval templates with similarity calculation. Specifically, by constructing an information retrieval template, the keywords or phrases input by the user are mapped to the specific knowledge base, thereby achieving accurate information positioning. At the same time, the cosine similarity algorithm is used to calculate the similarity between the user's input intention and the content in the knowledge base, so as to recall the TOP N pieces of knowledge content with a similarity score higher than the threshold, thereby optimizing and rearranging the retrieval results. The application of this technical means not only improves the accuracy of information retrieval and ensures a close match between the retrieval results and user needs, but also significantly improves the retrieval efficiency, reduces user waiting time, and provides users with a more efficient and convenient information retrieval experience.
[0064] It should be noted that the execution subject of this embodiment may be a computing service device with information retrieval, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, an information retrieval system, etc. The following takes the information retrieval system as an example to illustrate this embodiment and the following embodiments.
[0065] Based on this, the present application embodiment provides an information retrieval method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the information retrieval method of the present application.
[0066] In this embodiment, the information retrieval method includes steps S1000 to S4000:
[0067] Step S1000: Generate a local vector knowledge base based on pre-acquired professional knowledge documents;
[0068] It should be noted that in this embodiment, by building an intelligent question-answering robot based on a knowledge base to strengthen knowledge integration and improve the speed and efficiency of information retrieval, the user's cost of knowledge base management and maintenance can be significantly reduced, while reducing the burden on users to obtain effective information, greatly reducing related operating expenses.
[0069] Among them, professional knowledge documents can be text materials with knowledge in a specific field. These documents can be legal documents, technical manuals, academic papers, etc., covering a wealth of professional information and data. In this solution, the role of professional knowledge documents is to serve as the basis for building a knowledge base. They are the core resources of information retrieval and intelligent question-answering systems. Through these documents, the system can provide professional and accurate answers to meet users' information needs in specific fields.
[0070] In addition, it should be noted that the local vector knowledge base is a kind of data stored after preprocessing and vectorization of professional knowledge document content. By using natural language processing technology (NLP) and machine learning models, such as word embedding models such as BERT, the text in the document is converted into vector form, which is convenient for efficient similarity calculation and retrieval. In this solution, the role of the local vector knowledge base is to serve as the information retrieval basis of the intelligent question-answering system, which improves the speed and accuracy of retrieval, and also makes the management and maintenance of the knowledge base more efficient.
[0071] The purpose of this step is to generate a local vector knowledge base based on pre-acquired expertise documents to build a structured and easy-to-retrieve knowledge base. This step includes the following key steps:
[0072] Document preprocessing: Clean and format professional knowledge documents, including removing irrelevant special symbols, dividing paragraphs, identifying key information, etc., to improve the document's structured level.
[0073] Automated processing: Use automation technology to automatically identify and classify document content, map it to the corresponding knowledge base, reduce manual operations and improve efficiency.
[0074] Vectorization: Convert document content into vector form and store it in a vector database, so that relevant information can be quickly located and retrieved by calculating the similarity between vectors.
[0075] Through this step, the performance of the intelligent question answering system can be significantly improved, enabling the system to quickly respond to user query requests and provide more accurate and relevant information. In addition, the construction of a local vector knowledge base can also help reduce the maintenance cost of the knowledge base and improve the scalability and adaptability of the system.
[0076] In addition, it should be noted that, in this embodiment, constructing the vector knowledge base combines human processing and automatic processing.
[0077] Among them, manual processing relies on human professional ability and experience accumulation to obtain professional knowledge documents and pre-process the documents, including removing special symbols, dividing similar paragraph content, and expressing special identifiers for segmentation. After the pre-processing is completed, the belonging list of document knowledge, the organization to which the document belongs, and other information are divided, and the attribute content is uploaded to the knowledge document library by selecting it offline.
[0078] Automated processing uses automatic extraction technology to automatically obtain the knowledge content of public documents in a timely and effective manner, automatically classify document types and document affiliations, and automatically map attribute information to the corresponding knowledge document library for upload.
[0079] After the knowledge document is uploaded, the model's layout and classification capabilities are combined to automatically parse the document content, and the document knowledge is segmented according to the custom segmentation attributes or segmentation lengths. The segmented content is embedded in combination with word embedding models such as Bert, and then the document vector is stored in the corresponding vector database.
[0080] In a feasible implementation manner, step S1000 may include steps S1100 to S1400:
[0081] Step S1100: in response to a document manual preprocessing instruction, the document attribute content input by the front end is obtained and uploaded to a preset knowledge document library;
[0082] It should be noted that the response to the manual preprocessing instructions of the document is the first step in building a local vector knowledge base. In this step, relying on the knowledge and experience of professionals, the documents are initially screened and classified to ensure that the content uploaded to the knowledge document library is accurate and valuable. Professionals will selectively upload documents based on the importance, relevance and completeness of the information, and annotate the attributes of the documents, such as the author, publication date, field, etc. These attributes are crucial for subsequent retrieval and analysis.
[0083] For example, in a scenario of building a knowledge base for bond information, during the preprocessing stage, the system can remove non-content information such as headers, footers, and copyright statements based on the received bond issuance instructions, and divide its key parts such as bond terms, issuance conditions, risk factors, etc. into different paragraphs, and upload this information to the bond knowledge document library.
[0084] Step S1200: In response to the document automatic preprocessing instruction, the pre-acquired professional knowledge document is parsed to obtain the document knowledge content;
[0085] It should be noted that the response to the manual preprocessing instructions of the document is the first step in building a local vector knowledge base. In this step, relying on the knowledge and experience of professionals, the documents are initially screened and classified to ensure that the content uploaded to the knowledge document library is accurate and valuable. Professionals will selectively upload documents based on the importance, relevance and completeness of the information, and annotate the attributes of the documents, such as the author, publication date, field, etc. These attributes are crucial for subsequent retrieval and analysis.
[0086] For example, during the automated processing stage, the system can automatically obtain a public bond market analysis report, automatically extract chapter titles, subtitles, and key financial data, and then upload it to the corresponding bond knowledge document library.
[0087] Step S1300: eliminating abnormal contents and dividing paragraph contents of the document knowledge content to obtain document attribute contents;
[0088] It should be noted that the elimination of abnormal content and the division of paragraph content are key links in document preprocessing, with the goal of purifying and structuring document content. Abnormal content may include irrelevant advertisements, copyright notices, etc., which are of no value for knowledge retrieval and analysis and need to be identified and excluded. At the same time, dividing the document into paragraphs can help the system understand the structure and content of the document more accurately, facilitating subsequent vectorization processing.
[0089] In addition, it should be noted that this step can also improve the readability and retrieval efficiency of the document content. By reasonably dividing the paragraphs and eliminating abnormal content, it can ensure that each part of the document is rich in information and relevant, thereby improving the quality of the knowledge base.
[0090] For example, when processing a bond rating report, the system can identify and exclude advertisements and irrelevant links in the document, then divide the body of the document according to rating criteria, methodology and conclusions, and identify the specific content of each part, such as credit rating, default probability, etc., so as to extract the accurate content of the original text.
[0091] Step S1400: vectorizing the document attribute content and storing it in a preset vector database to obtain a local vector knowledge base.
[0092] It should be noted that vectorization is the process of converting document attribute content into a machine-understandable form for efficient similarity calculation and retrieval. By using word embedding models such as BERT, the system can convert text into fixed-dimensional vectors that can capture the semantic information of the text. By storing these vectors in a vector database, the vector space model can be used to quickly retrieve and compare document content.
[0093] In addition, it should be noted that the purpose of this step is to build a local knowledge base that can support fast retrieval and intelligent question answering. The vectorized knowledge base not only improves the retrieval speed, but also enables the system to better understand the user's query intent and provide more accurate answers.
[0094] For example, in the vectorization processing stage, the system will input the content of the bond rating report processed in the above embodiment into the BERT model, and the model will convert the text into vector form, and then these vectors will be stored in the vector database to build a local vector knowledge base in the bond field, which is convenient for subsequent rapid retrieval and information extraction. In this way, when a user queries the credit rating information of a specific bond, the system can quickly provide accurate and relevant data.
[0095] Step S2000: in response to input of random complex information, performing intent analysis on the random complex information through an intent recognition model to obtain key intent information;
[0096] It should be noted that in this embodiment, the system may receive random complex information input by the user, which may include natural language queries, commands or dialogues, which may come from different channels, such as text input, text converted by voice recognition or chat records. The role of the intent recognition model is to analyze these inputs and extract the user's query intent, which is the prerequisite for achieving accurate information retrieval and providing effective answers.
[0097] According to the intent recognition classification, the specific topic is confirmed, and different target information interfaces are directly called according to different topics to search the knowledge base. The target information interface can be dynamically expanded according to different knowledge bases. For this retrieval process, the present invention constructs a mapping framework between the topic and the knowledge base. The schematic diagram of the framework structure is shown in FIG. Figure 2 As shown in the figure, intent recognition is mainly about understanding and parsing complex information input by users. The information input by users is highly personalized and may come from multiple channels, such as text queries or chat records. This information contains rich contextual information and emotional colors, so the accuracy of intent recognition directly affects the subsequent effective retrieval and response.
[0098] The present invention combines complex NLP technologies, such as semantic analysis, syntactic analysis, and sentiment recognition, and uses intent models such as BERT and LSTM to deeply understand these complex input information. After intent recognition, intent classification is performed. Keywords, key phrases, and other information are extracted from the information after intent recognition. Keywords and phrases are mapped to specific predefined categories. This step determines which knowledge bases are used to obtain information in the future.
[0099] In order to increase the accuracy of intent recognition, the present invention builds a set of more than 2,000 user input information based on business rules, and combines model fine-tuning technology to adapt the model's characteristics in new tasks by fine-tuning a small parameter set to improve the model's intent recognition performance on new tasks. The present invention presets 7 categories of specific topic classifications based on actual business rules, and after multiple rounds of conversations and intent corrections on the user's input intent, it maps the extracted keywords or phrases to specific topic targets.
[0100] The system parses complex input information through sentence recognition strategy and sentiment recognition strategy. The sentence recognition strategy focuses on the grammatical structure and semantic content of the user input, while the sentiment recognition strategy analyzes the sentiment tendency of the user input, such as positive, negative or neutral. Specifically, it parses the keywords and key phrases in the sentence intent information. Keywords and phrases are the key to understanding user intent, and they usually contain the core content and focus of the user's query. By identifying these keywords and phrases, the system can more accurately grasp the user's query needs.
[0101] Then, the step of generating key intent information based on the identified keywords and phrases is to convert the extracted keywords and phrases into intent information that the system can understand, which will guide the system to perform the next step of knowledge base retrieval.
[0102] In addition, it should be noted that the implementation idea of intent recognition and classification is to improve the accuracy and efficiency of intent recognition by combining natural language processing (NLP) technology and machine learning models, such as BERT, LSTM, etc. These technologies can handle complex language phenomena, including ambiguity, metaphors, and complex sentence structures, thereby improving the system's ability to understand user intentions.
[0103] For example, a user wants to know the credit rating and related risks of a specific bond. The user's input may be: "Please query the bond credit rating and default risk level of XYZ company." The system first recognizes through the sentence recognition strategy that the user is concerned about "XYZ company's bonds" and that the user has a clear intention to understand "bond credit rating" and "default risk level". Then, the system parses out the keywords "bond credit rating" and "default risk level" and converts these keywords into key intent information, indicating that the user wants to obtain information about the bond credit rating and related risk level assessment of XYZ company's bonds. Finally, this key intent information is used to guide the system to perform accurate information retrieval in the knowledge base in the bond field to provide the data and analysis required by the user.
[0104] In a feasible implementation manner, the intention recognition model has a built-in sentence recognition strategy and an emotional color recognition strategy, and step S2000 may include steps S2100 to S2300:
[0105] Step S2100: in response to the input of random complex information, the random complex information is parsed by using the sentence recognition strategy and the emotional color recognition strategy to obtain sentence intention information;
[0106] It should be noted that in this embodiment, the system uses built-in sentence recognition strategy and emotional color recognition strategy to conduct in-depth analysis of random and complex information input by users. The sentence recognition strategy focuses on the grammatical structure and semantic content of the input information to identify the basic composition and intention direction of the sentence. The emotional color recognition strategy analyzes the emotional tendency in the user input, which helps the system understand the user's emotional state and provide answers that are more in line with the user's emotional needs.
[0107] In addition, it should be noted that the purpose of this step is to extract sentence intent information from the user's input, which includes the user's query purpose, demand focus, and emotional expression. Through this multi-dimensional analysis, the system can more accurately grasp the user's real needs and lay a solid foundation for subsequent keyword extraction and intent generation.
[0108] Among them, the sentence recognition strategy can be based on deep learning syntactic analysis and semantic understanding models. Syntactic analysis is used to identify the structure of the sentence, including components such as subject, predicate and object, and the grammatical relationship between them. The semantic understanding model is used to identify concepts and entities in the sentence, as well as the relationship between them. For example, using dependency syntactic analysis, it can be determined that "stock market fluctuations" is a topic that users are concerned about, and "worry" is the user's emotional state. The emotional color recognition strategy determines the user's emotional tendency by analyzing the vocabulary selection, tone and context in the sentence. It can be implemented by using emotional dictionary matching, machine learning classifiers or deep learning models. For example, the system may use a dictionary containing emotional colors to identify that "very worried" expresses the user's negative emotions. Sentence parsing should not only consider individual sentences, but also the conversation context. Contextual information can help the system understand the sentence intent more accurately. For example, if the user previously mentioned a discussion about investment, then "stock market fluctuations" is likely to be related to investment losses.
[0109] If the user enters a sentence "I am very worried about the recent stock market fluctuations", the system first uses the sentence recognition strategy to identify that the user is concerned about "stock market fluctuations", and then uses the emotional color recognition strategy to analyze that the user's emotion is "worry". In this way, the system can obtain the user's sentence intention information, that is, the user wants to understand the reasons and possible impacts of stock market fluctuations.
[0110] Step S2200: parsing information keywords and information key phrases in the sentence intention information;
[0111] Step S2300: Generate key intent information based on the information keywords and information key phrases.
[0112] It should be noted that in this embodiment, the system will identify and extract keywords and key phrases in the sentence. These words or phrases are the core content of the user's query and can directly reflect the information points that the user is most concerned about. The extraction of keywords helps the system to quickly locate the user's needs, and the identification of key phrases can provide richer semantic information, allowing the system to more comprehensively understand the user's query intention.
[0113] In addition, it should be noted that the implementation of this step usually relies on natural language processing technology, such as TF-IDF, Word2Vec and other algorithms, which can evaluate the importance of words in a sentence and identify keywords and phrases that are crucial to understanding user intent.
[0114] It should be noted that generating key intent information based on the information keywords and information key phrases is a process of converting the extracted keywords and key phrases into key intent information that the system can understand. In this step, the system will comprehensively consider the meaning of the keywords and key phrases and their contextual relationship in the original sentence to generate one or more key intent information that clearly expresses the user's query intention.
[0115] Step S3000: determining a topic query mode according to the key intent information;
[0116] It should be noted that intent recognition is mainly about understanding and parsing complex information input by users. The information input by users is highly personalized and may also come from multiple channels, such as text queries or chat records. This information contains rich contextual information and emotional color, so the accuracy of intent recognition directly affects the subsequent effective retrieval and response. The present invention combines complex NLP technologies, such as semantic analysis, syntactic analysis, and emotional color recognition, and uses intent models such as BERT, LSTM, etc. to deeply understand these complex input information. After intent recognition is completed, intent classification is performed. According to the information extracted after intent recognition, keywords, key phrases and other information are mapped to specific predefined categories through keywords and phrases. This step determines which knowledge bases will be used to obtain information in the future.
[0117] According to the intent recognition classification, the specific topic can be confirmed. According to different topics, different target information interfaces can be directly called to retrieve the knowledge base. The target information interface can be dynamically expanded according to different knowledge bases. For details, please refer to Figure 2As shown in Figure 1, it is a bridge that converts the user's key intention information into specific query operations. The purpose of this step is to clarify the user's query requirements and form executable query instructions. It analyzes the user's key intention information, determines the specific topic of the user's query, and obtains the corresponding pre-built query mode to retrieve the most relevant information from the knowledge base.
[0118] In a feasible implementation manner, step S3000 may include steps S3100 to S3300:
[0119] Step S3100: parsing information keywords and information key phrases in the key intent information;
[0120] Step S3200: determining the information intent type according to the information keywords and information key phrases;
[0121] Step S3300: Determine a target search topic according to the information intent type, and determine a topic query mode corresponding to the target search topic, wherein the topic query mode includes search content and target knowledge base information.
[0122] It should be noted that the purpose of parsing the information keywords and information key phrases in the key intent information is to deeply understand the user's key intent information. The system can further perform semantic analysis on the key intent information and extract the keywords and key phrases. These keywords and phrases are the core expressions of user intent, and they can guide the system to determine the specific areas and needs of the user's query.
[0123] For example, a user is interested in a specific area of the bond market and enters the query: "I need to know the interest rate on XYZ company's bonds." The system will parse this query and identify the keywords "XYZ company's bonds," "default risk level," and "bond credit rating."
[0124] The system can determine the user's query intent type based on the identified keywords. In this example, the system identifies that the user wants to obtain information about "XYZ Company's bond credit rating and default risk level", indicating that the user's intent type may be "XYZ Company's bond credit rating and default risk level query".
[0125] It should be noted that determining the target retrieval topic according to the information intent type and determining the subject query mode corresponding to the target retrieval topic is the process of converting the determined intent type into a specific retrieval instruction. In this step, the system will select the corresponding target retrieval topic according to the intent type and construct a query mode associated with the topic. The query mode includes the retrieval content and the target knowledge base information, which will guide the system to retrieve the most relevant information from the knowledge base.
[0126] Each topic represents a specific semantic domain, and determines the information retrieval template corresponding to the specific format of the topic. Each topic covers a set of related query patterns. The topic information can be customized and expanded, and the topic types include bond information topics and customer subject information topics.
[0127] The information retrieval mode is also called the information retrieval template, which includes two parts: the retrieval content and the specific knowledge base mapped to it. The retrieval content is assembled based on the keywords or phrases obtained after intent recognition. The assembly format types are as follows: 1. Keywords + intent classification content 2. Keywords + spaces + retrieval keywords predefined in the information retrieval template. After the retrieval content is assembled, it is passed to the target information retrieval interface to search the corresponding knowledge base. The information retrieval template can contain multiple knowledge bases to be searched, and the mapping relationship is 1-N. Because the content entered by the user may need to obtain information from different document libraries, the user can customize the mapping configuration as needed to confirm which types of knowledge bases can retrieve the required information.
[0128] For example, based on the determined intent type "Query on XYZ company's bond credit rating and default risk level", the system can determine the target search topic as "Bond Risk Analysis" and construct the corresponding topic query pattern. This query pattern will include search content, such as "XYZ company's bond credit rating default risk level", as well as target knowledge base information, such as pointing to a specific knowledge base part containing economic data and financial analysis.
[0129] Step S4000: calling a target information retrieval interface according to the subject query mode, searching the target knowledge base in the local vector knowledge base, and obtaining a target retrieval information set.
[0130] It should be noted that according to the determined subject query mode, the system will call the target information retrieval interface, which can retrieve the most relevant information from the local vector knowledge base according to the user's query intention. This process involves matching and screening the attribute content of the documents in the knowledge base to ensure the relevance and accuracy of the retrieval results.
[0131] In addition, it should be noted that the purpose of this step is to achieve a quick response to user queries and provide high-quality retrieval results. By calling the target information retrieval interface, the system can directly access and retrieve the documents that best match the user's query intent, thereby greatly improving retrieval efficiency and user satisfaction.
[0132] For example, if the user queries for the legal interpretation of a specific contract clause, the system will call the target information retrieval interface based on the subject query pattern, retrieve documents containing relevant legal provisions and case analyses in the local vector knowledge base, and return these documents to the user as the target retrieval information set.
[0133] This embodiment provides an information retrieval method, which generates a local vector knowledge base based on pre-acquired professional knowledge documents; in response to the input of random complex information, performs intent analysis on the random complex information through an intent recognition model to obtain key intent information; determines a subject query mode according to the key intent information; calls a target information retrieval interface according to the subject query mode, searches the target knowledge base in the local vector knowledge base to obtain a target retrieval information set. Through the above scheme, specifically by constructing a local vector knowledge base and parsing the intent of the input complex information, the target information interface is directly called according to the intent classification to retrieve the corresponding knowledge base to obtain the target retrieval information set, thereby improving the accuracy and efficiency of information retrieval.
[0134] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 The step S4000 of the information retrieval method may further include steps S4100 to S4400:
[0135] Step S4100: determining a corresponding target information retrieval interface according to the subject query mode;
[0136] It should be noted that the core of determining the corresponding target information retrieval interface according to the subject query pattern is to match the user's specific query needs with the preset retrieval interface in the system. The subject query pattern is an abstract expression of the user's query needs, which includes the type of retrieval content and the direction of the target knowledge base. The target information retrieval interface is a specific channel used to access the knowledge base within the system. Each interface corresponds to a specific knowledge base or retrieval logic. The system will select the most appropriate retrieval interface from the preset interface library based on the information in the subject query pattern, such as the retrieval subject, keywords, user intent, etc. The process of selecting an interface may involve matching interface attributes, parsing user intent, and analyzing retrieval history data.
[0137] Step S4200: transferring the search content and target knowledge base information to the target information search interface;
[0138] It should be noted that the purpose of passing the search content and target knowledge base information to the target information search interface is to pass the user's specific search needs to the selected search interface. The search content refers to the specific words or phrases queried by the user, and the target knowledge base information includes the identification, category, etc. of the knowledge base. This information will guide the interface to search in the correct knowledge base. In this embodiment, the system can format the search content and target knowledge base information to ensure that they meet the input requirements of the interface. Then, the system passes this information as parameters to the target information search interface to trigger the search process.
[0139] For example, if a user wants to query methods about "computer radiation protection", the system will pass "computer radiation protection" as the search content and "health and safety guidelines" as the target knowledge base information into the corresponding search interface.
[0140] Step S4300: calling at least one target knowledge base in the local vector knowledge base according to the target knowledge base information through the target information retrieval interface;
[0141] It should be noted that in the process of actually accessing the knowledge base and extracting information, the target information retrieval interface will call the corresponding part of the local vector knowledge base according to the incoming target knowledge base information. The local vector knowledge base is a collection of preprocessed and vectorized documents that supports efficient similarity retrieval. The interface can quickly locate relevant documents or document paragraphs based on the retrieval content by interacting with the knowledge base.
[0142] Step S4400: performing information search in the target knowledge base according to the search content to obtain a target search information set.
[0143] It should be noted that in the final information retrieval and result generation stage, the system will use the target information retrieval interface to perform retrieval operations in the target knowledge base, and filter out the most relevant information based on the similarity between the retrieval content and the documents in the knowledge base. The system can use algorithms such as cosine similarity to calculate the similarity between the retrieval content and the document vectors in the knowledge base, and then sort the retrieval results according to the similarity score, and select the results with higher scores (higher than the preset threshold) as the target retrieval information, thereby forming the target retrieval information set.
[0144] It should be noted that in this solution, the cosine similarity can be used to quantify the similarity between the retrieval content (query vector) and the document vector in the knowledge base. The formula for calculating cosine similarity is the dot product of two vectors divided by the product of their moduli (or Euclidean norm). After calculating the cosine similarity of all document vectors and the query vector, the results are sorted from high to low according to the similarity score. By setting a similarity threshold, only documents with a similarity score higher than this threshold will be considered relevant and thus selected into the target retrieval information set. The system retrieves all documents in the knowledge base, calculates the cosine similarity between each document and the query vector, and sorts the results. Information that meets the similarity score conditions is selected into the target retrieval information set, and the system will display the content of this document to the user.
[0145] In this way, the system can effectively retrieve the most relevant information to the user's query from a large number of documents and provide the user with the most valuable answers.
[0146] In a feasible implementation manner, step S4400 may include steps S4410 to S4450:
[0147] Step S4410: Calculate the first similarity between the search content and the document attribute content in the target knowledge base according to the cosine similarity algorithm;
[0148] Step S4420: Determine the document attribute content with a similarity greater than a preset threshold as the first pending target information, and obtain a first pending target information set;
[0149] Step S4430: extracting text features of the first undetermined target information according to a preset rearrangement model and rearrangement evaluation strategy;
[0150] Step S4440: calculating a second similarity between the search content and the first target information to be determined according to the text feature;
[0151] Step S4450: Rearrange the first pending target information set based on the second similarity to obtain a target retrieval information set.
[0152] It should be noted that, refer to Figure 4 , Figure 4The following is a schematic diagram of the recall, rearrangement and response content output process of this embodiment. According to the previously determined search content, the corresponding knowledge base is searched, and the similarity between the specific intent of the user input obtained after intent recognition and the content in the knowledge base is calculated based on the cosine similarity. After the preliminary search, the preliminary search result list of the TOP N pieces of knowledge content with a similarity score greater than a threshold (the threshold can be configured according to the actual topic) is recalled. The result list returned by the preliminary search is combined with the rerank model and uses more complex evaluation criteria to extract the text content, behavior and other features in the preliminary search result list again, and the result lists returned for the first time are recalculated and ranked by scores, so as to increase the priority of the content with higher relevance and improve the ranking of the most relevant or best-quality results.
[0153] In addition, it is important to note that the above process aims to retrieve the documents most relevant to the user's query from the target knowledge base and sort them effectively. This process involves not only preliminary similarity calculations, but also in-depth analysis and re-ranking of the search results to ensure that the information set provided to the user is both accurate and comprehensive.
[0154] First, the system uses the cosine similarity algorithm to measure the similarity between the retrieved content and the vector representation of each document in the knowledge base. Cosine similarity is a method to measure the consistency of two vectors in direction, with a value ranging from -1 (completely opposite) to 1 (exactly the same), which is used here to quantify the similarity between the query vector and the document vector.
[0155] Next, the system regards those documents whose similarity with the search content exceeds the preset threshold as the first target information to be determined, forming the first target information set to be determined. This threshold is an empirical value used to preliminarily screen out potentially relevant documents to narrow the scope of subsequent processing.
[0156] Subsequently, the system extracts the text features of each document in the first target information set according to the preset rearrangement model and evaluation strategy, which may include the document's length, keyword density, sentence structure, etc., which helps to gain a deeper understanding of the document's content and quality.
[0157] Furthermore, the system recalculates the second similarity between the search content and the first target information to be determined based on these text features. The purpose of this step is to further refine and refine the relevance score of the document in order to achieve a better search effect.
[0158] Finally, based on the calculation result of the second similarity, the system re-arranges the first pending target information set to form the final target retrieval information set. This step ensures that the most relevant and valuable information is at the front, thereby improving the efficiency and satisfaction of user retrieval.
[0159] In addition, it should be noted that the idea of implementing this solution is to adapt to the complexity and diversity of user queries by gradually refining and optimizing the search results. By introducing a re-ranking mechanism, the system can dynamically adjust the ranking of search results to better meet the personalized needs of users. At the same time, this also provides space for continuous learning and optimization of the system, and improves the accuracy and efficiency of the search algorithm through continuous feedback and adjustment.
[0160] For example, a user inputs a piece of information to be retrieved. After the information is parsed into a query vector, the system first calculates the similarity between the query vector and all document vectors in the knowledge base through the cosine similarity algorithm. Then, the system selects documents with a similarity higher than the set threshold, such as 0.7, and extracts the text features of these documents, such as keyword frequency, document structure, etc. Next, the system performs a second round of similarity calculations based on these features to obtain a more accurate relevance score. Finally, the system re-arranges the documents based on these scores to ensure that the most relevant documents are at the top of the target retrieval information set, thereby providing users with the most valuable information. In this way, the system can not only quickly respond to users' query requests, but also provide high-quality retrieval results and enhance the user's retrieval experience.
[0161] In a feasible implementation manner, the method may further include steps S5100 to S5300:
[0162] Step S5100: Obtain pre-configured content output format information;
[0163] Step S5200: if the content output format is the original text output format, returning the original text information of each target search information in the target search information set, the original text information including document source attributes, information location tags and content reference coordinates;
[0164] Step S5300: If the content output format is a fixed output format, then a type output relationship mapping of the target retrieval information set is established based on the fixed output format and returned, wherein the type output relationship mapping includes a curve graph mapping and a list mapping.
[0165] It should be noted that the core goal of the content response output process is to effectively meet the user's information needs. In this embodiment, the information response format is divided into two forms: the original text-related information content is directly returned or the information data is returned in a fixed type format according to the user's needs.
[0166] Among them, the direct return of original information content directly returns the corresponding original information, presenting the information in the most direct and concise way. The returned content includes the source attributes of the document, the information location meta tags, and the precise content reference coordinates of the information in the document. These returned attributes define the type of information in detail, such as distinguishing different structures such as title paragraphs, structured tables, and free text. This form emphasizes the precise matching and relevance of the content.
[0167] According to the user's needs, the fixed-type format returned information data has two parts. The first part is to establish a relationship mapping of type output, and output the type after relationship mapping according to the user input. Including: curve charts, lists and other information, the second part is to configure the prompt word project. Combined with the retrieval of the TOP N pieces of information, the user can customize the type sample of the content to be returned, and then interact with the type sample and the TOP N pieces of information and the big model. The big model combines the format content in the prompt word according to the prompt word entered by the user and returns it to the user, such as a table, JSON data or business card layout content. The returned content also includes the source attributes of the document, the information location meta tag, and the precise content reference coordinates of the information in the document.
[0168] In addition, it should be noted that the process aims to display the search results in the most appropriate way according to the user's preset needs or preferences, starting from obtaining the output format information configured by the user and ending with presenting the information in a user-friendly manner, ensuring that the user can obtain the required knowledge efficiently and intuitively.
[0169] The system first obtains the pre-configured content output format information, which is the basis for the user to interact with the system. The purpose of this step is to identify the user's specific needs and provide a basis for subsequent information customization and display.
[0170] If the user selects the original text output format, the system will directly extract and return the original text information of each target search information from the target search information set. The display of the original text information includes the source attributes of the document, such as the author and the year of publication; information location tags, such as chapter titles and paragraph numbers; and content reference coordinates, such as page numbers and specific locations in the document. This output method retains the originality and integrity of the information and is suitable for scenarios where users need to conduct in-depth research or cite original materials.
[0171] In addition, it should be noted that if the user selects a fixed output format, the system will establish a type output relationship mapping of the target retrieval information set based on the format. This mapping includes graph mapping and list mapping, etc., which display complex data or information in a graphical or tabular form, enhancing the readability and comprehensibility of the information. For example, for statistical data or comparative analysis, graph mapping can intuitively display the trend of data changes over time, while list mapping helps users quickly compare key indicators of different projects.
[0172] Through the implementation of this solution, the system can flexibly adapt to the needs of different users, whether scholars who need to study original documents in detail or decision makers who need to quickly grasp the data overview, can obtain information presentation that meets their needs. This not only improves the user experience, but also enhances the applicability and effectiveness of the intelligent question-answering system in a variety of application scenarios.
[0173] In addition, it should be noted that the returned information described above contains the location information of the document, from which specific information is extracted and traced back to the specific location of the original text source based on the characteristic information. The structure of the specific information in the response result is as follows:
[0174] content:
[0175] {source:"text source",
[0176] text: "information content",
[0177] type: "text type identifier",
[0178] page: "page number",
[0179] location: "text coordinates"
[0180] }
[0181] Type understands the structure and function of information in the original context, page locates the specific page number of the text source, and location identifies the specific and precise position coordinates of the information content on the page where the text source is located. This information forms the basis for content tracing. Through visual interactive tools, you can directly jump to the location of the content in the text source and highlight it, which simplifies the user's operation of verifying the accuracy of the returned content based on the original text and improves retrieval efficiency.
[0182] This embodiment provides an information retrieval method, which determines the corresponding target information retrieval interface according to the subject query mode; transmits the search content and target knowledge base information to the target information retrieval interface; calls at least one target knowledge base in the local vector knowledge base according to the target knowledge base information through the target information retrieval interface; performs information search in the target knowledge base according to the search content to obtain a target retrieval information set. Through the above scheme, the corresponding target information retrieval interface is determined specifically through the subject query mode, and information search is performed in the target knowledge base according to the search content to obtain a target retrieval information set, thereby improving the accuracy and efficiency of information retrieval.
[0183] For example, to help understand the implementation process of the information retrieval method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 5 , Figure 5 A brief flowchart of an information retrieval method is provided, specifically:
[0184] The information retrieval method of the present application starts with receiving random complex information input, which may come from different channels with different complexities and may contain ambiguous or ambiguous language structures. The system first uses natural language processing technology to deeply analyze user input through the steps of intent recognition, information extraction and classification, identify the user's true intent, and extract key information such as keywords and phrases, and then classify the user's query.
[0185] Subsequently, the system determines the direction of the target search based on the identified query topic and searches the knowledge base. This process involves matching with the preset mapping framework in the knowledge base to ensure that the system can select the appropriate knowledge base for retrieval based on the specific query intent. The system calls the corresponding knowledge base retrieval interface and uses algorithms such as cosine similarity to retrieve information in the local vector knowledge base to quickly locate the documents or information fragments most relevant to the user's query.
[0186] After the search is completed, the system enters the response content output stage. In this stage, the system determines how to display the search results based on the output format information pre-configured by the user. If the user selects the original output format, the system will return the original information including the document source attributes, information location tags and content reference coordinates; if the user selects a fixed output format, the system will establish an output relationship mapping based on the format, such as a curve mapping or a list mapping, and return the formatted information.
[0187] Finally, the system provides an information backtracking function, which allows users to quickly locate the specific location of the original text based on the returned information and verify the contextual accuracy of the retrieved content. This function not only improves users' trust in the retrieval results, but also enhances the reliability and transparency of the system output.
[0188] The design idea of the entire process is to improve the efficiency and accuracy of retrieval through automated and intelligent processing, while providing flexible output configuration to meet the information display needs of different users. This solution not only improves the user experience, but also provides an innovative solution for the fields of knowledge management and information retrieval.
[0189] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the information retrieval method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0190] The present application provides an information retrieval device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the information retrieval method in the above-mentioned embodiment one.
[0191] Reference below Figure 6 , which shows a schematic diagram of the structure of an information retrieval device suitable for implementing the embodiment of the present application. The information retrieval device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The information retrieval device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0192] like Figure 6As shown, the information retrieval device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the information retrieval device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. Communication device 1009 can allow information retrieval device to communicate with other devices wirelessly or wired to exchange data. Although the figure shows an information retrieval device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0193] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0194] The information retrieval device provided by the present application adopts the information retrieval method in the above embodiment to solve the technical problem of information retrieval. Compared with the prior art, the beneficial effects of the information retrieval device provided by the present application are the same as the beneficial effects of the information retrieval method provided by the above embodiment, and other technical features in the information retrieval device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0195] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0196] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0197] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the information retrieval method in the above-mentioned embodiment.
[0198] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0199] The computer-readable storage medium may be included in the information retrieval device; or may exist independently without being assembled into the information retrieval device.
[0200] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the information retrieval device, the information retrieval device: generates a local vector knowledge base based on pre-acquired professional knowledge documents; in response to the input of random complex information, performs intent analysis on the random complex information through an intent recognition model to obtain key intent information; determines a subject query pattern based on the key intent information; calls a target information retrieval interface based on the subject query pattern, searches the target knowledge base in the local vector knowledge base, and obtains a target retrieval information set.
[0201] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0202] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0203] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0204] The readable storage medium provided in the present application is a computer-readable storage medium, and the computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned information retrieval method. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the information retrieval method provided in the above-mentioned embodiment, and will not be described in detail here.
[0205] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned information retrieval method when executed by a processor.
[0206] The computer program product provided by this application can solve the technical problem of information retrieval. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the information retrieval method provided by the above embodiment, which will not be repeated here.
[0207] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. An information retrieval method, It is characterized in that The method comprises: Generate a local vector knowledge base based on pre-acquired expertise documents; In response to input of random complex information, performing intent analysis on the random complex information through an intent recognition model to obtain key intent information; Determine a subject query mode according to the key intent information; The target information retrieval interface is called according to the subject query mode, and the target knowledge base is searched in the local vector knowledge base to obtain a target retrieval information set.
2. The method according to claim 1, It is characterized in that The step of generating a local vector knowledge base based on the pre-acquired professional knowledge documents includes: In response to the manual preprocessing instruction of the document, the document attribute content input by the front end is obtained and uploaded to the preset knowledge document library; In response to the document automatic preprocessing instruction, parsing the pre-acquired professional knowledge document to obtain the document knowledge content; Eliminating abnormal contents and dividing paragraph contents of the document knowledge content to obtain document attribute contents; The document attribute content is vectorized and stored in a preset vector database to obtain a local vector knowledge base.
3. The method according to claim 1, It is characterized in that The intention recognition model has a built-in sentence recognition strategy and an emotional color recognition strategy. In response to the input of random complex information, the step of performing intention analysis on the random complex information through the intention recognition model to obtain key intention information includes: In response to input of random complex information, the random complex information is parsed by using the sentence recognition strategy and the emotional color recognition strategy to obtain sentence intention information; Parsing information keywords and information key phrases in the sentence intention information; Key intent information is generated based on the information keywords and the information key phrases.
4. The method as claimed in claim 3, It is characterized in that The step of determining the subject query mode according to the key intention information comprises: parsing information keywords and information key phrases in the key intent information; Determining the information intent type according to the information keywords and information key phrases; A target search topic is determined according to the information intent type, and a subject query mode corresponding to the target search topic is determined, wherein the subject query mode includes search content and target knowledge base information.
5. The method according to claim 2, It is characterized in that The step of calling the target information retrieval interface according to the subject query mode, searching the target knowledge base in the local vector knowledge base, and obtaining the target retrieval information set comprises: Determine the corresponding target information retrieval interface according to the subject query mode; Transmitting the search content and target knowledge base information into the target information search interface; Calling at least one target knowledge base in the local vector knowledge base according to the target knowledge base information through the target information retrieval interface; Information retrieval is performed in the target knowledge base according to the retrieval content to obtain a target retrieval information set.
6. The method according to claim 5, It is characterized in that The step of performing information retrieval in the target knowledge base according to the retrieval content to obtain a target retrieval information set comprises: Calculate the first similarity between the search content and the document attribute content in the target knowledge base according to the cosine similarity algorithm; Determine the document attribute content whose similarity is greater than a preset threshold as the first pending target information, and obtain a first pending target information set; Extracting text features of the first undetermined target information according to a preset rearrangement model and rearrangement evaluation strategy; Calculating a second similarity between the search content and the first target information to be determined according to the text feature; The first pending target information set is rearranged based on the second similarity to obtain a target retrieval information set.
7. The method according to claim 1, It is characterized in that The method further comprises: Get pre-configured content output format information; If the content output format is the original text output format, returning the original text information of each target search information in the target search information set, wherein the original text information includes document source attributes, information location tags and content reference coordinates; If the content output format is a fixed output format, a type output relationship mapping of the target search information set is established based on the fixed output format and returned, wherein the type output relationship mapping includes a curve graph mapping and a list mapping.
8. An information retrieval device, It is characterized in that The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the information retrieval method according to any one of claims 1 to 7.
9. A storage medium, It is characterized in that The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the information retrieval method according to any one of claims 1 to 7 are implemented.
10. A computer program product, It is characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the information retrieval method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Message processing method and device
CN111046151A
Information search method, equipment, storage medium and device
CN117972183A
Intelligent question and answer method and device, electronic equipment and readable storage medium
CN118113851A
Cited By
Document processing method, knowledge retrieval method and equipment for multiple knowledge bases
CN119396959A
Knowledge question response method and device, electronic equipment and storage medium
CN119848224A
Retrieval enhancement generation method and system based on large language model
CN120045750A
A retrieval-augmented generation method and system based on a large language model
CN120045750B
Knowledge enhancement retrieval generation method, device and system for multivariate data fusion
CN120144720A
