Control method and equipment of information retrieval system and storage medium
By adopting a multi-channel recall strategy in the information retrieval system and deduplication based on the location of the recall information, the problem of high cost of deduplication in recall information in multiple recalls is solved, and the deduplication efficiency is improved.
Patent Information
- Application Number
- CN202411717157.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-04-11
AI Technical Summary
In the process of large-scale data set retrieval, the cost of similarity calculation occupies resources in the process of deduplication of recall information of multiple recalls.
After receiving the pending problem, at least two recall strategies are used to recall, the recall information is obtained, and the number is determined based on the recall information in the source data set, and the numbered recall information is deduplicated to generate search results.
Reduce the resource cost of recall information deduplication in multiple recalls and improve the efficiency of recall information deduplication.
Smart Images

Figure CN119807339A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a control method, device and storage medium of an information retrieval system. Background Art
[0002] In large language models, retrieval-augmented generation (RAG) usually adopts a multi-way recall retrieval method to obtain relevant information for guiding the generation of response text.
[0003] In the related technology, since multi-way recall is based on joint retrieval of multiple recall strategies, the same information exists in the recall information obtained by different recall strategies. Therefore, after obtaining the relevant information, RAG will deduplicate a group of recall information whose similarity is higher than the similarity threshold by comparing the similarity between the recall information.
[0004] However, in the process of retrieving large-scale data sets, different recall strategies obtain a large amount of recall information data, and the information duplication rate is high. In this case, RAG calculates a large amount of data for the similarity of recall information, resulting in a high resource cost for deduplication of recall information.
[0005] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0006] The main purpose of the present application is to provide a control method, device and storage medium for an information retrieval system, aiming to solve the technical problem that the similarity calculation of recall information occupies a high resource cost during the deduplication process of RAG multi-channel recall.
[0007] To achieve the above object, the present application provides a control method for an information retrieval system, the method comprising the following steps:
[0008] After receiving the pending issues, recalling the pending issues through at least two recall strategies to obtain recall information;
[0009] Determining the serial number of the recalled information according to the position of the recalled information in the source data set;
[0010] According to the serial numbers, the recall information of different recall strategies is matched, and the recall information is deduplicated according to the matching results;
[0011] The recalled information after deduplication is re-sorted, and a retrieval result associated with the pending question is generated based on the sorting result.
[0012] In one embodiment, after receiving the pending issue, recalling the pending issue by using at least two recall strategies, and obtaining the recall information includes:
[0013] Receiving the pending issues;
[0014] Based on the preset keywords in the source data set, recall the keywords of the problem to be processed to obtain the recall information;
[0015] And, generating a pre-answer answer to the question to be processed, and based on the pre-answer vector of the pre-answer answer, performing vector recall on the question to be processed to obtain the recall information.
[0016] In one embodiment, the step of performing keyword recall on the problem to be processed based on the keywords preset in the source data set includes:
[0017] By natural language processing, the problem to be processed is split to generate problem segmentation words;
[0018] Matching the question segmentation with the keywords preset in the source data set;
[0019] A target keyword matching the question segmentation word is obtained, and the target keyword is selected as the recall information.
[0020] In one embodiment, the step of generating a pre-answer answer to the question to be processed, and performing vector recall on the question to be processed based on the pre-answer vector of the pre-answer answer comprises:
[0021] Inputting the problem to be processed into a language processing model to generate the pre-answer answer to the problem to be processed;
[0022] By text embedding, the generated pre-answer answer is converted into a pre-answer vector;
[0023] Calculate the vector similarity between the pre-answer answer and the text vector, picture vector and table vector in the source data set;
[0024] Based on the vector similarity, the recall information is selected from the text vector, the image vector and / or the table vector.
[0025] In one embodiment, after the step of reordering the deduplicated recall information and generating the search results associated with the pending question based on the ordering result, the method further includes:
[0026] Calculating the importance of the recall information according to the number of repetitions and / or the recall vector of the recall information;
[0027] sorting the recall information according to the importance to generate a recall information sequence;
[0028] The recall information sequence is input into a natural language generation model to generate a response text.
[0029] In one embodiment, the step of calculating the importance of the recall information according to the number of repetitions and / or the recall vector of the recall information includes:
[0030] Based on the same serial number, the recall information is grouped, and according to the grouping result, the number of repetitions of the recall information is determined;
[0031] and / or, obtaining the recall vector of the recall information in the search result, and calculating the matching degree between the recall vector and the problem to be processed;
[0032] The importance of the recall information is calculated according to the number of repetitions and / or the matching degree.
[0033] In one embodiment, the step of sorting the recall information according to the importance to generate a recall information sequence includes:
[0034] determining an importance ranking of the recall information based on the importance;
[0035] Reordering the recalled information based on a preset relocation rule and the importance ranking by using a relocation model;
[0036] According to the sorting result, the recall information sequence is generated.
[0037] In one embodiment, the step of sorting the recall information by the relocation model based on preset relocation rules and the importance ranking includes:
[0038] Filling the recall information whose importance ranking is less than a first ranking threshold into the sequence head of the idle sequence in the recall information sequence;
[0039] Fill the recalled information whose importance ranking is greater than the first ranking threshold and less than the second ranking threshold to the end of the idle sequence;
[0040] updating the importance ranking of the recall information;
[0041] Jump to execute the step of filling the recall information whose importance ranking is less than the first ranking threshold into the sequence head of the idle sequence in the recall information sequence, and output the recall information sequence after filling all the recall information into the recall information sequence.
[0042] In addition, to achieve the above-mentioned purpose, the present application also provides a control device for an information retrieval system, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the control method for the information retrieval system as described above.
[0043] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the control method of the information retrieval system as described above are implemented.
[0044] One or more technical solutions proposed in this application have at least the following technical effects:
[0045] In the process of using at least two recall strategies to recall the received pending issues and obtaining recall information, the present application determines the number of the recall information according to the position of the recall information in the source data set, and based on the number, deduplicates the recall information with the same number to generate a retrieval result, wherein, through the number corresponding to the position of the recall information in the source data set, it is possible to quickly determine whether the compared recall information is the same information, without comparing the specific content of the recall information by calculating the similarity, thereby reducing the resource cost occupied by deduplication of recall information in multi-channel recall and improving the deduplication efficiency of recall information in multi-channel recall. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0048] Figure 1 This is a flow chart of a first embodiment of a control method for an information retrieval system of the present application;
[0049] Figure 2 This is a flow chart of a second embodiment of the control method of the information retrieval system of the present application;
[0050] Figure 3 A schematic diagram of a flow chart of a third embodiment of a control method for an information retrieval system of the present application;
[0051] Figure 4It is a structural diagram of a control device of an information retrieval system of a hardware operating environment involved in an embodiment of the present application.
[0052] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0053] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0054] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0055] The main solution of the embodiment of the present application is: after receiving the pending problem, recall the pending problem through at least two recall strategies to obtain recall information; determine the number of the recall information according to the position of the recall information in the source data set; according to the number, match the recall information of different recall strategies, and deduplicate the recall information according to the matching result to generate a retrieval result.
[0056] Since Retrieval-Augmented Generation (RAG) uses multiple recall strategies to jointly retrieve in multi-way recall, there is the same information in the recall information obtained by different recall strategies. Therefore, after obtaining the relevant information, RAG will deduplicate a group of recall information with a similarity higher than the similarity threshold by comparing the similarity between the recall information. However, in the process of retrieving large-scale data sets, the amount of recall information obtained by different recall strategies is large, and the information repetition rate is high. In this case, the amount of data calculated by RAG for the similarity of recall information is large, resulting in a high resource cost for deduplication of recall information.
[0057] The present application uses at least two recall strategies to perform recall processing on the received pending issues and, in the process of obtaining recall information, determines the number of the recall information according to the position of the recall information in the source data set, and based on the number, deduplicates the recall information with the same number to generate a retrieval result, wherein, through the number corresponding to the position of the recall information in the source data set, it is possible to quickly determine whether the compared recall information is the same information, without comparing the specific content of the recall information by calculating the similarity, thereby reducing the resource cost occupied by deduplication of recall information in multi-channel recall and improving the deduplication efficiency of recall information in multi-channel recall.
[0058] In order to better understand the above technical solution, exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0059] It should be noted that the execution subject of this embodiment can be an information retrieval system, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a control device of the information retrieval system, etc., and this embodiment does not specifically limit this. The following takes the information retrieval system as an example to illustrate this embodiment and the following embodiments.
[0060] Based on this, the present application embodiment provides a control method of an information retrieval system, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the control method of the information retrieval system of the present application.
[0061] In this embodiment, the control method of the information retrieval system includes steps S10 to S30:
[0062] Step S10: after receiving the problem to be processed, recall the problem to be processed by using at least two recall strategies to obtain recall information;
[0063] In this embodiment, the information retrieval system uses retrieval-augmented generation (RAG) to obtain retrieval information for guiding the generation of answer text. The information retrieval system can retrieve retrieval information related to the question in a recall information database based on the user question through a multi-way recall method, that is, through at least two recall strategies. The information retrieval system can be applied to a question-answering system, and based on the retrieved retrieval information, guide the language processing module in the question-answering system to generate an answer text that meets the answer to the question based on the relevant information.
[0064] It should be noted that RAG is a method that combines information retrieval and language model capabilities. It generates the final answer by first retrieving relevant document fragments and then inputting these fragments into the language model as context. Among them, RAG's multi-way recall is a retrieval method that uses multiple recall strategies to recall at the same time. It aims to improve the accuracy and diversity of retrieval by combining multiple recall strategies. Among them, RAG can use recall methods such as keyword recall, vector recall, and sparse vector recall for multi-way recall.
[0065] In one embodiment, the information retrieval system can use ES (Elasticsearch) sparse recall and vector recall for multi-way recall. Elasticsearch is a search engine based on Lucene, which provides a distributed multi-user full-text search engine with HTTP web interface and modeless JSON documents. The information retrieval system can perform sparse recall on keywords in the text based on the ES search engine. At the same time, the information retrieval system uses vector recall to match the recall vector of the recall information in the source data set with the question to be processed, and selects the recall information that meets the answer to the question to be processed.
[0066] Optionally, the information retrieval system may recall a range in the database and a source data set corresponding to the recall range according to user requirements.
[0067] For example, after entering the xx museum, the user can ask the question-answering system, "What are the precautions for visiting the xx museum?" After receiving the question input by the question-answering system, the information retrieval system uses the tour guide of the xx museum pre-stored in the system as the source data set and performs a recall action on the question in the tour guide. The information retrieval system performs a keyword recall on the tour guide based on the keywords such as "museum" and "precautions" in the question, and at the same time, calculates the vector of the question and matches the vector with the content vector in the tour guide.
[0068] Step S20: determining the serial number of the recalled information according to the position of the recalled information in the source data set;
[0069] In this embodiment, the source data set is the data source of the recalled information obtained after the information retrieval system performs the recall action. The user can select the source data set as the data source according to the information needs. For example, when asking about the relevant matters of visiting a museum, the museum's tour guide can be used as the source data set. Optionally, the question-answering system can recall the database preset in the system as the source data set.
[0070] Furthermore, the information retrieval system can determine the number of the recalled information based on the position of the recalled information in the source data set, so as to ensure the uniqueness of the recalled information in each question-answering process of the question-answering system. After obtaining the recalled information, the information retrieval system can compare the number of the recalled information. The information retrieval system can assign a unique number to the recalled information based on the question-answering behavior and the selected source data set.
[0071] For example, after the information retrieval system obtains the recall information in the 4th line of the 106th paragraph of the third text in the source data set, it can determine the number of the recall information as 030106004 based on the text number 03 of the text, the number 0106 corresponding to the 106th paragraph, and the number 004 of the 4th line.
[0072] Step S30: matching the recall information of different recall strategies according to the serial numbers, and removing duplicates from the recall information according to the matching results;
[0073] In this embodiment, since different recall strategies are adopted in multi-channel recall to recall content at the same time, the same information recalled by different recall strategies exists in the acquired recall information. The information retrieval system will identify the same recall information and perform deduplication processing, and only retain one recall information in the same recall information. When the numbers are the same, it means that the compared recall information is in the same position in the source data set. The information retrieval system can determine that the compared recall information is the same information, and perform deduplication to generate a retrieval result. At the same time, deduplication is performed based on the number. It can avoid that the recall information with high content similarity but different content is abnormally removed due to the deduplication processing of calculating the similarity.
[0074] For example, when the information retrieval system is comparing recall information, if the numbers of the two compared recall information are both 030106004, it can be determined that the two compared recall information are both from the 4th line of the 106th paragraph in the third text in the source data set, and are the same recall information, thereby determining to perform a deduplication action.
[0075] As an optional implementation, the information retrieval system can group the recall information based on the number, and group the recall information with the same number into the same group. When removing duplicates, the information retrieval system can select the target recall information in each group based on preset rules, and remove other recall information to avoid duplication of recall information. Among them, based on the preset rules, the information retrieval system can select the target recall information by using the last obtained recall information, or the recall information with the most words retained.
[0076] As another optional implementation, the information retrieval system may also perform deduplication in a traversal manner. The information retrieval system starts from the first recall information, compares the number of the recall information with the numbers of other recall information one by one, and removes other recall information with the same number as the recall information. After comparing the first recall information, the next recall information is compared in a traversal manner until all recall information is compared.
[0077] Furthermore, after completing deduplication of the recalled information, the information retrieval system will use the deduplicated recalled information as a retrieval result associated with the question to be processed, and output it to the question-answering system.
[0078] Step S40: re-sorting the recalled information after deduplication, and generating retrieval results associated with the pending question based on the sorting result.
[0079] In this embodiment, after the recall information is deduplicated, the information retrieval system re-ranks the recall information through a reranker model. The information retrieval system inputs the query and candidate recall information into the reranker model, which re-evaluates the relevance between each document and the query and generates a new ranking result, so that the question-answering system can obtain recall information that is more relevant to the user's question based on the ranking result.
[0080] The embodiment of the present application uses at least two recall strategies to perform recall processing on the received pending issues and in the process of obtaining recall information, determines the number of the recall information according to the position of the recall information in the source data set, and based on the number, deduplicates the recall information with the same number to generate a retrieval result, wherein, through the number corresponding to the position of the recall information in the source data set, it is possible to quickly determine whether the compared recall information is the same information, without comparing the specific content of the recall information by calculating the similarity, thereby reducing the resource cost occupied by deduplication of recall information in multi-channel recall and improving the deduplication efficiency of recall information in multi-channel recall.
[0081] Based on the same inventive concept, the present application also provides a second embodiment, referring to Figure 2 , Figure 2 This is a flow chart of the second embodiment of the control method of the information retrieval system of the present application.
[0082] In this embodiment, after receiving the pending issue as described in step S10, the pending issue is recalled using at least two recall strategies, and obtaining the recall information includes steps S11 to S13:
[0083] Step S11: receiving the problem to be processed;
[0084] Step S12: Based on the preset keywords in the source data set, keyword recall is performed on the problem to be processed;
[0085] In this embodiment, the question-answering system can split the question to be processed through natural language processing, generate question segmentation, and match the question segmentation with the preset keywords in the source data set. Obtain the target keyword that matches the question segmentation, and select the target keyword as the recall information.
[0086] In one embodiment, the information retrieval system compares the question segmentation with the keywords in the source data set based on the ES search engine. Keyword recall compares the question text with the keywords to obtain recall information.
[0087] Step S13: Generate a pre-answer answer to the question to be processed, and perform vector recall on the question to be processed based on the pre-answer vector of the pre-answer answer.
[0088] In this embodiment, the information retrieval system also performs recall through vectors. The vector recall includes language text recall and chart recall. Language text recall is to perform vector recall on the language text in the source data set. Chart recall includes image recall and table recall. The information retrieval system will summarize and describe the images and tables, determine the content contained in the images and tables, and perform vector recall on the charts.
[0089] Specifically, the question-answering system can input the question to be processed into the language processing model to generate a pre-answer answer to the question to be processed. The question-answering system can use a large language model (such as GPT, BERT, etc.) to generate pre-answer answers related to the question. The pre-answer answer is generated based on the model's understanding of the question. In order to ensure the diversity of the generated answers, the sample mode is usually used to ensure that the multiple pre-answer answers generated are different.
[0090] Furthermore, the information retrieval system performs text embedding such as sentence embedding or word embedding on the pre-answer answer through a vectorization model, converts the text into a point in a high-dimensional vector space, and generates a pre-answer vector. The information retrieval system can calculate the vector similarity between the pre-answer answer and the text vector, image vector, and table vector in the source data set by means of cosine similarity or fusion vector, and the information retrieval system can select the recall information from the text vector, image vector, and / or table vector based on the vector similarity.
[0091] The embodiment of the present application performs multi-way recall by respectively adopting the recall strategies of keyword recall, text vector recall and chart vector recall, and can obtain recall information that is more consistent with the answer to the question in a diversified manner, thereby improving the accuracy of recall.
[0092] Since the system introduced in the second embodiment of the present application is a system used to implement the method of the first embodiment of the present application, based on the method introduced in the first embodiment of the present application, the person skilled in the art can understand the specific structure and deformation of the system, so it is not repeated here. All systems used in the method of the first embodiment of the present application belong to the scope of protection of this application.
[0093] Based on the same inventive concept, the present application also provides a third embodiment, referring to Figure 3 , Figure 3 This is a flow chart of the third embodiment of the control method of the information retrieval system of the present application.
[0094] In this embodiment, the control method of the information retrieval system further includes steps S50 to S70:
[0095] Step S50: Calculating the importance of the recall information according to the number of repetitions and / or the recall vector of the recall information;
[0096] In this embodiment, the recall system also needs to evaluate the importance of the recall information, so as to select the recall information that is more consistent with the answer to the question to be processed from the obtained recall information.
[0097] As an optional implementation method for calculating the importance of the recalled information, when the information retrieval system performs multiple recalls using different recall strategies, the higher the frequency of recalling the same recalled information using different recall strategies, the more important the recalled information is. The information retrieval system can calculate the importance of the recalled information based on the number of repetitions of the recalled information.
[0098] Specifically, the information retrieval system may group the recalled information based on the same serial number, and determine the number of repetitions of the recalled information according to the grouping result, and the importance of the recalled information may be calculated according to the number of repetitions.
[0099] As another optional implementation for calculating the importance of the recall information, the recall system may also calculate the matching degree between the recall vector and the problem to be processed based on the recall vector of the recall information, and determine the importance of the recall information according to the matching degree.
[0100] Optionally, in the multi-way recall process, factors such as recall rate, precision rate and hit rate can be used to evaluate the importance of the recalled information. Among them, recall rate (Recall) measures the proportion of relevant documents that the system can find. In the recommendation system, recall rate reflects how many of the items recalled by the strategy are actually clicked or interacted by users. Precision rate (Precision) measures how many of the relevant documents given by the system are truly relevant. The F1 score is the harmonic mean of recall rate and precision rate, which is used to comprehensively consider recall rate and precision rate. Hit rate (Hit Rate) measures the proportion of expected recalled text (true value) appearing in the top K texts of the recall result. Mean reciprocal ranking (MRR) measures the average of the inverse of the average ranking of relevant documents or information returned by the system in a series of queries.
[0101] Step S60: sorting the recall information according to the importance to generate a recall information sequence;
[0102] In this embodiment, the question-answering system also needs to sort the recalled information based on the importance of the recalled information to guide the language processing module to generate the answer text according to the recalled information sequence.
[0103] As an optional implementation, since the question-answering system is prone to lose information in the middle of the recall information sequence during the generation of the answer text, the information retrieval system will place the more important recall information at the two ends of the recall information sequence, i.e., the sequence head and the sequence tail, when sorting the recall information.
[0104] In this embodiment, step S60 includes steps S61 to S65:
[0105] Step S61: determining the importance ranking of the recall information based on the importance;
[0106] Step S62: reordering the recalled information based on a preset relocation rule and the importance ranking by using a relocation model;
[0107] Step S63: Generate the recall information sequence according to the sorting result.
[0108] In this embodiment, the information retrieval system generates a recall information sequence based on the number of recalled information, and fills the recall information with an importance ranking less than the first ranking threshold into the sequence head of the free sequence in the recall information sequence, and fills the recall information with an importance ranking greater than the first ranking threshold and less than the second ranking threshold into the sequence tail of the free sequence, and re-determines the importance ranking of the recall information in an updated manner. The information retrieval system will sort all the recall information into the recall information sequence in a cyclic manner, and after each recall information is filled into the recall information sequence, it will jump again to execute the step of filling the recall information with an importance ranking less than the first ranking threshold into the sequence head of the free sequence in the recall information sequence and the subsequent steps, and output the recall information sequence after all the recall information is filled into the recall information sequence.
[0109] Exemplarily, the information retrieval system may first take the top three pieces of recall information ranked in importance, fill them into the front end of the free positions in the recall information sequence, and take the top three pieces of recall information ranked in importance from the remaining recall information, fill them into the end of the free positions in the recall information sequence, and repeat the above actions, continuously filling the top three pieces of recall information ranked in importance from the remaining recall information into the front end and the end of the free positions in the recall information sequence one by one, until all the recall information is filled into the recall information sequence.
[0110] Step S70: input the recall information sequence into a natural language generation model to generate a response text.
[0111] In this embodiment, the Natural Language Generation (NLG) model connects and organizes the recall information sequence in a textual manner to generate the final answer text. The question-answering system can input the recall information sequence into the Prompt model and obtain the output result of the model as the answer text.
[0112] Since the system introduced in the second embodiment of the present application is a system used to implement the method of the first embodiment of the present application, based on the method introduced in the first embodiment of the present application, the person skilled in the art can understand the specific structure and deformation of the system, so it is not repeated here. All systems used in the method of the first embodiment of the present application belong to the scope of protection of this application.
[0113] The present application provides a control device for an information retrieval system, the device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the control method for the information retrieval system in the above-mentioned embodiment one.
[0114] Reference below Figure 4 , which shows a schematic diagram of the structure of a control device suitable for implementing the information retrieval system of the embodiment of the present application. The control device of the information retrieval system in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The control device of the information retrieval system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0115] like Figure 4As shown, the control device of the information retrieval system may include a processing device 1001 (e.g., a core processor, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the control device of the information retrieval system are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the control device of the information retrieval system to communicate wirelessly or wired with other devices to exchange data. Although the control device of the information retrieval system with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have instead.
[0116] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0117] The control device of the information retrieval system provided by the present application adopts the control method of the information retrieval system in the above-mentioned embodiment, which can solve the technical problem that the similarity calculation of the recalled information occupies a high resource cost during the deduplication process of the RAG multi-way recall. Compared with the prior art, the beneficial effects of the control device of the information retrieval system provided by the present application are the same as the beneficial effects of the control method of the information retrieval system provided by the above-mentioned embodiment, and the other technical features in the control device of the information retrieval system are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0118] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0119] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0120] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the control method of the information retrieval system in the above-mentioned embodiment.
[0121] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0122] The computer-readable storage medium may be included in the control device of the information retrieval system; or may exist independently without being assembled into the control device of the information retrieval system.
[0123] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the control device of the information retrieval system, the control device of the information retrieval system: after receiving the problem to be processed, recall the problem to be processed through at least two recall strategies to obtain recall information; determine the number of the recall information according to the position of the recall information in the source data set; according to the number, match the recall information of different recall strategies, and deduplicate the recall information according to the matching result; re-sort the deduplicated recall information, and generate the retrieval result associated with the problem to be processed based on the sorting result.
[0124] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0125] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0126] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0127] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the control method of the above-mentioned information retrieval system, and can solve the technical problem that the similarity calculation of the recall information occupies a high resource cost during the deduplication process of RAG multi-way recall. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the control method of the information retrieval system provided by the above-mentioned embodiment, which will not be repeated here.
[0128] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A control method for an information retrieval system, characterized in that: The control method of the information retrieval system comprises the following steps: After receiving the pending issues, recalling the pending issues through at least two recall strategies to obtain recall information; Determining the serial number of the recalled information according to the position of the recalled information in the source data set; According to the serial numbers, the recall information of different recall strategies is matched, and the recall information is deduplicated according to the matching results; The recalled information after deduplication is re-sorted, and a retrieval result associated with the pending question is generated based on the sorting result.
2. The method according to claim 1, characterized in that After receiving the pending issues, recalling the pending issues by using at least two recall strategies, and obtaining the recall information includes: Receiving the pending issues; Based on the preset keywords in the source data set, recall the keywords of the problem to be processed to obtain the recall information; And, generating a pre-answer answer to the question to be processed, and based on the pre-answer vector of the pre-answer answer, performing vector recall on the question to be processed to obtain the recall information.
3. The method according to claim 2, characterized in that The step of recalling keywords for the problem to be processed based on the keywords preset in the source data set includes: By natural language processing, the problem to be processed is split to generate problem segmentation words; Matching the question segmentation with the keywords preset in the source data set; A target keyword matching the question segmentation word is obtained, and the target keyword is selected as the recall information.
4. The method according to claim 2, characterized in that The step of generating a pre-answer answer to the question to be processed, and performing vector recall on the question to be processed based on the pre-answer vector of the pre-answer answer comprises: Inputting the problem to be processed into a language processing model to generate the pre-answer answer to the problem to be processed; By text embedding, the generated pre-answer answer is converted into a pre-answer vector; Calculate the vector similarity between the pre-answer answer and the text vector, picture vector and table vector in the source data set; Based on the vector similarity, the recall information is selected from the text vector, the image vector and / or the table vector.
5. The method according to claim 1, characterized in that The step of reordering the deduplicated recall information and generating the search results associated with the pending question based on the ordering result includes: Calculating the importance of the recall information according to the number of repetitions and / or the recall vector of the recall information; sorting the recall information according to the importance to generate a recall information sequence; The recall information sequence is input into a natural language generation model to generate a response text.
6. The method according to claim 5, characterized in that The step of calculating the importance of the recall information according to the number of repetitions and / or the recall vector of the recall information comprises: Based on the same serial number, the recall information is grouped, and according to the grouping result, the number of repetitions of the recall information is determined; and / or, obtaining the recall vector of the recall information in the search result, and calculating the matching degree between the recall vector and the problem to be processed; The importance of the recall information is calculated according to the number of repetitions and / or the matching degree.
7. The method according to claim 5, characterized in that The step of sorting the recall information according to the importance to generate a recall information sequence comprises: determining an importance ranking of the recall information based on the importance; Reordering the recalled information based on a preset relocation rule and the importance ranking by using a relocation model; According to the sorting result, the recall information sequence is generated.
8. The method according to claim 7, characterized in that The step of sorting the recall information by the relocation model based on the preset relocation rules and the importance ranking includes: Filling the recall information whose importance ranking is less than a first ranking threshold into the sequence head of the idle sequence in the recall information sequence; Fill the recalled information whose importance ranking is greater than the first ranking threshold and less than the second ranking threshold to the end of the idle sequence; updating the importance ranking of the recall information; Jump to execute the step of filling the recall information whose importance ranking is less than the first ranking threshold into the sequence head of the idle sequence in the recall information sequence, and output the recall information sequence after filling all the recall information into the recall information sequence.
9. A control device for an information retrieval system, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the control method of the information retrieval system according to any one of claims 1 to 8.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the control method of the information retrieval system according to any one of claims 1 to 8 are implemented.