A query method and device based on fuzzy sample input on knowledge graph

Through the iterative-feedback process, the user's query intention is learned and the preference vector or query subgraph is updated, which solves the problems of high user cognitive requirements and high query complexity in the existing technology, and realizes interactive user-friendly knowledge graph query.

CN118535619BActive Publication Date: 2024-10-08ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410997945.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-10-08
Estimated Expiration
2044-07-24

AI Technical Summary

Technical Problem

Existing knowledge graph query methods require users to have a clear understanding of query conditions, and the sample-based query process is non-interactive. The input information of a single sample is limited, which cannot meet diverse query needs, and the iteratively expanded query graph cannot be well captured. The user's query focus.

Method used

An iterative-feedback query method based on fuzzy sample input is adopted to learn query preferences through user click feedback, update the preference vector or expand the input sample subgraph to achieve interactive user-friendly query.

Benefits of technology

In the case of incomplete input, it can learn the user's query intentions, meet diverse query needs, and provide query results that are more in line with user preferences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535619B_ABST
    Figure CN118535619B_ABST
Patent Text Reader

Abstract

The present invention discloses a query method and device based on fuzzy sample input on a knowledge graph. The method includes: obtaining a knowledge graph and an initial input; aligning the initial input with an entity in the knowledge graph to obtain a corresponding initial query subgraph; adding the features corresponding to the partial edges diverging around the current query subgraph to the candidate set of the user's query intention, and initializing a preference vector according to the current candidate set; performing a query operation based on the current query subgraph, returning the query result of the current query round, and the user giving feedback on the current query result or terminating the query behavior; determining whether the content updated after the current round ends is a preference vector or a query subgraph based on the user's feedback in the current round; if the updated content is a preference vector, repeating the query and update operations after the preference vector is updated, and if the updated content is a query subgraph, directly initializing, querying, and updating operations; until the user terminates the query.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of knowledge graph query, and in particular to a query method and device based on fuzzy sample input on a knowledge graph. Background Art

[0002] In recent years, knowledge graphs, as a tool for representing structured information of real objects, have been increasingly used in semantic search, recommendation systems, and question-answering systems.

[0003] The query on the knowledge graph can use the rich semantic information of the knowledge graph to complete the complex query process. Generally speaking, the input used by the query method on the knowledge graph is a structured query language (such as SPARQL), which explicitly states how many nodes the query result needs to contain and what conditions each node needs to meet, or directly constructs a clear query graph. Usually, the writing of this type of structured query language is more complicated.

