Data retrieval method, device and equipment based on human-computer interaction and storage medium

By obtaining user question information in human-computer interactive data retrieval, determining the map to be retrieved and cropping, the problems of low search efficiency and accuracy in the existing technology are solved, and more efficient and accurate data retrieval is achieved, improving user experience.

CN119807357AActive Publication Date: 2025-04-11BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411848909.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-11
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

The existing human-computer interactive data retrieval methods have large calculations, low retrieval efficiency and accuracy, which affects the user experience.

Method used

By obtaining the user's question information, determining the map to be retrieved, and cropping it to obtain the target map, thereby determining and sending the reply information.

Benefits of technology

Improves the efficiency and accuracy of data retrieval and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807357A_ABST
    Figure CN119807357A_ABST
Patent Text Reader

Abstract

The invention provides a data retrieval method, device and equipment based on human-computer interaction and a storage medium, and relates to the field of artificial intelligence, in particular to the field of human-computer interaction. According to the specific implementation scheme, question information of a user is obtained, and a to-be-retrieved graph is determined from a preset knowledge graph according to the question information; wherein the preset knowledge graph comprises a plurality of nodes, each node represents a vocabulary unit, the to-be-retrieved graph is a sub-graph in the preset knowledge graph, and the to-be-retrieved graph represents question information and information related to the question information; according to vocabulary units represented by nodes in the to-be-retrieved atlas, cutting the to-be-retrieved atlas to obtain a target atlas; and determining reply information corresponding to the question information from the target map, and sending the reply information to the user. By cutting the knowledge graph, unnecessary calculation is reduced, the retrieval efficiency and precision are improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of human-computer interaction in the field of artificial intelligence, and in particular to a data retrieval method, device, equipment and storage medium based on human-computer interaction. Background Art

[0002] With the development of artificial intelligence technology, users can query various information according to their needs. For example, users can input the questions they want to query through human-computer interaction, and quickly get the answers to the questions through data retrieval.

[0003] The current retrieval method can search through the preset knowledge graph to find information related to user needs and reply to the user. However, this method has a large amount of calculation, low retrieval efficiency and accuracy, and affects the user experience. Summary of the invention

[0004] The present invention provides a data retrieval method, device, equipment and storage medium based on human-computer interaction.

[0005] According to a first aspect of the present disclosure, a data retrieval method based on human-computer interaction is provided, comprising:

[0006] Obtaining the user's question information, and determining a to-be-searched graph from a preset knowledge graph according to the question information; wherein the preset knowledge graph includes a plurality of nodes, each node represents a vocabulary unit, the to-be-searched graph is a subgraph in the preset knowledge graph, and the to-be-searched graph represents the question information and information related to the question information;

[0007] According to the vocabulary units represented by the nodes in the to-be-searched graph, the to-be-searched graph is trimmed to obtain a target graph;

[0008] Determine reply information corresponding to the question information from the target graph, and send the reply information to the user.

[0009] According to a second aspect of the present disclosure, a data retrieval device based on human-computer interaction is provided, comprising:

[0010] An acquisition unit is used to acquire the user's question information, and determine a to-be-searched graph from a preset knowledge graph according to the question information; wherein the preset knowledge graph includes a plurality of nodes, each node represents a vocabulary unit, the to-be-searched graph is a subgraph in the preset knowledge graph, and the to-be-searched graph represents the question information and information related to the question information;

[0011] A clipping unit, used for clipping the to-be-searched graph according to the vocabulary units represented by the nodes in the to-be-searched graph to obtain a target graph;

[0012] A reply unit is used to determine reply information corresponding to the question information from the target map and send the reply information to the user.

[0013] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0014] at least one processor; and

[0015] a memory communicatively coupled to the at least one processor;

[0016] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect of the present disclosure.

[0017] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method according to the first aspect of the present disclosure.

[0018] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, which implements the steps of the method described in the first aspect of the present disclosure when executed by a processor.

[0019] According to the technology disclosed in the present invention, the efficiency and accuracy of data retrieval are improved, and the user experience is enhanced.

[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0022] Figure 1 It is a flowchart of a data retrieval method based on human-computer interaction provided according to an embodiment of the present disclosure;

[0023] Figure 2 is a schematic diagram of a knowledge graph provided according to an embodiment of the present disclosure;

[0024] Figure 3 It is a flowchart of a data retrieval method based on human-computer interaction provided according to an embodiment of the present disclosure;

[0025] Figure 4 It is a flowchart of a data retrieval method based on human-computer interaction provided according to an embodiment of the present disclosure;

[0026] Figure 5 is a structural block diagram of a data retrieval device based on human-computer interaction provided according to an embodiment of the present disclosure;

[0027] Figure 6 is a structural block diagram of a data retrieval device based on human-computer interaction provided according to an embodiment of the present disclosure;

[0028] Figure 7 is a block diagram of an electronic device for implementing the data retrieval method based on human-computer interaction according to an embodiment of the present disclosure;

[0029] Figure 8 The block diagram is a block diagram of an electronic device used to implement the data retrieval method based on human-computer interaction according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0031] When users give query requirements, large language models may affect user experience because of shallow answers or lack of specificity. The RAG (Retrieval Augmented Generation) model can alleviate this problem to a certain extent by retrieving relevant text information. However, due to the variable length of relevant text information and the flexibility of natural language expression of text, RAG has difficulty in emphasizing the influence relationship between entity words in the text. The graph retrieval enhanced language model uses the clear entity and relationship representations in the graph data, and can provide more accurate answer information by supplementing and optimizing keyword recall.

