Interaction information processing method and device, database retrieval method and device and electronic equipment
By retrieving and association multimodal information in the database of the intelligent question-and-answer system, the problem of incomplete information extraction is solved, and the search recall rate and response accuracy are improved.
Patent Information
- Application Number
- CN202510134749.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-06
- Publication Date
- 2025-06-27
AI Technical Summary
When the existing intelligent question-and-answer system deals with multimodal knowledge bases, information extraction is fragmented and incomplete, resulting in a decrease in retrieval recall and accuracy.
By searching multimodal reference information related to user inquiry information in the database, and guiding the dialogue model to generate a response based on this information, the associated search of information and the acquisition of complementary information are realized.
Improve the search recall rate and response accuracy, obtain complementary information through associated search, and enhance the performance of the intelligent question-and-answer system.
Smart Images

Figure CN120216736A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and more particularly, to a method for processing interaction information, a database retrieval method, an apparatus, and an electronic device. Background Art
[0002] With the development of artificial intelligence technology, intelligent question-and-answer systems based on large models have been widely used. To implement intelligent question-and-answer, an intelligent question-and-answer system usually maintains a database that stores multiple documents, and each document is segmented into multiple document paragraphs. When a query statement from a user is obtained, the intelligent question-and-answer system retrieves the document paragraphs related to the query statement from the database, and by inputting the query statement and its related document paragraphs into a large language model, the large language model generates an answer corresponding to the query statement.
[0003] In real-world scenarios, a knowledge base may include various modal forms, such as pictures, videos, tables, etc. If only the pure text part is extracted, the extracted information will be fragmented and incomplete, reducing the recall rate of the retrieval, and thus reducing the accuracy of the intelligent question-and-answer system. Summary of the Invention
[0004] An object of an embodiment of the present disclosure is to provide a new technical solution for improving the response accuracy of a dialogue system.
[0005] According to a first aspect of the present disclosure, there is provided a method for processing interaction information, including:
[0006] Receiving inquiry information;
[0007] Retrieving first reference information that satisfies a first correlation condition with the inquiry information in the reference information of the database;
[0008] Using the first reference information as a retrieval object in the reference information of the database, and retrieving second reference information that satisfies a second correlation condition with the retrieval object;
[0009] Based on the inquiry information and all the retrieved reference information, guiding a dialogue model to output response information for the inquiry information.
[0010] Optionally, the method further includes:
[0011] After retrieving the second reference information, determining whether the retrieval operation satisfies a set stop condition;
[0012] In the case of not satisfying the stop condition, updating the retrieval object to the second reference information retrieved in the current time, and continuing to execute the step of retrieving second reference information that satisfies the second correlation condition with the retrieval object.
[0013] Optionally, the stopping condition includes:
[0014] The number of retrievals is greater than or equal to a set number; or,
[0015] All the second reference information retrieved in the previous retrieval has been retrieved priorly as a retrieval object.
[0016] Optionally, the second related condition includes any one or more of the following:
[0017] An association relationship is pre - established between the retrieval object and the second reference information in the database;
[0018] The similarity between the feature vectors of the second reference information and the retrieval object satisfies a second set condition;
[0019] The second reference information includes the index information of the retrieval object;
[0020] The retrieval object includes the index information of the second reference information.
[0021] Optionally, the method further includes:
[0022] Obtaining a source document for constructing the database;
[0023] Splitting the source document into at least one reference information, determining the feature vector of the reference information, and storing the feature vector and the reference information in the database in an associated manner; the feature vector is used to determine whether the corresponding reference information and the query information satisfy a first related condition.
[0024] Optionally, splitting the source document into at least one reference information includes:
[0025] Detecting the document format of the source document;
[0026] Splitting the source document into at least one reference information according to the document format.
[0027] Optionally, when the reference information is a picture, determining the feature vector of the reference information includes:
[0028] Extracting key information from the picture to obtain a text description of the reference information;
[0029] Performing feature embedding on the text description as the feature vector of the reference information.
[0030] Optionally, when the reference information is of other information types, the method further includes:
[0031] Convert the reference information into a picture;
[0032] wherein, the other information type is an information type other than pictures and texts.
[0033] According to a second aspect of the present disclosure, there is also provided a database retrieval method, including:
[0034] Receive inquiry information;
[0035] In the reference information of the database, retrieve first reference information that meets a first correlation condition with the inquiry information;
[0036] In the reference information of the database, use the first reference information as a retrieval object, and retrieve second reference information that meets a second correlation condition with the retrieval object;
[0037] All retrieved reference information is used as the retrieval result of the database for the inquiry information.
[0038] According to a third aspect of the present disclosure, there is also provided a processing device for interactive information, including:
[0039] An information receiving module, configured to receive inquiry information;
[0040] A first retrieval module, configured to retrieve first reference information that meets a first correlation condition with the inquiry information in the reference information of the database;
[0041] A second retrieval module, configured to use the first reference information as a retrieval object in the reference information of the database, and retrieve second reference information that meets a second correlation condition with the retrieval object;
[0042] A model guiding module, configured to guide a dialogue model to output a response information for the inquiry information based on the inquiry information and all retrieved reference information.
[0043] According to a fourth aspect of the present disclosure, there is also provided an electronic device, which includes a memory and a processor, the memory is used to store a computer program, and the processor is used to execute the processing method for interactive information according to the first aspect of the present disclosure under the control of the computer program.
[0044] One beneficial effect of the embodiments of the present disclosure is that, through the embodiments of the present disclosure, in the reference information of the database, the first reference information that meets the first correlation condition with the received query information is retrieved, and then the second reference information that meets the second correlation condition with the first reference information in the database is retrieved. Based on the query information and all the retrieved reference information, the dialogue model is guided to output the response information for the query information. In this way, through the associated retrieval of the query information, complementary information can be retrieved, the retrieval recall rate can be improved, and thus the accuracy of the obtained response result can be improved.
[0045] The features and advantages of the embodiments of this specification will become clear through the following detailed description of the exemplary embodiments of this specification with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The drawings incorporated in and constituting a part of this specification illustrate the embodiments of this specification and, together with the description thereof, are used to explain the principles of the embodiments of this specification.
[0047] Figure 1 is a schematic diagram of an application scenario of a method for processing interaction information according to some embodiments;
[0048] Figure 2 shows an architecture diagram of an interaction system adopted by some embodiments;
[0049] Figure 3 shows a schematic diagram of the hardware structure of an electronic device that can be used to implement the method for processing interaction information according to the embodiments of the present disclosure;
[0050] Figure 4 shows a schematic diagram of the flow of a method for processing interaction information according to some embodiments;
[0051] Figure 5 shows a schematic diagram of the flow of a method for processing interaction information according to some other embodiments;
[0052] Figure 6 shows a schematic diagram of the flow of a method for processing interaction information according to some other embodiments;
[0053] Figure 7 shows a schematic diagram of the flow of a method for processing interaction information according to some other embodiments;
[0054] Figure 8 shows a schematic diagram of the structure of a device for processing interaction information according to some embodiments;
[0055] Figure 9 shows a schematic diagram of the hardware structure of an electronic device according to some embodiments. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0056] Various exemplary embodiments of the present specification will now be described in detail with reference to the accompanying drawings.
[0057] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way a limitation on the embodiments of this specification, their applications, or uses.
[0058] It should be noted that like reference numerals and letters denote like items in the following drawings. Therefore, once an item is defined in one drawing, further discussion thereof is not required in subsequent drawings.
[0059] It should be noted that all actions of obtaining signals, information, or data in the embodiments of the present disclosure are carried out on the premise of complying with the corresponding data protection regulations and policies of the country where the location is located and with the authorization given by the corresponding device owner.
[0060] Artificial intelligence is a theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain better results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines, enabling the machines to have the functions of perception, reasoning, and decision-making.
[0061] Artificial intelligence technology is an interdisciplinary subject with a wide range of fields involved, including both hardware-level technologies and software-level technologies. Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. Artificial intelligence software technologies mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0062] With the research and progress of artificial intelligence technology, artificial intelligence technology has been studied and applied in multiple fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, driverless, autonomous driving, robots, smart healthcare, smart customer service, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role. The solution provided by the embodiments of this application involves technologies such as natural language processing and machine learning / deep learning in artificial intelligence, and is mainly applied to an interaction system adopting the RAG (Retrieval-Augmented Generation) framework. Among them, RAG refers to retrieving reference information from an external database before using a large language model to answer questions, and prompting the retrieved reference information to the large model for answering questions. By combining information retrieval and large language models, RAG improves the accuracy of the inference results of large language models.
[0063] Figure 1 shows the interaction process of the interaction system adopting the RAG framework in this application. Refer to Figure 1 , the interaction system pre-obtains documents in a certain field (such as electricity, medicine, etc.), identifies and analyzes the obtained documents, then slices them into multiple pieces of reference information, and further stores each piece of reference information in a database. When the inquiry information input by the user is obtained, the first reference information that meets the first relevant condition with the inquiry information input by the user is retrieved from the database, then the second reference information that meets the second relevant condition with the first reference information is retrieved from the database, and then the inquiry information and all the retrieved reference information are provided to the dialogue model, so that the dialogue model can understand and respond to the inquiry information input by the user based on these reference information, and return the obtained response information to the user.
[0064] Figure 2 shows the architecture diagram of the interaction system adopted by the embodiments of this application. Refer to Figure 2 , the interaction system includes: a terminal device 2100, a server 2200, and a network 2300.
[0065] Among them, the terminal device 2100 can be a smart phone, a laptop computer, a tablet computer, etc. The embodiments of this application do not make specific limitations on the product type of the terminal device 2100. An interaction application can be installed on the terminal device 2100, and based on this interaction application, the interaction between humans and machines can be completed. Among them, the interaction application can be an application specifically used for human-machine interaction, or other applications with interaction functions, such as a social application, a browser application, a search engine, etc. with interaction functions. The embodiments of this application do not make specific limitations on this.
[0066] The server 2200 is the backend server for the interactive application. This server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. The embodiments of the present application do not make specific limitations on this. To achieve human-computer interaction, the server 2200 maintains a database. The database can store the document identification information of source documents in a certain field (such as document names, field standard names, etc.), and can also store each reference information segmented from the source documents and their corresponding feature vectors, etc. The server 2200 can call multiple models such as an embedding model and a large language model. These models can be directly deployed on the server 2200, or deployed on other servers. The server 2200 can call these models by interacting with other servers.
[0067] The network 2300 can be a wireless communication network or a wired communication network, and can be a local area network or a wide area network. In Figure 1 the shown interactive system, the terminal device 2100 and the server 2200 can communicate through the network 2300.
[0068] The interaction process based on the terminal device 2100 and the server 2200 can be as follows: The user can input query information on the terminal device 2100 and send a query request carrying the query information through the terminal device 2100. After receiving the query request, the server 2200 obtains the user's query information, calls the embedding model, performs vectorization processing on the query information to obtain the feature vector corresponding to the query information, and then based on the feature vector corresponding to the query information and the feature vectors corresponding to each reference information in the database, by calculating the similarity between the feature vector corresponding to the query information and the feature vectors corresponding to each reference information, retrieves the first reference information that satisfies the first correlation condition with the query information from the database, and then uses the first reference information as the retrieval object to retrieve the second reference information that satisfies the second correlation condition with the retrieval object in the database, and then provides the query information and all the retrieved reference information to the dialogue model to guide the dialogue model to output the response information for the query information, and then sends the response information to the terminal device 2100, which is provided to the user by the terminal device 2100.
[0069] In a real scenario, the source documents used to build the database can include information in various modal forms, such as text, pictures, videos, tables, etc. If only the pure text part of the document is extracted to build the database, the extracted reference information will be fragmented and incomplete, greatly reducing the recall rate of the retrieval.
[0070] To solve the problem of low recall rate in database retrieval of an interaction system adopting the RAG framework, when constructing a database based on source documents, information in various modal forms in the source documents is extracted and associated retrieval of information in multiple modal forms is performed. In this way, complementary information can be retrieved and the recall rate of the retrieval can be improved, and further the accuracy of the response information to the query information output by the dialogue model can be improved.
[0071] Figure 3 FIG. shows a schematic hardware structure diagram of an electronic device that can be used to implement the method for processing interaction information according to an embodiment of the present disclosure.
[0072] Figure 3 The electronic device 3000 in may be at least the foregoing server 2000, or may be the foregoing terminal device 1000 and server 2000, which is not limited herein.
[0073] As Figure 3 shown, the electronic device 3000 may include a processor 3101, a memory 3102, an interface device 3103, a communication device 3104, an output device 3105, an input device 3106, and so on. Figure 3 The hardware configuration shown is merely illustrative and is in no way intended to limit the present disclosure, its application, or its use.
[0074] The processor 3101 is used to execute a computer program, and the computer program can be written using an instruction set such as x86, Arm, RISC, MIPS, SSE, etc. The memory 3102 includes, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, and the like. The interface device 3103 includes, for example, a USB interface, a network cable interface, a headphone interface, and the like. The communication device 3104 can perform wired or wireless communication, for example. The communication device 3104 may include at least one short-range communication module, for example, any module that performs short-range wireless communication based on short-range wireless communication protocols such as the Hilink protocol, WiFi (IEEE 802.31 protocol), Mesh, Bluetooth, ZigBee, Thread, Z-Wave, NFC, UWB, LiFi, etc. The communication device 3104 may also include a remote communication module, for example, any module that performs WLAN, GPRS, 2G / 3G / 4G / 5G remote communication. The output device 3105 may include, for example, a liquid crystal display screen or a touch display screen, a speaker, and the like. The input device 3106 may include, for example, a touch screen, a keyboard, a microphone, various sensors, and the like.
[0075] In this embodiment, the memory 3102 of the electronic device 3000 is used to store a computer program, and the computer program is used to control the processor 3101 to operate to execute the method for processing interaction information according to any embodiment of the present disclosure.
[0076] Next, taking the electronic device 3000 as an example of the implementation subject, various embodiments of the method for processing interaction information will be described. Figure 3 For example, taking the electronic device 3000 as the implementation subject, various embodiments of the method for processing interaction information will be described.
[0077] <First Embodiment>
[0078] Figure 4 A method for processing interaction information according to some embodiments is shown. The method for processing interaction information may include the following steps S410 to S440:
[0079] Step S410, receiving inquiry information.
[0080] In this embodiment, the inquiry information may be input by the user through a terminal device installed with an interaction application, or may be information generated by the terminal device or the server, and is not limited herein.
[0081] In an embodiment where the inquiry information is input by the user through a terminal device installed with an interaction application or is generated by the terminal device, the terminal device may send a query request carrying the inquiry information to the server, and the server receives the query request and obtains the inquiry information in the query request.
[0082] Step S420, retrieving first reference information that satisfies a first correlation condition with the inquiry information from the reference information in the database.
[0083] In the database of this embodiment, multiple reference information and the feature vector corresponding to each reference information may be stored.
[0084] In this embodiment, the first correlation condition may include: the similarity between the feature vector of the first reference information and the feature vector of the inquiry information satisfies a first set condition.
[0085] In one example, the first set condition may be that the similarity is greater than or equal to a first similarity threshold. The first similarity threshold may be a value set according to the application scenario or specific requirements respectively. For example, the first similarity threshold may be 0.8.
[0086] In another example, the first set condition may be that the descending order value of the similarity is less than or equal to a first sorting value threshold. The first sorting value threshold may be set according to the application scenario or specific requirements respectively. For example, the first sorting value threshold may be 3.
[0087] In this embodiment, an embedding model may be called to perform feature embedding on the inquiry information to obtain the feature vector of the inquiry information, and then the similarity between the feature vector of the inquiry information and the feature vector corresponding to the reference information may be determined.
[0088] In some embodiments, the cosine similarity between the feature vector of the query information and the feature vector corresponding to the reference information in the database can be used as the similarity between the feature vector of the query information and the feature vector corresponding to the reference information.
[0089] In other embodiments, a machine learning model pre-trained can be used to process the feature vector of the query information and the feature vector corresponding to the reference information in the database to obtain the similarity between the feature vector of the query information and the feature vector corresponding to the reference information.
[0090] Step S430: In the reference information of the database, use the first reference information as the retrieval object to retrieve the second reference information that meets the second correlation condition with the retrieval object.
[0091] In this embodiment, the information types of the first reference information and the second reference information can be the same or different, which is not limited herein. Among them, the information type of a piece of reference information in the database can be text, picture, or table.
[0092] In some embodiments, the second correlation condition includes any one or more of the following:
[0093] An association relationship has been established between the retrieval object and the second reference information in the database in advance;
[0094] The similarity between the feature vector of the second reference information and the feature vector of the retrieval object meets the second set condition;
[0095] The second reference information includes the index information of the retrieval object;
[0096] The retrieval object includes the index information of the second reference information.
[0097] In the embodiments where the second correlation condition includes that an association relationship has been established between the retrieval object and the second reference information in the database in advance, it can be that one second reference information is associated with one first reference information, or multiple second reference information are associated with one first reference information.
[0098] In one example, an association relationship can be established between any piece of reference information obtained by splitting any source document and other reference information obtained by splitting the same source document.
[0099] In one example, an association relationship can be established between any reference information and another reference information that contains the index information of the former. An association relationship can also be established between at least two reference information whose index information contains the same reference information. Or, an association relationship can be established between at least two reference information whose corresponding index information is included in the same reference information. Among them, the index information can include at least one of the following: the number of a picture, the name of a picture, the number of a table, the name of a table. For example, when the index information of the third reference information is Figure X, the fourth reference information and the third reference information belong to the same source document, and the fourth reference information contains Figure X, an association relationship is established between the third reference information and the fourth reference information.
[0100] In one example, it can also be to establish an association relationship between two reference information whose similarity between feature vectors meets the third set condition. Among them, the third set condition can be that the similarity is greater than or equal to the third similarity threshold. Among them, the third similarity threshold can be a value set respectively according to the application scenario or specific requirements. For example, the third similarity threshold can be 0.8. Or, the third set condition can be that the descending order value of the similarity is less than or equal to the third sorting value threshold. Among them, the third sorting value threshold can be set respectively according to the application scenario or specific requirements. For example, the third sorting value threshold can be 3.
[0101] In an embodiment where the second correlation condition includes that the similarity between the feature vector of the second reference information and the feature vector of the retrieval object meets the second set condition, the second set condition can be that the similarity is greater than or equal to the second similarity threshold. Among them, the second similarity threshold can be a value set respectively according to the application scenario or specific requirements. For example, the second similarity threshold can be 0.8. Or, the second set condition can be that the descending order value of the similarity is less than or equal to the second sorting value threshold. Among them, the second sorting value threshold can be set respectively according to the application scenario or specific requirements. For example, the second sorting value threshold can be 3.
[0102] In an embodiment where the second correlation condition includes that the second reference information includes the index information of the retrieval object, the information type of the second reference information can be text, and the information type of the retrieval object can be any one of text, picture, and table. Among them, the index information can include at least one of the following: the number of a picture, the name of a picture, the number of a table, the name of a table. For example, when the index information of the retrieval object is Figure X, the second reference information and the retrieval object belong to the same source document, and the second reference information contains Figure X, the second reference information includes the index information of the retrieval object.
[0103] In an embodiment where the second related condition includes index information of the second reference information in the retrieval object, the information type of the second reference information may be any one of text, picture, and table, and the information type of the retrieval object may be text. Among them, the index information may include at least one of the following: the number of the picture, the name of the picture, the number of the table, and the name of the table. For example, when the index information of the second reference information is Figure X, the second reference information and the retrieval object belong to the same source document, and the retrieval object contains Figure X, the retrieval object includes the index information of the second reference information.
[0104] Through this embodiment, the second reference information that meets the second related condition with the retrieval object can be retrieved from the reference information in the database.
[0105] Step S440, based on the query information and all the retrieved reference information, guide the dialogue model to output the response information for the query information.
[0106] In this embodiment, it may be to input the first reference information, the second reference information, and the query information into the dialogue model to obtain the response information for the query information.
[0107] Furthermore, it may be to input the feature vector of the first reference information, the feature vector of the second reference information, and the feature vector of the query information into the dialogue model to obtain the response information for the query information.
[0108] In this embodiment, the dialogue model may be a large language model (LLM). A large language model is an artificial intelligence model based on deep learning technology and can interact with users intelligently in the form of text.
[0109] Specifically, through the processing method of the interaction information in this embodiment, the procedural content generation (PCG) can be called by the dialogue model for game art asset generation, and the game plot can also be generated by the dialogue model and interact with player users.
[0110] For example, if the query information describes the desire to generate a Christmas scene, through the method of this embodiment, a picture of a pine tree can be retrieved as the first reference information according to the query information, and then a pine tree generation program can be retrieved as the second reference information according to the picture of the pine tree. The picture of the pine tree and the pine tree generation program are both input into the dialogue model to guide the dialogue model to generate a Christmas scene.
[0111] Through the embodiments of the present disclosure, in the reference information of the database, the first reference information that meets the first correlation condition with the received query information is retrieved, then the second reference information that meets the second correlation condition with the first reference information in the database is retrieved, and based on the query information and all the retrieved reference information, the dialogue model is guided to output the response information for the query information. In this way, through the associated retrieval of the query information, complementary information can be retrieved, the retrieval recall rate can be improved, and further the accuracy of the obtained response result can be improved.
[0112] <Second Embodiment>
[0113] Figure 5 The flowchart shows the processing method of interaction information according to some embodiments. Different from the above first embodiment, in this embodiment, before guiding the dialogue model to output the response information for the query information based on the query information and all the retrieved reference information, it is determined whether the retrieval operation meets the set stop condition to perform the associated retrieval of the query information and improve the retrieval recall rate. As Figure 5 shown, the processing method of interaction information in this embodiment may include steps S510 to S560:
[0114] Step S510, receiving the query information.
[0115] Step S520, in the reference information of the database, retrieving the first reference information that meets the first correlation condition with the query information.
[0116] Step S530, in the reference information of the database, using the first reference information as the retrieval object, retrieving the second reference information that meets the second correlation condition with the retrieval object.
[0117] In some embodiments, the second correlation condition includes any one or more of the following:
[0118] An association relationship is pre-established between the retrieval object and the second reference information in the database;
[0119] The similarity between the feature vector of the second reference information and the feature vector of the retrieval object meets the second set condition;
[0120] The second reference information includes the index information of the retrieval object;
[0121] The retrieval object includes the index information of the second reference information.
[0122] Step S540, determining whether the retrieval operation meets the set stop condition. If so, execute step S560; if not, execute step S550.
[0123] In some embodiments, the stop condition includes: the number of retrievals is greater than or equal to a set number; or, all of the second reference information retrieved in the current retrieval has been previously retrieved as a retrieval object.
[0124] In embodiments where the stop condition includes the number of retrievals being greater than or equal to a set number, the set number can be set in advance according to the application scenario or specific requirements. For example, the set number can be 5.
[0125] Through this embodiment, infinite associated retrievals can be avoided, which may affect the interaction speed.
[0126] In embodiments where the stop condition includes that all of the second reference information retrieved in the current retrieval has been previously retrieved as a retrieval object, it can be to compare the second reference information retrieved in the current retrieval with the reference information retrieved previously. If all of the second reference information retrieved in the current retrieval has been previously retrieved as a retrieval object, it is determined that the retrieval operation meets the stop condition; if any one of the second reference information retrieved in the current retrieval has been previously retrieved as a retrieval object, it is determined that the retrieval operation does not meet the stop condition.
[0127] For example, if the second reference information retrieved in the current retrieval is the second reference information retrieved in the jth retrieval, then, in the case where the second reference information retrieved in the previous j - 1 retrievals includes all of the second reference information retrieved in the jth retrieval, it is determined that the retrieval operation meets the stop condition; in the case where the second reference information retrieved in the previous j - 1 retrievals does not include at least one of the second reference information retrieved in the jth retrieval, it is determined that the retrieval operation does not meet the stop condition. Here, j is a positive integer greater than 1.
[0128] Step S550: Update the retrieval object to the second reference information retrieved in the current retrieval, and continue to execute the step of retrieving the second reference information that meets the second correlation condition with the retrieval object.
[0129] In this embodiment, in the case of updating the retrieval object to the second reference information retrieved in the current retrieval, then, when continuing to execute the step of retrieving the second reference information that meets the second correlation condition with the retrieval object, the reference information that meets the second correlation condition with the second reference information retrieved in the previous retrieval can be retrieved.
[0130] For example, after the second reference information is retrieved in the ith retrieval, in the case where the retrieval operation does not meet the set stop condition, it can be to update the retrieval object to the second reference information retrieved in the ith retrieval, and the (i + 1)th time execute the step of retrieving the second reference information that meets the second correlation condition with the retrieval object, to obtain the second reference information retrieved in the (i + 1)th retrieval. Here, i is a positive integer.
[0131] In some embodiments, the retrieval object may also be updated to a second reference information that is retrieved currently for the first time and has not been retrieved previously as a retrieval object, which can avoid repeated retrieval and speed up the retrieval speed.
[0132] Step S560: Based on the query information and all the retrieved reference information, guide the dialogue model to output a response information for the query information.
[0133] Through this embodiment, by performing an associated retrieval on the query information, more reference information related to the query information can be retrieved, the recall rate of the retrieval can be improved, and thus the accuracy of the obtained response result can be enhanced.
[0134] <The Third Embodiment>
[0135] Figure 6 FIG. shows a flowchart of a method for processing interaction information according to some embodiments. Different from the above first embodiment, in this embodiment, before performing a retrieval based on the database, the database may be pre-constructed to facilitate subsequent retrieval of the query information based on the database and improve the retrieval recall rate. As Figure 6 shown, the method for processing interaction information in this embodiment may include steps S610 to S660:
[0136] Step S610: Obtain source documents for constructing the database.
[0137] In this embodiment, the source documents may be pre-uploaded to the server or downloaded by the server from the network.
[0138] In this embodiment, the file format of the source documents may be in any format and is not limited herein.
[0139] Step S620: Split the source documents into at least one reference information, determine the feature vectors of the reference information, and store the feature vectors and the reference information in the database in an associated manner.
[0140] In this embodiment, the feature vectors of the reference information are used to determine whether the reference information and the query information satisfy the first correlation condition.
[0141] In this embodiment, the source documents may have the problem of overly long information. Therefore, the source documents may be split into multiple reference information to facilitate more efficient processing and retrieval of information subsequently. This can help reduce the burden on the dialogue model and improve the accuracy of database retrieval.
[0142] In this embodiment, the information type of a obtained reference information is a single text, picture, table, video, etc. Specifically, a reference information may be a picture, a sentence of text, a paragraph of text, a table, etc.
[0143] In some embodiments, splitting a source document into at least one piece of reference information includes: detecting a document format of the source document; and splitting the source document into at least one piece of reference information according to the document format.
[0144] In this embodiment, the document format of the source document may include plain text type (such as txt), graphic type (such as docx, doc, ppt, pptx, xls, xlsx, csv, etc.), and plain picture type (such as pdf, jpg, png, etc.).
[0145] For source documents in plain text format, the source documents can be split according to sentences, paragraphs, fixed text length, etc.
[0146] For source documents in graphic and text formats, the source documents are split according to their own structured information, such as titles, tables, paragraphs, sentences, pictures, etc. at various levels, and index information corresponding to each reference information is obtained.
[0147] For a source document in a pure image format, a layout analysis method may be used to perform structural processing to obtain at least one reference information and corresponding index information.
[0148] In this embodiment, when the index information of the reference information is obtained, the reference information and the index information are associated and stored in the database.
[0149] Through this embodiment, the source document is split into at least one reference information according to the document format, so that the information type of each reference information obtained can be single, so that the information can be processed and retrieved more efficiently later.
[0150] In some embodiments, multimodal embedding may be used to obtain a feature vector for each piece of reference information. Multimodal embedding is the process of mapping data from different modalities (such as text, images, audio, etc.) into a common low-dimensional vector space. Through this mapping, data from different modalities can be represented and processed in the same space, allowing computers to better understand and fuse these multi-source information and mine potential associations and patterns therein.
[0151] In some embodiments, the feature vector of the reference information may also be determined according to the information type of the reference information.
[0152] When the reference information is text, feature embedding may be performed on the text to obtain a feature vector of the reference information.
[0153] In some embodiments, when the reference information is a picture, determining the feature vector of the reference information includes: extracting key information from the picture to obtain a text description of the reference information; and embedding features in the text description as the feature vector of the reference information.
[0154] In this embodiment, a pre-trained multi-modal model can be used to extract key information from a picture to obtain a text description of the reference information. Among them, the multi-modal model is a neural network model that can convert multiple modalities, understand the content of the picture, and generate a text description of the picture. For example, the multi-modal model can be GPT-4V.
[0155] Through this embodiment, by performing feature embedding on the text description of the picture to determine the feature vector of the reference information, the obtained feature vector can represent richer content information, and thus the reference information related to the query information can be retrieved more accurately.
[0156] In some embodiments, when the reference information is of other information types, the method further includes: converting the reference information into a picture; extracting key information from the picture to obtain a text description of the reference information; performing feature embedding on the text description as the feature vector of the reference information. Among them, the other information types are information types other than pictures and texts.
[0157] In this embodiment, the reference information of other information types can be first converted into pictures. Among them, the reference information of other information types can be, for example, a flowchart in a PPT document, a flowchart in a word document, a table, or a formula.
[0158] On the basis of converting the reference information of other information types into pictures, extract key information from the pictures to obtain a text description of the reference information of this other information type; perform feature embedding on the text description as the feature vector of the reference information of this other information type.
[0159] Through this embodiment, converting the reference information of other information types into pictures and then performing feature embedding on the text description of the pictures to determine the feature vector of the reference information can make the obtained feature vector represent richer content information, and thus the reference information related to the query information can be retrieved more accurately.
[0160] In some embodiments, when storing the reference information in a database, the method may further include: establishing an association relationship between the reference information in the database.
[0161] In some embodiments, establishing an association relationship between the reference information in the database includes: establishing an association relationship between the third reference information in the database and the fourth reference information including the index information of the third reference information.
[0162] In this embodiment, the index information may include at least one of the following: the number of the picture, the name of the picture, the number of the table, the name of the table.
[0163] For example, when the index information of the third reference information is Figure X, the fourth reference information belongs to the same source document as the third reference information, and the fourth reference information contains Figure X, an association relationship is established between the third reference information and the fourth reference information.
[0164] Through this embodiment, an association relationship can be established between a text and the pictures or tables it cites.
[0165] In some embodiments, establishing an association relationship between reference information in a database includes: determining the similarity between the feature vectors of the fifth reference information and at least one sixth reference information in the database; establishing an association relationship between the fifth reference information and the sixth reference information according to the similarity.
[0166] In one example, it can be to calculate the cosine similarity between the feature vector of the fifth reference information and the feature vector of the sixth reference information as the similarity between the feature vector of the fifth reference information and the feature vector of the sixth reference information.
[0167] In another example, it can also be to process the feature vectors of the fifth reference information and the sixth reference information based on a pre-trained machine learning model to obtain the similarity between the feature vector of the fifth reference information and the feature vector of the sixth reference information.
[0168] In this embodiment, based on obtaining the similarity between the feature vector of the fifth reference information and the feature vector of each sixth reference information, it can be to reorder the sixth reference information according to the order from high to low similarity, and establish an association relationship between the fifth reference information and the TopN sixth reference information. Wherein, N is a preset positive integer. For example, N can be 3. Or, it can also be to establish an association relationship between the fifth reference information and the sixth reference information whose similarity is greater than or equal to the third similarity threshold.
[0169] Through this embodiment, an association relationship can be established between a text and the pictures or tables it describes.
[0170] In some embodiments, establishing an association relationship between reference information in a database further includes: establishing an association relationship between the seventh reference information and the eighth reference information that are associated with the same reference information in the database.
[0171] In this embodiment, when an association relationship is established between the seventh reference information and the ninth reference information, and an association relationship is established between the eighth reference information and the ninth reference information, an association relationship is established between the seventh reference information and the eighth reference information.
[0172] Among them, the association relationship can be established between the seventh reference information and the ninth reference information, and the association relationship can be established between the eighth reference information and the ninth reference information in any of the embodiments. The method of establishing the association relationship between the seventh reference information and the ninth reference information and the method of establishing the association relationship between the eighth reference information and the ninth reference information can be the same or different, which is not limited herein.
[0173] Through the method of establishing the association relationship in this embodiment, the index information of the ninth reference information can be included in both the seventh reference information and the eighth reference information for establishing the association connection; or, the index information of the seventh reference information and the eighth reference information for establishing the association connection can be included in the ninth reference information.
[0174] For example, if a piece of text cites several pictures and each picture may be cited by multiple pieces of text, pairwise mesh associations can be made for each piece of text and each picture.
[0175] Through this embodiment, more association relationships can be established between the reference information in the database, so that through the associated retrieval of the query information subsequently, more complete reference information can be retrieved, the retrieval recall rate can be improved, and thus the accuracy of the obtained response result can be improved.
[0176] Step S630, receive the query information.
[0177] Step S640, in the reference information of the database, retrieve the first reference information that meets the first correlation condition with the query information.
[0178] Step S650, in the reference information of the database, use the first reference information as the retrieval object and retrieve the second reference information that meets the second correlation condition with the retrieval object.
[0179] Step S660, based on the query information and all the retrieved reference information, guide the dialogue model to output the response information to the query information.
[0180] By constructing the database through the embodiments of the present disclosure and then performing associated retrieval on the query information based on the database, complementary information can be retrieved, the retrieval recall rate can be improved, and thus the accuracy of the obtained response result can be improved.
[0181] <Fourth Embodiment>
[0182] Figure 7 Shows a flowchart of a database retrieval method according to some embodiments. As Figure 7 shown, the database retrieval method of this embodiment may include steps S710 to S740:
[0183] Step S710, receive the query information.
[0184] In this embodiment, the inquiry information can be input by the user through a terminal device installed with an interactive application, or can be information generated by the terminal device or the server, which is not limited herein.
[0185] In an embodiment where the inquiry information is input by the user through a terminal device installed with an interactive application or is generated by the terminal device, the terminal device may send a query request carrying the inquiry information to the server, and the server receives the query request and obtains the inquiry information in the query request.
[0186] Step S720, in the reference information of the database, retrieve the first reference information that satisfies the first correlation condition with the inquiry information.
[0187] In the database of this embodiment, it may store multiple pieces of reference information and the feature vector corresponding to each piece of reference information.
[0188] In this embodiment, the first correlation condition may include: the similarity between the feature vector of the first reference information and the feature vector of the inquiry information satisfies the first set condition.
[0189] In one example, the first set condition may be that the similarity is greater than or equal to the first similarity threshold. Among them, the first similarity threshold may be a value set according to the application scenario or specific requirements respectively. For example, the first similarity threshold may be 0.8.
[0190] In another example, the first set condition may be that the descending order value of the similarity is less than or equal to the first sorting value threshold. Among them, the first sorting value threshold may be set according to the application scenario or specific requirements respectively. For example, the first sorting value threshold may be 3.
[0191] In this embodiment, it may be to perform feature embedding on the inquiry information to obtain the feature vector of the inquiry information, and then determine the similarity between the feature vector of the inquiry information and the feature vector corresponding to the reference information.
[0192] In some embodiments, it may be to calculate the cosine similarity between the feature vector of the inquiry information and the feature vector corresponding to the reference information in the database as the similarity between the feature vector of the inquiry information and the feature vector corresponding to the reference information.
[0193] In other embodiments, it may be to process the feature vector of the inquiry information and the feature vector corresponding to the reference information in the database based on a pre-trained machine learning model to obtain the similarity between the feature vector of the inquiry information and the feature vector corresponding to the reference information.
[0194] Step S730: In the reference information of the database, use the first reference information as the retrieval object, and retrieve the second reference information that satisfies the second correlation condition with the retrieval object.
[0195] In this embodiment, the information types of the first reference information and the second reference information may be the same or different, and are not limited herein. Among them, the information type of a piece of reference information in the database may be text, picture, or table.
[0196] In some embodiments, the second correlation condition includes any one or more of the following:
[0197] An association relationship has been established in advance between the retrieval object and the second reference information in the database with the retrieval object;
[0198] The similarity between the feature vector of the second reference information and the feature vector of the retrieval object satisfies the second set condition;
[0199] The second reference information includes the index information of the retrieval object;
[0200] The retrieval object includes the index information of the second reference information.
[0201] In the embodiment where the second correlation condition includes that an association relationship has been established in advance between the retrieval object and the second reference information in the database with the retrieval object, it may be that one piece of second reference information is associated with the first reference information, or multiple pieces of second reference information are associated with the first reference information.
[0202] In one example, an association relationship can be established between any piece of reference information obtained by splitting any source document and other reference information obtained by splitting the same source document.
[0203] In one example, an association relationship can be established between any piece of reference information and another piece of reference information that contains the index information of this reference information, and an association relationship can also be established between at least two pieces of reference information that contain the index information of the same reference information, and can also be between at least two pieces of reference information whose corresponding index information is included in the same piece of reference information. Among them, the index information may include at least one of the following: the number of a picture, the name of a picture, the number of a table, the name of a table. For example, when the index information of the third reference information is Figure X, the fourth reference information belongs to the same source document as the third reference information, and the fourth reference information contains Figure X, an association relationship is established between the third reference information and the fourth reference information.
[0204] In one example, it is also possible to establish an association relationship between two reference information whose similarity between feature vectors satisfies a third set condition. Among them, the third set condition may be that the similarity is greater than or equal to a third similarity threshold. The third similarity threshold may be a value set according to the application scenario or specific requirements respectively. For example, the third similarity threshold may be 0.8. Or, the third set condition may be that the descending order value of the similarity is less than or equal to a third sorting value threshold. The third sorting value threshold may be set according to the application scenario or specific requirements respectively. For example, the third sorting value threshold may be 3.
[0205] In an embodiment where the second correlation condition includes that the similarity between the feature vector of the second reference information and the feature vector of the retrieval object satisfies the second set condition, the second set condition may be that the similarity is greater than or equal to a second similarity threshold. The second similarity threshold may be a value set according to the application scenario or specific requirements respectively. For example, the second similarity threshold may be 0.8. Or, the second set condition may be that the descending order value of the similarity is less than or equal to a second sorting value threshold. The second sorting value threshold may be set according to the application scenario or specific requirements respectively. For example, the second sorting value threshold may be 3.
[0206] In an embodiment where the second correlation condition includes that the second reference information includes the index information of the retrieval object, the information type of the second reference information may be text, and the information type of the retrieval object may be any one of text, picture, and table. The index information may include at least one of the following: the number of the picture, the name of the picture, the number of the table, and the name of the table. For example, when the index information of the retrieval object is Figure X, the second reference information and the retrieval object belong to the same source document, and the second reference information contains Figure X, the second reference information includes the index information of the retrieval object.
[0207] In an embodiment where the second correlation condition includes that the retrieval object includes the index information of the second reference information, the information type of the second reference information may be any one of text, picture, and table, and the information type of the retrieval object may be text. The index information may include at least one of the following: the number of the picture, the name of the picture, the number of the table, and the name of the table. For example, when the index information of the second reference information is Figure X, the second reference information and the retrieval object belong to the same source document, and the retrieval object contains Figure X, the retrieval object includes the index information of the second reference information.
[0208] Through this embodiment, the second reference information that satisfies the second correlation condition with the first reference information can be retrieved from the reference information in the database.
[0209] Step S740, all the retrieved reference information is used as the retrieval result corresponding to the query information.
[0210] In this embodiment, the server may output the first reference information and the second reference information as the retrieval result of the database for the query information.
[0211] Furthermore, the server may return the retrieval result to the terminal device, or may transmit the retrieval result to other servers equipped with large language models, which is not limited herein.
[0212] Through this embodiment, in the reference information of the database, the first reference information that meets the first correlation condition with the received query information is retrieved, and then the second reference information that meets the second correlation condition with the first reference information in the database is retrieved, and all the retrieved reference information is used as the retrieval result corresponding to the query information. By performing associated retrieval on the query information, complementary information can be retrieved and the retrieval recall rate can be improved.
[0213] <Apparatus Embodiment>
[0214] Figure 8 The composition structure diagram of the processing apparatus for interaction information according to an embodiment of the present disclosure is shown. As Figure 8 shown, the processing apparatus 800 for interaction information includes an information receiving module 810, a first retrieval module 820, a second retrieval module 830, and a model guiding module 840.
[0215] The information receiving module 810 is configured to receive query information.
[0216] The first retrieval module 820 is configured to retrieve the first reference information that meets the first correlation condition with the query information in the reference information of the database.
[0217] The second retrieval module 830 is configured to use the first reference information as the retrieval object in the reference information of the database and retrieve the second reference information that meets the second correlation condition with the retrieval object.
[0218] The model guiding module 840 is configured to guide the dialogue model to output the response information for the query information based on the query information and all the retrieved reference information.
[0219] In some embodiments, the processing apparatus 800 for interaction information further includes:
[0220] a condition detection module, configured to determine whether the retrieval operation meets the set stop condition after the second reference information is retrieved;
[0221] The second retrieval module 830 is configured to, when the stop condition is not satisfied, update the retrieval object to the second reference information retrieved in the current retrieval, and continue to perform the step of retrieving the second reference information that satisfies the second correlation condition with the retrieval object.
[0222] In some embodiments, the stop condition includes:
[0223] The number of retrievals is greater than or equal to a set number; or,
[0224] All the second reference information retrieved in the current retrieval has been retrieved earlier as the retrieval object.
[0225] In some embodiments, the second correlation condition includes any one or more of the following:
[0226] An association relationship is pre-established between the retrieval object and the second reference information in the database;
[0227] The similarity between the feature vector of the second reference information and the feature vector of the retrieval object satisfies a second set condition;
[0228] The index information of the retrieval object is included in the second reference information;
[0229] The index information of the second reference information is included in the retrieval object.
[0230] In some embodiments, the interaction information processing device 800 further includes:
[0231] A document acquisition module, configured to acquire source documents for constructing the database;
[0232] A document processing module, configured to split the source documents into at least one reference information, determine the feature vector of the reference information, and store the feature vector and the reference information in the database in an associated manner; the feature vector is used to determine whether the corresponding reference information and the query information satisfy the first correlation condition. In some embodiments, the document processing module is configured to:
[0233] Detect the document format of the source documents;
[0234] Split the source documents into at least one reference information according to the document format.
[0235] In some embodiments, when the reference information is a picture, the document processing module is configured to:
[0236] Extract key information from the picture to obtain a text description of the reference information;
[0237] Perform feature embedding on the text description as the feature vector of the reference information.
[0238] In some embodiments, when the reference information is of other information types, the processing device 800 for interaction information further includes:
[0239] An information conversion module, configured to convert the reference information into a picture; wherein, the other information type is an information type other than pictures and texts.
[0240] <Device Embodiment>
[0241] Figure 9 The schematic diagram of the hardware structure of an electronic device according to some other embodiments is shown. As Figure 9 shown, the electronic device 900 includes a processor 910 and a memory 920. The memory 920 is used to store a computer program, and the computer program is used to control the operation of the processor 910 to control the electronic device 900 to execute the method for processing interaction information according to any embodiment of the present disclosure.
[0242] An embodiment of the present disclosure also provides a computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the method for processing interaction information according to any embodiment of the present disclosure.
[0243] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for device and equipment embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0244] The specific embodiments of this specification are described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the specific order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0245] The embodiments of this specification can be devices, methods, and / or computer program products. The computer program products can include a computer-readable storage medium having computer-readable program instructions thereon for causing a processor to implement various aspects of the embodiments of this specification.
[0246] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium may be, for example—but not limited to—an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: 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), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as a punched card or raised structures in grooves having instructions stored thereon, and any suitable combination of the foregoing. The computer-readable storage medium as used herein is not construed as being a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.
[0247] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing / processing devices, or can be downloaded to an external computer or an external storage device through a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include a copper transmission cable, an optical fiber transmission, a wireless transmission, a router, a firewall, a switch, a gateway computer, and / or an edge server. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.
[0248] The computer program instructions for performing the operations of the embodiments of this specification may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone 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 it may be connected to an external computer (e.g., by using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of the computer-readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field-programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer-readable program instructions to implement various aspects of the embodiments of this specification.
[0249] Aspects of the embodiments of this specification are described herein with reference to the flowcharts and / or block diagrams of methods, apparatuses (devices), and computer program products according to the embodiments of this specification. It should be understood that each block of the flowcharts and / or block diagrams, and the combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0250] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine such that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is produced that implements the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause a computer, a programmable data processing device, and / or other devices to work in a specific manner. Thus, the computer-readable medium storing the instructions includes a manufactured article that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0251] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, causing a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process such that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in one or more boxes of the flowchart and / or block diagram.
[0252] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present specification. In this regard, each box in the flowchart or block diagram may represent a module, a segment of a program, or a part of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the boxes may occur in a different order than noted in the figures. For example, two consecutive boxes may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functionality involved. It should also be noted that each box in the block diagram and / or flowchart, and combinations of boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or acts, or by a combination of dedicated hardware and computer instructions. As is well known to those skilled in the art, implementation by hardware, implementation by software, and implementation by a combination of software and hardware are equivalent.
[0253] The embodiments of the present specification have been described above. The above description is exemplary and not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art in the technical field without departing from the scope of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, the practical application, or the improvement of technologies in the market, or to enable other ordinary skilled persons in the technical field to understand the embodiments disclosed herein.
Claims
1. A method for processing interactive information, comprising: Receive inquiry information; Retrieving first reference information that satisfies a first correlation condition with the query information from the reference information in the database; In the reference information in the database, the first reference information is used as a search object, and second reference information that satisfies a second correlation condition with the search object is searched; Based on the query information and all the retrieved reference information, the dialogue model is guided to output response information to the query information.
2. The method according to claim 1, wherein: The method further comprises: After retrieving the second reference information, determining whether the retrieval operation satisfies a set stop condition; When the stop condition is not satisfied, the search object is updated to the second reference information currently searched, and the step of searching for the second reference information that satisfies the second correlation condition with the search object is continued.
3. The method according to claim 2, wherein: The stop conditions include: The number of searches is greater than or equal to the set number; or, The second reference information currently retrieved has all been previously retrieved as a search object.
4. The method according to claim 1, wherein: The second related condition includes any one or more of the following: The search object and the second reference information are preliminarily associated with the search object in the database; The similarity between the feature vector of the second reference information and the feature vector of the search object satisfies a second set condition; The second reference information includes index information of the search object; The search object includes index information of the second reference information.
5. The method according to claim 1, wherein: The method further comprises: Obtaining source documents for constructing the database; The source document is split into at least one reference information, a feature vector of the reference information is determined, and the feature vector and the reference information are stored in the database in association with each other; the feature vector is used to determine whether the corresponding reference information and the query information meet a first correlation condition.
6. The method according to claim 5, wherein: The step of splitting the source document into at least one piece of reference information includes: Detecting the document format of the source document; The source document is split into at least one piece of reference information according to the document format.
7. The method according to claim 6, wherein: In the case where the reference information is a picture, the determining the feature vector of the reference information includes: Extract key information from the image to obtain a text description of the reference information; Feature embedding is performed on the text description to serve as a feature vector of the reference information.
8. The method according to claim 7, wherein: In the case where the reference information is other information types, the method further includes: converting the reference information into a picture; The other information types are information types other than pictures and texts.
9. A database retrieval method, wherein: include: Receive inquiry information; Retrieving first reference information that satisfies a first correlation condition with the query information from the reference information in the database; In the reference information in the database, the first reference information is used as a search object, and second reference information that satisfies a second correlation condition with the search object is searched; All the retrieved reference information is used as the search result of the database for the query information.
10. A device for processing interactive information, wherein: include: An information receiving module, used for receiving inquiry information; A first search module, used to search the reference information in the database for first reference information that satisfies a first correlation condition with the query information; A second search module, configured to use the first reference information as a search object in the reference information of the database to search for second reference information that satisfies a second correlation condition with the search object; The model guiding module is used to guide the dialogue model to output response information to the query information based on the query information and all the retrieved reference information.
11. An electronic device, wherein: The method comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the method according to any one of claims 1 to 9 under the control of the computer program.