[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: First, most of the current query methods require users to have a relatively clear understanding of the knowledge graph as a data source, that is, users are required to have the ability to associate query conditions with the relationships or attributes existing on the knowledge graph, but this condition is generally difficult for ordinary users to meet. In order to meet the needs of non-professional inquirers, the existing methods propose sample-based queries (K. Dimitriadou, O. Papaemmanouil and Y. Diao, "Explore-by-example: an automatic query steering framework for interactive data exploration"), that is, the input content is a sample of the expected answer set. In this query scenario, users do not need to have a clear description of their query needs, and only need to provide a sample to complete the query operation. However, most of the current sample-based query processes are non-interactive. The information that a single sample can represent as input is extremely limited, and the same input sample can represent different query intentions, which may not be able to meet diverse query needs. The existing iterative query graph expansion method cannot capture the user's query focus well (M. Lissandrini, D. Mottin, T. Palpanas and Y. Velegrakis, "Graph-Query Suggestions for Knowledge Graph Exploration"). Summary of the invention

[0005] In response to the above technical problems and the shortcomings in the field, the present invention provides a query method based on fuzzy sample input on a knowledge graph, which processes the incomplete samples initially input by the user through an iterative-feedback process, learns the user's query preferences through feedback such as user clicks, and thus updates the preference vector or expands the input sample subgraph, thereby realizing interactive user-friendly query in the case of incomplete input.

[0006] A query method based on fuzzy sample input on a knowledge graph comprises the following steps:

[0007] S11: Obtain a knowledge graph, which is represented as a directed graph, where nodes represent entities in real life, edges are used to represent the connections between entities, and each edge has a corresponding label;

[0008] S12: Obtaining an initial input, where the initial input is one of the answers that meets the user's query intention;

[0009] S13: Align the initial input with the entities in the knowledge graph to obtain the corresponding initial query subgraph;

[0010] S14: The edge label of any edge radiating from any node of the current query subgraph and its corresponding tail entity can be used as a feature to describe the current query subgraph. The features corresponding to some edges radiating around the current query subgraph are added to the candidate set of the user's query intention, and the preference vector is initialized according to the current candidate set.

[0011] S15: Perform a query operation based on the current query subgraph, and return the query result of the current query round. The query result is an answer set, which includes several answer subgraphs. The user provides feedback on the current query result (the feedback form can be click, etc.) or terminates the query behavior;

[0012] S16: Based on the user's feedback in the current round, decide whether the content to be updated after the current round is the preference vector or the query subgraph;

[0013] S17: If the content updated in step S16 is the preference vector, then steps S15 and S16 are repeated after the preference vector is updated; if the content updated in step S16 is the query subgraph, then steps S14, S15, and S16 are directly repeated until the user terminates the query.

[0014] The query method based on fuzzy sample input on the knowledge graph of the present invention is an iterative user-friendly query method with fuzzy sample input. When the input scenario is a sample, it can learn the user's query intention in an iterative mode to meet different query needs.

[0015] In some embodiments, in step S13, entities and relationships corresponding to the initial input in the knowledge graph are obtained as the initial query subgraph.

[0016] In some embodiments, step S14 specifically includes the steps of:

[0017] S41: Get all the edges diverging from the current query subgraph;

[0018] S42: For all the edges diverging from the current query subgraph, sort them in descending order according to the degree of their tail entities (the sum of outgoing and incoming edges), considering only the first , add the candidate set of user query intention, is the number of nodes in the current query subgraph, is the number of features considered for a node, and the candidate set of user query intent is ;

[0019] S43: Initialize a dimension The preference vector of , whose value ranges from 0 to 1, and the larger the value, the more important the feature corresponding to the dimension is to the user.

[0020] In some embodiments, in step S14, the value of each dimension of the preference vector is initialized to 0.5.

[0021] In some embodiments, step S15 specifically includes the steps of:

[0022] S51: adopt edge-preserving isomorphism query, and take the edge-preserving isomorphism query result of the current query subgraph as the complete answer set;

[0023] S52: Select the top k answers with the highest scores from the entire answer set through a scoring function and return them to the user as the query result;

[0024] S53: The user provides feedback on the k returned answers or terminates the query behavior.

[0025] Furthermore, in step S52, the scoring function It can be defined as follows:

[0026] ;

[0027] Used to describe the current answer set With the current query subgraph The similarity of the answer set Each answer subgraph in , ,in is the current preference vector, Represents the matching vector, which is used to describe the answer subgraph With the current query subgraph The similarity degree in each feature. The value range of each dimension is 0 to 1. The larger the number, the higher the similarity. 1 represents a complete match, that is, the answer subgraph completely satisfies the corresponding user query intent.

[0028] For the feature with subscript i in the matching vector, the matching vector assignment rule is: , Represents the tail entity of the corresponding feature degree;

[0029] Used to describe the current answer set The coverage of the current feature set, i.e. the user's query intention, and The rate of decay is is the current query round, is the parameter used to control the decay rate, The specific definition is ,in Indicates taking the absolute value, For the current candidate set The purpose is to make the k answers returned partially satisfy the answer subgraph for each feature. , there are also some unsatisfied answer subgraphs , so that the user's query preference can be obtained through the user's feedback on the answer subgraph;

[0030] For use in the balanced scoring function and The weight of .

[0031] This scoring function takes into account the feature similarity between the answer subgraph and the query subgraph and the coverage of the query intent by the selected answer set, aiming to cover as many query intents as possible while ensuring a certain query quality. The feature similarity (matching vector) is weighted by the preference vector.

[0032] By maximizing Scoring method selected Answers returned to the user ,Right now .

[0033] In some embodiments, step S16 specifically includes the steps of:

[0034] S61: according to the user's feedback result, the current query result is divided into two parts, one part has received positive feedback from the user and is used as a positive example, and the other part has not received positive feedback from the user and is used as a negative example;

[0035] S62: for each answer subgraph, obtain the matching degree between it and all user query intentions, and obtain matching vectors whose dimensions are equal to the preference vector, where the value range of each dimension is from 0 to 1, and the larger the number, the higher the matching degree, and 1 represents a complete match, that is, the answer subgraph completely satisfies the corresponding user query intention;

[0036] S63: Take the mean of the matching vectors of the positive example and the negative example respectively to obtain the positive mean vector and the negative mean vector, which are recorded as and ;

[0037] S64: Subtract the two mean vectors. At this time, the absolute value of the difference corresponding to each dimension is the difference in the score of the corresponding feature in the positive example and the negative example; record and The absolute value of the difference is ;

[0038] If the absolute value of the difference corresponding to a certain dimension is greater than the set threshold, it is considered that the feature corresponding to the dimension is included in the user's query intention, and the corresponding feature is used to expand and update the query subgraph. If the absolute value of the difference corresponding to all dimensions is less than or equal to the set threshold, the query subgraph is not expanded and updated, and only the preference vector is updated.

[0039] Furthermore, in step S16, the preference vector may be updated in the following manner:

[0040] Combine the current preference vector with Add them together and normalize the resulting vector so that the vector mean remains at the initialization value (e.g. 0.5), completing the update of the preference vector.

[0041] The present invention also provides a computer device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, and when the computer program is running, the processor executes the query method.

[0042] The present invention also provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a computer device, the computer device executes the query method.

[0043] The present invention also provides a query device based on fuzzy sample input on a knowledge graph, comprising:

[0044] The acquisition module is used to: I) acquire a knowledge graph, which is represented as a directed graph, in which nodes represent entities in real life, edges are used to represent the relationship between entities, and each edge has a corresponding label; II) acquire an initial input and align it with the entity in the knowledge graph to acquire a corresponding initial query subgraph, wherein the initial input is one of the answers that meets the user's query intention;

