Intelligent query statistics method for data centers based on natural language semantic analysis

Through natural language semantic analysis and self-learning escape dictionaries, combined with data permissions and frequency information, suitable SQL query statements are generated, solving the complexity of intelligent queries and statistics in large data centers, and achieving high-precision, industry-specific Query results and simple operation procedures.

CN112131246BActive Publication Date: 2024-08-30范馨月
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011038101.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-28
Publication Date
2024-08-30
Estimated Expiration
2040-09-28

AI Technical Summary

Technical Problem

The existing technology is difficult to carry out intelligent management and statistical calculations in large data centers. It requires technicians to have a high understanding of the business and be familiar with the data center table structure. It cannot effectively handle the semantic differences of industry professional vocabulary, resulting in query results that are not industry-specific. sex.

Method used

Using a method based on natural language semantic analysis, through word segmentation, synonym analysis and escape dictionary matching, a directed graph and weight matrix are constructed, and SQL query statements are generated based on data permissions, quality and frequency information to achieve self-learning and industry vocabulary Semantic escaping, recommending suitable data tables and fields.

Benefits of technology

It improves the industry pertinence and accuracy of query results, reduces noise, and simplifies user operations. Users can complete query and statistical tasks without knowing the data center table structure, and the query results are highly consistent with user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112131246B
    Figure CN112131246B
Patent Text Reader

Abstract

The present invention discloses a data center intelligent query and statistics method based on natural language semantic analysis. In the query task, the specific semantic keywords are analyzed, the compound words in the keywords are segmented, the synonyms of the segmented words are analyzed and reorganized after the segmentation, and the results of the analysis and reorganization are matched with the escape dictionary; if the match is successful, the network is analyzed and established, and the weight information is redefined, and the data center authority, data quality, and frequency of use information of the data information are combined to construct a recommendation algorithm to splice the tables and fields in the database used in the task into SQL for query and statistics. The present invention has the characteristics of strong practicality, simple and convenient use, industry-specific query results, and a high degree of fit between the query results and user needs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data query statistics, and in particular to a data center intelligent query statistics method based on natural language semantic analysis. Background Art

[0002] With the continuous development of artificial intelligence technology, natural language semantic parsing and interaction technology are receiving more and more attention. At present, the dialogue system has its own corpus for a certain industry, and cannot perform intelligent management and statistical calculations on the data or the template is relatively fixed. For large data centers, to complete a certain query or statistical task, which tables and fields in which databases are needed to complete it requires technical personnel to have a certain degree of understanding of the business and be familiar with the data center table structure before they can complete it. At present, the intelligent application of Chinese natural language data based on the data center of the application industry has become an urgent need, and it is also a major trend in the development of the artificial intelligence era. Summary of the invention

[0003] The purpose of the present invention is to provide a data center intelligent query statistics method based on natural language semantic analysis. The present invention has the characteristics of strong practicability, simple and convenient use, industry-specific query results, and high degree of fit between query results and user needs.

[0004] The technical solution of the present invention is: a data center intelligent query and statistics method based on natural language semantic analysis. In the query task, specific semantic keywords are analyzed, compound words in the keywords are segmented, and the synonyms of the segmented words are analyzed and reorganized after the segmentation, and the results of the analysis and reorganization are matched with the escape dictionary; if the match is successful, the network is analyzed and established, and the weight information is redefined, and the data center authority, data quality, and usage frequency information of the data information are combined to build a recommendation algorithm to splice the tables and fields in the data center used in the task into SQL for query and statistics.

[0005] Specifically, the aforementioned data center intelligent query statistics method based on natural language semantic analysis includes the following steps:

[0006] a. Receive standardized data information;

[0007] b. Receive user demand keywords or entities generated after semantic analysis based on user natural language;

[0008] c. Construct a dictionary of metaphors based on the metaphorical interpretation of industry terms;

[0009] d. Match the user demand keywords or entities, synonyms of the user demand keywords or entities, and / or synonyms of the keywords after translation in the data information of step a; save and record the matched corresponding words and corresponding field information, and create an index;

[0010] e. Generate a directed graph consisting of tables and keywords as nodes and ordered pairs as edges;

[0011] f. Construct a weight matrix based on the directed graph to optimize the PageRank algorithm evaluation table and fields and recommend them to the user, and then generate SQL corresponding to the corresponding vocabulary according to the database type.

