Knowledge retrieval method, electronic equipment, storage medium and program product
By establishing a knowledge tree in the knowledge information corresponding to the user's problem information, determining the target knowledge nodes and obtaining their relevant knowledge information, the problem of excessive irrelevant knowledge in the search results in the prior art is solved, and the efficiency and accuracy of knowledge retrieval is improved.
Patent Information
- Application Number
- CN202411770980.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-28
AI Technical Summary
In the existing big model knowledge retrieval technology, the retrieved knowledge is the knowledge in the entire knowledge base or database, which leads to a large amount of irrelevant knowledge in the search results, reducing the retrieval efficiency, accuracy and the degree of correlation between the results and the search target.
By obtaining user's problem information, including current problem and historical interaction information, establishing a knowledge tree based on problem information, determining target prompt words, finding target knowledge nodes and obtaining their relevant knowledge information, ensuring that the search results are only related to user's problem information.
It effectively avoids the emergence of irrelevant knowledge in the search results, improves the efficiency and accuracy of large-model knowledge retrieval, and enhances the correlation between the search results and the search target.
Smart Images

Figure CN119719283A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology, and in particular to a knowledge retrieval method, electronic device, storage medium and program product. Background Art
[0002] Large-model knowledge retrieval is an information retrieval technology that relies on large-scale pre-trained models. It can effectively improve the accuracy and efficiency of information retrieval through large models during retrieval.
[0003] The mainstream technology for existing large-model knowledge retrieval is Retrieval Augmented Generation (RAG), which is a technology that combines retrieval (usually a knowledge base or database) and generative model (large language model) to refer to relevant external knowledge when generating the text of the retrieval results. This allows the generative model to generate more accurate and rich answers through the retrieved knowledge even if it has not seen certain information during training.
[0004] However, in actual retrieval, a keyword is often used to determine the knowledge base or database corresponding to the keyword, so that the knowledge retrieved based on the keyword is the knowledge in the entire knowledge base or database, resulting in a large amount of irrelevant knowledge in the retrieval results, which reduces the efficiency of large-model knowledge retrieval, and reduces the relevance of the retrieval results to the retrieval target and the accuracy of the retrieval results. Summary of the invention
[0005] The present application provides a knowledge retrieval method, an electronic device, a storage medium and a program product to solve the problem in the prior art that the knowledge retrieved is the knowledge in the entire knowledge base or database, resulting in a large amount of irrelevant knowledge in the retrieval results, which reduces the efficiency of large-model knowledge retrieval, and reduces the relevance of the retrieval results to the retrieval target and the accuracy of the retrieval results.
[0006] In a first aspect, the present application provides a knowledge retrieval method, the method comprising:
[0007] Acquire user's question information; wherein, the user's question information includes the user's current question information and the user's corresponding historical interaction information, the historical interaction information includes a plurality of historical knowledge nodes, the historical knowledge nodes are nodes in a target knowledge tree, the target knowledge tree is a knowledge tree established based on the knowledge information corresponding to the question information, the target knowledge tree includes a plurality of levels, each level includes at least one knowledge node, and the plurality of knowledge nodes are connected by a node association relationship;
[0008] Determine the target prompt word according to the user's question information;
[0009] A target knowledge node is determined in the target knowledge tree according to the target prompt word, and target knowledge information corresponding to the target knowledge node is obtained.
[0010] In a second aspect, the present application provides a knowledge retrieval device, the device comprising:
[0011] An acquisition module, used to acquire user's question information; wherein the user's question information includes the user's current question information and the user's corresponding historical interaction information, the historical interaction information includes a plurality of historical knowledge nodes, the historical knowledge nodes are nodes in a target knowledge tree, the target knowledge tree is a knowledge tree established based on the knowledge information corresponding to the question information, the target knowledge tree includes a plurality of levels, each level includes at least one knowledge node, and the plurality of knowledge nodes are connected by node association relationships;
[0012] A first determination module, used to determine a target prompt word according to the user's question information;
[0013] The second determination module is used to determine a target knowledge node in the target knowledge tree according to the target prompt word, and obtain target knowledge information corresponding to the target knowledge node.
[0014] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the knowledge retrieval method as described in any embodiment of the present application is implemented.
[0015] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the knowledge retrieval method as described in any embodiment of the present application.
[0016] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the knowledge retrieval method as described in any embodiment of the present application.
[0017] The scheme of the present application obtains the user's question information; wherein the user's question information includes the user's current question information and the user's corresponding historical interaction information, the historical interaction information includes multiple historical knowledge nodes, the historical knowledge nodes are nodes in the target knowledge tree, the target knowledge tree is a knowledge tree established based on the knowledge information corresponding to the question information, the target knowledge tree includes multiple levels, each level includes at least one knowledge node, and multiple knowledge nodes are connected by node association relationships; determine the target prompt word according to the user's question information; determine the target knowledge node in the target knowledge tree according to the target prompt word, and obtain the target knowledge information corresponding to the target knowledge node. That is, the scheme of the present application, by determining the target knowledge node corresponding to the user's question information in the knowledge tree established by the knowledge information corresponding to the user's question information, and obtaining the knowledge information corresponding to the target knowledge node, can make the knowledge retrieved only related to the user's question information, avoid the phenomenon of a large amount of irrelevant knowledge appearing in the retrieval results, thereby improving the efficiency of large model knowledge retrieval, and improving the relevance of the retrieval results to the retrieval target, thereby improving the accuracy of the retrieval results. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 It is a flowchart of the knowledge retrieval method provided by this application;
[0020] Figure 2a is another flow chart of the knowledge retrieval method provided by the present application;
[0021] Figure 2b is an example diagram of a knowledge tree of the knowledge retrieval method provided by this application;
[0022] Figure 3 It is a structural schematic diagram of the knowledge retrieval device provided by this application;
[0023] Figure 4 It is a structural schematic diagram of the electronic device provided by this application. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0027] Figure 1 The present invention provides a flow chart of a knowledge retrieval method, which can be performed by a knowledge retrieval device, which can be implemented in software and / or hardware. In a specific embodiment, the device can be applied to an electronic device, which can be a computer. The following embodiments will be described by taking the application of the device in an electronic device as an example, referring to Figure 1 , the method may specifically include the following steps:
[0028] Step 101, obtaining user's question information.
[0029] Among them, the user's question information includes the user's current question information and the user's corresponding historical interaction information. The historical interaction information includes multiple historical knowledge nodes. The historical knowledge nodes are nodes in the target knowledge tree. The target knowledge tree is a knowledge tree established based on the knowledge information corresponding to the question information. The target knowledge tree includes multiple levels, each level includes at least one knowledge node, and multiple knowledge nodes are connected by node association relationships.
[0030] Specifically, the user refers to a user who interacts with the large language model in this embodiment. For example, the user is interacting with the artificial intelligence in the application that can automatically answer the user's questions. The application is to interact with the user through the large language model. The user's question information includes the user's current question information and the user's corresponding historical interaction information. The historical interaction information is the interaction information performed by the user before the current question is raised. The interaction information may include multiple rounds of user questions and information on the replies of the large language model. In the historical interaction between the user and the large language model, the large language model retrieves the corresponding knowledge information in the knowledge tree through the historical knowledge nodes and responds to the user's questions. Therefore, the historical interaction information includes multiple historical knowledge nodes. The target knowledge tree includes multiple knowledge nodes, and the historical knowledge nodes are all knowledge nodes in the target knowledge tree. The target knowledge tree is a knowledge tree established based on the knowledge information corresponding to the question information. Therefore, the knowledge retrieved through the knowledge tree is all knowledge related to the question information, which increases the accuracy of the retrieval results. There are multiple levels in the knowledge tree, each level includes at least one knowledge node, and multiple knowledge nodes are connected by node association relationships, and multiple levels are connected by node association relationships between knowledge nodes of each level. The subordinate nodes of the knowledge nodes at each level are the knowledge nodes at the next level that have a node association relationship with the knowledge node, and the superior nodes of the knowledge nodes at each level are the knowledge nodes at the previous level that have a node association relationship with the knowledge node.
[0031] For example, Figure 2b is an example diagram of a knowledge tree of the knowledge retrieval method provided by this application. Figure 2bAs shown, the first-level knowledge node is domestic debit card business processing 0, and the second-level knowledge nodes are debit card activation 1, debit card password modification 2, debit card loss report 3, and debit card cancellation 4. The above four knowledge nodes are all knowledge nodes that have a node association relationship with domestic debit card business processing 0 and are subordinate nodes of domestic debit card business processing 0. The subordinate nodes of debit card activation 1 are cardholder entrusts others to process 5, cardholder handles it himself 6, and institution visits 7. The superior node of debit card activation 1 is domestic debit card business processing 0. The subordinate nodes of debit card password modification 2 are cardholder entrusts others to process 8, cardholder handles it himself 9, and institution visits 10. The subordinate nodes of cardholder entrusts others to process 5 are cardholder underage 11, cardholder is a blind, deaf-mute customer 12, cardholder is abroad for a long time 13, and cardholder has difficulty in moving 14. The lower level nodes of On-site service by institution 7 are Cardholder has limited mobility 15 and Cardholder meets other on-site service conditions 16. The lower level nodes of Cardholder entrusts others to handle 8 are Cardholder is underage 17, Cardholder is a blind, deaf-mute customer 18, Cardholder stays abroad for a long time 19 and Cardholder has limited mobility 20. The lower level nodes of On-site service by institution 10 are Cardholder has limited mobility 21 and Cardholder meets other on-site service conditions 22.
[0032] Optionally, the target knowledge tree is obtained by extracting knowledge from the professional field corresponding to the problem information, splitting the knowledge in the professional field into multiple knowledge blocks, and refining each knowledge block to obtain the corresponding prompt word, obtaining a knowledge node based on each prompt word, and constructing a node association relationship based on the prompt word and connecting the knowledge nodes to establish a tree-like knowledge graph.
[0033] Specifically, knowledge extraction is performed in advance on knowledge in multiple professional fields, including the professional field corresponding to the question information. After knowledge extraction is performed on the knowledge in the professional field, the extracted knowledge in the professional field is split into multiple knowledge blocks, and each knowledge block is refined to obtain the corresponding prompt word. A knowledge node is obtained based on the summary of each obtained prompt word, and the node association relationship is determined based on the association relationship between the prompt words. After the knowledge nodes are connected according to the node association relationship, a tree-like knowledge graph can be obtained, which is the knowledge tree in this embodiment. The target knowledge tree is the knowledge tree corresponding to the user's question information. Since the target knowledge tree is a knowledge tree established according to the professional field corresponding to the user's question information, the establishment of the target knowledge tree can ensure that the retrieved knowledge is all knowledge related to the question information, thereby increasing the accuracy of the retrieval results.
[0034] For example, Figure 2bThe example of the knowledge tree shown is established based on the knowledge related to domestic debit card business handling. The knowledge related to domestic debit card business handling is divided into four knowledge blocks, and information is extracted from each knowledge block to obtain four prompt words: debit card activation, debit card password modification, debit card loss report, and debit card cancellation. The prompt words are used as knowledge nodes and connected to the upper-level knowledge node domestic debit card business handling 0 with a node association relationship, so as to obtain the knowledge tree related to domestic debit card business handling.
[0035] Optionally, each knowledge node of the target knowledge tree includes identification information of the knowledge node, business name of the knowledge node, prompt word of the knowledge node, weight coefficient of the knowledge node, subordinate cumulative weight coefficient of the knowledge node, business occurrence condition of the knowledge node and knowledge information corresponding to the knowledge node.
[0036] Specifically, the identification information of the knowledge node is used to represent the number information of the knowledge node. When the names of the knowledge nodes are the same, the knowledge nodes are distinguished according to the identification information of the knowledge nodes. Figure 2b As shown, the identification information of the knowledge node can be a unique identification spelled out by combining the date and time when the knowledge node was generated with a self-increasing positive integer. For example, the identification of domestic debit card business 0 is 20240219203701-0. The business name of the knowledge node is used to indicate the name of the business corresponding to the knowledge node, for example Figure 2b The business name of the domestic debit card business processing 0 is domestic debit card business processing, and its corresponding business is the domestic debit card processing business. The prompt word of the knowledge node is used to indicate the summary information of the business corresponding to the knowledge node, or the prompt word related to the knowledge node. The knowledge node can be determined according to the prompt word, for example, Figure 2b The service prompt word of the domestic debit card service 0 shown in the figure can be how to apply for a domestic debit card. The large language model can convert the prompt word into a knowledge point of domestic debit card service, and the specific information of the corresponding service is the domestic debit card service. The weight coefficient of the knowledge node is used to represent the weight of the service corresponding to the knowledge node under the same parent node, for example Figure 2b As shown, under the business node of domestic debit card processing, the weight corresponding to the debit card activation 1 node is the weight coefficient of the debit card activation 1 node. For example, the weight corresponding to the debit card activation 1 node is 0.2.
[0037] The subordinate cumulative weight coefficient of the knowledge node is used to represent the weight threshold information of the subordinate knowledge sub-nodes of the knowledge node, for example Figure 2bThe subordinate cumulative weight coefficient of the debit card activation 1 node shown is the weight threshold information of the three subordinate knowledge sub-nodes: cardholder entrusts others to handle 5, cardholder handles by himself 6, and institution handles by door-to-door 7. For example, the subordinate cumulative weight coefficient of the debit card activation 1 node is 0.8, and the weight threshold of the three subordinate knowledge sub-nodes: cardholder entrusts others to handle 5, cardholder handles by himself 6, and institution handles by door-to-door 7 is 0.8. The business occurrence condition of the knowledge node is used to represent the business execution rule corresponding to the business, and can verify the execution information of the business. For example, the business execution rule corresponding to the cardholder underage node is that the cardholder is under 18 years old. The knowledge information corresponding to the knowledge node is the knowledge related to the knowledge node. For example, the knowledge information corresponding to the cardholder underage node is the relevant knowledge of binding a debit card when the cardholder is underage. Specific settings for knowledge nodes can facilitate the acquisition of knowledge related to knowledge nodes and handle corresponding problems, thereby improving the efficiency of knowledge retrieval. Since the knowledge nodes in the knowledge tree are established based on the knowledge blocks in the professional field corresponding to the user's question information, the establishment of the target knowledge tree can ensure that the retrieved knowledge is all knowledge of the knowledge nodes related to the question information, thereby further increasing the accuracy of the retrieval results.
[0038] After the knowledge tree is established, the content of the knowledge tree can also be verified. The verification method can be that multiple staff members cross-verify the content of the knowledge tree. If the results of the cross-verification by multiple people are consistent, it can be considered that the knowledge tree meets the business conditions and has high availability. The verification content can include whether the business name in the knowledge tree ontology is appropriate, whether the node association relationship is reasonable, whether there are redundant or conflicting processes in the knowledge tree ontology, and whether the prompt words of each knowledge node in the knowledge tree meet the input requirements of the large language model, whether the weight coefficient setting of the knowledge node is reasonable, whether the business occurrence conditions of the knowledge node are reasonable, and whether the knowledge information corresponding to the knowledge node completely covers the relevant knowledge corresponding to the professional field.
[0039] Optionally, the node association relationship between the historical knowledge node and the target knowledge node includes: the historical knowledge node is the upper node of the target knowledge node, the historical knowledge node is the lower node of the target knowledge node, the target knowledge node and the historical knowledge node are the same-layer nodes, and the upper node of the target knowledge node and the upper node of the historical knowledge node are the same-layer nodes.
[0040] Specifically, the node association relationship between the historical knowledge node and the target knowledge node can be that the historical knowledge node is the upper node of the target knowledge node, the historical knowledge node is the lower node of the target knowledge node, the target knowledge node and the historical knowledge node are the same-layer nodes, and the upper node of the target knowledge node and the upper node of the historical knowledge node are the same-layer nodes. Determining the node association relationship between the historical knowledge node and the target knowledge node facilitates the large language model to find the target knowledge node, further improving the efficiency of knowledge retrieval. When the historical knowledge node is the upper node of the target knowledge node, the retrieval of the large language model in the knowledge tree flows from the historical knowledge node to the target knowledge node at the next level, thereby obtaining the knowledge information corresponding to the target knowledge node. For example, the user's question information includes the current question "entrust others to handle", and the historical interaction information is the user's question "how to open a debit card", and the answer obtained from the large language model is "Hello, do you want to entrust others to handle it, or do the cardholder handle it himself, or do you want us to handle it on site". At this time, if Figure 2b As shown, the historical knowledge node is debit card activation 1, and the target node is the cardholder entrusting others to handle 5. At this time, the historical knowledge node is the upper node of the target knowledge node.
[0041] When the historical knowledge node is the lower node of the target knowledge node, the large language model's retrieval in the knowledge tree jumps from the historical knowledge node to the target knowledge node one level up, thereby obtaining the knowledge information corresponding to the target knowledge node. For example, the user's question information includes the current question "What conditions must be met for you to come to my door to handle it", and the historical interaction information is the user's question "How do I open a debit card?", and the answer from the large language model is "Hello, do you want to entrust someone else to handle it, or do the cardholder handle it himself, or do you want us to come to your door to handle it?" The user asked "entrust someone else to handle it", and the answer from the large language model was "Okay, which of the following does your specific situation belong to? A minor, a blind, deaf-mute customer, someone who has been abroad for a long time, or has mobility difficulties." At this time, if Figure 2b As shown, the historical knowledge nodes are the cardholder being a minor 11, the cardholder being a blind, deaf-mute customer 12, the cardholder being abroad for a long time 13, and the cardholder being physically challenged 14, and the target node is the institution visiting the door 7. In this case, the historical knowledge node is the lower-level node of the target knowledge node.
[0042] When the target knowledge node and the historical knowledge node are nodes at the same level, the large language model's retrieval in the knowledge tree jumps from the historical knowledge node to the target knowledge node at the same level, thereby obtaining the knowledge information corresponding to the target knowledge node. For example, the user's question information includes the current question "What if the user is abroad for a long time?", and the historical interaction information is the user's question "How to open a debit card?", and the answer from the large language model is "Hello, do you want to entrust someone else to handle it, or do the cardholder handle it himself, or do you want us to handle it on site?" The user asked "entrust someone else to handle it", and the answer from the large language model was "Okay, which of the following does your specific situation belong to? Minors, blind, deaf-mute customers, long-term overseas or mobility difficulties." The user asked "minors", and the answer from the large language model was "Okay, guardians of minors are required to provide X materials to open a card." At this time, if Figure 2b As shown, the historical knowledge node is the cardholder is underage 11, and the target node is the cardholder has been abroad for a long time 13. At this time, the target knowledge node and the historical knowledge node are nodes at the same level. The answer of the large language model can be "If you are abroad for a long time, the client needs to provide Y materials" based on the knowledge corresponding to the knowledge node of the cardholder has been abroad for a long time 13.
[0043] When the upper node of the target knowledge node and the upper node of the historical knowledge node are the same-level nodes, the large language model's retrieval in the knowledge tree jumps from the historical knowledge node to the target knowledge node, thereby obtaining the knowledge information corresponding to the target knowledge node. For example, the user's question information includes the current question "I want to change the password of this card, do I also need to ask the guardian to provide these materials?" The historical interaction information is the user's question "How to open a debit card", and the answer from the large language model is "Hello, do you want to entrust someone else to handle it, or do the cardholder handle it himself, or do you want us to handle it on site?" The user asked "entrust someone else to handle it", and the answer from the large language model was "Okay, which of the following does your specific situation belong to? Minors, blind, deaf-mute customers, long-term overseas or mobility difficulties." The user asked "minors", and the answer from the large language model was "Okay, guardians of minors are required to provide X materials to open a card." At this time, if Figure 2b As shown, the historical knowledge node is the cardholder is underage 11, and the target node is the cardholder is underage 17, a subordinate node of the debit card password modification 2 node and the cardholder entrusts others to handle 8 node. At this time, the upper node of the target knowledge node and the upper node of the historical knowledge node are the same-level nodes.
[0044] Step 102: determining a target prompt word according to the user's question information.
[0045] Specifically, the user's question information includes historical interaction information and current question information. Therefore, based on the historical knowledge nodes in the historical interaction information, the user's question intention can be determined by analyzing the user's question information through a large language model, which can accurately determine the user's question intention and avoid misunderstanding the user's intention. After determining the user's question intention, the target prompt word is determined according to the user's question intention, that is, the prompt word that can represent the user's intention.
[0046] For example, the user's question information includes historical interaction information such as the user asking "how to open a debit card", and the answer obtained from the large language model is "Hello, do you want to entrust someone else to handle it, or do the cardholder handle it himself, or do you want us to handle it at your door?" The user asked "entrust someone else to handle it", and the answer obtained from the large language model is "OK, may I ask which of the following specific situations you are in? A minor, a blind, deaf-mute customer, living abroad for a long time or having difficulty in moving." The user asked "minor", and the answer obtained from the large language model is "OK, a minor needs to provide X materials by the guardian to open a card." The current question is "I want to change the password of this card, do I also need to ask the guardian to provide these materials?" At this time, after determining the user's intention to entrust others to handle the debit card, the cardholder is determined to have the materials required, and the method of handling the minor cardholder when the debit card password is changed and the cardholder entrusts others to handle it is obtained. Therefore, the target prompt words are "What should I do if I entrust someone else to open a debit card and the cardholder is a minor? What should I do if I entrust someone else to change the debit card password and the cardholder is a minor? Answer the above two questions, compare the results of the two questions, and analyze whether the materials required are consistent."
[0047] Step 103, determining a target knowledge node in the target knowledge tree according to the target prompt word, and obtaining target knowledge information corresponding to the target knowledge node.
[0048] Specifically, according to the target prompt word and the relevance of the knowledge nodes in the target knowledge tree, the target knowledge node is determined in the target knowledge tree, and after the target knowledge node is determined, the target knowledge information corresponding to the target knowledge node is obtained.
[0049] For example, the target prompt words are "What should I do if I entrust someone else to open a debit card and the cardholder is a minor? What should I do if I entrust someone else to change the debit card password and the cardholder is a minor? Answer the above two questions, compare the results of the two questions, and analyze whether the materials required are consistent." Figure 2bThe knowledge node in the target knowledge tree shown is the subordinate node of node 2 "Debit card password modification" and the subordinate node of node 8 "Cardholder entrusts others to handle" and the subordinate node "Cardholder is underage" 17, so the target knowledge information corresponding to the target knowledge node is obtained.
[0050] Optionally, after determining the target knowledge node in the target knowledge tree according to the target prompt word, steps 1031 to 1032 may also be performed.
[0051] Step 1031, determining at least one target child node according to the weight coefficient of the target knowledge node, the weight coefficient of the child node corresponding to the target knowledge node, and the weight threshold corresponding to the target knowledge node.
[0052] Specifically, after determining the target knowledge node, at least one target sub-node is determined based on the weight coefficient of the target knowledge node, the weight coefficient of the sub-node corresponding to the target knowledge node, and the weight threshold corresponding to the target knowledge node, so that the sum of the weight coefficients of at least one target sub-node is less than the weight threshold corresponding to the target knowledge node.
[0053] For example, Figure 2b As shown, the weight of the cardholder entrusts others to apply for the card 5 node under the debit card activation 1 node is 0.2, the weight threshold of the cardholder entrusts others to apply for the card 5 node is 0.7, and the weight coefficients of the subordinate nodes of the cardholder entrusts others to apply for the card 5 node are 0.3, 0.3, 0.2, and 0.1, respectively. Therefore, at least one target child node is determined to be the cardholder underage 11 and the cardholder is a blind, deaf, and mute customer 12. The initial weight threshold of the cardholder entrusts others to apply for the card 5 node is 1. After multiple user feedback, the weight threshold of the child nodes of the node is adjusted according to the access results selected by the user to increase the possibility that the retrieved knowledge meets the user's needs.
[0054] Step 1032: Obtain sub-node knowledge information corresponding to at least one target sub-node.
[0055] Specifically, after determining at least one target sub-node, the sub-node knowledge information corresponding to the at least one target sub-node is obtained. After determining the target sub-node according to the weight threshold, the knowledge corresponding to the target sub-node can be more likely to be close to the user's question intention, thereby narrowing the scope of the knowledge retrieval results and improving the accuracy of large model knowledge retrieval.
[0056] Optionally, after step 103 , step 31 may also be performed.
[0057] Step 31, input the historical knowledge nodes and the target knowledge information corresponding to the target knowledge nodes into the large language model, obtain the reply information output by the large language model, and return the reply information to the user device corresponding to the user.
[0058] Among them, the large language model is an open source language model that has been designed and trained and is fully aligned with human feedback.
[0059] Specifically, the target knowledge information corresponding to the historical knowledge nodes and the target knowledge nodes is input into the large language model, and the large language model outputs a reply based on the target knowledge information to obtain reply information close to the user's language, and returns the reply information to the user's corresponding user device. The large language model is an open source language model that has been designed and trained and fully aligned with human feedback. It can reply to the user's questions in the tone of communication with the user. As a result, the information replied by the large language model is obtained based on the knowledge information of the knowledge node corresponding to the question information, thereby improving the efficiency and accuracy of the reply.
[0060] Optionally, when executing step 1032 , inputting the target knowledge information corresponding to the historical knowledge nodes and the target knowledge nodes into the large language model in step 31 can be achieved by executing step 32 .
[0061] Step 32: input the historical knowledge nodes, the target knowledge information corresponding to the target knowledge nodes, and the sub-node knowledge information corresponding to at least one target sub-node into the large language model.
[0062] Specifically, after obtaining the sub-node knowledge information corresponding to at least one target sub-node, the historical knowledge node, the target knowledge information corresponding to the target knowledge node, and the sub-node knowledge information corresponding to at least one target sub-node are input into the large language model, so that the knowledge information obtained by the large language model is more accurate. The large language model outputs a reply based on the target knowledge information, obtains reply information close to the user's language, and returns the reply information to the user device corresponding to the user.
[0063] The scheme of the present application obtains the user's question information; wherein the user's question information includes the user's current question information and the user's corresponding historical interaction information, the historical interaction information includes multiple historical knowledge nodes, the historical knowledge nodes are nodes in the target knowledge tree, the target knowledge tree is a knowledge tree established based on the knowledge information corresponding to the question information, the target knowledge tree includes multiple levels, each level includes at least one knowledge node, and multiple knowledge nodes are connected by node association relationships; determine the target prompt word according to the user's question information; determine the target knowledge node in the target knowledge tree according to the target prompt word, and obtain the target knowledge information corresponding to the target knowledge node. That is, the scheme of the present application, by determining the target knowledge node corresponding to the user's question information in the knowledge tree established by the knowledge information corresponding to the user's question information, and obtaining the knowledge information corresponding to the target knowledge node, can make the knowledge retrieved only related to the user's question information, avoid the phenomenon of a large amount of irrelevant knowledge appearing in the retrieval results, thereby improving the efficiency of large model knowledge retrieval, and improving the relevance of the retrieval results to the retrieval target, thereby improving the accuracy of the retrieval results.
[0064] Figure 2a is another flow chart of the knowledge retrieval method provided by the present application. Figure 1 Based on the illustrated embodiment and various optional implementation schemes, the modification of the weight coefficient of the sub-node is described in detail. Figure 2a As shown, the method may include the following steps:
[0065] Step 201, obtaining user's question information.
[0066] Step 202: determining a target prompt word according to the user's question information.
[0067] Step 203, determining a target knowledge node in the target knowledge tree according to the target prompt word, and obtaining target knowledge information corresponding to the target knowledge node.
[0068] Step 204: Determine access weight information of each child node according to the access amount of the child node knowledge information corresponding to the knowledge node.
[0069] Specifically, after the user interaction is completed, the number of visits to the sub-nodes corresponding to the knowledge nodes visited during the user interaction is counted, and the access weight information of each sub-node is determined according to the number of visits to the knowledge information of each sub-node corresponding to the knowledge node.
[0070] For example, Figure 2bAs shown, the knowledge information access volume of node 5 by the cardholder of the subordinate node of node 2 of debit card password modification entrusting others to handle the processing is 30 times, the knowledge information access volume of node 6 by the cardholder of the subordinate node of node 2 of debit card password modification himself is 40 times, and the knowledge information access volume of node 7 by the agency of the subordinate node of node 2 of debit card password modification on-site is 20 times.
[0071] Step 205: adjust the weight coefficient of the child node and the subordinate cumulative weight coefficient of the knowledge node according to the access weight information, so that the weight coefficient of the child node matches the access weight information.
[0072] Specifically, after the access weight information of each child node is determined, the weight coefficient of the child node and the subordinate cumulative weight coefficient of the knowledge node are adjusted according to the access weight information so that the weight coefficient of the child node matches the access weight information.
[0073] For example, Figure 2b As shown, the knowledge information access volume of node 5 of the subordinate node Cardholder entrusts others to handle the debit card password modification 2 node is 30 times, the knowledge information access volume of node 6 of the subordinate node Cardholder handles the debit card password modification 2 node by himself is 40 times, and the knowledge information access volume of node 7 of the subordinate node Institutional Door-to-Door Service of debit card password modification 2 node is 20 times. Therefore, the weight coefficient of node 5 of the subordinate node Cardholder entrusts others to handle the debit card password modification 2 node is adjusted to 0.3, the weight coefficient of node 6 of the subordinate node Cardholder handles the debit card password modification 2 node by himself is adjusted to 0.4, and the weight coefficient of node 7 of the subordinate node Institutional Door-to-Door Service of debit card password modification 2 node is adjusted to 0.2.
[0074] The solution of the present application adjusts the weight of the sub-node according to the number of visits to each sub-node, so that the weight of the sub-node is closer to the user's access habits, further reducing the scope of knowledge retrieval, thereby improving the accuracy of knowledge retrieval.
[0075] Figure 3 is a schematic diagram of the structure of the knowledge retrieval device provided by the present application, and the device is suitable for executing the knowledge retrieval method provided by the present application. Figure 3 As shown, the device may specifically include:
[0076] The acquisition module 301 is used to obtain the user's question information; wherein the user's question information includes the user's current question information and the user's corresponding historical interaction information, the historical interaction information includes multiple historical knowledge nodes, the historical knowledge nodes are nodes in the target knowledge tree, the target knowledge tree is a knowledge tree established based on the knowledge information corresponding to the question information, the target knowledge tree includes multiple levels, each level includes at least one knowledge node, and the multiple knowledge nodes are connected by node association relationships.
[0077] The first determination module 302 is used to determine a target prompt word according to the user's question information.
[0078] The second determination module 303 is used to determine a target knowledge node in the target knowledge tree according to the target prompt word, and obtain target knowledge information corresponding to the target knowledge node.
[0079] In one embodiment, the device also includes: a reply module, which is used to input the historical knowledge node and the target knowledge information corresponding to the target knowledge node into a large language model after the second determination module 303 obtains the target knowledge information corresponding to the target knowledge node, obtain the reply information output by the large language model, and return the reply information to the user device corresponding to the user; wherein the large language model is an open source language model that has been designed and trained and is fully aligned with human feedback.
[0080] In one embodiment, the second determination module 303 is also used for: after determining the target knowledge node in the target knowledge tree according to the target prompt word, determining at least one target sub-node according to the weight coefficient of the target knowledge node, the weight coefficient of the sub-node corresponding to the target knowledge node and the weight threshold corresponding to the target knowledge node; obtaining the sub-node knowledge information corresponding to the at least one target sub-node; the reply module is specifically used for: inputting the historical knowledge node, the target knowledge information corresponding to the target knowledge node and the sub-node knowledge information corresponding to the at least one target sub-node into the large language model.
[0081] In one embodiment, the target knowledge tree acquired by module 101 is obtained by extracting knowledge from the professional field corresponding to the problem information, splitting the knowledge of the professional field into multiple knowledge blocks, and refining each knowledge block to obtain the corresponding prompt word, obtaining a knowledge node based on each prompt word, and constructing a node association relationship based on the prompt word and connecting the knowledge nodes to establish a tree-like knowledge graph.
[0082] In one embodiment, each of the knowledge nodes in the target knowledge tree acquired by module 101 includes identification information of the knowledge node, the business name of the knowledge node, a prompt word of the knowledge node, a weight coefficient of the knowledge node, a subordinate cumulative weight coefficient of the knowledge node, a business occurrence condition of the knowledge node, and knowledge information corresponding to the knowledge node.
[0083] In one embodiment, the node association relationship between the historical knowledge node and the target knowledge node obtained by module 101 includes: the historical knowledge node is the upper node of the target knowledge node, the historical knowledge node is the lower node of the target knowledge node, the target knowledge node and the historical knowledge node are the same-layer nodes, and the upper-layer node of the target knowledge node and the upper-layer node of the historical knowledge node are the same-layer nodes.
[0084] In one embodiment, the device also includes: a weight determination module, which is used to determine the access weight information of each child node according to the number of visits to the child node knowledge information corresponding to the knowledge node after the second determination module 303 obtains the target knowledge information corresponding to the target knowledge node; and adjusts the weight coefficient of the child node and the subordinate cumulative weight coefficient of the knowledge node according to the access weight information so that the weight coefficient of the child node matches the access weight information.
[0085] The device of the present application obtains the user's question information; wherein the user's question information includes the user's current question information and the user's corresponding historical interaction information, the historical interaction information includes multiple historical knowledge nodes, the historical knowledge nodes are nodes in the target knowledge tree, the target knowledge tree is a knowledge tree established based on the knowledge information corresponding to the question information, the target knowledge tree includes multiple levels, each level includes at least one knowledge node, and the multiple knowledge nodes are connected by node association relationships; determine the target prompt word according to the user's question information; determine the target knowledge node in the target knowledge tree according to the target prompt word, and obtain the target knowledge information corresponding to the target knowledge node. That is, the scheme of the present application, by determining the target knowledge node corresponding to the user's question information in the knowledge tree established by the knowledge information corresponding to the user's question information, and obtaining the knowledge information corresponding to the target knowledge node, can make the knowledge retrieved only related to the user's question information, avoid the phenomenon of a large amount of irrelevant knowledge appearing in the retrieval results, thereby improving the efficiency of large model knowledge retrieval, and improving the relevance of the retrieval results to the retrieval target, thereby improving the accuracy of the retrieval results.
[0086] The present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the knowledge retrieval method provided in any of the above embodiments is implemented.
[0087] The present application also provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the knowledge retrieval method provided in any of the above embodiments is implemented.
[0088] Reference below Figure 4 , which shows a structural schematic diagram of an electronic device 400 suitable for implementing the present application. Figure 4 The electronic device shown is only an example and should not bring any limitation to the function and scope of use of the present application.
[0089] like Figure 4 As shown, the electronic device 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage part 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The CPU 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0090] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.
[0091] 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 the network through the communication part 409, and / or installed from the removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, the above-mentioned functions defined in the system of the present application are executed.
[0092] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media 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 the present application, a 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, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0093] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram 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.
[0094] The modules and / or units described in this application may be implemented in software or hardware. The modules and / or units described may also be provided in a processor, for example, may be described as: a processor including an acquisition module, a first determination module, and a second determination module. The names of these modules do not, in some cases, constitute limitations on the modules themselves.
[0095] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device performs the following operations:
[0096] Obtain the user's question information; wherein the user's question information includes the user's current question information and the user's corresponding historical interaction information, the historical interaction information includes multiple historical knowledge nodes, the historical knowledge nodes are nodes in the target knowledge tree, the target knowledge tree is a knowledge tree established based on the knowledge information corresponding to the question information, the target knowledge tree includes multiple levels, each level includes at least one knowledge node, and the multiple knowledge nodes are connected by node association relationships; determine the target prompt word according to the user's question information; determine the target knowledge node in the target knowledge tree according to the target prompt word, and obtain the target knowledge information corresponding to the target knowledge node.
[0097] According to the technical solution of the present application, the user's question information is obtained; wherein the user's question information includes the user's current question information and the user's corresponding historical interaction information, the historical interaction information includes multiple historical knowledge nodes, the historical knowledge nodes are nodes in the target knowledge tree, the target knowledge tree is a knowledge tree established based on the knowledge information corresponding to the question information, the target knowledge tree includes multiple levels, each level includes at least one knowledge node, and multiple knowledge nodes are connected by node association relationships; the target prompt word is determined according to the user's question information; the target knowledge node is determined in the target knowledge tree according to the target prompt word, and the target knowledge information corresponding to the target knowledge node is obtained. That is, the solution of the present application, by determining the target knowledge node corresponding to the user's question information in the knowledge tree established by the knowledge information corresponding to the user's question information, and obtaining the knowledge information corresponding to the target knowledge node, can make the knowledge retrieved only related to the user's question information, avoid the phenomenon of a large amount of irrelevant knowledge appearing in the retrieval results, thereby improving the efficiency of large model knowledge retrieval, and improving the relevance of the retrieval results to the retrieval target, thereby improving the accuracy of the retrieval results.
[0098] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements a knowledge retrieval method as provided in any embodiment of the present application.
[0099] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present application, and the programming language includes an object-oriented programming language, such as Java, Smalltalk, C++, and also includes a conventional procedural programming language, such as "C" language or similar programming language. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can 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 can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0100] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution of this application can be achieved, and this document is not limited here.
[0101] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A knowledge retrieval method, characterized in that: The method comprises: Acquire user's question information; wherein, the user's question information includes the user's current question information and the user's corresponding historical interaction information, the historical interaction information includes a plurality of historical knowledge nodes, the historical knowledge nodes are nodes in a target knowledge tree, the target knowledge tree is a knowledge tree established based on the knowledge information corresponding to the question information, the target knowledge tree includes a plurality of levels, each level includes at least one knowledge node, and the plurality of knowledge nodes are connected by a node association relationship; Determine the target prompt word according to the user's question information; A target knowledge node is determined in the target knowledge tree according to the target prompt word, and target knowledge information corresponding to the target knowledge node is obtained.
2. The method according to claim 1, characterized in that The method further comprises: The target knowledge information corresponding to the historical knowledge node and the target knowledge node is input into a large language model to obtain reply information output by the large language model, and the reply information is returned to a user device corresponding to the user; wherein the large language model is an open source language model that has been designed and trained and is fully aligned with human feedback.
3. The method according to claim 2, characterized in that After determining the target knowledge node in the target knowledge tree according to the target prompt word, the method further includes: Determine at least one target child node according to the weight coefficient of the target knowledge node, the weight coefficient of the child node corresponding to the target knowledge node, and the weight threshold corresponding to the target knowledge node; Acquire sub-node knowledge information corresponding to the at least one target sub-node; The step of inputting the target knowledge information corresponding to the historical knowledge node and the target knowledge node into the large language model includes: The historical knowledge node, the target knowledge information corresponding to the target knowledge node, and the sub-node knowledge information corresponding to the at least one target sub-node are input into the large language model.
4. The method according to claim 1, characterized in that: The target knowledge tree is obtained by extracting knowledge from the professional field corresponding to the problem information, splitting the knowledge of the professional field into multiple knowledge blocks, and refining each knowledge block to obtain the corresponding prompt word, obtaining a knowledge node according to each prompt word, and constructing a node association relationship according to the prompt word and connecting the knowledge nodes to establish a tree-like knowledge graph.
5. The method according to claim 4, characterized in that Each of the knowledge nodes in the target knowledge tree includes identification information of the knowledge node, a business name of the knowledge node, a prompt word of the knowledge node, a weight coefficient of the knowledge node, a subordinate cumulative weight coefficient of the knowledge node, a business occurrence condition of the knowledge node, and knowledge information corresponding to the knowledge node.
6. The method according to claim 5, characterized in that The node association relationship between the historical knowledge node and the target knowledge node includes: the historical knowledge node is the upper node of the target knowledge node, the historical knowledge node is the lower node of the target knowledge node, the target knowledge node and the historical knowledge node are the same-layer nodes, and the upper node of the target knowledge node and the upper node of the historical knowledge node are the same-layer nodes.
7. The method according to claim 4, characterized in that The method further comprises: Determine access weight information of each sub-node according to the access amount of the sub-node knowledge information corresponding to the knowledge node; The weight coefficient of the child node and the subordinate cumulative weight coefficient of the knowledge node are adjusted according to the access weight information so that the weight coefficient of the child node matches the access weight information.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the knowledge retrieval method as described in any one of claims 1 to 7 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the knowledge retrieval method as described in any one of claims 1 to 7 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the knowledge retrieval method according to any one of claims 1 to 7.