[0045] A construction module is used to add the edges radiating from the current query subgraph to the candidate set of the user's query intention, and initialize the preference vector according to the current candidate set; the edge label of any radiating edge and the corresponding tail entity constitute a feature describing the current query subgraph, which is used to reflect the user's possible query intention;

[0046] The query module is used to perform query operations based on the current query subgraph and return the query results of the current query round. The query results are answer sets, including several answer subgraphs. Users can provide feedback on the current query results or terminate the query behavior.

[0047] The processing module is used to decide whether the updated content after the end of the current round is a preference vector or a query subgraph based on the user's feedback in the current round; if the updated content is a preference vector, it returns to the query module after the preference vector is updated and repeats the query-processing operation; if the updated content is a query subgraph, it directly returns to the construction module and repeats the construction-query-processing operation; until the user terminates the query.

[0048] The query device can execute the query method when running.

[0049] Compared with the prior art, the present invention has the following beneficial effects:

[0050] The present invention constructs an iterative user-friendly query method and device for the scenario of fuzzy sample input on the knowledge graph. The present invention uses the feature corresponding to an edge around the initial query graph as the user's possible query intention to make up for the shortcomings of unclear user query intention in the scenario of sample input query, and uses a preference vector to characterize the user's query focus, so as to adapt to diverse query scenarios. At the same time, the present invention can make the query results close to the preference result sets of different users in the iterative query process, which is user-friendly. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 The present invention is a flowchart of a query method based on fuzzy sample input on a knowledge graph in a specific implementation manner.