[0032] At present, data retrieval can determine the reply information to the user through full-text retrieval, vector retrieval, graph retrieval, etc. Full-text retrieval mainly relies on comprehensive scanning and matching of text content, and accurately searches for keywords, phrases or sentences in the text to locate relevant documents or information. However, when processing large-scale data sets, the retrieval efficiency of full-text retrieval may be affected, and the judgment of relevance at the semantic level is relatively limited. Vector retrieval uses machine learning technology to convert text content into vector representation, and evaluates the relevance between texts by calculating the similarity between vectors. Although this method can capture the semantic features of text and has high retrieval efficiency when processing large-scale data sets, it may not accurately capture the user's true intention when processing complex queries. Graph-based retrieval methods represent text content as nodes and edges in a graph, and locate relevant documents or information by traversing and searching the graph. This method can capture the relevance and contextual information between texts and has strong processing capabilities for complex queries. However, the construction and maintenance costs of the graph are high, and there is a lack of accurate mathematical models to evaluate the relevance between nodes.

[0033] The present invention provides a data retrieval method, device, equipment and storage medium based on human-computer interaction, which are applied to the human-computer interaction field in the field of artificial intelligence to improve the efficiency and accuracy of data retrieval and enhance user experience.

[0034] It should be noted that the data in this embodiment is not targeted at a specific user and cannot reflect the personal information of a specific user. It should be noted that the data in this embodiment comes from a public data set.

[0035] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0036] In order to enable readers to more deeply understand the implementation principle of the present disclosure, the following Figure 1-Figure 8 The embodiment is further refined.

[0037] Figure 1 FIG. 1 is a flow chart of a data retrieval method based on human-computer interaction provided according to an embodiment of the present disclosure. The method can be executed by a data retrieval device based on human-computer interaction. Figure 1 As shown, the method comprises the following steps:

[0038] S101. Obtain the user's question information, and determine the graph to be retrieved from the preset knowledge graph based on the question information; wherein the preset knowledge graph includes multiple nodes, each node represents a vocabulary unit, the graph to be retrieved is a subgraph in the preset knowledge graph, and the graph to be retrieved represents the question information and information related to the question information.

[0039] For example, the user can send out question information through human-computer interaction. For example, the user can input voice or text, and the content input by the user is determined as question information. The question information represents the user's query demand. For example, if the user wants to query movies about park scenes, the question information input by the user can be "What are the movies with park scenes?" The user's question information is the query raised by the user, and the user's query can be obtained in real time.

[0040] A knowledge graph is pre-built, and the knowledge graph can be a topological graph structure. The knowledge graph includes multiple nodes, one node corresponds to a vocabulary unit, and different nodes can be connected by edges. The vocabulary unit can be a word of any part of speech, for example, it can be a quantifier, a noun, a pronoun, etc. Figure 2 A schematic diagram of the knowledge graph. Figure 2 There are ten nodes in it. If there is an edge connection between two nodes, it means that there is an association relationship between the two nodes. For example, Figure 2 There is an edge connection between the "Movie" node and the "Actor A" node, indicating that there is a certain relationship between actor A and the movie.

[0041] The knowledge graph can be cropped according to the question information to obtain a part of the knowledge graph, that is, a part of the subgraph can be cropped from the knowledge graph as the graph to be searched. The graph to be searched can include multiple nodes, and the graph to be searched can represent the question information and information related to the question information. That is, the part of the knowledge graph related to the question information can be cropped as the graph to be searched.

[0042] For example, if the question is "What are the movies with park scenes?", you can search the knowledge graph for the "park" node and the "movie" node, then determine the multiple nodes that are connected to the "park" node and the multiple nodes that are connected to the "movie" node, and determine these nodes and connection relationships as the graph to be retrieved.

[0043] S102. According to the vocabulary units represented by the nodes in the to-be-searched graph, the to-be-searched graph is trimmed to obtain a target graph.

[0044] Exemplarily, in the graph to be searched, each node corresponds to its own vocabulary unit. Determine the vocabulary unit represented by each node in the graph to be searched. According to the vocabulary unit represented by each node in the graph to be searched, the graph to be searched is cropped to obtain a target graph after cropping. That is, the target graph is a subgraph of the graph to be searched.

[0045] In this embodiment, the graph to be searched can be trimmed according to the semantics of the vocabulary units represented by the nodes in the graph to be searched. Specifically, the vocabulary units represented by the nodes in the graph to be searched can be semantically analyzed to determine the semantics of the vocabulary units. The nodes are sorted according to the semantics of the vocabulary units. For example, the semantic richness of the vocabulary units can be calculated, and the nodes are sorted according to the richness, with the nodes with large richness placed in front. In this embodiment, the method for calculating the semantic richness is not specifically limited. For example, the vocabulary units include "yes" and "high-tech", and the semantic richness of "high-tech" is greater than the semantic richness of "yes". After sorting the nodes, the nodes ranked in the last few places can be trimmed in the graph to be searched to obtain the target graph.

[0046] S103: Determine the reply information corresponding to the question information from the target graph, and send the reply information to the user.

[0047] Exemplarily, after obtaining the target graph, the reply information corresponding to the question information is determined according to the target graph, that is, the answer to the user's query is determined, and the reply information is sent to the user to complete the data retrieval process.

[0048] The target graph may include multiple nodes, and the vocabulary units represented by the nodes in the target graph may be combined, and the sentences obtained after the combination may be sent to the user as reply information. It is also possible to first determine the vocabulary units represented by the nodes in the target graph, and then query the text information related to these vocabulary units from a preset database, and send the queried information to the user as reply information. A large amount of text information may be stored in the preset database. For example, the nodes of the target graph may be traversed to search for documents related to each node.

[0049] In this embodiment, reply information corresponding to the question information is determined from the target graph, including: determining the semantic information of the vocabulary units represented by each node in the target graph; based on the semantic information of the vocabulary units represented by each node in the target graph, performing semantic splicing processing on the vocabulary units represented by each node in the target graph to obtain reply information corresponding to the question information.

[0050] Specifically, semantic recognition processing is performed on the vocabulary unit represented by each node in the target graph to obtain semantic information of the vocabulary unit represented by the node. In this embodiment, the process of semantic recognition is not specifically limited.