[0012] In step a of the aforementioned data center intelligent query statistics method based on natural language semantic analysis, the data information is one or more data information tables consisting of information such as all databases, tables, fields, Chinese data dictionaries, data quality conditions, field usage frequency, etc. of the data center.

[0013] In step c of the aforementioned data center intelligent query statistics method based on natural language semantic analysis, the construction of the escape dictionary is as follows:

[0014] c1. Segment the industry vocabulary and mark the part of speech; match the word in the escape dictionary according to the part of speech, and replace the corresponding word in the original escape dictionary with the escape word after matching;

[0015] c2. Use word meaning similarity Sim to calculate words with similarity higher than 90%, perform synonym recognition, and add the recognized synonyms to the translation dictionary.

[0016] In step c1 of the aforementioned data center intelligent query statistics method based on natural language semantic analysis, when the match fails, the failure reason is returned and manually added to the escape dictionary for interpretation.

[0017] In step c2 of the aforementioned data center intelligent query statistics method based on natural language semantic analysis, the method of synonym identification is specifically: through the word meaning similarity Sim calculation, the words with similarity value Sim>90% are identified, and then the synonym vector is constructed according to semantic splicing, and the similarity value of the word vector is recorded.

[0018] In step d of the aforementioned data center intelligent query statistics method based on natural language semantic analysis, if the match fails, information is returned to the user so that the explanation can be added to the escape dictionary.

[0019] In the step e of the aforementioned data center intelligent query statistics method based on natural language semantic analysis, the generation of the directed graph is specifically as follows:

[0020] Let D be the directed graph.<V,E> ;in,

[0021] Vertex set V = {K i ,T l}, K iis the keyword or entity required by the i-th user, i = 1,…,n; T l Represents l data information tables, l = 1,…,m;

[0022] The edge set is defined as E = { <K i ,T i,r >, <T l ,K i >|i=1,2,3,…,n,l=1,…,m,r is the data information table associated with the i-th user demand keyword or entity};

[0023] When a user demand keyword or entity corresponds to several fields of the same data information table, the field with the greatest similarity is taken, Σr=m.

[0024] The above-mentioned step f of the data center intelligent query statistics method based on natural language semantic analysis is specifically as follows:

[0025] The permission of the jth data information table corresponding to the i-th user requirement keyword or entity is K ij p , where i=1,2,3,…,n, j=n+1,n+2,…,n+m;

[0026]

[0027] K ij f The frequency of use of the field. Fields with higher frequency of use should be recommended first.

[0028] K ij q The data quality of this field is quantified as a percentage figure;

[0029] K ij Sim is the similarity of the matched words, where i = 1, 2, 3, ..., n, j = 1, 2, ..., m; where i represents the i-th user demand keyword or entity, j represents the matched field in the j-th data information table, n is the number of keywords, and m is the number of matched tables in the data information table;

[0030] Defining weights

[0031]

[0032] here

[0033]

[0034] Construct the initial weight matrix

[0035]

[0036] Calculate the directed graph D =<V,E> The adjacency matrix A is normalized by row and recorded as A'. The final weight matrix