[0052] Figure 2 for Figure 1 The specific flow chart of step S14 in the query method is shown.

[0053] Figure 3 for Figure 1 The specific flow chart of step S15 in the query method is shown.

[0054] Figure 4 for Figure 1 The specific flow chart of step S16 in the query method is shown.

[0055] Figure 5 It is a schematic diagram of a query device based on fuzzy sample input on a knowledge graph in a specific implementation manner. DETAILED DESCRIPTION

[0056] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention.

[0057] Combination Figure 1 , a query method based on fuzzy sample input on a knowledge graph, comprising the steps of:

[0058] S11: Obtain a knowledge graph, which is represented as a directed graph, where nodes represent entities in real life, edges are used to represent the connections between entities, and each edge has a corresponding label;

[0059] S12: Obtaining an initial input, where the initial input is one of the answers that meets the user's query intention;

[0060] S13: Align the initial input with the entities in the knowledge graph to obtain the corresponding initial query subgraph;

[0061] S14: The edge label of any edge radiating from any node of the current query subgraph and its corresponding tail entity can be used as a feature to describe the current query subgraph. The features corresponding to some edges radiating around the current query subgraph are added to the candidate set of the user's query intention, and the preference vector is initialized according to the current candidate set.

[0062] S15: Perform a query operation based on the current query subgraph, and return the query result of the current query round. The query result is an answer set, which includes several answer subgraphs. The user provides feedback on the current query result (the feedback form can be click, etc.) or terminates the query behavior;

[0063] S16: Based on the user's feedback in the current round, decide whether the content to be updated after the current round is the preference vector or the query subgraph;

[0064] S17: If the content updated in step S16 is the preference vector, then steps S15 and S16 are repeated after the preference vector is updated; if the content updated in step S16 is the query subgraph, then steps S14, S15, and S16 are directly repeated until the user terminates the query.

[0065] In step S11, a knowledge graph contains several triples representing real relationships, which can be represented as a directed graph. The present invention can be applied to multiple practical fields such as knowledge graph query and structured molecular query. Without loss of generality, the present invention can represent the knowledge graph as ,in Represents an entity, Represents the edges that can be used to connect entities, each edge has a corresponding relationship label , Represents a definition If There is a head node in , the tail node is , and the relationship is The edge of , if it does not exist, then 0.

[0066] In step S12, the answer set that the user wants to find may contain multiple elements, and these elements all meet the same characteristics. For example, if the user's query intention is the movies that a certain actor has participated in, the answers he expects to obtain include various movie names. The user can take any element in the answer set that he knows (such as any movie name and actor name) as the query input.

[0067] In step S13, the entities and relationships corresponding to the initial input in the knowledge graph can be obtained as the initial query subgraph.

[0068] The user's query intention can be represented by several edges in the knowledge graph, for example, the query intention' The movies he has acted in can be viewed by to identify, where It can be any movie. Therefore, when the query intent is not clear, the divergent edges of the subgraph corresponding to the initial input sample can be used as a candidate set of possible query intents, and a preference vector is used to identify the importance of these intents to the user. In step S14, Figure 2 As shown, the following sub-steps can be performed on the query subgraph corresponding to the initial input sample to obtain the query intent candidate set and the preference vector with the cardinality of the candidate set as the dimension:

[0069] S41: Get all the edges that radiate from the current query subgraph. For example, the node The divergent edges include wait.

[0070] S42: For all the edges diverging from the current query subgraph, sort them in descending order according to the degree of their tail entities (the sum of outgoing and incoming edges), considering only the first , add the candidate set of user query intention, is the number of nodes in the current query subgraph, is the number of features considered for a node, and the candidate set of user query intent is .

