Information retrieval method and device and computer readable storage medium
By using the expansion information of the target problem information in the information retrieval, the problem of low answering correlation in the existing technology in the existing technology has been solved, and the efficient information retrieval in low accuracy is realized.
Patent Information
- Application Number
- CN202411235580.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2025-01-28
AI Technical Summary
Existing information retrieval plans require users to describe the problem information more accurately, otherwise it will lead to a low correlation between the answer information and the problem information.
After obtaining the target problem information, it is determined based on the information, such as the target intention information, generalization of problem information, target metadata information, target ternary group data information or complete problem information. Then determine the target answer information in the database based on these extended information.
With the low accuracy of the problem information, the use of information through expansion has significantly improved the correlation between the answer information and the problem information, and the efficiency of information retrieval.
Smart Images

Figure CN119377343A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to an information retrieval method, device and computer-readable storage medium. Background Art
[0002] In work or life, users often have questions, such as what food do mice like best. At this time, users can obtain answers to their questions through information retrieval.
[0003] An existing information retrieval solution is to perform word segmentation on the question information after obtaining the user's question information to obtain the segmentation results, and then determine the answer information in the database according to the segmentation results.
[0004] In this solution, the user is required to describe the question information more accurately. If the accuracy of the question information is low, the correlation between the determined answer information and the question information will be low. Summary of the invention
[0005] The present application provides an information retrieval method, device and computer-readable storage medium, which can improve the relevance of determined answer information and question information when the accuracy of question information is low.
[0006] In order to achieve the above purpose, this application adopts the following technical solutions:
[0007] In a first aspect, an information retrieval method is provided, the method comprising: obtaining target question information; determining multiple extended information of the target question information based on the target question information; the extended information comprising target intent information, generalized question information, target metadata information, target triple data information or complete question information; the similarity between the generalized question information and the target question information is greater than a first threshold, and the complete question information is information determined based on the target question information and the above context of the target question information; determining target answer information of the target question information in a database based on the multiple extended information.
[0008] Based on this solution, compared with the existing solutions that require more precise question information, the solution of the present application determines multiple extended information of the target question information based on the target question information after obtaining the target question information, and then determines the target answer information of the target question information in the database based on the multiple extended information. Since the extended information includes target intent information, generalized question information, target metadata information, target triple data information or complete question information, the target question information is expanded and the answer to the target question information is determined based on the expanded information, thereby improving the relevance of the determined answer to the question when the accuracy of the target question information is low.
[0009] In combination with the first aspect, in certain embodiments of the first aspect, the database includes multiple question-answer pairs and at least one label for each of the multiple question-answer pairs, the label includes an intent information label, a metadata information label or a triple information label, and answer information of the target question information in the database is determined based on multiple extended information, including: determining a first question-answer pair among the multiple question-answer pairs based on the target intent information; matching the intent information label of the first question-answer pair with the target intent information; determining a second question-answer pair among the multiple question-answer pairs based on the target metadata information; matching the metadata information label of the second question-answer pair with the target metadata information; determining a third question-answer pair among the multiple question-answer pairs based on the target triple data information; matching the triple data information label of the third question-answer pair with the target triple data information; determining the target answer information of the target question information based on the target question information, the first question-answer pair, the second question-answer pair and the third question-answer pair.
[0010] Based on this scheme, when the database includes multiple question-answer pairs and at least one label for each of the multiple question-answer pairs, and the labels include intent information labels, metadata information labels or triple information labels, by determining the question-answer pairs in the database whose labels match the extended information of the target question information, since the labels of the determined question-answer pairs match the extended information of the target question information, subsequently, the target answer information of the target question information is determined based on the target question information and the determined question-answer pairs, which can narrow the scope of the retrieved question-answer pairs and improve the efficiency of information retrieval.
[0011] In combination with the first aspect, in certain embodiments of the first aspect, target answer information of the target question information is determined based on the target question information, the first question and answer pair, the second question and answer pair, and the third question and answer pair, including: determining at least one fourth question and answer pair based on the target question information, the first question and answer pair, the second question and answer pair, and the third question and answer pair; the similarity between the question information in the fourth question and answer pair and the target question information is greater than a second threshold; for each fourth question and answer pair in at least one fourth question and answer pair, determining a correlation index between the answer information in the fourth question and answer pair and the target question information; determining the answer information of the target question and answer pair in at least one fourth question and answer pair as the target answer information; the correlation index between the target answer information and the target question information is greater than a third threshold.
[0012] Based on this scheme, at least one fourth question-answer pair is determined among the first question-answer pair, the second question-answer pair, and the third question-answer pair, whose similarity with the target question information is greater than the second threshold; then, for each fourth question-answer pair in the at least one fourth question-answer pair, the correlation index between the answer information in the fourth question-answer pair and the target question information is determined, and then, the answer information of the target question pair in the at least one fourth question-answer pair is determined as the target answer information. Since the similarity between the fourth question-answer pair and the target question information is greater than the second threshold, and the correlation index between the target answer information and the target question information is greater than the third threshold, the correlation between the target answer information and the question information can be improved.
[0013] In combination with the first aspect, in certain embodiments of the first aspect, the method also includes: obtaining multiple first content text information; for each first content text information in the multiple first content text information, determining question information, metadata information, triple data information and intent information of the first content text information; determining the question information and the first content text information as a question-answer pair in a database, and determining the metadata information, triple data information and intent information as labels of the question-answer pair.
[0014] Based on this scheme, by obtaining multiple first content text information, and then, for each first content text information in the multiple first content text information, determining the question information, metadata information, triple data information and intent information of the first content text information, and then, determining the question information and the first content text information as question-answer pairs in the database, and determining the metadata information, triple data information and intent information as labels of the question-answer pairs, multiple question-answer pairs in the database and the label of each question-answer pair can be obtained.
[0015] In combination with the first aspect, in certain implementations of the first aspect, obtaining multiple first content text information includes: obtaining a file to be processed; determining second content text information of the file to be processed; and splitting the second content text information to obtain multiple first content text information.
[0016] In combination with the first aspect, in certain embodiments of the first aspect, determining the second content text information of the file to be processed includes: when the file type of the file to be processed is a table, determining multiple sub-data of the file to be processed; the sub-data include at least one header of the file to be processed and a numerical value of each header, and at least one numerical value is located in the same row or the same column; for each sub-data in the multiple sub-data, determining the third content text information corresponding to the sub-data; determining the multiple third content text information as the second content text information of the file to be processed; when the file type of the file to be processed is a picture, determining the picture text information in the file to be processed; determining the image content information of the file to be processed; determining the second content text information of the file to be processed based on the picture text information and the image content information; when the file type of the file to be processed is text, replacing the pronouns in the file to be processed with entity words.
[0017] Based on this solution, when the file type of the file to be processed is a table, since the table is structured relational data with a row-column relationship and has the particularity of the table (for example, the merging of cells), if the text content in the table is simply extracted, it is difficult to reflect the content of the file to be processed. By determining multiple sub-data of the file to be processed, since the sub-data includes at least one header of the file to be processed and the value of each header in the same row or column, the sub-data and the summary table content prompt are input into the target large model to obtain the third content text information corresponding to the sub-data, which can improve the accuracy of determining the second content text information of the file to be processed.
[0018] In the case where the file type of the to-be-processed file is an image, since the second content text information of the to-be-processed file is determined only by OCR, if there are relatively few characters in the to-be-processed file, the extracted characters are too few, and thus it is difficult to reflect the content of the to-be-processed file. By determining the image text information in the to-be-processed file, and determining the image content information of the to-be-processed file, and subsequently determining the second content text information of the to-be-processed file based on the image text information and the image content information, the accuracy of determining the second content text information of the to-be-processed file can be improved.
[0019] When the file type of the to-be-processed file is text, the accuracy of determining the second content text information of the to-be-processed file can be improved by replacing the pronouns in the to-be-processed file with entity words.
[0020] In combination with the first aspect, in certain embodiments of the first aspect, splitting the second content text information to obtain multiple first content text information includes: taking text between two adjacent preset symbols in the second content text as a third content text to obtain multiple third content texts; for each third content text in the multiple third content texts, determining a fourth content text adjacent to the third content text in the third content text and the second content text as a first content text; the character length of the fourth content text is a first preset character length; or, splitting the second content text information with a second preset character length as a step length to obtain multiple first content text information; the second preset character length is a character length determined based on a token of a target macro model.
[0021] Based on this solution, since the text between two adjacent preset symbols cannot truly reflect the content of the text, it is easy to cause problems of semantic fragmentation and semantic incoherence. Since the first content text includes the third content text between the two adjacent preset symbols and the fourth content text adjacent to the third content text, the content can be split by scrolling (overlap) to gradually include contextual content, thereby improving the flexibility of splitting text information.
[0022] Based on this possible implementation method, since the first content text information needs to be input into the target large model for processing, the second content text information is split into multiple first content text information by taking the character length determined by the token based on the target large model as the step length, thereby improving the efficiency of subsequent use of the target large model.
[0023] In a second aspect, an information retrieval device is provided for implementing the information retrieval method of the first aspect. The information retrieval device includes a module, unit, or means corresponding to the method, which can be implemented by hardware, software, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions.
[0024] In combination with the second aspect, in certain embodiments of the second aspect, the device includes: an acquisition module and a processing module; the acquisition module is used to acquire target question information; the processing module is used to determine multiple extended information of the target question information based on the target question information; the extended information includes target intent information, generalized question information, target metadata information, target triple data information or complete question information; the similarity between the generalized question information and the target question information is greater than a first threshold, and the complete question information is information determined based on the target question information and the above-described target question information; the processing module is also used to determine the target answer information of the target question information in the database based on multiple extended information.
[0025] In combination with the second aspect, in certain embodiments of the second aspect, the database includes multiple question-answer pairs and at least one label for each of the multiple question-answer pairs, the label includes an intent information label, a metadata information label or a triple information label, and the processing module is also used to determine the answer information of the target question information in the database based on multiple extended information, including: determining the first question-answer pair among the multiple question-answer pairs according to the target intent information; the intent information label of the first question-answer pair matches the target intent information; determining the second question-answer pair among the multiple question-answer pairs according to the target metadata information; the metadata information label of the second question-answer pair matches the target metadata information; determining the third question-answer pair among the multiple question-answer pairs according to the target triple data information; the triple data information label of the third question-answer pair matches the target triple data information; determining the target answer information of the target question information according to the target question information, the first question-answer pair, the second question-answer pair and the third question-answer pair.
[0026] In combination with the second aspect, in certain embodiments of the second aspect, the processing module is also used to determine the target answer information of the target question information based on the target question information, the first question and answer pair, the second question and answer pair, and the third question and answer pair, including: determining at least one fourth question and answer pair based on the target question information, the first question and answer pair, the second question and answer pair, and the third question and answer pair; the similarity between the question information in the fourth question and answer pair and the target question information is greater than the second threshold; for each fourth question and answer pair in at least one fourth question and answer pair, determining the correlation index between the answer information in the fourth question and answer pair and the target question information; determining the answer information of the target question and answer pair in at least one fourth question and answer pair as the target answer information; the correlation index between the target answer information and the target question information is greater than the third threshold.
[0027] In combination with the second aspect, in certain embodiments of the second aspect, the processing module is also used to: obtain multiple first content text information; for each first content text information in the multiple first content text information, determine the question information, metadata information, triple data information and intent information of the first content text information; determine the question information and the first content text information as a question-answer pair in a database, and determine the metadata information, triple data information and intent information as labels of the question-answer pair.
[0028] In combination with the second aspect, in certain embodiments of the second aspect, the processing module is further used to obtain multiple first content text information, including: obtaining a file to be processed; determining second content text information of the file to be processed; and splitting the second content text information to obtain multiple first content text information.
[0029] In combination with the second aspect, in certain embodiments of the second aspect, the processing module is also used to determine the second content text information of the file to be processed, including: when the file type of the file to be processed is a table, determining multiple sub-data of the file to be processed; the sub-data includes at least one header of the file to be processed and a numerical value of each header, and at least one numerical value is located in the same row or the same column; for each sub-data in the multiple sub-data, determining the third content text information corresponding to the sub-data; determining the multiple third content text information as the second content text information of the file to be processed; when the file type of the file to be processed is a picture, determining the picture text information in the file to be processed; determining the image content information of the file to be processed; determining the second content text information of the file to be processed based on the picture text information and the image content information; when the file type of the file to be processed is text, replacing the pronouns in the file to be processed with entity words.
[0030] In combination with the second aspect, in certain embodiments of the second aspect, the processing module is further used to split the second content text information to obtain multiple first content text information, including: taking the text between two adjacent preset symbols in the second content text as the third content text to obtain multiple third content texts; for each third content text in the multiple third content texts, determining the fourth content text adjacent to the third content text in the third content text and the second content text as the first content text; the character length of the fourth content text is the first preset character length; or, splitting the second content text information with the second preset character length as a step length to obtain multiple first content text information; the second preset character length is the character length determined based on the token of the target macro model.
[0031] According to a third aspect, an information retrieval device is provided, comprising: at least one processor and a memory for storing instructions executable by the processor; wherein the processor is configured to execute instructions to implement the method provided in the first aspect and any possible implementation manner thereof.
[0032] In a fourth aspect, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an information retrieval device, the information retrieval device can execute the method provided in the first aspect and any possible implementation manner thereof.
[0033] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method provided in the first aspect and any possible implementation manner thereof.
[0034] Among them, the technical effects brought about by any implementation of the second to fifth aspects can refer to the technical effects brought about by different implementations of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A schematic diagram of the architecture of an information retrieval system provided for this application;
[0036] Figure 2 A flowchart of an information retrieval method provided in this application;
[0037] Figure 3 A flowchart of another information retrieval method provided by this application;
[0038] Figure 4 A flowchart of another information retrieval method provided by this application;
[0039] Figure 5 A flowchart of another information retrieval method provided by this application;
[0040] Figure 6 A flowchart of another information retrieval method provided by this application;
[0041] Figure 7 A schematic diagram of the structure of an information retrieval device provided by this application;
[0042] Figure 8 A schematic diagram of the structure of another information retrieval device provided by the present application. DETAILED DESCRIPTION
[0043] In the description of this application, unless otherwise specified, "plurality" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0044] In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.
[0045] Meanwhile, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.
[0046] It is understood that the "embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, the various embodiments in the entire specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It is understood that in various embodiments of the present application, the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0047] It can be understood that in the present application, "when", "if" and "if" all mean that corresponding processing will be carried out under certain objective circumstances, but do not limit the time, nor do they require judgment actions when implementing them, nor do they mean the existence of other limitations.
[0048] It can be understood that some optional features in the embodiments of the present application may be implemented independently in certain scenarios without relying on other features, such as the solution on which they are currently based, to solve corresponding technical problems and achieve corresponding effects, or may be combined with other features according to needs in certain scenarios. Accordingly, the devices provided in the embodiments of the present application may also realize these features or functions accordingly, which will not be elaborated here.
[0049] In this application, unless otherwise specified, the same or similar parts between the various embodiments can refer to each other. In the various embodiments in this application, and the various implementation methods in each embodiment, if there is no special description and logical conflict, the terms and / or descriptions between different embodiments and the various implementation methods in each embodiment are consistent and can be referenced to each other. The technical features in different embodiments and the various implementation methods in each embodiment can be combined to form new embodiments, implementation methods, implementation methods, or implementation methods according to their inherent logical relationships. The following implementation methods of this application do not constitute a limitation on the scope of protection of this application.
[0050] Figure 1 This is a schematic diagram of the architecture of an information retrieval system provided in this application. The technical solution of the embodiment of this application can be applied to Figure 1 The information retrieval system shown in Figure 1As shown, the information retrieval system 10 includes an information retrieval device 11 and an electronic device 12 .
[0051] The information retrieval device 11 is directly or indirectly connected to the electronic device 12. In this connection relationship, a wired connection or a wireless connection may be adopted, which is not limited in the embodiment of the present application.
[0052] The information retrieval device 11 and the electronic device 12 can exchange data.
[0053] It should be noted that the information retrieval device 11 and the electronic device 12 may be independent devices or integrated into the same device, and this application does not make any specific limitation on this.
[0054] When the information retrieval device 11 and the electronic device 12 are integrated into the same device, the communication between the information retrieval device 11 and the electronic device 12 is the communication between the internal modules of the device. In this case, the communication process between the two is the same as "the communication process between the information retrieval device 11 and the electronic device 12 when they are independent of each other".
[0055] In the following embodiments provided in the present application, the present application is described by taking the example that the information retrieval device 11 and the electronic device 12 are independently configured.
[0056] In practical applications, the information retrieval method provided in the embodiment of the present application can be applied to the information retrieval device 11, and can also be applied to the device included in the information retrieval device 11.
[0057] The information retrieval method provided in the embodiment of the present application is described below with reference to the accompanying drawings, taking the application of the information retrieval method to the information retrieval device 11 as an example.
[0058] Figure 2 A flowchart of an information retrieval method provided in this application is shown in FIG. Figure 2 As shown, the method comprises the following steps:
[0059] S201: The information retrieval device obtains target question information.
[0060] It should be noted that the target question information may be “What is the mouse's favorite?” or “What are the reasons why the mobile phone cannot make calls?” Of course, the target question information may also have other contents, and this application does not impose any specific restrictions on this.
[0061] As a possible implementation, combining Figure 1 The information retrieval device receives a message from an electronic device, the message includes target question information, and the information retrieval device obtains the target question information from the message.
[0062] S202: The information retrieval device determines a plurality of extended information of the target question information based on the target question information.
[0063] Among them, the extended information includes target intent information, generalized question information, target metadata information, target triple data information or complete question information; the similarity between the generalized question information and the target question information is greater than a first threshold, and the complete question information is information determined based on the target question information and the above-mentioned target question information.
[0064] It should be noted that the first threshold may be 90% or 85%. Of course, the first threshold may also have other values. For example, the first threshold may be a decimal between 0 and 1. This application does not impose any specific limitation on this.
[0065] The number of the target question information items can be 1 or 2, and this application does not impose any specific limitation on this.
[0066] The target intent information includes retrieval images, retrieval tables or retrieval summary. Of course, the target intent information can also be other intents, and this application does not make specific restrictions on this. For example, if the target question information is "What is the workload of Zhang San in the table", the target intent information can be a retrieval table.
[0067] Taking the target question information as "What is the mouse's favorite" as an example, the generalized question information can be "What does the mouse like most" or "What does the mouse like most". Of course, the generalized question information can also be information of other content, and this application does not make any specific restrictions on this.
[0068] The target metadata information includes the name of the retrieved file, the date of the retrieved file, the author of the retrieved file, the page number in the retrieved file, the size of the retrieved file, the type of the retrieved file, and the chapter title in the retrieved file. Of course, the target metadata information may also include other metadata, which is not specifically limited in this application. For example, if the target question information is "What are the files produced by Li Si", the target metadata information is that the author of the retrieved file is Li Si.
[0069] The target triple data information includes entity-relationship-entity. For example, if the target question information is "What are the files produced by Li Si", the target triple data information is Li Si-production-file.
[0070] Taking the target question information as "What is the token" as an example, if the context of the target question information is "What is the big model", the complete question information is "What is the token of the big model".
[0071] As a possible implementation method, the information retrieval device inputs the target question information and the intention recognition prompt into the target large model, and the target large model outputs the target intention information of the target question information.
[0072] The information retrieval device inputs the target question information and the question generalization prompt into the target macro model, and the target macro model outputs the generalized question information of the target question information.
[0073] The information retrieval device inputs the target question information and the metadata extraction prompt into the target macro model, and the target macro model outputs the target metadata information of the target question information.
[0074] The information retrieval device inputs the target question information and the triple data extraction prompt into the target macro model, and the target macro model outputs the target triple data information of the target question information.
[0075] The information retrieval device inputs the target question information, the context of the target question information and the question rewriting prompt into the target large model, and the target large model outputs the complete question information of the target question information.
[0076] It should be noted that the target big model is a generative language big model. For example, the target big model can be Wenxinyiyan or ChatGPT. This application does not make any specific restrictions on this.
[0077] In some embodiments, the information retrieval device can also input the target question and the intention recognition prompt, the question generalization prompt, the metadata extraction prompt, the triple data extraction prompt, and the question rewriting prompt into the target big model at the same time, and obtain the target intention information of the target question information, the generalized question information of the target question information, the target metadata information of the target question information, the target triple data information of the target question information, and the complete question information of the target question information. In this way, by calling the template big model once, the efficiency of information retrieval can be improved.
[0078] S203: The information retrieval device determines target answer information of the target question information in the database according to the multiple extended information.
[0079] It should be noted that the database includes multiple question-answer pairs and at least one label for each of the multiple question-answer pairs, and the label includes an intent information label, a metadata information label or a triple information label.
[0080] The database may be Elasticsearch, or the database may be a vector database with other names, and this application does not impose any specific limitation on this.
[0081] As a possible implementation method, taking the above-mentioned database as an example, the information retrieval device determines the first question and answer pair among multiple question and answer pairs based on the target intent information, and the intent information label of the first question and answer pair matches the target intent information; determines the second question and answer pair among multiple question and answer pairs based on the target metadata information, and the metadata information label of the second question and answer pair matches the target metadata information; determines the third question and answer pair among multiple question and answer pairs based on the target triple data information, and the triple data information label of the third question and answer pair matches the target triple data information; determines the target answer information of the target question information based on the target question information, the first question and answer pair, the second question and answer pair and the third question and answer pair.
[0082] It should be noted that the specific description of this possible implementation method can be referred to the subsequent description of the specific implementation method of this application, and this application will not explain it here.
[0083] Based on this solution, compared with the existing solutions that require more precise question information, the solution of the present application determines multiple extended information of the target question information based on the target question information after obtaining the target question information, and then determines the target answer information of the target question information in the database based on the multiple extended information. Since the extended information includes target intent information, generalized question information, target metadata information, target triple data information or complete question information, the target question information is expanded and the answer to the target question information is determined based on the expanded information, thereby improving the relevance of the determined answer to the question when the accuracy of the target question information is low.
[0084] The above is a general description of the information retrieval method provided by the present application. The following will further describe the information retrieval method provided by the present application in conjunction with the accompanying drawings.
[0085] In one design, the database includes a plurality of question-answer pairs and at least one label for each of the plurality of question-answer pairs, the label including an intent information label, a metadata information label, or a triple information label, Figure 3 A flowchart of another information retrieval method provided by this application is shown in FIG. Figure 3 As shown, S203 provided in the specific implementation manner of the present application may specifically include the following multiple steps:
[0086] S301. The information retrieval device determines a first question-answer pair among multiple question-answer pairs according to target intent information.
[0087] Among them, the intent information label of the first question-answer pair matches the target intent information.
[0088] It should be noted that the matching in the specific implementation of the present application may be that the two are identical, or that the similarity between the two is greater than the fourth threshold, and the present application does not impose any specific restrictions on this. This is a unified description and will not be repeated later.
[0089] For example, the fourth threshold may be 85% or 90%, and this application does not impose any specific limitation on this.
[0090] The similarity in the specific implementation of the present application can be based on the similarity of vectors. For example, two pieces of information are vectorized to obtain two vectors, and the similarity between the two vectors is used as the similarity between the two pieces of information. The specific description of judging the similarity of two pieces of information based on vectors can refer to the existing scheme, and the present application will not repeat it here.
[0091] The question-answer pair includes question information and answer information. For example, the question information in the question-answer pair may be "What is the favorite of mice?", and the answer information in the question-answer pair may be "The favorite of mice is rice."
[0092] The number of the first question-answer pairs can be one or more, and this application does not impose any restrictions on this.
[0093] As a possible implementation method, for each question-answer pair among the multiple question-answer pairs, the information retrieval device determines whether the target intent information matches the intent information label of the question-answer pair. If it matches, the question-answer pair is the first question-answer pair; if it does not match, the question-answer pair is not the first question-answer pair.
[0094] S302: The information retrieval device determines a second question-answer pair among the multiple question-answer pairs according to the target metadata information.
[0095] Among them, the metadata information label of the second question-answer pair matches the target metadata information.
[0096] The number of the second question-answer pairs can be one or more, and this application does not impose any restrictions on this.
[0097] As a possible implementation, for each question-answer pair among the multiple question-answer pairs, the information retrieval device determines whether the target metadata information matches the metadata information tag of the question-answer pair. If they match, the question-answer pair is the second question-answer pair; if they do not match, the question-answer pair is not the second question-answer pair.
[0098] S303. The information retrieval device determines a third question-answer pair among the multiple question-answer pairs according to the target triple data information.
[0099] Among them, the triple data information label of the third question and answer pair matches the target triple data information.
[0100] The number of the third question-answer pairs can be one or more, and this application does not impose any restrictions on this.
[0101] As a possible implementation, for each question-answer pair in the multiple question-answer pairs, the information retrieval device determines whether the target triple data information matches the triple data information label of the question-answer pair. If it matches, the question-answer pair is the third question-answer pair; if it does not match, the question-answer pair is not the third question-answer pair.
[0102] S304: The information retrieval device determines target answer information of the target question information according to the target question information, the first question-answer pair, the second question-answer pair, and the third question-answer pair.
[0103] As a possible implementation method, the information retrieval device determines at least one fourth question and answer pair based on the target question information, the first question and answer pair, the second question and answer pair, and the third question and answer pair, and the similarity between the question information in the fourth question and answer pair and the target question information is greater than a second threshold; for each fourth question and answer pair in the at least one fourth question and answer pair, determines the correlation index between the answer information in the fourth question and answer pair and the target question information; determines the answer information of the target question and answer pair in the at least one fourth question and answer pair as the target answer information, and the correlation index between the target answer information and the target question information is greater than a third threshold.
[0104] It should be noted that the specific description of this possible implementation method can be referred to the subsequent description of the specific implementation method of this application, and this application will not explain it here.
[0105] As another possible implementation, the information retrieval device determines at least one fourth question-answer pair based on the target question information, the first question-answer pair, the second question-answer pair, and the third question-answer pair, wherein the similarity between the question information in the fourth question-answer pair and the target question information is greater than a second threshold; for each fourth question-answer pair in the at least one fourth question-answer pair, a correlation index between the answer information in the fourth question-answer pair and the target question information is determined. The answer information of the at least one fourth question-answer pair is sorted in descending order of the correlation index to obtain the target answer information.
[0106] It should be noted that the specific instructions for determining the fourth question-answer pair and determining the correlation index in this possible implementation method can refer to the subsequent instructions of S401-S402.
[0107] Based on this scheme, when the database includes multiple question-answer pairs and at least one label for each of the multiple question-answer pairs, and the labels include intent information labels, metadata information labels or triple information labels, by determining the question-answer pairs in the database whose labels match the extended information of the target question information, since the labels of the determined question-answer pairs match the extended information of the target question information, subsequently, the target answer information of the target question information is determined based on the target question information and the determined question-answer pairs, which can narrow the scope of the retrieved question-answer pairs and improve the efficiency of information retrieval.
[0108] In one design, Figure 4 A flowchart of another information retrieval method provided by this application is shown in FIG. Figure 4 As shown, S304 provided in the specific implementation of the present application may specifically include the following multiple steps:
[0109] S401. The information retrieval device determines at least one fourth question-answer pair based on the target question information, the first question-answer pair, the second question-answer pair, and the third question-answer pair.
[0110] Among them, the similarity between the question information in the fourth question-answer pair and the target question information is greater than the second threshold.
[0111] It should be noted that the second threshold may be 85% or 90%, and this application does not impose any specific limitation on this.
[0112] As a possible implementation manner, the information retrieval device determines the similarity between each question-answer pair and the target question information for each of the first question-answer pair, the second question-answer pair, and the third question-answer pair.
[0113] The question-answer pair whose similarity with the target question information is greater than the second threshold is used as the fourth question-answer pair.
[0114] S402: The information retrieval device determines, for each fourth question-answer pair in at least one fourth question-answer pair, a correlation index between the answer information in the fourth question-answer pair and the target question information.
[0115] As a possible implementation method, the information retrieval device inputs at least one fourth question-answer pair, target question information and sorting prompt into the target large model, and the target large model outputs the correlation index between the answer information in each fourth question-answer pair and the target question information.
[0116] S403: The information retrieval device determines answer information of a target question and answer pair in at least one fourth question and answer pair as target answer information.
[0117] Among them, the correlation index between the target answer information and the target question information is greater than the third threshold.
[0118] It should be noted that the third threshold may be 85% or 90%, and this application does not impose any specific limitation on this.
[0119] As a possible implementation method, the information retrieval device determines, for each fourth question-answer pair in at least one fourth question-answer pair, whether the correlation index corresponding to the fourth question-answer pair is greater than a third threshold value. If so, it is determined that the answer information of the fourth question-answer pair is the target answer information; if not, it is determined that the answer information of the fourth question-answer pair is not the target answer information.
[0120] Based on this scheme, at least one fourth question-answer pair is determined among the first question-answer pair, the second question-answer pair, and the third question-answer pair, whose similarity with the target question information is greater than the second threshold; then, for each fourth question-answer pair in the at least one fourth question-answer pair, the correlation index between the answer information in the fourth question-answer pair and the target question information is determined, and then, the answer information of the target question pair in the at least one fourth question-answer pair is determined as the target answer information. Since the similarity between the fourth question-answer pair and the target question information is greater than the second threshold, and the correlation index between the target answer information and the target question information is greater than the third threshold, the correlation between the target answer information and the question information can be improved.
[0121] In one design, Figure 5 A flowchart of another information retrieval method provided by this application is shown in FIG. Figure 5 As shown, before S201, the information retrieval method provided by the present application may further include the following steps:
[0122] S501: An information retrieval device obtains a plurality of first content text information.
[0123] As a possible implementation, combining Figure 1 The information retrieval device receives a message from an electronic device, the message includes a plurality of first content text information, and the information retrieval device obtains the plurality of first content text information from the message.
[0124] As another possible implementation method, combining Figure 1 The information retrieval device receives a message from an electronic device, the message including a file to be processed, and then determines second content text information of the file to be processed, and then splits the second content text information to obtain multiple first content text information.
[0125] It should be noted that the specific description of this possible implementation method can be referred to the subsequent description of the specific implementation method of this application, and this application will not explain it here.
[0126] S502: The information retrieval device determines, for each first content text information among a plurality of first content text information, question information, metadata information, triple data information and intention information of the first content text information.
[0127] As a possible implementation manner, the information retrieval device inputs the first content text information and the intention recognition prompt into the target macro model, and the target macro model outputs the intention information of the first content text information.
[0128] The information retrieval device inputs the first content text information and the question generation prompt into the target macro model, and the target macro model outputs the question information of the first content text information.
[0129] The information retrieval device inputs the first content text information and the metadata extraction prompt into the target macro model, and the target macro model outputs the metadata information of the first content text information.
[0130] The information retrieval device inputs the first content text information and the triple data extraction prompt into the target macro model, and the target macro model outputs the triple data information of the first content text information.
[0131] S503: The information retrieval device determines the question information and the first content text information as a question-answer pair in the database, and determines the metadata information, the triple data information and the intention information as labels of the question-answer pair.
[0132] As a possible implementation method, the information retrieval device encapsulates the question information and the first content text information into a question-answer pair. The information retrieval device can vectorize the question-answer pair and store it in a database, and determine the metadata information, triple data information and intent information as labels of the question-answer pair.
[0133] Based on this scheme, by obtaining multiple first content text information, and then, for each first content text information in the multiple first content text information, determining the question information, metadata information, triple data information and intent information of the first content text information, and then, determining the question information and the first content text information as question-answer pairs in the database, and determining the metadata information, triple data information and intent information as labels of the question-answer pairs, multiple question-answer pairs in the database and the label of each question-answer pair can be obtained.
[0134] In one design, Figure 6 A flowchart of another information retrieval method provided by this application is shown in FIG. Figure 6 As shown, S501 provided in the specific implementation manner of the present application may specifically include the following multiple steps:
[0135] S601: The information retrieval device obtains a file to be processed.
[0136] It should be noted that the file type of the file to be processed can be a table, picture or text, and this application does not impose any specific restrictions on this.
[0137] In the case of a text file of the file type to be processed, the arrangement of the text in the file to be processed may be single-column layout or multi-column layout. For example, the layout of a paper is left-first and right-later layout, that is, multi-column layout.
[0138] As a possible implementation, combining Figure 1 The information retrieval device receives a message from an electronic device, the message includes a file to be processed, and the information retrieval device obtains the file to be processed from the message.
[0139] S602: The information retrieval device determines second content text information of the file to be processed.
[0140] As a possible implementation manner, the information retrieval device determines, when the file type of the to-be-processed file is a table, a plurality of sub-data of the to-be-processed file; the sub-data includes at least one table header of the to-be-processed file and a value of each table header, and at least one value is located in the same row or the same column; for each of the plurality of sub-data, third content text information corresponding to the sub-data is determined; and the plurality of third content text information is determined as the second content text information of the to-be-processed file;
[0141] As an example, the information retrieval device extracts multiple sub-data of the file to be processed, and the sub-data can be {"title":["Title 1","Title 2","Title 3"],"row1":["Row 1 Data 1","Row 1 Data 2","Row 1 Data 2"],"row2":["Row 2 Data 1","Row 2 Data 2","Row 2 Data 2"]}, and the format of the sub-data can be JSON format.
[0142] The information retrieval device inputs the sub-data and summary table content prompt into the target macro model, and the target macro model outputs the third content text information corresponding to the sub-data.
[0143] The information retrieval device puts a plurality of third content text information into a file to obtain the second content text information of the file to be processed.
[0144] In some embodiments, the third content text information of a sub-data can also be used as a first content text information.
[0145] Based on this possible implementation method, when the file type of the file to be processed is a table, since the table is structured relational data with a row-column relationship and has the particularity of the table (for example, the merging of cells), if the text content in the table is simply extracted, it is difficult to reflect the content of the file to be processed. By determining multiple sub-data of the file to be processed, since the sub-data includes at least one header of the file to be processed and the value of each header in the same row or column, the sub-data and the summary table content prompt are input into the target large model to obtain the third content text information corresponding to the sub-data, which can improve the accuracy of determining the second content text information of the file to be processed.
[0146] As another possible implementation method, when the file type of the file to be processed is a picture, the information retrieval device determines the picture text information in the file to be processed; determines the image content information of the file to be processed; and determines the second content text information of the file to be processed based on the picture text information and the image content information.
[0147] As an example, the information retrieval device determines the image text information in the file to be processed by optical character recognition (OCR).
[0148] The information retrieval device inputs the file to be processed into the multimodal model, and the multimodal model outputs the image content information of the file to be processed.
[0149] The information retrieval device inputs the picture text information, image content information and content summary prompt into the target macro model, and the target macro model outputs the second content text information of the file to be processed.
[0150] Based on this possible implementation, when the file type of the to-be-processed file is a picture, since the second content text information of the to-be-processed file is determined only by OCR, if there are relatively few words in the to-be-processed file, too few words are extracted, and it is difficult to reflect the content of the to-be-processed file. By determining the picture text information in the to-be-processed file, and determining the image content information of the to-be-processed file, and subsequently determining the second content text information of the to-be-processed file based on the picture text information and the image content information, the accuracy of determining the second content text information of the to-be-processed file can be improved.
[0151] As another possible implementation manner, when the file type of the file to be processed is text, the information retrieval device replaces the pronouns in the file to be processed with entity words.
[0152] As an example, if the file to be processed specifies that "it" is "puppy", the information retrieval device uniformly replaces "it" in the file to be processed with "puppy".
[0153] As another example, if the file to be processed indicates that today is "January 2, 2024", the information retrieval device uniformly replaces "yesterday" in the file to be processed with "January 1, 2024".
[0154] Based on this possible implementation, when the file type of the to-be-processed file is text, the accuracy of determining the second content text information of the to-be-processed file can be improved by replacing the pronouns in the to-be-processed file with entity words.
[0155] S603: The information retrieval device splits the second content text information to obtain a plurality of first content text information.
[0156] As a possible implementation manner, the information retrieval device uses the text between two adjacent preset symbols in the second content text as the third content text to obtain multiple third content texts; for each third content text in the multiple third content texts, a fourth content text adjacent to the third content text in the third content text and the second content text is determined as the first content text; and the character length of the fourth content text is the first preset character length.
[0157] It should be noted that the preset symbol may be a preset punctuation mark, for example, the preset symbol may be a period or an exclamation mark. Of course, the preset symbol may also be other symbols, and the present application does not impose any specific limitation on this.
[0158] The first preset character length may be 10 characters or 15 characters. Of course, the first preset character length may also have other lengths, and this application does not impose any specific limitation on this.
[0159] In some embodiments, the fourth content text may be the content text before the third content text, the content text after the third content text, or the content text before the third content text and the content text after the third content text, and this application does not impose any specific limitation on this.
[0160] Based on this possible implementation, since the text between two adjacent preset symbols cannot truly reflect the content of the text, it is easy to cause problems of semantic fragmentation and semantic incoherence. Since the first content text includes the third content text between the two adjacent preset symbols and the fourth content text adjacent to the third content text, the content can be split by scrolling (overlap) to gradually include contextual content, thereby improving the flexibility of splitting text information.
[0161] As a possible implementation method, the information retrieval device splits the second content text information into multiple first content text information with a second preset character length as a step length; the second preset character length is a character length determined based on a token of a target macro model.
[0162] It should be noted that the ratio of the second preset character length to the token of the target large model may be 1:1.5. For example,
[0163] The second preset character length may be 1024 characters, 512 characters or 256 characters, and this application does not impose any specific limitation on this.
[0164] Based on this possible implementation method, since the first content text information needs to be input into the target large model for processing, the second content text information is split into multiple first content text information by taking the character length determined by the token based on the target large model as the step length, thereby improving the efficiency of subsequent use of the target large model.
[0165] The above mainly introduces the scheme provided by the embodiment of the present application from the perspective of the information retrieval device executing the information retrieval method. In order to achieve the above functions, the information retrieval device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0166] The embodiment of the present application can divide the functional modules of the information retrieval device according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. Optionally, the division of modules in the embodiment of the present application is schematic, which is only a logical function division, and there may be other division methods in actual implementation. In addition, the "module" here can refer to a specific application-specific integrated circuit (ASIC), a circuit, a processor and memory that executes one or more software or firmware programs, an integrated logic circuit, and / or other devices that can provide the above functions.
[0167] In the case of functional module division, Figure 7 FIG. 1 shows a schematic diagram of the structure of an information retrieval device. Figure 7 As shown, the information retrieval device 70 includes an acquisition module 701 and a processing module 702 .
[0168] In some embodiments, the information retrieval device 70 may also include a storage module ( Figure 7 ), for storing program instructions and data.
[0169] Among them, the acquisition module 701 is used to obtain target question information; the processing module 702 is used to determine multiple extended information of the target question information based on the target question information; the extended information includes target intent information, generalized question information, target metadata information, target triple data information or complete question information; the similarity between the generalized question information and the target question information is greater than the first threshold, and the complete question information is information determined based on the target question information and the above-mentioned target question information; the processing module 702 is also used to determine the target answer information of the target question information in the database based on multiple extended information.
[0170] Optionally, the database includes multiple question-answer pairs and at least one label for each of the multiple question-answer pairs, the label including an intent information label, a metadata information label or a triple information label, and the processing module 702 is also used to determine answer information of the target question information in the database based on multiple extended information, including: determining the first question-answer pair among the multiple question-answer pairs based on the target intent information; the intent information label of the first question-answer pair matches the target intent information; determining the second question-answer pair among the multiple question-answer pairs based on the target metadata information; the metadata information label of the second question-answer pair matches the target metadata information; determining the third question-answer pair among the multiple question-answer pairs based on the target triple data information; the triple data information label of the third question-answer pair matches the target triple data information; determining the target answer information of the target question information based on the target question information, the first question-answer pair, the second question-answer pair and the third question-answer pair.
[0171] Optionally, processing module 702 is also used to determine target answer information of the target question information based on the target question information, the first question and answer pair, the second question and answer pair, and the third question and answer pair, including: determining at least one fourth question and answer pair based on the target question information, the first question and answer pair, the second question and answer pair, and the third question and answer pair; the similarity between the question information in the fourth question and answer pair and the target question information is greater than a second threshold; for each fourth question and answer pair in at least one fourth question and answer pair, determining a correlation index between the answer information in the fourth question and answer pair and the target question information; determining the answer information of the target question and answer pair in at least one fourth question and answer pair as the target answer information; the correlation index between the target answer information and the target question information is greater than a third threshold.
[0172] Optionally, processing module 702 is also used to: obtain multiple first content text information; determine, for each first content text information in the multiple first content text information, question information, metadata information, triple data information and intent information of the first content text information; determine the question information and the first content text information as a question-answer pair in a database, and determine the metadata information, triple data information and intent information as labels of the question-answer pair.
[0173] Optionally, the processing module 702 is further configured to obtain multiple first content text information, including: obtaining a file to be processed; determining second content text information of the file to be processed; and splitting the second content text information to obtain multiple first content text information.
[0174] Optionally, the processing module 702 is also used to determine the second content text information of the file to be processed, including: when the file type of the file to be processed is a table, determining multiple sub-data of the file to be processed; the sub-data includes at least one header of the file to be processed and a value of each header, and at least one value is located in the same row or the same column; for each sub-data in the multiple sub-data, determining the third content text information corresponding to the sub-data; determining the multiple third content text information as the second content text information of the file to be processed; when the file type of the file to be processed is a picture, determining the picture text information in the file to be processed; determining the image content information of the file to be processed; determining the second content text information of the file to be processed based on the picture text information and the image content information; when the file type of the file to be processed is text, replacing the pronouns in the file to be processed with entity words.
[0175] Optionally, the processing module 702 is further used to split the second content text information to obtain multiple first content text information, including: taking the text between two adjacent preset symbols in the second content text as the third content text to obtain multiple third content texts; for each third content text in the multiple third content texts, determining the fourth content text adjacent to the third content text in the third content text and the second content text as the first content text; the character length of the fourth content text is the first preset character length; or, splitting the second content text information with the second preset character length as the step length to obtain multiple first content text information; the second preset character length is the character length determined based on the token of the target large model.
[0176] All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0177] When the functions of the above functional modules are implemented in the form of hardware, Figure 8 FIG. 4 shows a schematic diagram of the structure of another information retrieval device. Figure 8 As shown, the information retrieval device 80 includes a processor 801, a memory 802 and a bus 803. The processor 801 and the memory 802 may be connected via the bus 803.
[0178] The processor 801 is the control center of the information retrieval device 80, and can be a processor or a general term for multiple processing elements. For example, the processor 801 can be a general-purpose central processing unit (CPU) or other general-purpose processors. The general-purpose processor can be a microprocessor or any conventional processor.
[0179] As an embodiment, the processor 801 may include one or more CPUs, such as Figure 8 CPU0 and CPU1 are shown in the figure.
[0180] The memory 802 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.
[0181] As a possible implementation, the memory 802 can exist independently of the processor 801, and the memory 802 can be connected to the processor 801 via the bus 803 to store instructions or program codes. When the processor 801 calls and executes the instructions or program codes stored in the memory 802, the information retrieval method provided in the embodiment of the present application can be implemented.
[0182] In another possible implementation, the memory 802 may also be integrated with the processor 801 .
[0183] The bus 803 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0184] It should be pointed out that Figure 8 The structure shown does not constitute a limitation on the information retrieval device 80. Figure 8 In addition to the components shown, the information retrieval device 80 may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0185] As an example, combining Figure 7 The functions implemented by the acquisition module 701 and the processing module 702 in the information retrieval device 70 are similar to those Figure 8 The function of processor 801 in is the same.
[0186] Optional, such as Figure 8 As shown, the information retrieval device 80 provided in the embodiment of the present application may further include a communication interface 804 .
[0187] The communication interface 804 is used to connect with other devices through a communication network. The communication network may be Ethernet, wireless access network, wireless local area network (WLAN), etc. The communication interface 804 may include a receiving unit for receiving data and a sending unit for sending data.
[0188] In a possible implementation, in the information retrieval device 80 provided in the embodiment of the present application, the communication interface 804 may also be integrated in the processor 801, and the embodiment of the present application does not specifically limit this.
[0189] As a possible product form, the information retrieval device of the embodiment of the present application can also be implemented using the following: one or more field programmable gate arrays (FPGA), programmable logic devices (PLD), controllers, state machines, gate logic, discrete hardware components, any other suitable circuits, or any combination of circuits that can perform the various functions described throughout the present application.
[0190] Through the description of the above implementation methods, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional units is used as an example. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the device can be divided into different functional units to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0191] An embodiment of the present application also provides a computer-readable storage medium on which a computer program or instruction is stored. When the computer program or instruction is executed, the computer executes each step in the method flow shown in the above method embodiment.
[0192] An embodiment of the present application provides a computer program product including instructions. When the instructions are executed on a computer, the computer is caused to execute each step in the method flow shown in the above method embodiment.
[0193] An embodiment of the present application provides a chip system, including: a processor and an interface circuit; the interface circuit is used to receive a computer program or instruction and transmit it to the processor; the processor is used to execute the computer program or instruction so that the chip system executes each step in the method flow shown in the above method embodiment.
[0194] Among them, the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, and a hard disk. Random Access Memory (RAM), Read-Only Memory (ROM), Erasable Programmable Read Only Memory (EPROM), registers, hard disks, optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any other form of computer-readable storage media in a suitable combination of the above, or numerical values in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in a specific-purpose ASIC. In the embodiments of the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program, which may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0195] Since the information retrieval device, computer-readable storage medium, and computer program product provided in this embodiment can be applied to the information retrieval method provided by this embodiment, the technical effects that can be obtained can also refer to the above-mentioned method embodiments, and the embodiments of this application will not be repeated here.
[0196] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other changes to the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0197] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. An information retrieval method, characterized in that: The method comprises: Get target problem information; Determine multiple extended information of the target question information based on the target question information; the extended information includes target intent information, generalized question information, target metadata information, target triple data information or complete question information; the similarity between the generalized question information and the target question information is greater than a first threshold, and the complete question information is information determined based on the target question information and the above context of the target question information; The target answer information of the target question information in the database is determined according to the multiple extended information.
2. The method according to claim 1, characterized in that The database includes a plurality of question-answer pairs and at least one label of each of the plurality of question-answer pairs, wherein the label includes an intent information label, a metadata information label, or a triple information label, and determining answer information of the target question information in the database according to the plurality of extended information includes: Determine a first question-answer pair among the multiple question-answer pairs according to the target intent information; the intent information label of the first question-answer pair matches the target intent information; Determine a second question-answer pair among the multiple question-answer pairs according to the target metadata information; the metadata information tag of the second question-answer pair matches the target metadata information; Determining a third question-answer pair among the multiple question-answer pairs according to the target triple data information; the triple data information label of the third question-answer pair matches the target triple data information; The target answer information of the target question information is determined according to the target question information, the first question-answer pair, the second question-answer pair and the third question-answer pair.
3. The method according to claim 2, characterized in that The step of determining target answer information of the target question information according to the target question information, the first question-answer pair, the second question-answer pair, and the third question-answer pair includes: Determine at least one fourth question-answer pair according to the target question information, the first question-answer pair, the second question-answer pair, and the third question-answer pair; the similarity between the question information in the fourth question-answer pair and the target question information is greater than a second threshold; For each fourth question-answer pair in the at least one fourth question-answer pair, determining a correlation index between the answer information in the fourth question-answer pair and the target question information; Answer information of a target question and answer pair in the at least one fourth question and answer pair is determined as the target answer information; a correlation index between the target answer information and the target question information is greater than a third threshold.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Acquire multiple first content text information; For each first content text information among the plurality of first content text information, determining question information, metadata information, triple data information and intent information of the first content text information; The question information and the first content text information are determined as a question-answer pair in the database, and the metadata information, the triple data information and the intent information are determined as labels of the question-answer pair.
5. The method according to claim 4, characterized in that The obtaining of a plurality of first content text information includes: Get the files to be processed; Determine the second content text information of the file to be processed; The second content text information is split to obtain a plurality of first content text information.
6. The method according to claim 5, characterized in that The determining the second content text information of the file to be processed includes: In the case that the file type of the to-be-processed file is a table, determining a plurality of sub-data of the to-be-processed file; the sub-data comprises at least one header of the to-be-processed file and a value of each header, and at least one value is located in the same row or the same column; For each sub-data in the plurality of sub-data, determining third content text information corresponding to the sub-data; Determining a plurality of third content text information as the second content text information of the file to be processed; In the case where the file type of the to-be-processed file is a picture, determining the picture text information in the to-be-processed file; Determining image content information of the file to be processed; Determine the second content text information of the file to be processed according to the picture text information and the image content information; When the file type of the to-be-processed file is text, the pronouns in the to-be-processed file are replaced with entity words.
7. The method according to claim 5, characterized in that The step of splitting the second content text information to obtain a plurality of first content text information includes: Using the text between two adjacent preset symbols in the second content text as the third content text, to obtain a plurality of third content texts; For each third content text among the plurality of third content texts, determining the third content text and a fourth content text adjacent to the third content text among the second content text as the first content text; the character length of the fourth content text is the first preset character length; Alternatively, the second content text information is split with a second preset character length as a step length to obtain multiple first content text information; the second preset character length is a character length determined based on a token of a target large model.
8. An information retrieval device, characterized in that: The device comprises: an acquisition module and a processing module; The acquisition module is used to acquire target question information; The processing module is used to determine multiple extended information of the target question information based on the target question information; the extended information includes target intent information, generalized question information, target metadata information, target triple data information or complete question information; the similarity between the generalized question information and the target question information is greater than a first threshold, and the complete question information is information determined based on the target question information and the above context of the target question information; The processing module is further used to determine target answer information of the target question information in the database according to the multiple extended information.
9. An information retrieval device, characterized in that: The information retrieval device comprises: a processor, the processor is coupled to a memory, the memory is used to store programs or instructions, when the program or instructions are executed by the processor, the device executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instructions are executed, the computer is caused to perform the method according to any one of claims 1 to 7.