[0051] According to the semantic information of the vocabulary units represented by each node in the target graph, the vocabulary units represented by each node in the target graph are semantically spliced, that is, sentences can be generated according to the vocabulary units, and the generated sentences are used as the reply information corresponding to the question information. For example, according to the semantic information, the order between vocabulary units can be adjusted, or the sentences between vocabulary units can be supplemented to obtain a complete and smooth sentence as the reply information.

[0052] After obtaining the semantic information, the vocabulary units can also be scored, and the nodes in the target graph can be screened according to the scoring results, so as to filter out the nodes with unimportant semantics. The vocabulary units of the retained nodes are spliced ​​to obtain the reply information corresponding to the question information. For example, the vocabulary units can be scored according to the semantic information. The richer the semantics, the higher the score. Or the semantic relevance between the vocabulary units can be determined. The higher the relevance, the higher the score.

[0053] The beneficial effect of this arrangement is that reply information is automatically generated based on the vocabulary units in the target graph, which improves the flexibility of determining reply information. There is no need to extract text content from documents with fixed content as reply information, which increases the diversity of reply information and enhances user experience.

[0054] In the disclosed embodiment, the knowledge graph is trimmed for the first time according to the user's question information to obtain a graph to be retrieved. Then, the graph to be retrieved is trimmed for the second time according to the vocabulary units represented by the nodes in the graph to be retrieved to obtain a target graph. According to the target graph, the reply information corresponding to the question information is determined, and the reply information is sent to the user. By trimming irrelevant or redundant subgraphs during the graph retrieval process, unnecessary calculations are effectively reduced, thereby further focusing on the reply information related to user needs, improving the accuracy and efficiency of data retrieval, and enhancing user experience.

[0055] Figure 3 A flowchart of a data retrieval method based on human-computer interaction provided in an embodiment of the present disclosure.

[0056] In this embodiment, a graph to be retrieved is determined from a preset knowledge graph based on the question information, including: segmenting the question information to obtain vocabulary units in the question information; and determining a graph to be retrieved from a preset knowledge graph based on the vocabulary units in the question information.

[0057] This embodiment is based on the above embodiment. Figure 3 As shown, the method comprises the following steps:

[0058] S301: Obtain user's question information, and segment the question information to obtain vocabulary units in the question information.

[0059] For example, the question information sent by the user is obtained in real time. When the user sends the question information, it can be sent in the form of voice or text. After obtaining the content sent by the user, it can be uniformly converted into a text form, that is, the question information containing text content can be obtained.

[0060] The question information is segmented, that is, the text content representing the user's needs is segmented. The segmentation process may refer to segmenting the question information to obtain multiple vocabulary units in the question information, and the vocabulary units are the components of the question information. For example, the question information is "XX is a high-tech company". After segmentation, the vocabulary units obtained include "XX", "is", "a", "high-tech", and "company". In this embodiment, the word segmentation method is not specifically limited. For example, semantic recognition can be performed on the question information, and the vocabulary units contained in the question information are determined based on the recognized semantics.

[0061] S302: Determine a graph to be searched from a preset knowledge graph according to the vocabulary units in the question information.

[0062] Exemplarily, the nodes where the vocabulary units in the question information are located are searched from the preset knowledge graph, and the nodes that are connected to the nodes of these vocabulary units by edges can also be searched. The graph formed by these nodes found is used as the graph to be searched. For example, if the vocabulary unit in the question information is "high-tech", then the node where "high-tech" is located is searched from the knowledge graph, and there are eight nodes that are connected to the node by edges, then these nine nodes and the connection relationship are used as the graph to be searched. In this embodiment, the full-text search method can be used to comprehensively scan and match the vocabulary units in the question information, and the relevant nodes in the knowledge graph can be located by accurately searching for vocabulary units such as keywords and phrases.

[0063] In this embodiment, the user's query is parsed and multiple vocabulary units can be extracted from the query, so that the knowledge graph can be tailored according to the vocabulary units, realizing the combination of full-text retrieval, semantic retrieval, and graph retrieval, so that the graph to be searched can focus on the user's query, improving the efficiency and accuracy of data retrieval.

[0064] In this embodiment, a graph to be retrieved is determined from a preset knowledge graph based on vocabulary units in the question information, including: determining part-of-speech information of vocabulary units in the question information; determining a graph to be retrieved from a preset knowledge graph based on the part-of-speech information of vocabulary units in the question information.

[0065] Specifically, for each vocabulary unit in the question information, the part-of-speech information of the vocabulary unit is determined, that is, the vocabulary unit in the question information is analyzed. A preset part-of-speech analysis tool can be used. In this embodiment, the part-of-speech analysis tool is not specifically limited. Different parts of speech can correspond to their own labels. Table 1 is an introduction table of parts of speech.

[0066] Table 1 Parts of speech introduction

[0067]

[0068] Determine the part-of-speech information of each vocabulary unit in the question information, and use corresponding tags to mark the vocabulary units in the question information. According to the part-of-speech information of each vocabulary unit in the question information, determine the graph to be retrieved from the preset knowledge graph. For example, the vocabulary units in the question information can be screened according to the part-of-speech information, and the vocabulary units with preset parts of speech can be screened out. According to the retained vocabulary units, the knowledge graph is trimmed to obtain the graph to be retrieved. Alternatively, different part-of-speech information corresponds to different trimming ranges, and the trimming range refers to the degree of the trimmed edge connection, that is, the length of the edge connection. For example, for the vocabulary unit of a noun, the edge connection of the vocabulary unit to two degrees outward can be trimmed. Two degrees refers to determining the nodes that have edge connections with the vocabulary unit and the nodes that have edge connections with the node. According to the part-of-speech information of the vocabulary unit, the edge connections of the vocabulary unit are trimmed to different lengths to obtain the graph to be retrieved.