[0071] S43: Initialize a dimension The preference vector of is in the range of 0 to 1. The larger the value, the more important the feature corresponding to the dimension is to the user. For example, the value of the preference vector in each dimension is initialized to 0.5.

[0072] The present invention can perform query operations based on the query sample initially input. The specific query method can be edge-preserving isomorphism, that is, subgraphs in the knowledge graph that are edge-preserving isomorphism with the query sample subgraph can be considered as possible query results. The result set returned by an edge-preserving isomorphism query may contain multiple elements. For this purpose, a scoring function can be designed to select certain elements in each round of query results and return them to the user for processing, and the user can provide feedback on the query results of each round. In step S15, if Figure 3 As shown, the following sub-steps can be performed to complete a round of query and user feedback:

[0073] S51: Use edge-preserving isomorphism query to take the edge-preserving isomorphism query result of the current query subgraph as the complete answer set. Edge-preserving isomorphism refers to the query result of the edge-preserving isomorphism of the two subgraphs. , ,in , is a node set, , For edge sets, , is the edge definition function, if there is a node mapping function , for the subgraph Any edge in ,in , For subgraph The nodes in the graph have the relationship labels , in the subgraph There are corresponding ,in for In the subgraph The mapping node in for In the subgraph The mapping nodes in , and have the same relationship label. Then the subgraph is considered and The edge-preserving isomorphism is denoted by .

[0074] S52: Select the top k answers from the entire answer set using a scoring function, from the highest to the lowest score, as the query result and return it to the user. Scoring function It can be defined as follows:

[0075] ;

[0076] Used to describe the current answer set With the current query subgraph The similarity of the answer set Each answer subgraph in , ,in is the current preference vector, Represents the matching vector, which is used to describe the answer subgraph With the current query subgraph The similarity degree in each feature. The value range of each dimension is 0 to 1. The larger the number, the higher the similarity. 1 represents a complete match, that is, the answer subgraph completely satisfies the corresponding user query intent.

[0077] For the feature with subscript i in the matching vector, the matching vector assignment rule is: , Represents the tail entity of the corresponding feature degree;

[0078] Used to describe the current answer set The coverage of the current feature set, i.e. the user's query intention, and The rate of decay is is the current query round, is a parameter used to control the decay rate, which can be set to 5, The specific definition is ,in Indicates taking the absolute value, For the current candidate set The purpose is to make the k answers returned partially satisfy the answer subgraph for each feature. , there are also some unsatisfied answer subgraphs , so that the user's query preference can be obtained through the user's feedback on the answer subgraph;

[0079] For use in the balanced scoring function and The weight of .

[0080] This scoring function takes into account the feature similarity between the answer subgraph and the query subgraph and the coverage of the query intent by the selected answer set, aiming to cover as many query intents as possible while ensuring a certain query quality. The feature similarity (matching vector) is weighted by the preference vector.

[0081] By maximizing Scoring method selected Answers returned to the user ,Right now .

[0082] S53: The user provides feedback on the k answers returned (the feedback method may be click, etc.) or terminates the query behavior.

[0083] The feedback behaviors such as clicks of users with different query intentions contain information about the query intention, and the answer that satisfies the user's query intention should be more likely to be clicked by the user. Therefore, part of the user's query preference information can be obtained based on the user's click behavior. Figure 4 As shown, the following sub-steps can be performed to complete a round of iterative feedback processing:

[0084] S61: according to the user's feedback results, the current query result (k answers) is divided into two parts, one part has received positive feedback from the user and is used as a positive example, and the other part has not received positive feedback from the user and is used as a negative example;

[0085] S62: For each answer subgraph, obtain its matching degree with all user query intentions, and obtain matching vectors with several dimensions equal to the preference vector ,The value range of each dimension is from 0 to 1. The larger the number, the higher the matching degree. 1 represents a complete match, that is, the answer subgraph completely satisfies the corresponding user query intention;

