Information retrieval method and device, electronic equipment and storage medium
By recognizing the search intention, identifying the knowledge field and identifying the search intention time of the original search text, the problem of low search accuracy in the prior art is solved, and high-precision information retrieval is achieved.
Patent Information
- Application Number
- CN202411955151.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-05-02
AI Technical Summary
In existing information retrieval technologies, the search formula may be ambiguity, incomplete or incorrect in expression, resulting in low search accuracy.
By obtaining the original search text, search intention recognition, knowledge field recognition and search intention time recognition are carried out, and multi-angle refinement of search intentions is clarified to improve the accuracy of the search method.
It realizes the clarity of the true search intention of the original search text and improves the accuracy of information retrieval.
Smart Images

Figure CN119917640A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information retrieval technology, and in particular to an information retrieval method and device, an electronic device and a storage medium. Background Art
[0002] Information retrieval technology is used to retrieve relevant information items from the database according to the search formula. In database retrieval, the search results are positively correlated with the accuracy of the search formula. Since the search formula may be ambiguous, incomplete or incorrectly expressed, the search accuracy is not high. Therefore, how to improve the accuracy of information retrieval has become an urgent problem to be solved. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to propose an information retrieval method and device, an electronic device and a storage medium, aiming to improve the accuracy of information retrieval.
[0004] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes an information retrieval method, the method comprising:
[0005] Get the original search text;
[0006] Performing search intent recognition on the original search text to obtain target search intent data;
[0007] Performing knowledge domain identification on the target retrieval intention data to obtain a knowledge domain category;
[0008] Performing retrieval intention time identification on the target retrieval intention data to obtain the retrieval intention time;
[0009] Information retrieval is performed on the target retrieval intention data according to the knowledge domain category and the retrieval intention time.
[0010] In some embodiments, the performing search intent recognition on the original search text to obtain target search intent data includes:
[0011] Standardizing the format of the original search text to obtain an initial search text;
[0012] Performing question splitting on the initial search text to obtain candidate search texts;
[0013] The candidate search text is disambiguated to obtain the target search intent data.
[0014] In some embodiments, the step of splitting the initial search text into questions to obtain candidate search texts includes:
[0015] Performing grammar recognition on the initial search text to obtain a text subject and a text predicate of the initial search text;
[0016] Performing text parallel structure recognition on the initial search text to obtain parallel structure information of the initial search text;
[0017] The initial search text is split into questions according to the text subject, the text predicate and the parallel structure information to obtain the candidate search text.
[0018] In some embodiments, the step of eliminating ambiguity from the candidate search text to obtain the target search intent data includes:
[0019] Performing input error correction on the candidate search text to obtain a selected search text;
[0020] The selected search text is subjected to reference resolution to obtain the target search intent data.
[0021] In some embodiments, the step of normalizing the format of the original search text to obtain the initial search text includes:
[0022] removing noise from the original search text to obtain a first search text;
[0023] Performing symbol processing on the first search text to obtain a second search text;
[0024] The second search text is subjected to text normalization to obtain the initial search text.
[0025] In some embodiments, performing information retrieval on the target retrieval intention data according to the knowledge domain category and the retrieval intention time includes:
[0026] If the knowledge domain category is within the preset domain category and / or the search intention time is not within the preset time segment, information retrieval is performed on the target search intention data according to the knowledge domain category, the search intention time and a preset external database;
[0027] If the knowledge domain category is not in the preset domain category and the search intention time is within the preset time period, information search is performed on the target search intention data according to a preset local database.
[0028] In some embodiments, performing information retrieval on the target retrieval intention data according to the knowledge domain category, the retrieval intention time and a preset external database includes:
[0029] Screening the external database according to the knowledge domain category to obtain a target knowledge database;
[0030] Screening the target knowledge database according to the search intention time to obtain target knowledge data;
[0031] Information retrieval is performed on the target retrieval intention data according to the target knowledge data.
[0032] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides an information retrieval device, the device comprising:
[0033] A text acquisition module is used to acquire the original search text;
[0034] An intention recognition module is used to perform search intention recognition on the original search text to obtain target search intention data;
[0035] A domain identification module is used to identify the knowledge domain of the target search intention data to obtain the knowledge domain category;
[0036] A time identification module, used to identify the retrieval intention time of the target retrieval intention data to obtain the retrieval intention time;
[0037] An information retrieval module is used to perform information retrieval on the target retrieval intention data according to the knowledge domain category and the retrieval intention time.
[0038] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0039] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0040] The present application proposes an information retrieval method and device, an electronic device and a storage medium, which obtain an original search text, then perform search intent recognition on the original search text to obtain target search intent data, then perform knowledge field recognition on the target search intent data to obtain knowledge field categories, and at the same time perform search intent time recognition on the target search intent data to obtain search intent time, thereby refining the original search text from multiple angles, clarifying the true search intent of the original search text, and improving the accuracy of subsequent search formulas. Finally, information retrieval is performed on the target search intent data according to the knowledge field category and the search intent time, thereby achieving high-precision information retrieval. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a flow chart of the information retrieval method provided in an embodiment of the present application;
[0042] Figure 2 yes Figure 1 Flow chart of step S102 in FIG.
[0043] Figure 3 yes Figure 2 Flow chart of step S201 in FIG.
[0044] Figure 4 yes Figure 2 Flow chart of step S202 in FIG.
[0045] Figure 5 yes Figure 2 Flow chart of step S203 in FIG.
[0046] Figure 6 yes Figure 1 Flow chart of step S105 in FIG.
[0047] Figure 7 yes Figure 6 Flow chart of step S601 in FIG.
[0048] Figure 8 is a schematic diagram of the structure of an information retrieval device provided in an embodiment of the present application;
[0049] Fig. 9 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0050] Fig.10 It is a flowchart of the information retrieval method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0052] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0054] First, some nouns involved in this application are analyzed:
[0055] Retrieval-augmented generation (RAG): is a technique that uses pre-retrieved relevant information to enhance the performance of the generative model. Retrieval-augmented generation is an application in the field of natural language processing and is part of artificial intelligence technology. This technology combines the methods of information retrieval and text generation by retrieving relevant content from large-scale data sources, which is then used to guide and improve the model's text generation capabilities. Main applications include but are not limited to dialogue systems, question answering, content recommendations, and any scenario that requires combining external knowledge to generate more accurate, relevant, or innovative text. Retrieval-augmented generation can not only improve the relevance and novelty of the generated text, but also enhance the model's depth of understanding of complex topics by providing more background information.
[0056] Coreference resolution: A technique in natural language processing that is used to identify various expressions in a text that refer to the same entity, ensuring the coherence and consistency of the language. Coreference resolution belongs to the field of artificial intelligence, an important branch at the intersection of computer science and linguistics, and is often regarded as a core component of computational linguistics. The technique mainly involves identifying and parsing elements such as nouns, pronouns, and demonstratives in text, such as determining whether "she," "car," and "the car" refer to the same object. Coreference resolution plays a key role in a variety of applications such as information extraction, text summarization, and dialogue systems, and can help the system better understand the structure and meaning of the text. Through precise coreference resolution, computers can simulate the depth of human understanding of language, handle complex semantic relationships, and play an important role in multiple technical fields such as question-answering systems, machine translation, and sentiment analysis.
[0057] Textual parallelism: refers to the use of similar grammatical structures, expressions or language elements in a text to enhance the expression effect of information and the coherence of content. Textual parallelism belongs to the research scope of linguistics, and is also an important research object in the field of natural language processing, which spans the interdisciplinary field of computer science and linguistics. In natural language processing, the recognition of textual parallelism can help improve the accuracy of machine translation, enhance the naturalness of text generation, and optimize the expressive ability of language understanding systems. Common applications include text comparison analysis, style recognition, semantic analysis, etc. By identifying and utilizing the parallel structure of text, computer programs can more accurately parse and generate language expressions with complex structures, thereby providing support in technical fields such as text summarization, machine translation, and speech recognition.
[0058] Ambiguity resolution: It is a technology in natural language processing that aims to identify and resolve ambiguous phenomena in language to ensure semantic clarity and accuracy. Ambiguity resolution is a branch of artificial intelligence, especially the intersection of computer science and linguistics, and is often regarded as a core component of computational linguistics. Ambiguity resolution has a wide range of applications, including machine translation, speech recognition, information retrieval, sentiment analysis and other technical fields. It helps the system to more effectively understand semantics and process information by accurately parsing ambiguous information in text. In natural language processing, ambiguity resolution not only improves the quality of text analysis, but also enhances the ability of machines to understand and generate language.
[0059] Information retrieval technology is used to retrieve relevant information items from the database according to the search formula. In database retrieval, the search results are positively correlated with the accuracy of the search formula. Since the search formula may be ambiguous, incomplete or incorrectly expressed, the search accuracy is not high. Therefore, how to improve the accuracy of information retrieval has become an urgent problem to be solved.
[0060] Based on this, the embodiments of the present application provide an information retrieval method and device, an electronic device and a storage medium, aiming to improve the accuracy of information retrieval.
[0061] An information retrieval method and device, electronic device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the information retrieval method in the embodiments of the present application is described.
[0062] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0063] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0064] The information retrieval method provided in the embodiment of the present application relates to the field of information retrieval technology. The information retrieval method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the information retrieval method, etc., but is not limited to the above forms.
[0065] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0066] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0067] Figure 1 is an optional flowchart of the information retrieval method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S105.
[0068] Step S101, obtaining the original search text;
[0069] Step S102, performing search intent recognition on the original search text to obtain target search intent data;
[0070] Step S103, performing knowledge domain identification on the target search intent data to obtain a knowledge domain category;
[0071] Step S104, performing retrieval intention time identification on the target retrieval intention data to obtain the retrieval intention time;
[0072] Step S105, performing information retrieval on the target retrieval intention data according to the knowledge domain category and the retrieval intention time.
[0073] Steps S101 to S105 shown in the embodiment of the present application are obtained by obtaining the original search text, then performing search intent recognition on the original search text to obtain target search intent data, then performing knowledge field recognition on the target search intent data to obtain knowledge field categories, and at the same time performing search intent time recognition on the target search intent data to obtain search intent time, thereby refining the original search text from multiple angles, clarifying the true search intent of the original search text, and improving the accuracy of subsequent search formulas. Finally, information retrieval is performed on the target search intent data according to the knowledge field categories and search intent time, thereby achieving high-precision information retrieval.
[0074] In step S101 of some embodiments, the original search text is the search term initially input by the user of the information retrieval system or the system without any automatic processing or modification, such as "human beings who have been to outer space and returned to land before 1985". The acquisition method can be remote transmission or local transmission, which is not specifically limited in this application.
[0075] See also Figure 2 In some embodiments, step S102 may include but is not limited to steps S201 to S203:
[0076] Step S201, standardizing the format of the original search text to obtain an initial search text;
[0077] Step S202, splitting the initial search text into questions to obtain candidate search texts;
[0078] Step S203, disambiguating the candidate search text to obtain target search intent data.
[0079] Steps S201 to S203 shown in the embodiment of the present application perform format standardization, question splitting and ambiguity elimination on the text in sequence, thereby avoiding potential format problems in the search text, providing a standardized search text for the subsequent search, and then splitting the standardized search text into questions, thereby splitting the questions into multiple sub-questions with clear search intents, avoiding multiple search intents in one search formula, and clarifying the requirements for the search formula. Finally, potential ambiguities in the search text are eliminated to obtain a highly accurate search text, i.e., target search intent data, thereby improving the accuracy of the search formula and providing a search formula basis for subsequent accurate information retrieval.
[0080] See also Figure 3 In some embodiments, step S201 may include but is not limited to steps S301 to S303:
[0081] Step S301, removing noise from the original search text to obtain a first search text;
[0082] Step S302, symbol processing is performed on the first search text to obtain a second search text;
[0083] Step S303: normalize the second search text to obtain an initial search text.
[0084] Steps S301 to S303 shown in the embodiment of the present application improve the text quality of the search text by performing noise removal, symbol processing and text standardization in sequence, eliminate irrelevant interference information, make the search text more concise and accurate, avoid search deviations caused by symbol differences, unify text formats and expressions, and finally obtain an initial search text with a standard format.
[0085] In step S301 of some embodiments, noise removal refers to identifying and removing those contents in the original search text that are not of substantial help to information retrieval and interfere with the accuracy and efficiency of retrieval during text processing, such as the original search text may contain unnecessary punctuation, emoticons, garbled characters, HTML characters or other characters, so as to obtain a text with more core value and purer, that is, the first search text. In one embodiment, noise removal is performed on the original search text based on a preset prompt and a pre-trained large language model, specifically, the prompt and the original search text are input into the large language model together for noise removal to obtain the first search text.
[0086] In step S302 of some embodiments, symbol processing refers to the normalization operation performed on various symbols in the first search text in the text processing process, including but not limited to converting full-width symbols into half-width symbols, unifying the writing form of symbols, and removing redundant or irrelevant symbols, so as to obtain a text that is more standardized in format and semantic expression, namely, the second search text. In one embodiment, the original search text is symbolized based on a preset prompt and a pre-trained large language model, specifically, the prompt and the first search text are input into the large language model together for noise removal to obtain the second search text.
[0087] In step S303 of some embodiments, text normalization is to convert the uppercase and lowercase letters of English characters in the text into uniform lowercase letters, for example, simplifying "Hello" to "hello", and using the text after the character conversion as the initial search text.
[0088] See also Figure 4 In some embodiments, step S202 may include but is not limited to steps S401 to S403:
[0089] Step S401, performing grammar recognition on the initial search text to obtain the text subject and text predicate of the initial search text;
[0090] Step S402, performing text parallel structure recognition on the initial search text to obtain parallel structure information of the initial search text;
[0091] Step S403, splitting the initial search text into questions according to the text subject, text predicate and parallel structure information to obtain candidate search texts.
[0092] Steps S401 to S403 shown in the embodiment of the present application perform grammatical recognition on the initial search text to obtain the text subject and text predicate of the initial search text, clarify the grammatical elements of the text, and then perform text parallel structure recognition on the initial search text to obtain the parallel structure information of the initial search text. Finally, the initial search text is split into questions according to the text subject, text predicate and parallel structure information to obtain candidate search texts, thereby refining the complex search requirements into multiple candidate search texts, so that information can be matched from different angles later, thereby improving the search effect.
[0093] In step S401 of some embodiments, grammar recognition is to analyze the initial search text using natural language processing technology and grammar analysis rules to determine the grammatical role of each component in the text. For example, if the initial search text is "How do Zhang San and Li Si manage a project?", after grammar recognition, the text subjects are "Zhang San" and "Li Si", and the text predicate is "How to manage a project". In one embodiment, grammar recognition is performed on the initial search text based on a preset prompt and a pre-trained large language model, specifically, the prompt and the initial search text are input into the large language model to obtain the text subject and text predicate of the initial search text.
[0094] In step S402 of some embodiments, parallel structure recognition refers to analyzing the parallel structure of the initial search text in terms of sentences. For example, if the initial search text is "how is the relationship between the search accuracy and the standardization degree of the search formula and the time limit of the search formula presented", the parallel structure recognizes that "the standardization degree of the search formula" and "the time limit of the search formula" are parallel structure relationships and are at the same level. In one embodiment, the preset prompt and the initial search text are input into the large language model to obtain the parallel structure information of the initial search text.
[0095] In step S403 of some embodiments, question splitting is to split the initial search text into multiple sub-questions. For example, the initial search text is "How do Zhang San and Li Si determine the relationship between the search accuracy and the degree of standardization of the search formula, and the time limit of the search formula", the text subjects are "Zhang San" and "Li Si", the text predicate is "determine", the parallel structure information includes "Zhang San" and "Li Si", "the degree of standardization of the search formula" and "the time limit of the search formula", and the initial search text, the text subject, the text predicate, the parallel structure information and the preset prompt are input into the large language model for question splitting, and four sub-questions are obtained, namely, "How does Zhang San determine the relationship between the search accuracy and the degree of standardization of the search formula", "How does Zhang San determine the relationship between the search accuracy and the time limit of the search formula", "How does Li Si determine the relationship between the search accuracy and the degree of standardization of the search formula" and "How does Li Si determine the relationship between the search accuracy and the time limit of the search formula", that is, candidate search texts.
[0096] See also Figure 5 In some embodiments, step S203 includes but is not limited to steps S501 to S502:
[0097] Step S501, correcting the input of the candidate search text to obtain the selected search text;
[0098] Step S502, performing reference resolution on the selected search text to obtain target search intent data.
[0099] In steps S501 to S502 shown in the embodiment of the present application, input error correction is performed on the candidate search text to obtain the selected search text, and then the selected search text is subjected to reference resolution to obtain the target search intent data, thereby correcting problems such as spelling errors or inappropriate wording in the search text, avoiding search result deviations due to incorrect input, and at the same time clarifying the objects referred to by pronouns in the text, eliminating semantic ambiguity and making the search intent clearer and more complete, thereby improving the expression accuracy of the search text, thereby improving the accuracy of subsequent searches.
[0100] In step S501 of some embodiments, input error correction refers to checking and correcting potential spelling errors or typing errors in candidate search texts, such as correcting "recieve" to "receive". In one embodiment, a preset prompt and candidate search texts are input into a pre-trained large language model to obtain a selected search text.
[0101] In step S502 of some embodiments, reference resolution is to identify and determine the specific objects actually pointed to by pronouns such as "he", "she", "it", "this", "that", and other words or phrases with referential properties in the selected search text, and at the same time identify the specific objects actually pointed to by words or phrases with referential properties such as nicknames or abbreviations, so as to ensure that the question is clearly stated. In one embodiment, the preset prompt and the selected search text are input into a pre-trained large language model to obtain the target search intent data.
[0102] In step S103 of some embodiments, knowledge domain identification refers to identifying the knowledge domain of the target retrieval intention data. For example, the target retrieval intention data includes "internal structure of brushless motor". First, the target retrieval intention data is keyword filtered to obtain "brushless motor" and "internal structure". Then, the knowledge domain is judged based on "brushless motor" and determined to be "mechanical field", that is, the knowledge domain category is "mechanical field".
[0103] In step S104 of some embodiments, retrieval intention time identification is to extract retrieval intention time from target retrieval intention data, specifically to clarify the time-related information in the target retrieval intention data. For example, if the target retrieval intention data is "new electric vehicles to be launched in 2024", the retrieval intention time "January 1, 2024 to December 31, 2024" is obtained after retrieval intention time identification.
[0104] In one embodiment, the target retrieval intent data is "recent weather changes", and the retrieval intent time is identified as "recently", then the specific time period of "recently" is determined according to the preset matching rules. It should be noted that different matching rules can be set in different scenarios, and this application does not make specific restrictions.
[0105] See also Figure 6 In some embodiments, step S105 includes but is not limited to steps S601 to S602:
[0106] Step S601, if the knowledge domain category is within the preset domain category and / or the search intention time is not within the preset time segment, information retrieval is performed on the target search intention data according to the knowledge domain category, the search intention time and the preset external database;
[0107] Step S602: if the knowledge domain category is not in the preset domain category and the search intention time is within the preset time segment, information search is performed on the target search intention data according to the preset local database.
[0108] In steps S601 to S602 shown in the embodiment of the present application, when the knowledge domain category is in the preset domain category and / or the search intention time is not in the preset time period, information retrieval is performed on the target search intention data according to the knowledge domain category, the search intention time and the preset external database; when the knowledge domain category is not in the preset domain category and the search intention time is in the preset time period, information retrieval is performed on the target search intention data according to the preset local database, thereby improving the speed and accuracy of the retrieval; when the information retrieval can be completed locally, the local database is used for retrieval, thereby improving the speed of the retrieval; when the information retrieval cannot be completed locally, an external database is used for online retrieval, thereby improving the accuracy of the retrieval.
[0109] In step S601 of some embodiments, the preset domain category is the sum of the categories of the knowledge domain recorded in the local database, and the preset time period is the total time period of the data recorded in the local database. When the knowledge domain category is in the preset domain category and / or the retrieval intention time is not within the preset time period, the local database cannot be used to perform information retrieval on the target retrieval intention data, that is, it is necessary to use an external database to perform information retrieval on the target retrieval intention data.
[0110] See also Figure 7 In some embodiments, step S601 may include but is not limited to steps S701 to S703:
[0111] Step S701, screening the external database according to the knowledge domain category to obtain the target knowledge database;
[0112] Step S702, screening the target knowledge database according to the search intention time to obtain target knowledge data;
[0113] Step S703: perform information retrieval on the target retrieval intention data according to the target knowledge data.
[0114] Steps S701 to S703 shown in the embodiment of the present application screen the external database according to the knowledge field category to obtain the target knowledge database, then screen the target knowledge database according to the retrieval intention time to obtain the target knowledge data, and finally perform information retrieval on the target retrieval intention data based on the target knowledge data, thereby achieving highly accurate information retrieval.
[0115] In step S701 of some embodiments, database screening is to screen the knowledge fields of the external database according to the knowledge field categories. The external database includes at least one database, and the contents recorded in each database are not completely consistent, that is, the knowledge fields of the data recorded in each database are not completely consistent. The same databases are screened out according to the knowledge field categories to obtain the target knowledge database.
[0116] In step S702 of some embodiments, the data in the target knowledge database includes time. The time of the data in the target database is filtered according to the retrieval intention time, and the data in the target database whose time matches the retrieval intention time is obtained to obtain the target knowledge data.
[0117] In step S703 of some embodiments, information retrieval is performed on the target retrieval intent data based on the target knowledge data, such as keyword matching, semantic retrieval, knowledge graph-based retrieval, or vector space model retrieval, etc., which is not specifically limited in this application.
[0118] In step S602 of some embodiments, information retrieval is performed on the target retrieval intent data according to a preset local database, such as keyword matching, semantic retrieval, knowledge graph-based retrieval or vector space model retrieval, etc., and this application does not impose specific restrictions.
[0119] See also Fig.10 In one embodiment, the original search text, i.e., query, inputted by the user is obtained, and then the original search text and the preset prompt word, i.e., prompt, are inputted into a pre-trained natural language model for format standardization and question splitting to obtain at least one candidate search text, i.e., query1, query2, and query3, and then the candidate search texts are disambiguated to obtain target search intent data, and then the target search intent data is subjected to knowledge domain identification, i.e., question classification. When the knowledge domain category is within the preset domain category and / or the search intent time is not within the preset time segment, information retrieval is performed on the target search intent data according to the knowledge domain category, the search intent time, and the preset external database. When the knowledge domain category is not within the preset domain category and the search intent time is within the preset time segment, information retrieval is performed on the target search intent data according to the preset local database.
[0120] See also Figure 8 The embodiment of the present application also provides an information retrieval device, which can implement the above-mentioned information retrieval method, and the device includes:
[0121] The text acquisition module 801 is used to acquire the original search text;
[0122] The intention recognition module 802 is used to perform search intention recognition on the original search text to obtain target search intention data;
[0123] The domain identification module 803 is used to identify the knowledge domain of the target search intention data and obtain the knowledge domain category;
[0124] A time identification module 804 is used to identify the time of the target search intention data to obtain the search intention time;
[0125] The information retrieval module 805 is used to perform information retrieval on the target retrieval intention data according to the knowledge domain category and the retrieval intention time.
[0126] The specific implementation of the information retrieval device is substantially the same as the specific implementation of the above-mentioned information retrieval method, and will not be described in detail here.
[0127] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above information retrieval method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0128] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0129] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0130] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the information retrieval method of the embodiment of this application;
[0131] Input / output interface 903, used to implement information input and output;
[0132] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0133] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0134] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0135] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned information retrieval method is implemented.
[0136] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0137] The information retrieval method, information retrieval device, electronic device and storage medium provided in the embodiments of the present application obtain an original search text, then perform search intent recognition on the original search text to obtain target search intent data, then perform knowledge field recognition on the target search intent data to obtain a knowledge field category, and at the same time perform search intent time recognition on the target search intent data to obtain a search intent time, thereby refining the original search text from multiple angles, clarifying the true search intent of the original search text, and improving the accuracy of subsequent search formulas. Finally, information retrieval is performed on the target search intent data according to the knowledge field category and the search intent time, thereby achieving high-precision information retrieval.
[0138] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0139] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0140] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0141] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0142] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0143] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0144] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0145] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0146] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0147] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0148] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. An information retrieval method, characterized in that: The method comprises: Get the original search text; Performing search intent recognition on the original search text to obtain target search intent data; Performing knowledge domain identification on the target retrieval intention data to obtain a knowledge domain category; Performing retrieval intention time identification on the target retrieval intention data to obtain the retrieval intention time; Information retrieval is performed on the target retrieval intention data according to the knowledge domain category and the retrieval intention time.
2. The method according to claim 1, characterized in that The step of performing search intent recognition on the original search text to obtain target search intent data includes: Standardizing the format of the original search text to obtain an initial search text; Performing question splitting on the initial search text to obtain candidate search texts; The candidate search text is disambiguated to obtain the target search intent data.
3. The method according to claim 2, characterized in that The step of splitting the initial search text into questions to obtain candidate search texts includes: Performing grammar recognition on the initial search text to obtain a text subject and a text predicate of the initial search text; Performing text parallel structure recognition on the initial search text to obtain parallel structure information of the initial search text; The initial search text is split into questions according to the text subject, the text predicate and the parallel structure information to obtain the candidate search text.
4. The method according to claim 2, characterized in that: The step of eliminating ambiguity of the candidate search text to obtain the target search intention data includes: Performing input error correction on the candidate search text to obtain a selected search text; The selected search text is subjected to reference resolution to obtain the target search intent data.
5. The method according to claim 2, characterized in that: The step of normalizing the format of the original search text to obtain the initial search text includes: removing noise from the original search text to obtain a first search text; Performing symbol processing on the first search text to obtain a second search text; The second search text is subjected to text normalization to obtain the initial search text.
6. The method according to any one of claims 1 to 5, characterized in that: The performing information retrieval on the target retrieval intention data according to the knowledge domain category and the retrieval intention time includes: If the knowledge domain category is within the preset domain category and / or the search intention time is not within the preset time segment, information retrieval is performed on the target search intention data according to the knowledge domain category, the search intention time and a preset external database; If the knowledge domain category is not in the preset domain category and the search intention time is within the preset time period, information search is performed on the target search intention data according to a preset local database.
7. The method according to claim 6, characterized in that The information retrieval of the target retrieval intention data according to the knowledge domain category, the retrieval intention time and a preset external database includes: Screening the external database according to the knowledge domain category to obtain a target knowledge database; Screening the target knowledge database according to the search intention time to obtain target knowledge data; Information retrieval is performed on the target retrieval intention data according to the target knowledge data.
8. An information retrieval device, characterized in that: The device comprises: A text acquisition module is used to acquire the original search text; An intention recognition module is used to perform search intention recognition on the original search text to obtain target search intention data; A domain identification module is used to identify the knowledge domain of the target search intention data to obtain the knowledge domain category; A time identification module, used to identify the retrieval intention time of the target retrieval intention data to obtain the retrieval intention time; An information retrieval module is used to perform information retrieval on the target retrieval intention data according to the knowledge domain category and the retrieval intention time.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the information retrieval method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the information retrieval method according to any one of claims 1 to 7 is implemented.