[0069] The beneficial effect of this setting is that by performing part-of-speech analysis on the vocabulary units in the question information, different parts of speech can be targetedly trimmed in the knowledge graph, thereby improving the effectiveness of trimming and further improving the accuracy and efficiency of data retrieval.

[0070] In this embodiment, a graph to be retrieved is determined from a preset knowledge graph based on the part-of-speech information of the vocabulary units in the question information, including: determining a first weight of the vocabulary units in the question information based on a preset first association relationship according to the part-of-speech information of the vocabulary units in the question information; wherein the first weight represents the importance of the vocabulary units, and the preset first association relationship represents the association relationship between the part-of-speech information and the weight; and determining a graph to be retrieved from a preset knowledge graph based on the first weight of the vocabulary units in the question information.

[0071] Specifically, a first association relationship is preset, and the first association relationship can represent the association relationship between the part-of-speech information and the first weight, and the first weight can represent the importance of the vocabulary unit in the sentence. For each vocabulary unit in the question information, the first weight corresponding to the part-of-speech information of the vocabulary unit can be determined according to the preset first association relationship, that is, the first weight corresponding to the vocabulary unit is obtained. For example, the first weight of the organization name is 3, the first weight of the verb is 0, the first weight of the quantifier is 1, and the first weight of the noun is 2.

[0072] According to the first weights of the vocabulary units in the question information, the vocabulary units in the question information are sorted. For example, the vocabulary units can be sorted in descending order according to the first weights. According to the sorting results, unimportant vocabulary units are filtered out, for example, vocabulary units with a first weight less than 1 can be filtered out. According to the retained vocabulary units, the graph to be retrieved is determined from the preset knowledge graph.

[0073] The beneficial effect of this setting is that the knowledge graph can be tailored according to the importance of lexical units of different parts of speech, avoiding the cutting of unimportant data into the graph to be retrieved, thereby improving the accuracy of data retrieval.

[0074] In this embodiment, a graph to be retrieved is determined from a preset knowledge graph based on a first weight of a vocabulary unit in the question information, including: determining a target vocabulary from the question information based on the first weight of the vocabulary unit in the question information; wherein the target vocabulary is a key vocabulary unit in the question information; and determining a graph to be retrieved from a preset knowledge graph based on the target vocabulary.

[0075] Specifically, according to the first weight of the vocabulary unit in the question information, the vocabulary unit in the question information is screened out, so that the target vocabulary can be determined from the vocabulary units in the question information. The target vocabulary is a key vocabulary unit in the question information, and there can be one or more target vocabulary. For example, a weight threshold can be preset, and the first weight of each vocabulary unit is compared with the preset weight threshold. If the first weight is greater than the weight threshold, the vocabulary unit with the first weight is determined to be the target vocabulary.

[0076] Find the node where the target vocabulary is located from the preset knowledge graph, and cut out the graph to be searched according to the node where the target vocabulary is located. A cutting range can be preset, with the node where the target vocabulary is located as the center, and the knowledge graph is cut according to the preset cutting range to obtain the graph to be searched. For example, if the preset cutting range is 10 degrees, then the node where each target vocabulary is located can be used as the center, and each target vocabulary can search for 10-degree edge connections outward, that is, the node where the target vocabulary is located is determined as the target vocabulary node, and the nodes that have direct and indirect edge connections with the target vocabulary node are determined. These nodes can form branches extending from the target vocabulary node, and each branch has ten nodes in addition to the target vocabulary node.

[0077] For each target vocabulary node, a subgraph can be cut out from the knowledge graph. There are usually repeated nodes in each subgraph. According to the repeated nodes, the subgraphs corresponding to each target vocabulary node can be spliced ​​to obtain the query information to be retrieved. If there are no repeated nodes in two subgraphs, the nodes closest to the knowledge graph can be connected for the two subgraphs to obtain the merged graph to be retrieved.

[0078] The beneficial effect of this arrangement is that, according to the size of the first weight, the more important vocabulary units in the question information are determined, and only the subgraphs corresponding to the important vocabulary units are extracted, thereby improving the accuracy of determining the graph to be retrieved, avoiding computational redundancy, and improving the accuracy and efficiency of data retrieval.

[0079] S303: According to the vocabulary units represented by the nodes in the to-be-searched graph, the to-be-searched graph is trimmed to obtain a target graph.

[0080] Exemplarily, this step may refer to the above-mentioned step S102 and will not be described in detail.

[0081] S304: Determine the reply information corresponding to the question information from the target graph, and send the reply information to the user.

[0082] Exemplarily, this step may refer to the above-mentioned step S103 and will not be described in detail.

[0083] In the disclosed embodiment, the knowledge graph is trimmed for the first time according to the user's question information to obtain a graph to be retrieved. Then, the graph to be retrieved is trimmed for the second time according to the vocabulary units represented by the nodes in the graph to be retrieved to obtain a target graph. According to the target graph, the reply information corresponding to the question information is determined, and the reply information is sent to the user. By trimming irrelevant or redundant subgraphs during the graph retrieval process, unnecessary calculations are effectively reduced, thereby further focusing on the reply information related to user needs, improving the accuracy and efficiency of data retrieval, and enhancing user experience.

[0084] Figure 4 A flowchart of a data retrieval method based on human-computer interaction provided in an embodiment of the present disclosure.

[0085] In this embodiment, the graph to be searched is trimmed according to the vocabulary units represented by the nodes in the graph to be searched to obtain a target graph, including: determining the vocabulary type to which the vocabulary units represented by the nodes in the graph to be searched belong, which is the type to be searched; wherein the vocabulary type represents the meaning of the vocabulary unit; determining the second weight corresponding to the type to be searched according to a preset second association relationship; wherein the preset second association relationship represents the association relationship between the vocabulary type and the weight, and the second weight represents the importance of the vocabulary type; according to the second weight corresponding to the type to be searched, the graph to be searched is trimmed to obtain a target graph.

