Knowledge graph query method based on key vector model
Patent Information
- Application Number
- CN202410835952.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-06-26
Smart Images

Figure CN118606418B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to data processing related fields, and in particular to a knowledge graph query method based on a key vector model. Background Art
[0002] With the development of science and technology, especially the development of knowledge graph query, the main goal of knowledge graph is to describe various entities and concepts existing in the real world and the relationship between them, so it can be considered as a semantic network. From the perspective of the development process, knowledge graph is developed on the basis of NLP. Knowledge graph and natural language processing NLP are closely related and both are top AI technologies. Knowledge graph can be used to query more complex related information, understand user intentions from a semantic level, and improve search quality. However, there is a lack of control over knowledge graph query in existing technologies, resulting in technical problems of low query efficiency. Summary of the invention
[0003] This application solves the technical problem of low query efficiency caused by the lack of control over knowledge graph queries in the prior art by providing a knowledge graph query method based on a key vector model, and achieves the technical effect of rationalizing and accurately controlling knowledge graph queries, thereby improving query efficiency.
[0004] The present application provides a knowledge graph query method based on a key vector model, the method is applied to a knowledge graph query system based on a key vector model, the method is applied to a knowledge graph query system, the knowledge graph query system includes a first server, a second server and a query entry, including: interactively obtaining an original database, and storing the original database in the first server, using the first server to filter data in the original database to establish a source database; establishing a feature set of data, wherein each data in the source database corresponds to at least one feature, the feature set is constructed by performing feature extraction using a key vector model built into the first server, and performing source filtering based on the feature set. Feature dimension reduction within the database, wherein the data to be subjected to feature dimension reduction is data marked as high-dimensional features after data pre-evaluation; the source database and the feature dimension reduction result are sent to the second server, the second server uses the feature dimension reduction result to perform vector representation of the corresponding data in the source database, and builds a knowledge graph with the vector representation result; receiving the input query information of the query entry, performing vector conversion on the input query information, and inputting the vector conversion result into the knowledge graph, performing vector space data similarity calculation within the knowledge graph, and generating a similarity calculation result; returning the similarity calculation result to the first server, performing additional calculation with the first server, and outputting the query result according to the additional calculation result.
[0005] In a possible implementation, the vector space data similarity calculation within the knowledge graph is performed to generate a similarity calculation result, and the following processing is performed: reading account data, the account data is account source data corresponding to the input query information, wherein the account data is pre-built user account data, wherein the account data carries a first similarity precision constraint; parsing the input query information to obtain user requirements, and generating a second similarity precision constraint based on the user requirements; configuring a matching similarity constraint through the first similarity precision constraint and the second similarity precision constraint, and executing the output configuration of the knowledge graph based on the matching similarity constraint, and generating a similarity calculation result with the output configuration result.
[0006] In a possible implementation, the following processing is performed: the results of the initial similarity calculation results are screened using the matching similarity constraint to generate a pre-screening result; whether the pre-screening result meets a preset quantity threshold; if the preset quantity threshold is met, a supplementary condition instruction is returned; the query entry is controlled by the supplementary condition instruction to add query conditions, and a similarity calculation result is generated according to the newly added query conditions.
[0007] In a possible implementation, the following processing is performed: recording the query results and generating query feedback of the query results; updating the precision extraction parameters of the second similarity precision constraint with the query feedback; and performing subsequent query extraction of the corresponding account using the updated precision extraction parameters.
[0008] In a possible implementation, the following processing is performed: after the first server receives the similarity calculation result, an initial solution space is constructed using the similarity calculation result; within the initial solution space, similarity calculation of the vector conversion result is performed using the feature set to complete additional calculations.
[0009] In a possible implementation, the first server is used to filter data in the original database and perform the following processing: establish a complete data verification channel, use the complete verification channel to verify the data integrity in the original database, and eliminate incomplete data based on the verification results; perform data similarity clustering in the original database to generate data similarity clustering results; perform feature anomaly evaluation between similar data based on the data similarity clustering results, and eliminate abnormal data based on the feature anomaly evaluation results to complete data filtering.
[0010] In a possible implementation, the following processing is performed: performing data linear fitting with the data similarity clustering result; evaluating the data deviation within the data similarity clustering result based on the data linear fitting result, and generating a feature anomaly evaluation result based on the deviation value.
[0011] The present application also provides a knowledge graph query system based on a key vector model, including: a first storage module, the first storage module is used to interactively obtain an original database, and store the original database in the first server, and the first server is used to filter the original database to establish a source database; a feature dimension reduction module, the feature dimension reduction module is used to establish a feature set of data, wherein each data in the source database corresponds to at least one feature, and the feature set is constructed by performing feature extraction through a key vector model built into the first server, and feature dimension reduction is performed in the source database based on the feature set, wherein the data for which feature dimension reduction is performed is data marked as high-dimensional features after data pre-evaluation; vector A representation module, the vector representation module is used to send the source database and feature dimension reduction results to the second server, and the second server uses the feature dimension reduction results to perform vector representation of the corresponding data in the source database, and build a knowledge graph with the vector representation results; a similarity calculation module, the similarity calculation module is used to receive the input query information of the query entry, perform vector conversion on the input query information, and input the vector conversion result into the knowledge graph, perform vector space data similarity calculation in the knowledge graph, and generate a similarity calculation result; an additional calculation module, the additional calculation module is used to return the similarity calculation result to the first server, perform additional calculations on the first server, and output the query result according to the additional calculation results. One or more technical solutions provided in this application have at least the following technical effects or advantages:
[0012] The knowledge graph query method based on the key vector model provided in this application solves the technical problem of low query efficiency caused by the lack of control over knowledge graph queries in the prior art, and realizes the rational and precise control over knowledge graph queries, thereby improving the technical effect of query efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solution of the embodiment of the present disclosure, the accompanying drawings of the embodiment of the present disclosure will be briefly introduced below. A flow chart is used in the present application to illustrate the operations performed by the system according to the embodiment of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, various steps can be processed in reverse order or simultaneously as needed. At the same time, other operations can also be added to these processes, or one or more operations can be removed from these processes.
[0014] Figure 1 A schematic diagram of the process of a knowledge graph query method based on a key vector model provided in an embodiment of the present application;
[0015] Figure 2 A schematic diagram of the structure of a knowledge graph query system based on a key vector model provided in an embodiment of the present application. DETAILED DESCRIPTION
[0016] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below.
[0017] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0018] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict, and the terms "first\second" involved are merely to distinguish similar objects and do not represent a specific ordering of objects. The terms "including" and "having" and any variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products, or devices. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by technicians in the technical field of this application. The terms used herein are for the purpose of describing the embodiments of the present application only.
[0019] The embodiment of the present application provides a knowledge graph query method based on a key vector model, the method is applied to a knowledge graph query system based on a key vector model, the method is applied to a knowledge graph query system, the knowledge graph query system includes a first server, a second server and a query entry, such as Figure 1 As shown, the method includes:
[0020] Step A100, interactively obtaining an original database, storing the original database in the first server, filtering data on the original database by the first server, and establishing a source database;
[0021] After data interaction with the historical data contained in the knowledge graph, the interacted historical data is downloaded or received based on the data acquisition authority, and all the downloaded or received data are summarized and recorded as the original database, and the obtained original database is further stored in the first server. The first server is a system for feature extraction and calculation of data in the knowledge graph through a service port, and then the original database is filtered through the first server. In a possible implementation method, step A100 further includes step A110, establishing a data integrity verification channel, verifying the data integrity in the original database through the integrity verification channel, and eliminating incomplete data according to the verification results; determining whether the data fields are complete, whether the data type is correct, and whether the data range meets the data integrity standards in the data integrity verification channel, and then performing the data integrity verification of the above-mentioned original database according to the integrity standards defined in the data integrity verification channel, which means that the verification scope can be determined according to data tables, specific fields or business needs, and the data integrity standards and rules are defined according to the characteristics and needs of the data. For example, whether a field is empty, whether the data type is correct, whether the data range is valid, etc. According to the integrity standard, read the data one by one and verify them in turn, use log files, database tables or other forms to record the data that passed the verification and the data that failed the verification, and delete the data that failed the verification.
[0022] Further, step A120 is performed to perform data similarity clustering in the original database to generate data similarity clustering results. First, the data to be similarly clustered can be extracted from the original database through data cleaning, feature selection, missing value processing, etc., and the data features are selected for similarity clustering using machine learning technology. The similarity between the data in the original database is then calculated using Euclidean distance, cosine similarity, Jaccard similarity coefficient, etc., and further, data similarity clustering can be performed through K-means clustering, hierarchical clustering, DBSCAN, etc. According to the similarity metric and clustering algorithm, the data is divided into different clusters or groups, thereby generating data similarity clustering results.
[0023] Then, step A130 is executed to evaluate the characteristic anomalies between similar data according to the data similarity clustering results, and to remove abnormal data based on the characteristic anomaly evaluation results to complete data filtering. In a possible implementation, step A130 further includes step A131, which performs data linear fitting based on the data similarity clustering results; it means that according to the results of data similarity clustering, the data is divided into different clusters or groups, and the data in each cluster should have a certain similarity or correlation, and the data in each cluster can be fitted by simple linear regression, multivariate linear regression, etc., extracting the values of independent variables (input) and dependent variables (output), obtaining the slope and solving the fitting of each cluster by least squares method, gradient descent method, etc., analyzing the fitting results of each cluster to draw the fitting curve of each cluster, generating data linear fitting results, and then executing step A132, evaluating the data deviation in the data similarity clustering results according to the data linear fitting results, and generating characteristic anomaly evaluation results according to the deviation values. First, the fitting residual is used as a data deviation evaluation indicator to measure the degree to which the data in the data similarity clustering results deviate from the linear fit. It refers to calculating the difference between the observed value of the data in each cluster and the predicted value on the fitting curve, that is, the fitting residual. The fitting residual can be calculated using the following formula:
[0024] Fitting residual = observed value - predicted value
[0025] Among them, the predicted value can be calculated using the fitted model and parameters.
[0026] Furthermore, the fitting residuals within each cluster can be statistically analyzed by calculating the mean, standard deviation, maximum and minimum values, etc., to obtain the deviation of the data within each cluster from the fitting curve, the degree to which the data between different clusters deviate from the fitting curve, and identify possible outliers or outliers. On this basis, feature anomaly evaluation results are generated, and based on the feature anomaly evaluation results, abnormal data with feature anomalies are removed to complete data filtering, which serves as an important reference for the later query of the knowledge graph.
[0027] Execute step A200 to establish a feature set of data, wherein each data in the source database corresponds to at least one feature, the feature set is constructed by performing feature extraction using a key vector model built into the first server, and feature dimension reduction is performed in the source database based on the feature set, wherein the data for which feature dimension reduction is performed is data marked as high-dimensional features after data pre-evaluation;
[0028] It means that each data in the source database contains one or more features, and feature extraction is performed through the key vector model built into the first server. The data set after extracting and integrating one or more features corresponding to each data in the source database is recorded as a feature set. It is achieved by first selecting and extracting a set of keywords, which are used to describe important concepts and topics in the text, and then calculating the weight of each keyword through word frequency-inverse document frequency to reflect its importance in the document.
[0029] A key vector is constructed according to the correspondence between keywords and weights to represent the characteristics of the data. The vector may contain all keywords and their corresponding weight values. After constructing the key vector, feature selection may be performed through a chi-square test to remove unnecessary or redundant features. The constructed key vector is used to represent the characteristics of the data, thereby determining the feature set, and each feature includes a data pre-evaluation, which may be an identifier such as a high-dimensional feature or a low-dimensional feature. Further, the constructed feature set is used as basic data to reduce the dimension of the data features contained in the source data, and the data for feature dimension reduction is the data marked as a high-dimensional feature after data pre-evaluation. First, the features in the source database are pre-processed by removing missing values, standardizing or normalizing, etc., to ensure comparability and a unified scale between different features. Further, the covariance matrix is calculated for the pre-processed feature data, and the covariance matrix reflects the degree of correlation between different features. Then, the covariance matrix is subjected to eigenvalue decomposition to obtain eigenvectors and eigenvalues. The eigenvector represents the direction in the original feature space, while the eigenvalue represents the importance of the eigenvector. The first k principal components can be selected in descending order of the eigenvalue, where k is the dimension to be reduced to. According to the size of the eigenvalue, the most important eigenvector is selected as the principal component, and the data pre-evaluation of the k principal components are all high-dimensional features. Finally, the feature data is projected onto the selected principal component to generate the reduced feature data and obtain the feature set of the data, thereby ensuring the query of the knowledge graph based on the key vector model.
[0030] Execute step A300, send the source database and the feature dimensionality reduction result to the second server, use the feature dimensionality reduction result to perform vector representation of the corresponding data in the source database through the second server, and build a knowledge graph with the vector representation result; send the above-constructed source database and the feature dimensionality reduction result to the second server together, use the second server to reduce the dimensionality of the features in the original database, and save the reduced features as vectors, and map the reduced feature vectors to the corresponding data according to the unique identifier of the corresponding data in the source database, by storing the feature vector in the source database, or using a new index table to track the feature vector of each data, and use the feature vector generated on the second server to represent the corresponding data in the source database. The feature vector can be provided as input to a machine learning algorithm or other analysis tools, and used in data mining, information retrieval and other tasks, thereby completing the construction of the knowledge graph and laying a solid foundation for the subsequent implementation of knowledge graph query based on the key vector model.
[0031] Execute step A400, receive the input query information of the query entry, perform vector conversion on the input query information, input the vector conversion result into the knowledge graph, perform vector space data similarity calculation in the knowledge graph, and generate a similarity calculation result;
[0032] The input query information received in the query portal is preprocessed by removing stop words, performing word form restoration, stem extraction and other operations to ensure comparability and uniform scale between different query information, and then extracting features from the preprocessed query text, which may include keywords, word frequency, vectors and other features. Then, based on the tasks and data structures in the query information, the query features are converted into vectors using vector representation methods. The converted vectors usually have a fixed dimension and can be used as input for machine learning algorithms or other analysis tools. The vector conversion results are stored in the knowledge graph using files in a specific format, databases or other data storage methods. A specific similarity calculation method, such as cosine similarity or Euclidean distance, is used to calculate the similarity between two vectors.
[0033] In a possible implementation, step A400 further includes step A410, reading account data, wherein the account data is account source data corresponding to the input query information, wherein the account data is pre-built user account data, wherein the account data has a first similarity precision constraint. In order to improve the efficiency of querying within the knowledge graph, the account data is first read, wherein the account data refers to the account source data corresponding to the input query information, and the account data is pre-built user account data, wherein the account data has a first similarity precision constraint, wherein the first similarity precision constraint is based on the accuracy determination between each user account data contained in the historical query information, and then executing step A420, parsing the input query information, obtaining user requirements, and generating a second similarity precision constraint based on the user requirements;
[0034] Use natural language processing (NLP) techniques, such as word segmentation, part-of-speech tagging, named entity recognition, etc. to parse the input query information, thereby identifying keywords, phrases and context information, and performing classification, filtering, sorting and other operations on the parsed query information to determine the specific needs of the user, and generate a second similarity precision constraint based on the user's needs. The second similarity precision constraint is used to indicate that in the similarity calculation, only relevant results with a similarity close to the most relevant result are returned, and on this basis, step A430 is executed, and a matching similarity constraint is configured through the first similarity precision constraint and the second similarity precision constraint, and the output configuration of the knowledge graph is executed based on the matching similarity constraint, so as to generate a similarity calculation result with the output configuration result. Configuring the matching similarity constraint through the first similarity precision constraint and the second similarity precision constraint is a process of limiting the number of output results. The purpose of reducing the dimension of data features is to simplify the calculation, thereby achieving the effect of faster output results. The current actual process is to first match by constructing a low-dimensional knowledge graph, filter out a set and then continue to filter with high dimensions. In a possible implementation, step A430 further includes step A431, using the matching similarity constraint to filter the results of the initial similarity calculation results, generate pre-screening results, and for each query result, use a similarity calculation method such as cosine similarity or Euclidean distance to calculate the similarity score between the query vector and the query vector. According to the similarity score, all query results are sorted, and the results with the highest similarity are placed in front. According to Match the similarity constraint, filter out relevant results that are close to the most relevant result in similarity, thereby completing the result screening and outputting it as the pre-screening result, and executing step A432 to determine whether the pre-screening result meets the preset quantity threshold; the preset quantity threshold is based on the historical number of passes to define the quantity range, so as to execute step A433. If the preset quantity threshold is met, the supplementary condition instruction is returned. When the pre-screening result meets the preset quantity threshold, it is deemed that the initial similarity calculation result at this time is within the matching similarity constraint, but the number of screened data is too small, so it is necessary to supplement the number of pre-screening results, thereby generating a supplementary condition instruction, and further executing step A434, using the supplementary condition instruction to control the query entry to add query conditions, and generate similarity calculation results according to the newly added query conditions. Use the supplementary conditional instructions input by natural language processing to parse to identify keywords, phrases and context information, and modify the database query statement or search engine query parameters according to the parsed query conditions so that the new conditions are applied to the query operation and added to the query entry. Further, based on the updated query entry, the query operation is executed to obtain the initial similarity calculation results, and all query results are sorted according to the similarity scores to generate similarity calculation results for output, which has a limited effect on realizing the query of knowledge graphs based on the key vector model.
[0035] Next, execute step A500, return the similarity calculation result to the first server, perform additional calculations on the first server, and output the query result based on the additional calculation result. First, ensure that the required computing environment is available on the first server, including the libraries, tools, and resources required for the similarity calculation, and then return the similarity calculation result outputted above to the first server, and then perform additional calculations on the similarity calculation result through the first server. In one possible implementation, step A500 further includes step A510, recording the query results, and generating query feedback for the query results, which means setting up a database on the first server to store the query results and related information, and then storing the query results and related information such as query conditions, timestamps, etc. in the database, and generating query feedback based on the query results and related information. The query feedback can be a document in the form of a report, summary, or other form, and further executing step A520, with the query results. The query feedback updates the precision extraction parameters of the second similarity precision constraint; analyzes the information provided in the query feedback document, compares the data and evaluation indicators related to the second similarity precision constraint, which may include the similarity score, ranking information, etc. of the second similar result, and determines to increase or decrease the threshold, adjust the similarity score calculation method, etc. of the precision extraction parameters of the second similarity precision constraint based on the analysis results of the query feedback, and adjusts the precision extraction parameters of the second similarity precision constraint accordingly according to the determined update strategy, re-evaluates the previous query results using the updated precision extraction parameters, ensures that the new parameters can correctly meet the second similarity precision constraint, and finally executes step A530, and performs subsequent query extraction of the corresponding account using the updated precision extraction parameters. The updated precision extraction parameters are saved in, for example, a configuration file or a database, so as to ensure that these parameters can be associated with the corresponding account, receive the user's query request, and obtain the relevant account information, which is to obtain the previously saved parameters from the storage location, that is, load the precision extraction parameters of the corresponding account and use the loaded precision extraction parameters to extract the query.
[0036] In order to query the knowledge graph more accurately, it is necessary to output the query results according to the additional calculation results. On this basis, the additional calculation results are obtained by executing step A540. After the first server receives the similarity calculation results, the initial solution space is constructed with the similarity calculation results. The first server receives the similarity calculation results from different sources, and filters and cleans the collected similarity calculation results to ensure the accuracy and consistency of the data. Using the cleaned similarity calculation results, the first server can start to build the initial solution space, which means that the calculation results can be converted into an operational data structure, such as a graph, a tree structure or a relationship matrix. After constructing the initial solution space, the first server needs to verify and test whether the solution space meets the requirements and ensure that it can effectively support subsequent similarity searches. Then, step A550 is executed. In the initial solution space, the similarity calculation of the vector conversion result is performed with the feature set to complete the additional calculation. In order to perform vector conversion and similarity calculation, an appropriate feature set needs to be selected. These features can be numbers, texts, images or other types of data. Using the feature set selected above, each element in the solution space can be converted into a vector. After the elements are converted into vectors, standard similarity calculation methods, such as cosine similarity, Euclidean distance or Manhattan distance, can be used to calculate the similarity between the vector conversion results. Further, additional calculations can be performed based on the similarity relationship between the elements in the similarity matrix, such as clustering, classification, recommendation or search. For example, a clustering algorithm can be used to group elements with high similarity into a group, or a recommendation algorithm can be used to recommend elements with high similarity to users, thereby completing additional calculations and generating additional calculation results, and outputting the query results of the knowledge graph based on the additional calculation results, thereby improving the accuracy of the subsequent knowledge graph query based on the key vector model.
[0037] The embodiments of the present application solve the technical problem that the prior art lacks control over knowledge graph queries, resulting in low query efficiency, and achieves the technical effect of rationalizing and accurately controlling knowledge graph queries, thereby improving query efficiency.
[0038] In the above, refer to Figure 1 The knowledge graph query method based on the key vector model according to an embodiment of the present invention is described in detail. Figure 2 A knowledge graph query system based on a key vector model according to an embodiment of the present invention is described.
[0039] The knowledge graph query system based on the key vector model according to the embodiment of the present invention is used to solve the technical problem of low query efficiency caused by the lack of control over knowledge graph query in the prior art, and realizes the rationalization and precise control over knowledge graph query, thereby improving the technical effect of query efficiency. The knowledge graph query system based on the key vector model includes: a first storage module 10, a feature dimensionality reduction module 20, a vector representation module 30, a similarity calculation module 40, and an additional calculation module 50.
[0040] A first storage module 10, the first storage module 10 is used to interactively obtain an original database, store the original database in the first server, and use the first server to filter data on the original database to establish a source database;
[0041] A feature dimension reduction module 20, wherein the feature dimension reduction module 20 is used to establish a feature set of data, wherein each data in the source database corresponds to at least one feature, and the feature set is constructed by performing feature extraction using a key vector model built into the first server, and feature dimension reduction is performed in the source database based on the feature set, wherein the data for which feature dimension reduction is performed is data marked as high-dimensional features after data pre-evaluation;
[0042] A vector representation module 30, wherein the vector representation module 30 is used to send the source database and the feature dimension reduction result to the second server, and the second server uses the feature dimension reduction result to perform vector representation of the corresponding data in the source database, and build a knowledge graph with the vector representation result;
[0043] A similarity calculation module 40, the similarity calculation module 40 is used to receive the input query information of the query entry, perform vector conversion on the input query information, and input the vector conversion result into the knowledge graph, perform vector space data similarity calculation in the knowledge graph, and generate a similarity calculation result;
[0044] The additional calculation module 50 is used to return the similarity calculation result to the first server, perform additional calculation with the first server, and output the query result according to the additional calculation result.
[0045] The specific configuration of the similarity calculation module 40 will be described in detail below. As described above, the similarity calculation module 40 for performing the vector space data similarity calculation in the knowledge graph may further include: a data construction unit for reading account data, the account data being account source data corresponding to the input query information, wherein the account data is pre-constructed user account data, wherein the account data carries a first similarity precision constraint; a parsing unit for parsing the input query information, obtaining user requirements, and generating a second similarity precision constraint based on the user requirements; a first output unit for configuring a matching similarity constraint through the first similarity precision constraint and the second similarity precision constraint, and executing the output configuration of the knowledge graph based on the matching similarity constraint, so as to generate a similarity calculation result by outputting the configuration result.
[0046] The specific configuration of the similarity calculation module 40 will be described in detail below. As described above, the similarity calculation module 40 may further include: a screening unit for screening the results of the initial similarity calculation results with the matching similarity constraint to generate a pre-screening result; a first judgment unit for judging whether the pre-screening result meets a preset number threshold; a second judgment unit for returning a supplementary condition instruction if the preset number threshold is met; and a first control unit for controlling the query entry to add a query condition with the supplementary condition instruction, and generating a similarity calculation result according to the newly added query condition.
[0047] The specific configuration of the additional calculation module 50 will be described in detail below. As described above, the additional calculation module 50 may further include: a first feedback unit for recording query results and generating query feedback of the query results; a second feedback unit for updating the precision extraction parameter of the second similarity precision constraint with the query feedback; and an extraction unit for performing subsequent query extraction of the corresponding account using the updated precision extraction parameter.
[0048] The specific configuration of the additional calculation module 50 will be described in detail below. As described above, the additional calculation module 50 may further include: a solution space construction unit for constructing an initial solution space with the similarity calculation result after the first server receives the similarity calculation result; and a first calculation unit for performing similarity calculation of the vector conversion result with the feature set in the initial solution space to complete the additional calculation.
[0049] The specific configuration of the first storage module 10 will be described in detail below. As described above, the first server is used to filter the data of the original database, and the first storage module 10 may further include: a verification unit for establishing a complete verification channel for data, using the complete verification channel to verify the integrity of the data in the original database, and eliminating incomplete data according to the verification result; a clustering unit for performing data similarity clustering in the original database and generating data similarity clustering results; a first evaluation unit for performing feature anomaly evaluation between similar data according to the data similarity clustering results, and performing abnormal data elimination based on the feature anomaly evaluation results to complete data filtering.
[0050] The specific configuration of the first storage module 10 will be described in detail below. As described above, the first storage module 10 may further include: a fitting unit for performing data linear fitting with the data similarity clustering result; a second evaluation unit for evaluating the data deviation in the data similarity clustering result according to the data linear fitting result, and generating a feature abnormality evaluation result according to the deviation value.
[0051] The knowledge graph query system based on the key vector model provided in the embodiment of the present invention can execute the knowledge graph query method based on the key vector model provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0052] Although the present application makes various references to certain modules in the system according to the embodiments of the present application, any number of different modules may be used and run on the user terminal and / or server, and the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0053] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A knowledge graph query method based on a key vector model, characterized in that: The method is applied to a knowledge graph query system, the knowledge graph query system comprising a first server, a second server and a query entry, and the method comprises: Interactively obtain an original database, store the original database in the first server, and use the first server to filter data in the original database to establish a source database; Establishing a feature set of data, wherein each data in the source database corresponds to at least one feature, the feature set is constructed by performing feature extraction using a key vector model built into the first server, and performing feature dimension reduction in the source database based on the feature set, wherein the data for which feature dimension reduction is performed is data marked as high-dimensional features after data pre-evaluation; The source database and the feature dimensionality reduction result are sent to the second server, and the second server uses the feature dimensionality reduction result to perform vector representation of the corresponding data in the source database, and builds a knowledge graph with the vector representation result; Receive input query information from the query entry, perform vector conversion on the input query information, input the vector conversion result into the knowledge graph, perform vector space data similarity calculation in the knowledge graph, and generate a similarity calculation result; The similarity calculation result is returned to the first server, additional calculation is performed by the first server, and the query result is output according to the additional calculation result.
2. The knowledge graph query method based on the key vector model according to claim 1, characterized in that: The performing of similarity calculation of vector space data in the knowledge graph and generating similarity calculation results includes: Reading account data, where the account data is account source data corresponding to the input query information, wherein the account data is pre-built user account data, and wherein the account data has a first similarity precision constraint; Parsing the input query information to obtain user requirements, and generating a second similarity precision constraint based on the user requirements; The matching similarity constraint is configured by the first similarity precision constraint and the second similarity precision constraint, and the output configuration of the knowledge graph is performed based on the matching similarity constraint, so as to generate a similarity calculation result by outputting the configuration result.
3. The knowledge graph query method based on the key vector model according to claim 2, characterized in that: The method further comprises: Performing result screening of the initial similarity calculation results based on the matching similarity constraint to generate a pre-screening result; Determine whether the pre-screening results meet the preset quantity threshold; If the preset quantity threshold is met, a supplementary conditional instruction is returned; The query entry is controlled by the supplementary condition instruction to add query conditions, and the similarity calculation results are generated according to the newly added query conditions.
4. The knowledge graph query method based on the key vector model according to claim 2, characterized in that: The method further comprises: Record the query results and generate query feedback of the query results; updating the precision extraction parameter of the second similarity precision constraint using the query feedback; Use the updated precision extraction parameters to perform subsequent query extraction of the corresponding account.
5. The knowledge graph query method based on the key vector model according to claim 1, characterized in that: The method comprises: After receiving the similarity calculation result, the first server constructs an initial solution space based on the similarity calculation result; In the initial solution space, similar calculations of vector transformation results are performed with the feature set to complete additional calculations.
6. The knowledge graph query method based on the key vector model according to claim 1, characterized in that: The filtering of data on the original database by the first server includes: Establishing a complete verification channel for data, using the complete verification channel to verify the integrity of data in the original database, and eliminating incomplete data based on the verification result; Execute data similarity clustering in the original database to generate data similarity clustering results; According to the data similarity clustering result, feature anomaly evaluation is performed between similar data, and abnormal data is eliminated based on the feature anomaly evaluation result to complete data filtering.
7. The knowledge graph query method based on the key vector model according to claim 6, characterized in that: The method further comprises: Performing data linear fitting based on the data similarity clustering results; The data deviation within the data similarity clustering results is evaluated based on the data linear fitting results, and the feature anomaly evaluation results are generated according to the deviation values.
8. A knowledge graph query method based on a key vector model, characterized in that: The method is applied to a knowledge graph query system, the knowledge graph query system comprising a first server, a second server and a query entry, the system is used to implement the knowledge graph query method based on a key vector model according to any one of claims 1 to 7, the method comprising: A first storage module, the first storage module is used to interactively obtain an original database, and store the original database in the first server, and use the first server to filter data on the original database to establish a source database; A feature dimension reduction module, wherein the feature dimension reduction module is used to establish a feature set of data, wherein each data in the source database corresponds to at least one feature, the feature set is constructed by performing feature extraction using a key vector model built into the first server, and feature dimension reduction is performed in the source database based on the feature set, wherein the data for which feature dimension reduction is performed is data marked as high-dimensional features after data pre-evaluation; A vector representation module, wherein the vector representation module is used to send the source database and the feature dimension reduction result to the second server, and the second server uses the feature dimension reduction result to perform vector representation of the corresponding data in the source database, and build a knowledge graph with the vector representation result; A similarity calculation module, the similarity calculation module is used to receive the input query information of the query entry, perform vector conversion on the input query information, input the vector conversion result into the knowledge graph, perform similarity calculation on the vector space data in the knowledge graph, and generate a similarity calculation result; The additional calculation module is used to return the similarity calculation result to the first server, perform additional calculation with the first server, and output the query result according to the additional calculation result.
Citation Information
Patent Citations
Domain knowledge graph question answering method and system based on query path sorting
CN115982338A
Information acquisition method, device and equipment, server and cluster thereof, and storage medium
CN117312529A