[0086] S63: Take the mean of the matching vectors of the positive example and the negative example respectively to obtain the positive mean vector and the negative mean vector, which are recorded as and ;

[0087] S64: Subtract the two mean vectors. At this time, the absolute value of the difference corresponding to each dimension is the difference in the score of the corresponding feature in the positive example and the negative example; record and The absolute value of the difference is ;

[0088] If the absolute value of the difference corresponding to a certain dimension is greater than the set threshold, it is considered that the feature corresponding to the dimension is included in the user's query intention, and the corresponding feature is used to expand and update the query subgraph. At the same time, the features of the newly added nodes are obtained and the preference vector is upgraded. If the absolute values ​​of the differences corresponding to all dimensions are less than or equal to the set threshold, the query subgraph is not expanded and updated, and only the preference vector is updated.

[0089] Furthermore, in step S16, the preference vector may be updated in the following manner:

[0090] Combine the current preference vector with Add them together and normalize the resulting vector so that the vector mean remains at the initialization value (e.g. 0.5), completing the update of the preference vector.

[0091] A computer device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, and when the computer program is run, the processor executes the query method.

[0092] A computer-readable storage medium stores a program or instruction, and when the program or instruction is executed by a computer device, the computer device executes the query method.

[0093] Combination Figure 5 , a query device based on fuzzy sample input on a knowledge graph, comprising:

[0094] The acquisition module 21 is used to: I) acquire a knowledge graph, which is represented as a directed graph, in which nodes represent entities in real life, edges are used to represent the relationship between entities, and each edge has a corresponding label; II) acquire an initial input and align it with the entity in the knowledge graph to acquire a corresponding initial query subgraph, wherein the initial input is one of the answers that meets the user's query intention;

[0095] A construction module 22 is used to add the edges diverging from the current query subgraph to the candidate set of the user's query intention, and initialize the preference vector according to the current candidate set; the edge label of any diverging edge and the corresponding tail entity constitute a feature describing the current query subgraph, which is used to reflect the user's possible query intention;

[0096] The query module 23 is used to perform a query operation based on the current query subgraph, and return the query result of the current query round. The query result is an answer set, which includes several answer subgraphs. The user can provide feedback on the current query result or terminate the query behavior;

[0097] The processing module 24 is used to decide whether the updated content after the end of the current round is a preference vector or a query subgraph based on the user's feedback in the current round; if the updated content is a preference vector, it returns to the query module 23 after the preference vector is updated and repeats the query-processing operation; if the updated content is a query subgraph, it directly returns to the construction module 22 and repeats the construction-query-processing operation; until the user terminates the query.

[0098] The query device can execute the query method when running.

[0099] The present invention proposes an iterative user-friendly query method and device for the query method of fuzzy sample input on the knowledge graph. When the user cannot fully describe the query intention, the sample is used as input to simplify the complexity of the query; the query focus of different users is described by the preference vector, so that the query method can meet the diverse query needs of different users; using the iterative query method, the initial input sample can be expanded during the interaction process, so that the query result is more in line with the query intention.

[0100] In addition, it should be understood that after reading the above description of the present invention, those skilled in the art may make various changes or modifications to the present invention, and these equivalent forms also fall within the scope defined by the claims attached to this application.

Claims