[0086] This embodiment is based on the above embodiment. Figure 4 As shown, the method comprises the following steps:

[0087] S401. Obtain the user's question information, and determine the graph to be retrieved from the preset knowledge graph based on the question information; wherein the preset knowledge graph includes multiple nodes, each node represents a vocabulary unit, the graph to be retrieved is a subgraph in the preset knowledge graph, and the graph to be retrieved represents the question information and information related to the question information.

[0088] Exemplarily, this step may refer to the above-mentioned step S101 and will not be described in detail.

[0089] S402, determining the vocabulary type to which the vocabulary unit represented by the node in the to-be-searched graph belongs, as the to-be-searched type; wherein the vocabulary type represents the meaning of the vocabulary unit.

[0090] Exemplarily, the vocabulary units represented by each node in the to-be-searched graph are determined. The vocabulary units in the to-be-searched graph may include vocabulary units in the question information, and may also include vocabulary units that are not in the question information.

[0091] Each vocabulary unit corresponds to its own vocabulary type. The vocabulary types of different vocabulary units can be the same or different. For each vocabulary unit in the to-be-searched graph, the vocabulary type of the vocabulary unit is determined as the to-be-searched type. The vocabulary type can represent the meaning of the vocabulary unit. For example, if the vocabulary units are City A and City B, the vocabulary types of these two vocabulary units are place names; if the vocabulary units are Zhang San and Li Si, the vocabulary types of these two vocabulary units are people.

[0092] The vocabulary units contained in different vocabulary types can be preset. After obtaining the vocabulary units in the to-be-searched graph, the corresponding vocabulary types can be searched as the to-be-searched types. It is also possible to perform semantic recognition on the vocabulary units in the to-be-searched graph to determine the semantics represented by the vocabulary units, and determine the to-be-searched types based on the represented semantics.

[0093] S403: Determine a second weight corresponding to the type to be searched according to a preset second association relationship; wherein the preset second association relationship represents the association relationship between the vocabulary type and the second weight, and the second weight represents the importance of the vocabulary type.

[0094] Exemplarily, a second association relationship is preset, the second association relationship represents the association relationship between the vocabulary type and the second weight, and the second weight represents the importance of the vocabulary type. After determining the type to be retrieved of each vocabulary unit in the to-be-retrieved graph, the second weight corresponding to each type to be retrieved is determined according to the preset second association relationship. For example, the nodes in the to-be-retrieved graph include vocabulary units representing movies and vocabulary units representing characters, and the types to be retrieved include movie types and character types. The second weight corresponding to the movie type is 3, and the second weight corresponding to the character type is 2.

[0095] S404: According to the second weight corresponding to the type to be searched, the graph to be searched is cropped to obtain a target graph.

[0096] Exemplarily, the second weights corresponding to the types to be searched are determined, and the graph to be searched is clipped according to the second weights corresponding to the types to be searched, and the target graph is obtained after clipping, that is, the target graph is a subgraph of the graph to be searched. For example, the vocabulary units of the vocabulary types with smaller weights in the graph to be searched can be screened out, and the remaining part can be determined as the target graph.

[0097] In this embodiment, the importance of vocabulary units in the graph to be searched is determined based on the vocabulary types in the graph to be searched, and the graph is trimmed again based on the importance, further focusing the information in the graph on content related to the user's question information, thereby improving the accuracy of the recalled content, reducing the amount of calculation, and improving the efficiency and accuracy of data retrieval.

[0098] In this embodiment, the graph to be searched is trimmed according to the second weight corresponding to the type to be searched to obtain a target graph, including: determining a target type from the type to be searched according to the second weight corresponding to the type to be searched; wherein the target type is a key vocabulary type in the type to be searched; and according to the target type, the graph to be searched is trimmed to obtain a target graph.

[0099] Specifically, the types to be searched are sorted according to the second weights corresponding to the types to be searched to obtain a sorting result. According to the sorting result, the types to be searched are screened, for example, the second weights can be sorted in descending order, and the types to be searched that are ranked at the back are screened out.

[0100] The retained types to be searched are determined as target types, which are relatively important vocabulary types in the types to be searched. For example, a second weight threshold can be preset, and the second weight of each type to be searched is compared with the threshold. If the second weight is greater than the threshold, the type to be searched corresponding to the second weight is the target type.

[0101] After obtaining the target type, the graph to be searched can be trimmed according to the target type. For example, only the vocabulary units of the target type and the nodes that are connected to the nodes of the vocabulary units can be retained to obtain the target graph. Alternatively, the vocabulary units of non-target types and the nodes that are connected to the nodes of the vocabulary units can be trimmed, and the remaining part can be determined as the target graph.

[0102] The beneficial effect of such a setting is that, according to the size of the second weight, important vocabulary types are determined, key information is retained from the graph to be searched, redundant information is reduced, and the accuracy of data retrieval is improved.

[0103] In this embodiment, the graph to be searched is cropped according to the target type to obtain the target graph, including: determining the node where the vocabulary unit belonging to the target type is located in the graph to be searched as the target node; according to the position of the target node in the graph to be searched, the graph to be searched is cropped to obtain the target graph.

[0104] Specifically, determine the vocabulary unit of the target type in the to-be-searched graph, and determine the node where the vocabulary unit is located as the target node. Determine the position of the target node in the to-be-searched graph, and according to the position of the target node in the to-be-searched graph, crop the to-be-searched graph to obtain a cropped target graph. For example, the target node and the nodes near the position of the target node in the to-be-searched graph can be retained to obtain the target graph.

[0105] The beneficial effect of this setting is that it can perform cropping according to the position of the target node, retain important information in the graph to be retrieved, improve the correlation between the recalled content and the question information, and the recalled content can be used as reply information, thereby improving the accuracy and efficiency of determining the reply information.