[0037] M=Q·(A') T (2)

[0038] In the data center, the importance of the data information table is determined by the IPR value. k+1 Represents the IPR value after the kth iteration

[0039]

[0040] I(T l ) is the same as T l A collection of related keywords, + (K j ) is the same as T l Related keywords K j The out-degree, initial value Generally, β = 0.85;

[0041]

[0042] IPR after iteration * (T l ) is the evaluation value of each data information table;

[0043] To T l IPR * (T l ) values ​​are sorted, where l = 1, 2, ..., m, if the maximum value is T j Both <K i ,T j >,i=1,…,m, then the statistics and query tasks can be j This data information table is completed to generate SQL corresponding to the keywords.

[0044] In the aforementioned data center intelligent query and statistical method based on natural language semantic analysis, if a data information table cannot complete the query and statistical analysis tasks, select IPR in turn. * The value completes the SQL splicing.

[0045] Beneficial effects: Compared with the prior art, the present invention has the following advantages:

[0046] 1. The present invention adds a self-learning meta-lexicon to the fields of different industries, and can learn professional vocabulary of different industries, so that the query results are more industry-specific and more practical.

[0047] 2. The present invention performs word meaning (semantic) splicing on compound keywords in the similarity processing mode. This method can effectively improve the accuracy of the query and greatly reduce the noise of the query result.

[0048] 3. When using the present invention to perform query statistics on a large data center, the user does not need to know the table structure in the data center. The user only needs to provide a data dictionary to automatically execute the analysis query and statistical tasks of the present invention. The present invention can also produce structured language queries for different databases, so it is simple and convenient to use.

[0049] 4. Based on word meaning similarity, data center authority, data quality, and frequency of use accurate to the field, the present invention constructs an intelligent recommendation algorithm suitable for the data center, and self-learns the semantics of the industry vocabulary through the escaped word library, avoiding the situation where the query results are not industry-specific due to the different meanings of the same word in different industries. After redefining the network nodes and their weight information through the recommendation algorithm, the fit between the query results and the user's query needs is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0051] The present invention is further described below in conjunction with the accompanying drawings and embodiments, but they are not intended to limit the present invention.

[0052] Embodiment 1. A data center intelligent query and statistics method based on natural language semantic analysis, in the query task, analyzes specific semantic keywords, performs word segmentation on compound words in the keywords, analyzes and reorganizes the synonyms of the word segmentation after word segmentation, and matches the analysis and reorganization results with the escape dictionary; if the match is successful, analyzes and establishes a network and redefines the weight information, combines the data center authority, data quality, usage frequency and other information of the data information, and constructs a recommendation algorithm to splice the tables and fields in the data center used in the task into SQL (which can be converted into different database statements) for query and statistics.

[0053] Specifically, the query method and process are shown in Figure 1 , Figure 1 Where Ci, (i=1,2,3,...) represents the i-th step of the implementation process of the present invention, that is, the following a, b,... steps; A and B are external process numbers, N means that no parameters need to be received, and 2s represents the maximum allowed waiting time.

[0054] Specifically, the query method comprises the following steps:

[0055] a. Receive standardized data information; the standardized data information can be a Json format file;

[0056] b. Receive user demand keywords or entities generated after semantic analysis based on user natural language; user demand keywords or entities can be marked as K1, K2, ..., K n ;

[0057] c. Construct a translation dictionary with self-learning function for the translation interpretation of industry vocabulary; for example, "track" is translated into "license plate", because the computer cannot complete the translation work like a human to complete the statistics of vehicle driving tracks. To count the tracks, the data center does not have such a similar field, and instead needs to complete the analysis task in the vehicle passing table with license plate information, so that the computer has the ability to learn automatically; the establishment of the translation dictionary requires multiple runs of the analysis task of the present invention;

[0058] d. Match the user demand keywords or entities, synonyms of user demand keywords or entities, and / or synonyms of keywords after being translated in the data information of step a in step b; save and record the matched corresponding words (i.e. user demand keywords or entities, synonyms of user demand keywords or entities, and / or synonyms of keywords after being translated) and the corresponding field information, and create an index; record the matched word similarity as K i,j Sim (i=1,2,3,…,n,j=1,2,…,m) Here i represents the keyword / entity, j represents the table in which the matched field is located, n is the number of keywords, and m is the number of matched tables in the data information table.

[0059] e. Generate a directed graph consisting of tables and keywords as nodes and ordered pairs as edges;

[0060] f. Construct a weight matrix based on the directed graph to optimize the PageRank algorithm evaluation table and fields and recommend them to the user, and then generate SQL corresponding to the corresponding vocabulary according to the database type.

[0061] Specifically, in the aforementioned step a, the data information is one or more data information tables consisting of information such as all databases, tables, fields, Chinese data dictionaries, data quality status (quantified as percentages), and field usage frequency of the data center.

[0062] Specifically, in the aforementioned step c, the basic word library of the escape dictionary can be based on the word library of Wikipedia; the escape dictionary is constructed as follows:

[0063] c1. Segment the industry vocabulary and mark the part of speech; match the part of speech in the escape dictionary, and replace the corresponding vocabulary in the original escape dictionary with the escape word after matching; the part of speech includes noun, verb, place word, etc.; the existing Python package, such as jieba\hanlp, etc., can be used to mark the part of speech;

[0064] c2. Use word semantic similarity Sim to calculate words with similarity higher than 90%, perform synonym recognition, and add the recognized synonyms to the translation dictionary. The word library used can be based on the extended version of Harbin Institute of Technology Cilin. Through the method, it is possible to avoid the adjectives, adverbs, etc. in the entity from affecting the subsequent recommendation algorithm. For example, for the entity "upload time", "time / n" can be a date. The similarity calculation can find the word "date" that is similar to time (Sim(x, y)>90%), then "upload" and "date" are reorganized into "upload date" to achieve semantic splicing, construct similar word vectors and record the similarity values ​​of the word vectors.

[0065] In the aforementioned step c1, when the match fails, the reason for the failure is returned and manually added to the escape dictionary for interpretation.

[0066] In step c2, the method of synonym recognition is specifically as follows: by calculating the word meaning similarity Sim, words with similarity value Sim>90% are recognized, and then synonym vectors are constructed according to semantic concatenation, and the similarity value of the word vector is recorded.

[0067] Specifically, in the aforementioned step d, if the match fails, information is returned to the user so that the explanation can be added to the escape dictionary.

[0068] Specifically, in the aforementioned step e, the generation of the directed graph is as follows:

[0069] Let D be the directed graph.<V,E> ;in,

[0070] Vertex set V = {K i ,T l}, K i is the keyword or entity required by the i-th user, i = 1,…,n; T l Represents l data information tables, l = 1,…,m;

[0071] The edge set is defined as E = { <K i ,T i,r >, <T l ,K i >|i=1,2,3,…,n,l=1,…,m,r is the data information table associated with the i-th user demand keyword or entity};

[0072] When a user demand keyword or entity corresponds to several fields of the same data information table, the field with the greatest similarity is taken, Σr=m.

[0073] Specifically, the aforementioned step f is as follows:

[0074] In large data centers, data between departments may not be open to permissions, so users without permission cannot operate on certain data.

[0075] The permission of the jth data information table corresponding to the i-th user requirement keyword or entity is K ij p , where i=1,2,3,…,n, j=n+1,n+2,…,n+m;

[0076]

[0077] K ij f The frequency of use of the field. Fields with higher frequency of use should be recommended first.

[0078] K ij q The data quality of this field is quantified as a percentage figure;

[0079] K ij Sim is the similarity of the matched words, where i = 1, 2, 3, ..., n, j = 1, 2, ..., m; where i represents the i-th user demand keyword or entity, j represents the matched field in the j-th data information table, n is the number of keywords, and m is the number of matched tables in the data information table;

[0080] Defining weights

[0081]

[0082] here

[0083]

[0084] Construct the initial weight matrix

[0085]

[0086] Calculate the directed graph D =<V,E> The adjacency matrix A is normalized by row and recorded as A'. The final weight matrix

[0087] M=Q·(A') T (2)

[0088] In the data center, the importance of the data information table is determined by the IPR value. k+1Represents the IPR value after the kth iteration

[0089]

[0090] I(T l ) is the same as T l A collection of related keywords, + (K j ) is the same as T l Related keywords K j The out-degree, initial value Generally, β = 0.85;

[0091]

[0092] IPR after iteration * (T l ) is the evaluation value of each data information table;

[0093] To T l IPR * (T l ) values ​​are sorted, where l=1,2,…,m, if the maximum value T j Both <K i ,T j >,i=1,…,m, then the statistics and query tasks can be j Complete this data information table and generate SQL corresponding to the keywords; if a data information table cannot complete the query and statistical analysis tasks, select IPR in turn * The value completes the SQL splicing.

Claims

1. A data center intelligent query statistics method based on natural language semantic analysis, characterized in that: In the query task, the specific semantic keywords are parsed, the compound words in the keywords are segmented, the synonyms of the segmented words are analyzed and reorganized after the segmentation, and the results of the analysis and reorganization are matched with the escape dictionary; if the match is successful, the network is analyzed and established, and the weight information is redefined. Combined with the data information including the data center authority, data quality, and usage frequency information, a recommendation algorithm is constructed to splice the tables and fields in the data center used in the task into SQL for query and statistics; The data center intelligent query statistics method based on natural language semantic analysis includes the following steps: a. Receive standardized data information; b. Receive user demand keywords or entities generated after semantic analysis based on user natural language; c. Construct a dictionary of metaphors based on the metaphorical interpretation of industry terms; d. Match the user demand keywords or entities, synonyms of the user demand keywords or entities, and / or synonyms of the keywords after translation in the data information of step a; save and record the matched corresponding words and corresponding field information, and create an index; e. Generate a directed graph consisting of tables and keywords as nodes and ordered pairs as edges; f. Construct a weight matrix based on a directed graph to optimize the PageRank algorithm evaluation table and fields and recommend them to users, and then generate SQL corresponding to the corresponding vocabulary according to the database type; In step a, the data information is one or more data information tables including all databases, tables, fields, Chinese data dictionaries, data quality conditions, and field usage frequency information of the data center; In step e, the generation of the directed graph is as follows: Let D be the directed graph.<V,E> ;in, Vertex set V = {K i , T l }, K i is the keyword or entity required by the i-th user, i=1, .., n; T l represents l data information tables, l=1,...,m; The edge set is defined as E = { <K i , T i,r >, <T l , K i >|i=1,2,3,...,n,l=1,...,m,r is the data information table associated with the i-th user demand keyword or entity}; When a product demand keyword or entity corresponds to several fields in the same data information table, the field with the greatest similarity is selected, ∑γ=m; Step f is as follows: The permission of the jth data information table corresponding to the i-th user requirement keyword or entity is Where i=J, 2, 3, ..., n, j=n+1, n+2, ..., n+m; K ij f The frequency of use of the field. Fields with higher frequency of use should be recommended first. K ij q The data quality of this field is quantified as a percentage figure; K ij Sim is the similarity of the matched words, where i=1, 2, 3, .., n, j=1, 2, .., m; where i represents the i-th user demand keyword or entity, j represents the matched field in the j-th data information table, n is the number of keywords, and m is the number of matched tables in the data information table; Defining weights here Construct the initial weight matrix Calculate the directed graph D =<V,E> The adjacency matrix A is normalized by row and recorded as A′. The final weight matrix M=Q·(A′) T (2) In the data center, the importance of the data information table is determined by the IPR value. k+I Represents the IPR value after the kth iteration I(T l ) is the same as T l A collection of related keywords, Δ + (K j ) is the same as T l Related keywords K j The out-degree, initial value Generally, β = 0.85; IPR after iteration * (T l ) is the evaluation value of each data information table; To T l IPR * (T l ) values ​​are sorted, where l = 1, 2, ..., m, if the maximum value is T j Both <K i , T j >, i = 1, ..., m, then the statistics and query tasks can be j This data information table is completed to generate SQL corresponding to the keywords.

2. The data center intelligent query statistics method based on natural language semantic analysis according to claim 1 is characterized in that: In step c, the escape dictionary is constructed as follows: c1. Segment the industry vocabulary and mark the part of speech; match the word in the escape dictionary according to the part of speech, and replace the corresponding word in the original escape dictionary with the escape word after matching; c2. Use word meaning similarity Sim to calculate words with similarity higher than 90%, perform synonym recognition, and add the recognized synonyms to the translation dictionary.

3. The data center intelligent query statistics method based on natural language semantic analysis according to claim 2 is characterized by: In step c1, when the match fails, the reason for the failure is returned and manually added to the escape dictionary.

4. The data center intelligent query statistics method based on natural language semantic analysis according to claim 2 is characterized by: In step c2, the method of synonym recognition is specifically as follows: by calculating the word meaning similarity Sim, words with similarity value Sim>90% are recognized, and then synonym vectors are constructed according to semantic concatenation, and the similarity value of the word vector is recorded.

5. The data center intelligent query statistics method based on natural language semantic analysis according to claim 1 is characterized by: Step d: If the match fails, the information is returned to the user so that the explanation can be added to the escape dictionary.

6. The data center intelligent query statistics method based on natural language semantic analysis according to claim 1 is characterized by: If a data information table cannot complete the query and statistical analysis tasks, select IPR in turn. * The value completes the SQL splicing.

Citation Information

Patent Citations

  • Enquiry statement analytical method and system for information retrieval

    CN101510221A

  • Multi-system cooperative system and method for production process control of discrete manufacturing enterprises

    CN104331767A