1. A query method based on fuzzy sample input on a knowledge graph, characterized in that: Includes steps: S11: Obtain a knowledge graph, which is represented as a directed graph, where nodes represent entities in real life, edges are used to represent the connections between entities, and each edge has a corresponding label; S12: Obtaining an initial input, where the initial input is one of the answers that meets the user's query intention; S13: Align the initial input with the entities in the knowledge graph to obtain the corresponding initial query subgraph; S14: The edge label of any edge radiating from any node of the current query subgraph and its corresponding tail entity can be used as a feature to describe the current query subgraph. The features corresponding to some edges radiating around the current query subgraph are added to the candidate set of the user's query intention, and the preference vector is initialized according to the current candidate set. S15: Perform a query operation based on the current query subgraph, and return the query result of the current query round. The query result is an answer set, which includes several answer subgraphs. The user provides feedback on the current query result or terminates the query behavior; S16: Based on the user's feedback in the current round, decide whether the content to be updated after the current round is the preference vector or the query subgraph; S17: If the content updated in step S16 is the preference vector, then steps S15 and S16 are repeated after the preference vector is updated; if the content updated in step S16 is the query subgraph, then steps S14, S15, and S16 are directly repeated until the user terminates the query; Step S15 specifically includes the following steps: S51: adopt edge-preserving isomorphism query, and take the edge-preserving isomorphism query result of the current query subgraph as the complete answer set; S52: Select the top k answers with the highest scores from the entire answer set through a scoring function and return them to the user as the query result; S53: The user provides feedback on the k returned answers or terminates the query behavior; In step S52, the scoring function The definition is as follows: ; Used to describe the current answer set With the current query subgraph The similarity of the answer set Each answer subgraph in , ,in is the current preference vector, Represents the matching vector, which is used to describe the answer subgraph With the current query subgraph The similarity degree in each feature. The value range of each dimension is 0 to 1. The larger the number, the higher the similarity. 1 represents a complete match, that is, the answer subgraph completely satisfies the corresponding user query intent. For the feature with subscript i in the matching vector, the matching vector assignment rule is: , Represents the tail entity of the corresponding feature degree; Used to describe the current answer set The coverage of the current feature set, i.e. the user's query intention, and The rate of decay is is the current query round, is the parameter used to control the decay rate, The specific definition is ,in Indicates taking the absolute value, For the current candidate set Any feature in For use in the balanced scoring function and The weight of By maximizing Scoring method selected Answers returned to the user ,Right now ; Step S16 specifically includes the following steps: S61: according to the user's feedback result, the current query result is divided into two parts, one part has received positive feedback from the user and is used as a positive example, and the other part has not received positive feedback from the user and is used as a negative example; S62: for each answer subgraph, obtain the matching degree between it and all user query intentions, and obtain matching vectors whose dimensions are equal to the preference vector, where the value range of each dimension is from 0 to 1, and the larger the number, the higher the matching degree, and 1 represents a complete match, that is, the answer subgraph completely satisfies the corresponding user query intention; S63: Take the mean of the matching vectors of the positive example and the negative example respectively to obtain the positive mean vector and the negative mean vector, which are recorded as and ; S64: Subtract the two mean vectors. At this time, the absolute value of the difference corresponding to each dimension is the difference in the score of the corresponding feature in the positive example and the negative example; record and The absolute value of the difference is ; If the absolute value of the difference corresponding to a certain dimension is greater than the set threshold, it is considered that the feature corresponding to the dimension is included in the user's query intention, and the corresponding feature is used to expand and update the query subgraph. If the absolute value of the difference corresponding to all dimensions is less than or equal to the set threshold, the query subgraph is not expanded and updated, and only the preference vector is updated.

2. The query method according to claim 1, characterized in that: In step S13, the entities and relationships corresponding to the initial input in the knowledge graph are obtained as the initial query subgraph.

3. The query method according to claim 1, characterized in that: Step S14 specifically includes the following steps: S41: Get all the edges diverging from the current query subgraph; S42: For all the edges diverging from the current query subgraph, sort them in descending order according to the degree of their tail entities, considering only the first , add the candidate set of user query intention, is the number of nodes in the current query subgraph, is the number of features considered for a node, and the candidate set of user query intent is ; S43: Initialize a dimension The preference vector of , whose value ranges from 0 to 1, and the larger the value, the more important the feature corresponding to the dimension is to the user.

4. The query method according to claim 1, characterized in that: In step S16, the preference vector is updated in the following manner: Combine the current preference vector with Add them together and normalize the resulting vector so that the vector mean remains at the initialization value, completing the update of the preference vector.