[0106] In this embodiment, the graph to be searched is cropped according to the position of the target node in the graph to be searched to obtain the target graph, including: according to a preset cropping range, with the position of the target node in the graph to be searched as the center, the graph to be searched is cropped to obtain a cropped graph corresponding to the target node; wherein the cropped graph is a subgraph of the graph to be searched, and the target node corresponds to the cropped graph one-to-one; the cropped graphs corresponding to the target nodes are spliced ​​to obtain the target graph.

[0107] Specifically, a clipping range of the target graph is preset, and the clipping range may refer to the degree of edge connection. For each target node in the graph to be retrieved, the graph to be retrieved is clipped according to the preset clipping range with the position of the target node as the center. The clipping range may be the maximum clipping length of each branch extending from the target node. For example, if the clipping range is 2 degrees, then for each branch of the target node, only two nodes other than the target node are retained, that is, the two nodes closest to the target node are retained. In other words, there are two edge connections on each branch.

[0108] For each target node, it is cropped according to the cropping range. Each target node corresponds to a subgraph cropped from the to-be-retrieved graph, and the subgraph corresponding to the target node is determined as the cropped graph. That is, the cropped graph is a subgraph of the to-be-retrieved graph, and the target node corresponds to the cropped graph one-to-one. The cropped graphs corresponding to each target node are spliced ​​to obtain a complete target graph. For example, a node for connection can be found from each of the two cropped graphs, and the two nodes are edge-connected to complete the splicing of the cropped graphs. The nodes for connection can be found randomly, or the nodes for connection can be determined based on the distance between the nodes in the two cropped graphs in the to-be-retrieved graph. For example, the two nodes with the least number of edge connections between the nodes can be determined as the nodes for connection.

[0109] The beneficial effect of this setting is that the nodes around the target node are retained, important information is avoided from being lost, and the richness of the reply information is improved. Multiple cropped graphs are spliced ​​to achieve graph integration, which facilitates the retrieval of question information, improves the accuracy and efficiency of reply information, and enhances the user's human-computer interaction experience.

[0110] S405: Determine the reply information corresponding to the question information from the target graph, and send the reply information to the user.

[0111] Exemplarily, this step may refer to the above-mentioned step S103 and will not be described in detail.

[0112] In the disclosed embodiment, the knowledge graph is trimmed for the first time according to the user's question information to obtain a graph to be retrieved. Then, the graph to be retrieved is trimmed for the second time according to the vocabulary units represented by the nodes in the graph to be retrieved to obtain a target graph. According to the target graph, the reply information corresponding to the question information is determined, and the reply information is sent to the user. By trimming irrelevant or redundant subgraphs during the graph retrieval process, unnecessary calculations are effectively reduced, thereby further focusing on the reply information related to user needs, improving the accuracy and efficiency of data retrieval, and enhancing user experience.

[0113] Figure 5 The structure block diagram of a data retrieval device based on human-computer interaction provided by the embodiment of the present disclosure. For the convenience of explanation, only the part related to the embodiment of the present disclosure is shown. Figure 5 The data retrieval device 500 based on human-computer interaction includes: an acquisition unit 501, a cutting unit 502 and a reply unit 503.

[0114] The acquisition unit 501 is used to acquire the user's question information, and determine the to-be-searched graph from the preset knowledge graph according to the question information; wherein the preset knowledge graph includes a plurality of nodes, each node represents a vocabulary unit, the to-be-searched graph is a subgraph in the preset knowledge graph, and the to-be-searched graph represents the question information and information related to the question information;

[0115] A clipping unit 502 is used to clip the to-be-searched graph according to the vocabulary units represented by the nodes in the to-be-searched graph to obtain a target graph;

[0116] The reply unit 503 is used to determine the reply information corresponding to the question information from the target graph and send the reply information to the user.

[0117] Figure 6 A structural block diagram of a data retrieval device based on human-computer interaction provided in an embodiment of the present disclosure, such as Figure 6 As shown, the data retrieval device 600 based on human-computer interaction includes an acquisition unit 601, a cropping unit 602 and a reply unit 603, wherein the acquisition unit 601 includes a segmentation module 6011 and a graph determination module 6012.

[0118] A segmentation module 6011 is used to segment the question information to obtain vocabulary units in the question information;

[0119] The graph determination module 6012 is used to determine the graph to be searched from the preset knowledge graph according to the vocabulary units in the question information.

[0120] In one example, the graph determination module 6012 includes:

[0121] A part-of-speech determination submodule, used to determine the part-of-speech information of the vocabulary unit in the question information;

[0122] The graph determination submodule is used to determine the graph to be retrieved from a preset knowledge graph based on the part-of-speech information of the vocabulary unit in the question information.

[0123] In one example, the graph determination submodule is specifically used to:

[0124] Determine, according to the part-of-speech information of the vocabulary unit in the question information, a first weight of the vocabulary unit in the question information based on a preset first association relationship; wherein the first weight represents the importance of the vocabulary unit, and the preset first association relationship represents the association relationship between the part-of-speech information and the weight;

[0125] According to the first weight of the vocabulary unit in the question information, the to-be-searched graph is determined from a preset knowledge graph.

[0126] In one example, the graph determination submodule is specifically used to:

[0127] Determining a target vocabulary from the question information according to a first weight of the vocabulary unit in the question information; wherein the target vocabulary is a key vocabulary unit in the question information;

[0128] According to the target vocabulary, the graph to be searched is determined from a preset knowledge graph.

[0129] In one example, the cropping unit 602 includes:

[0130] A type determination module, used to determine the vocabulary type to which the vocabulary unit represented by the node in the to-be-searched graph belongs, as the to-be-searched type; wherein the vocabulary type represents the meaning of the vocabulary unit;

[0131] A weight determination module, used to determine a second weight corresponding to the type to be searched according to a preset second association relationship; wherein the preset second association relationship represents the association relationship between the vocabulary type and the second weight, and the second weight represents the importance of the vocabulary type;