5. A computer device comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, wherein: When the computer program is executed, the processor is enabled to execute the query method according to any one of claims 1 to 4.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or instruction, and when the program or instruction is executed by a computer device, the computer device executes the query method described in any one of claims 1 to 4.

7. A query device based on fuzzy sample input on a knowledge graph, characterized in that: include: The acquisition module is used to: I) acquire a knowledge graph, which is represented as a directed graph, in which nodes represent entities in real life, edges are used to represent the relationship between entities, and each edge has a corresponding label; II) acquire an initial input and align it with the entity in the knowledge graph to acquire a corresponding initial query subgraph, wherein the initial input is one of the answers that meets the user's query intention; A construction module is used to add the edges radiating from the current query subgraph to the candidate set of the user's query intention, and initialize the preference vector according to the current candidate set; the edge label of any radiating edge and the corresponding tail entity constitute a feature describing the current query subgraph, which is used to reflect the user's possible query intention; The query module is used to perform query operations based on the current query subgraph and return the query results of the current query round. The query results are answer sets, including several answer subgraphs. Users can provide feedback on the current query results or terminate the query behavior. Specifically include Steps: S51: adopt edge-preserving isomorphism query, and use the edge-preserving isomorphism query result of the current query subgraph as the complete answer set; S52: select the top k answers from the complete answer set with the highest score to the lowest score through a scoring function and return them to the user as the query result; S53: the user gives feedback to the returned k answers or terminates the query behavior; In step S52, the scoring function The definition is as follows: ; Used to describe the current answer set With the current query subgraph The similarity of the answer set Each answer subgraph in , ,in is the current preference vector, Represents the matching vector, which is used to describe the answer subgraph With the current query subgraph The similarity degree in each feature. The value range of each dimension is 0 to 1. The larger the number, the higher the similarity. 1 represents a complete match, that is, the answer subgraph completely satisfies the corresponding user query intent. For the feature with subscript i in the matching vector, the matching vector assignment rule is: , Represents the tail entity of the corresponding feature degree; Used to describe the current answer set The coverage of the current feature set, i.e. the user's query intention, and The rate of decay is is the current query round, is the parameter used to control the decay rate, The specific definition is ,in Indicates taking the absolute value, For the current candidate set Any feature in For use in the balanced scoring function and The weight of By maximizing Scoring method selected Answers returned to the user ,Right now ; A processing module, used to determine whether the content to be updated after the current round is a preference vector or a query subgraph according to the user's feedback in the current round; The specific steps include: S61: according to the user's feedback result, the current query result is divided into two parts, one part has received positive feedback from the user and is used as a positive example, and the other part has not received positive feedback from the user and is used as a negative example; S62: for each answer subgraph, obtain the matching degree between it and all user query intentions, and obtain matching vectors whose dimensions are equal to the preference vector, where the value range of each dimension is from 0 to 1, and the larger the number, the higher the matching degree, and 1 represents a complete match, that is, the answer subgraph completely satisfies the corresponding user query intention; S63: Take the mean of the matching vectors of the positive example and the negative example respectively to obtain the positive mean vector and the negative mean vector, which are recorded as and ; S64: Subtract the two mean vectors. At this time, the absolute value of the difference corresponding to each dimension is the difference in the score of the corresponding feature in the positive example and the negative example; record and The absolute value of the difference is ; If the absolute value of the difference corresponding to a certain dimension is greater than the set threshold, the feature corresponding to the dimension is considered to be included in the user's query intention, and the corresponding feature is used to expand and update the query subgraph. If the absolute value of the difference corresponding to all dimensions is less than or equal to the set threshold, the query subgraph is not expanded and updated, and only the preference vector is updated; If the updated content is the preference vector, then after the preference vector is updated, it returns to the query module and repeats the query-processing operation. If the updated content is the query subgraph, it directly returns to the construction module and repeats the construction-query-processing operation until the user terminates the query.