[0132] The target determination module is used to crop the to-be-searched graph according to the second weight corresponding to the to-be-searched type to obtain a target graph.

[0133] In one example, the target determination module includes:

[0134] A target determination submodule, used to determine a target type from the types to be searched according to a second weight corresponding to the types to be searched; wherein the target type is a key vocabulary type in the types to be searched;

[0135] The cropping submodule is used to crop the to-be-searched atlas according to the target type to obtain the target atlas.

[0136] In one example, the clipping submodule is specifically used to:

[0137] Determine the node where the vocabulary unit of the target type is located in the to-be-searched graph as the target node;

[0138] According to the position of the target node in the to-be-searched graph, the to-be-searched graph is cropped to obtain the target graph.

[0139] In one example, the clipping submodule is specifically used to:

[0140] According to a preset clipping range, the to-be-searched graph is clipped with the position of the target node in the to-be-searched graph as the center to obtain a clipped graph corresponding to the target node; wherein the clipped graph is a subgraph of the to-be-searched graph, and the target node corresponds to the clipped graph one-to-one;

[0141] The cropped atlases corresponding to each target node are spliced ​​to obtain the target atlas.

[0142] In one example, the reply unit 603 includes:

[0143] A semantic determination module, used to determine the semantic information of the vocabulary unit represented by each node in the target graph;

[0144] The reply generation module is used to perform semantic splicing processing on the vocabulary units represented by each node in the target graph according to the semantic information of the vocabulary units represented by each node in the target graph, so as to obtain reply information corresponding to the question information.

[0145] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device.

[0146] Figure 7 This is a structural block diagram of an electronic device provided in an embodiment of the present disclosure. The electronic device may be a terminal device, a processor or a server. Figure 7As shown, the electronic device 70 includes: at least one processor 702; and a memory 701 communicatively connected to the at least one processor 702; wherein the memory stores instructions executable by the at least one processor 702, and the instructions are executed by the at least one processor 702 so that the at least one processor 702 can execute the human-computer interaction-based data retrieval method disclosed in the present invention.

[0147] The electronic device 70 further includes a receiver 703 and a transmitter 704. The receiver 703 is used to receive instructions and data sent by other devices, and the transmitter 704 is used to send instructions and data to external devices.

[0148] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0149] According to an embodiment of the present disclosure, the present disclosure also provides a computer program product, which includes: a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.

[0150] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0151] like Figure 8 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0152] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0153] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as a data retrieval method based on human-computer interaction. For example, in some embodiments, a data retrieval method based on human-computer interaction may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of data retrieval based on human-computer interaction described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the human-computer interaction-based data retrieval method in any other appropriate manner (eg, by means of firmware).

[0154] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0155] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0156] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.

[0157] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0158] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0159] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0160] 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 disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0161] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A data retrieval method based on human-computer interaction, comprising: Obtaining the user's question information, and determining a to-be-searched graph from a preset knowledge graph according to the question information; wherein the preset knowledge graph includes a plurality of nodes, each node represents a vocabulary unit, the to-be-searched graph is a subgraph in the preset knowledge graph, and the to-be-searched graph represents the question information and information related to the question information; According to the vocabulary units represented by the nodes in the to-be-searched graph, the to-be-searched graph is trimmed to obtain a target graph; Determine reply information corresponding to the question information from the target graph, and send the reply information to the user.

2. The method according to claim 1, wherein: Determining a to-be-searched graph from a preset knowledge graph according to the question information includes: Segmenting the question information to obtain vocabulary units in the question information; According to the vocabulary units in the question information, the to-be-searched graph is determined from a preset knowledge graph.

3. The method according to claim 2, wherein: The step of determining the to-be-searched graph from a preset knowledge graph according to the vocabulary units in the question information includes: Determining part-of-speech information of the vocabulary unit in the question information; According to the part-of-speech information of the vocabulary unit in the question information, the to-be-searched graph is determined from a preset knowledge graph.

4. The method according to claim 3, wherein: The step of determining the to-be-searched graph from a preset knowledge graph according to the part-of-speech information of the vocabulary unit in the question information includes: Determine, according to the part-of-speech information of the vocabulary unit in the question information, a first weight of the vocabulary unit in the question information based on a preset first association relationship; wherein the first weight represents the importance of the vocabulary unit, and the preset first association relationship represents the association relationship between the part-of-speech information and the weight; According to the first weight of the vocabulary unit in the question information, the to-be-searched graph is determined from a preset knowledge graph.

5. The method according to claim 4, wherein: The step of determining the to-be-searched graph from a preset knowledge graph according to the first weight of the vocabulary unit in the question information includes: Determining a target vocabulary from the question information according to a first weight of a vocabulary unit in the question information; wherein the target vocabulary is a key vocabulary unit in the question information; According to the target vocabulary, the graph to be searched is determined from a preset knowledge graph.

6. The method according to any one of claims 1 to 5, wherein: The method of cutting the graph to be searched according to the vocabulary units represented by the nodes in the graph to be searched to obtain the target graph includes: Determine the vocabulary type to which the vocabulary unit represented by the node in the to-be-searched graph belongs, as the to-be-searched type; wherein the vocabulary type represents the meaning of the vocabulary unit; Determine a second weight corresponding to the type to be searched according to a preset second association relationship; wherein the preset second association relationship represents an association relationship between the vocabulary type and the second weight, and the second weight represents the importance of the vocabulary type; According to the second weight corresponding to the type to be searched, the to-be-searched graph is cropped to obtain a target graph.

7. The method according to claim 6, wherein: The step of clipping the to-be-searched graph according to the second weight corresponding to the to-be-searched type to obtain a target graph includes: Determine a target type from the types to be searched according to the second weight corresponding to the types to be searched; wherein the target type is a key vocabulary type in the types to be searched; According to the target type, the to-be-searched atlas is cropped to obtain the target atlas.

8. The method according to claim 7, wherein: The step of performing a clipping process on the to-be-searched graph according to the target type to obtain the target graph includes: Determine the node where the vocabulary unit of the target type is located in the to-be-searched graph as the target node; According to the position of the target node in the to-be-searched graph, the to-be-searched graph is cropped to obtain the target graph.

9. The method according to claim 8, wherein: The step of clipping the graph to be searched according to the position of the target node in the graph to be searched to obtain the target graph includes: According to a preset clipping range, the to-be-searched graph is clipped with the position of the target node in the to-be-searched graph as the center to obtain a clipped graph corresponding to the target node; wherein the clipped graph is a subgraph of the to-be-searched graph, and the target node corresponds to the clipped graph one-to-one; The cropped atlases corresponding to each target node are spliced ​​to obtain the target atlas.

10. The method according to any one of claims 1 to 9, wherein: The step of determining the reply information corresponding to the question information from the target graph includes: Determining semantic information of the vocabulary unit represented by each node in the target graph; According to the semantic information of the vocabulary units represented by each node in the target graph, semantic concatenation processing is performed on the vocabulary units represented by each node in the target graph to obtain reply information corresponding to the question information.

11. A data retrieval device based on human-computer interaction, comprising: An acquisition unit is used to acquire the user's question information, and determine a to-be-searched graph from a preset knowledge graph according to the question information; wherein the preset knowledge graph includes a plurality of nodes, each node represents a vocabulary unit, the to-be-searched graph is a subgraph in the preset knowledge graph, and the to-be-searched graph represents the question information and information related to the question information; A clipping unit, used for clipping the to-be-searched graph according to the vocabulary units represented by the nodes in the to-be-searched graph to obtain a target graph; A reply unit is used to determine reply information corresponding to the question information from the target map and send the reply information to the user.

12. The device according to claim 11, wherein The acquisition unit comprises: A segmentation module, used for segmenting the question information to obtain vocabulary units in the question information; The graph determination module is used to determine the graph to be retrieved from a preset knowledge graph based on the vocabulary units in the question information.

13. The device according to claim 12, wherein: The atlas determination module comprises: A part-of-speech determination submodule, used to determine the part-of-speech information of the vocabulary unit in the question information; The graph determination submodule is used to determine the graph to be retrieved from a preset knowledge graph based on the part-of-speech information of the vocabulary unit in the question information.

14. The device according to claim 13, wherein: The graph determination submodule is specifically used for: Determine, according to the part-of-speech information of the vocabulary unit in the question information, a first weight of the vocabulary unit in the question information based on a preset first association relationship; wherein the first weight represents the importance of the vocabulary unit, and the preset first association relationship represents the association relationship between the part-of-speech information and the weight; According to the first weight of the vocabulary unit in the question information, the to-be-searched graph is determined from a preset knowledge graph.

15. The device according to claim 14, wherein: The graph determination submodule is specifically used for: Determining a target vocabulary from the question information according to a first weight of a vocabulary unit in the question information; wherein the target vocabulary is a key vocabulary unit in the question information; According to the target vocabulary, the graph to be searched is determined from a preset knowledge graph.

16. The device according to any one of claims 11 to 15, wherein: The cutting unit comprises: A type determination module, used to determine the vocabulary type to which the vocabulary unit represented by the node in the to-be-searched graph belongs, as the to-be-searched type; wherein the vocabulary type represents the meaning of the vocabulary unit; A weight determination module, used to determine a second weight corresponding to the type to be searched according to a preset second association relationship; wherein the preset second association relationship represents the association relationship between the vocabulary type and the second weight, and the second weight represents the importance of the vocabulary type; The target determination module is used to crop the to-be-searched graph according to the second weight corresponding to the to-be-searched type to obtain a target graph.

17. The device according to claim 16, wherein: The target determination module comprises: A target determination submodule, used to determine a target type from the types to be searched according to a second weight corresponding to the types to be searched; wherein the target type is a key vocabulary type in the types to be searched; The cropping submodule is used to crop the to-be-searched atlas according to the target type to obtain the target atlas.

18. The device according to claim 17, wherein: The cutting submodule is specifically used for: Determine the node where the vocabulary unit of the target type is located in the to-be-searched graph as the target node; According to the position of the target node in the to-be-searched graph, the to-be-searched graph is cropped to obtain the target graph.

19. The device according to claim 18, wherein: The cutting submodule is specifically used for: According to a preset clipping range, the to-be-searched graph is clipped with the position of the target node in the to-be-searched graph as the center to obtain a clipped graph corresponding to the target node; wherein the clipped graph is a subgraph of the to-be-searched graph, and the target node corresponds to the clipped graph one-to-one; The cropped atlases corresponding to each target node are spliced ​​to obtain the target atlas.

20. The device according to any one of claims 11 to 19, wherein: The reply unit comprises: A semantic determination module, used to determine the semantic information of the vocabulary unit represented by each node in the target graph; The reply generation module is used to perform semantic splicing processing on the vocabulary units represented by each node in the target graph according to the semantic information of the vocabulary units represented by each node in the target graph, so as to obtain reply information corresponding to the question information.

21. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 10.

22. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-10.

23. A computer program product, wherein: The invention comprises a computer program, which implements the steps of the method according to any one of claims 1 to 10 when being executed by a processor.

Citation Information

Patent Citations

  • Knowledge graph searching and positioning method and system, electronic equipment and storage medium

    CN110941694A

  • Question and answer method and device based on atlas knowledge base, equipment and storage medium

    CN111046133A

  • Dialogue generation method and system for expanding context into knowledge graph

    CN113742490A

  • Operation and maintenance information retrieval method and device, electronic equipment and storage medium

    CN116244408A

  • Method and device for searching large-scale graph structure knowledge graph

    CN117332047A