A method for constructing knowledge graph in audit field based on AI technology

Through the AI-based audit knowledge graph construction method, the problem of insufficient applicability of power audit knowledge graph to grassroots units is solved, more efficient and accurate search results are achieved, and the closeness of physical data is improved.

CN119202273BActive Publication Date: 2025-02-18TECH TRAINING CENT OF STATE GRID HUBEI ELECTRIC POWER CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411678161.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-02-18
Estimated Expiration
2044-11-22

AI Technical Summary

Technical Problem

The existing power audit knowledge graph is weak in applicability to power grassroots units, resulting in a waste of time when searching and viewing, and the accuracy of query results is not high.

Method used

Using the knowledge graph construction method of auditing field based on AI technology, by collecting and recording text data, obtaining entity data and clustering, building a standard database to obtain the entity data of the grassroots unit, calculating similar values ​​and hierarchical correlation factors, and connecting when the preset correlation threshold exceeds Entity data, thus completing the construction of the knowledge graph.

Benefits of technology

It improves the closeness of connections between entity data, enhances the efficiency of search and viewing of grassroots units and the accuracy of results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202273B_ABST
    Figure CN119202273B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of knowledge graph construction, and specifically to a method for constructing a knowledge graph in the audit field based on AI technology, including: clustering entity data; constructing a standard database to obtain grassroots entity data; calculating the similarity value between the entity data of each cluster and the grassroots entity data, and the cluster corresponding to the largest similarity value is the top cluster; calculating the hierarchical correlation factor between any undetermined level cluster and the lowest level cluster in the determined level cluster, and the cluster corresponding to the largest hierarchical correlation factor is the next level cluster of the determined level cluster; calculating the degree of association between any upper entity data and any lower entity data in the adjacent level clusters, and when the degree of association exceeds a preset association threshold, the upper entity data is connected to the lower entity data. The knowledge graph constructed by the present invention improves the closeness of the connection between entity data, the efficiency of grassroots unit search and viewing, and the accuracy of the results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of knowledge graph construction, and specifically to a method for constructing a knowledge graph in the auditing field based on AI technology. Background Art

[0002] A knowledge graph is a structured graphical model for representing and storing knowledge, typically displaying entities (such as people, places, and things) and their relationships in the form of a graph. It constructs a comprehensive knowledge network using nodes (representing entities) and edges (representing relationships), enabling precise semantic organization of information and supporting queries, thereby significantly improving the accuracy and efficiency of information retrieval. Knowledge graphs are widely used in search engines, recommendation systems, artificial intelligence, and other fields, aiming to provide comprehensive and detailed contextual information and enhance the intelligence of retrieval and reasoning to optimize user experience and decision-making efficiency.

[0003] In the auditing field, a knowledge graph is a structured knowledge network that focuses on the various entities, activities, and relationships within the audit process. It organizes audit-related information elements (such as audit standards, processes, risk factors, control measures, and financial data) into nodes and edges to demonstrate the relationships and dependencies between these elements. Knowledge graphs support intelligent audit decision-making and data mining, helping auditors better understand and analyze audit objects, identify potential risks, and improve audit efficiency.

[0004] In conventional technology, when constructing a knowledge graph in the field of power auditing, the differences in nature between grassroots units are not taken into account. That is, in conventional technology, a large-scale power audit knowledge graph is constructed in a general way, resulting in a lot of time being wasted when searching and viewing some grassroots power units, and the accuracy of the query results is not high. Summary of the Invention

[0005] In order to solve the technical problem that the existing power audit knowledge graph is not applicable to grassroots power units, the purpose of this invention is to provide a method for constructing an audit field knowledge graph based on AI technology. The technical solution adopted is as follows:

[0006] Collecting recorded text data, obtaining entity data based on the recorded text data, and clustering the entity data to obtain entity data of a plurality of clusters;

[0007] Constructing a standard database containing standard text data to obtain grassroots unit entity data, wherein the grassroots unit entity data is an entity name corresponding to the grassroots unit;

[0008] Calculating the similarity between the entity data of each cluster and the grassroots entity data, and the cluster corresponding to the one with the largest similarity value is the top-level cluster;

[0009] Calculate the hierarchical correlation factor between any cluster of undetermined hierarchy and the lowest cluster among the clusters of determined hierarchy, the cluster corresponding to the one with the largest hierarchical correlation factor being the cluster of the next level below the cluster of determined hierarchy, the clusters of determined hierarchy including the top cluster;

[0010] The degree of association between any upper-level entity data and any lower-level entity data in clusters of adjacent levels is calculated. When the degree of association exceeds a preset association threshold, the upper-level entity data is connected to the lower-level entity data, thereby completing the construction of the knowledge graph.

[0011] Furthermore, the recorded text data includes: trial reports, equipment operation documents, industry reports; the standard text data includes: text data on audit industry regulations and standards; and the entity data includes: unit organization name, person name, time, place, and event.

[0012] Furthermore, obtaining entity data according to the recorded text data includes:

[0013] Cleaning the recorded text data, and then performing word segmentation on the cleaned recorded text data;

[0014] The entity data in the recorded text data is obtained according to the BERT model, and the word vector of each word in the entity data is obtained.

[0015] Furthermore, when the entity data contains one word, the word vector of the word is the entity vector of the entity data; when the entity data contains at least two words, the vector sum of the word vectors of all the words is the entity vector of the entity data.

[0016] Furthermore, clustering the entity data to obtain entity data of several clusters includes:

[0017] The entity data is clustered using a K-means clustering algorithm, and the number of clusters is obtained using an elbow method.

[0018] Furthermore, the calculating of the similarity value between the entity data of each cluster and the grassroots entity data includes:

[0019] Calculating the cosine similarity between a first total vector and a second total vector, where the first total vector is a vector obtained by performing a vector addition operation on the entity vectors of all entity data corresponding to the grassroots entity data, and the second total vector is a vector obtained by performing a vector addition operation on the entity vectors of all entity data in the i-th cluster;

[0020] The absolute value of the difference in proportions is obtained by subtracting the second proportion from the first proportion, and the inverse of the absolute value of the difference in proportions is used as a parameter of a natural exponential function to obtain an exponential value, wherein the first proportion is the proportion of the grassroots unit entity data in all the entity data in the standard database, and the second proportion is the proportion of the entity data in the i-th cluster in all the entity data in the record text data;

[0021] The cosine similarity is multiplied by the exponent value to obtain the similarity value.

[0022] Furthermore, the calculation of the hierarchical correlation factor between any cluster of undetermined hierarchy and the lowest-level cluster among the clusters of determined hierarchy includes:

[0023] Calculating a modulus after a vector subtraction operation is performed on a first vector sum and a second vector sum, wherein the first vector sum is a vector sum of word vectors of words included in all entity data in the lowest-level cluster of the determined hierarchical clusters, and the second vector sum is a vector sum of word vectors of words included in all entity data in the undetermined hierarchical clusters;

[0024] Subtracting the second number of features from the first number of features and taking the absolute value to obtain the absolute value of the number of features, wherein the first number of features is the number of features of the lowest level cluster among the clusters of the determined level, and the second number of features is the number of features of the clusters of the undetermined level;

[0025] The hierarchical correlation factor is obtained by taking the inverse of the product of the absolute value of the number of features and the modulus as a parameter of a natural exponential function.

[0026] Furthermore, the calculation of the correlation degree between any upper-layer entity data and any lower-layer entity data of adjacent hierarchical clusters includes:

[0027] Obtaining a modulus length after performing a vector subtraction operation on an entity vector of the upper-layer entity data and an entity vector of the lower-layer entity data;

[0028] Subtracting the mean of the word frequencies of the words included in the lower-level entity data from the mean of the word frequencies of the words included in the upper-level entity data and taking the absolute value to obtain the absolute value of the mean difference in word frequencies;

[0029] Obtaining a distance value between the upper-layer entity data and the lower-layer entity data in the same text in the standard database;

[0030] The degree of association is obtained by multiplying the modulus, the absolute value of the word frequency mean difference, and the distance value in sequence, and taking the inverse of the multiplication result as the parameter of the natural exponential function.

[0031] Furthermore, the method further comprises:

[0032] When the upper-layer entity data and the lower-layer entity data appear simultaneously in at least two identical texts in the standard database, the average of the distances between the upper-layer entity data and the lower-layer entity data in each text is used as the distance value.

[0033] Furthermore, the preset correlation threshold is 0.5.

[0034] The present invention has the following beneficial effects:

[0035] First, record text data is collected, entity data is obtained based on the record text data, and the entity data is clustered to obtain entity data for several clusters. Clustering here refers to the classification of entity data in the record text data, and entity data within the same cluster is not very different. A standard database containing standard text data is constructed to obtain grassroots entity data. The grassroots entity data is the entity name corresponding to the grassroots unit. The grassroots entity data is obtained to subsequently determine the top-level cluster. The similarity value between the entity data of each cluster and the grassroots entity data is calculated. The cluster corresponding to the highest similarity value is the top-level cluster. The top-level cluster is obtained here to facilitate the subsequent acquisition of the clusters at the next level below the top-level cluster. The hierarchical correlation factor is calculated between any cluster of undetermined level and the lowest-level cluster among the clusters at the determined level. The cluster corresponding to the highest hierarchical correlation factor is the cluster at the next level below the clusters at the determined level. The clusters at the determined level include the top-level cluster. Here, the next level cluster of the top level cluster is obtained based on the top level cluster, that is, the second level cluster. The next level cluster of the second level cluster is obtained based on the second level cluster, that is, the third level cluster. And so on to determine the level to which each cluster belongs. The degree of association between any upper level entity data and any lower level entity data in the clusters of adjacent levels is calculated. When the degree of association exceeds the preset association threshold, the upper level entity data is connected to the lower level entity data, thereby completing the construction of the knowledge graph. Here, in order to obtain the degree of association between different entity data of adjacent levels, each entity data can be regarded as a node. When the degree of association exceeds the preset association threshold, the upper level entity data node is connected to the lower level entity data node. One upper level entity data node can be connected to multiple lower level entity data nodes. In this way, a knowledge graph is successfully constructed, which improves the closeness of the connection between entity data, and also improves the efficiency of grassroots unit search and viewing and the accuracy of the results. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0037] Figure 1 A flowchart of a method for constructing an auditing domain knowledge graph based on AI technology provided by one embodiment of the present invention;

[0038] Figure 2 A flowchart of a process for obtaining similarity values ​​provided by one embodiment of the present invention;

[0039] Figure 3 A flowchart of a process for obtaining a hierarchical correlation factor according to an embodiment of the present invention;

[0040] Figure 4 This is a flow chart of a process for obtaining a degree of association provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0041] In order to further illustrate the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the method for constructing a knowledge graph in the audit field based on AI technology proposed by the present invention, its specific implementation method, structure, features and effects. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0042] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0043] The specific scheme of the method for constructing a knowledge graph in the audit field based on AI technology provided by the present invention is described in detail below with reference to the accompanying drawings.

[0044] See also Figure 1 , which shows a flowchart of a method for constructing an auditing domain knowledge graph based on AI technology provided by one embodiment of the present invention, the method comprising:

[0045] S101. Collect recorded text data, obtain entity data based on the recorded text data, and cluster the entity data to obtain entity data of several clusters.

[0046] The recorded text data includes: trial reports, equipment operation documents, and industry reports; the entity data includes: unit organization name, person name, time, place, and event.

[0047] It should be noted that the present invention includes but is not limited to applications in the field of power auditing. When applied to the field of power auditing, the recorded text data may include power audit reports, power equipment operation documents, and power industry reports.

[0048] Furthermore, obtaining entity data according to the recorded text data includes:

[0049] Cleaning the recorded text data, and then performing word segmentation on the cleaned recorded text data;

[0050] The entity data in the recorded text data is obtained according to the BERT model, and the word vector of each word in the entity data is obtained.

[0051] The recorded text data can be cleaned using the text cleaning toolkit NLTK, and then the cleaned recorded text data can be segmented using the Jieba word segmentation tool. The processes of preprocessing the recorded text data using the text cleaning toolkit NLTK and the Jieba word segmentation tool are both well-known techniques and will not be described in detail here.

[0052] The word vector of each word in the recorded text data is obtained by the Word2vec algorithm, and the entity data in the recorded text data is obtained according to the BERT model. Wherein, the Word2vec algorithm and the BERT model are both well-known technologies and will not be described in detail here.

[0053] Furthermore, when the entity data contains one word, the word vector of the word is the entity vector of the entity data; when the entity data contains at least two words, the vector sum of the word vectors of all the words is the entity vector of the entity data.

[0054] To record various abnormal events that occur during power audits and facilitate subsequent audits, this solution constructs a knowledge graph based on the recorded text data, improving the convenience of grassroots power audit personnel. First, entity data is filtered from the recorded text data. Knowledge graphs of different levels are constructed using all entity data. To determine the entity data corresponding to different levels, all entity data needs to be divided, or clustered.

[0055] Furthermore, clustering the entity data to obtain entity data of several clusters includes:

[0056] The entity data is clustered using a K-means clustering algorithm, and the number of clusters is obtained using an elbow method. Specifically, all entity data is clustered using a K-means clustering algorithm based on their entity vectors, and the number of clusters is selected using an elbow method. The sum of squared errors in the elbow method is the modulus of the result of vector subtraction of all entity vectors in each cluster, because the closer the magnitude and direction of two entity vectors are, the smaller the modulus after vector subtraction. Both the K-means clustering algorithm and the elbow method are well-known technologies.

[0057] S102. Construct a standard database containing standard text data to obtain grassroots unit entity data, where the grassroots unit entity data is the entity name corresponding to the grassroots unit.

[0058] The standard text data includes: text data on audit industry regulations and standards.

[0059] In the field of power auditing, the standard text data may include text data such as power auditing industry regulations, rules and standards.

[0060] The grassroots unit entity data in the standard database is obtained through the BERT model, that is, the entity names corresponding to all grassroots units in the standard database are selected.

[0061] S103. Calculate the similarity between the entity data of each cluster and the grassroots entity data, and the cluster corresponding to the one with the largest similarity value is the top-level cluster.

[0062] Since the present invention constructs a knowledge graph based on the differences between different grassroots units in power auditing, the grassroots unit entity data is first selected through the standard database, and the entity data corresponding to the highest-level node of the knowledge graph is determined through the differences between the grassroots unit entity data in the standard database and all entity data in all clusters in the record text data. That is, the entity data in the cluster with smaller differences (higher similarity values) is more suitable as the entity data in the highest-level node.

[0063] The closer the frequency of entity data in each cluster in the recorded text data of all power audits is to the frequency of entity data of grassroots units selected from the standard database, the more suitable the entity data in the cluster is as the entity data in the highest-level node.

[0064] The entity data in the highest-level node is the entity data in the top-level cluster.

[0065] The process of obtaining the similarity value will be described in detail in the second embodiment and will not be repeated here.

[0066] S104. Calculate the hierarchical correlation factor between any cluster of undetermined level and the lowest level cluster among the clusters of determined level. The cluster corresponding to the one with the largest hierarchical correlation factor is the cluster of the next level of the cluster of determined level. The clusters of determined level include the top-level cluster.

[0067] Because the differences between entity data in clusters of adjacent levels should be relatively small, a difference analysis is performed on the entity data in clusters of determined levels and the entity data in clusters of undetermined levels. The smaller the difference, the more related they are. The entity data in the cluster with the smallest difference is used as the entity data in the next level adjacent to the determined level.

[0068] When constructing a knowledge graph, the total vectors between the corresponding words of entity data at adjacent levels should be small. This can be quantified by the difference between the total vectors of the corresponding words in the entity data in the top cluster and any other cluster. The smaller the difference, the more consistent the cluster is with the adjacent clusters of the top cluster. In the knowledge graph, the scope of entity data at higher levels is greater, which means it is more likely to be a title, and the more likely it is to be bolded and blacked simultaneously. Therefore, the difference between the number of entity data in each cluster that are titles, bolded, and blacked can be used to quantify whether two clusters are clusters of adjacent levels. (The first level may correspond to various grassroots units, the second level is the various types of work corresponding to the grassroots units, the third level is the specific tasks corresponding to each type of work, and so on.)

[0069] After the top cluster is determined, the top cluster is the cluster of the determined hierarchy. In this case, if there is only one cluster of the determined hierarchy, the top cluster is the lowest cluster among the clusters of the determined hierarchy. At this point, the hierarchical correlation factor is calculated between any clusters of undetermined hierarchy and the top cluster. The cluster with the largest hierarchical correlation factor is the cluster of the next level below the top cluster, i.e., the second cluster.

[0070] After the top-level clusters are determined, the top-level clusters and the second-level clusters are the clusters of the determined hierarchy. In this case, the second-level clusters are the lowest-level clusters in the determined hierarchy. At this point, the hierarchical correlation factor between any undetermined clusters and the second-level clusters is calculated. The cluster with the largest hierarchical correlation factor is the cluster of the next level below the second-level clusters, i.e., the third-level cluster.

[0071] By analogy, each cluster can be classified into a certain level.

[0072] The process of obtaining the hierarchical correlation factor will be described in detail in the third embodiment and will not be repeated here.

[0073] S105. Calculate the degree of association between any upper-level entity data and any lower-level entity data in clusters of adjacent levels. When the degree of association exceeds a preset association threshold, the upper-level entity data is connected to the lower-level entity data, thereby completing the construction of the knowledge graph.

[0074] After determining the level corresponding to each cluster, the corresponding relationship between the entity data in the adjacent levels has not yet been determined, so it is also necessary to determine the connection between the entity data in the adjacent levels. Because the closer the distance between two entity data in adjacent levels, the smaller the difference between the word vectors in the two entity data, and the closer the frequency of the words in the two entity data in the corresponding text, the degree of association between the two entity data can be quantified by the difference between the word vectors corresponding to the two entity data and the difference in the frequency of the words in the two entity data in the corresponding text. It is also possible to analyze the corresponding positions of different entity data in two adjacent levels in the standard database. The closer the distance between the corresponding positions, the more associated the two entity data are.

[0075] The process of obtaining the association degree will be described in detail in the fourth embodiment and will not be repeated here.

[0076] When constructing a knowledge graph, it is an inverted tree structure, that is, the nodes in each layer gradually increase from top to bottom, so a node corresponding to the upper-level entity data may correspond to multiple nodes of the lower-level entity data.

[0077] Furthermore, the preset association threshold can be set to 0.5, and the preset association threshold is not specifically limited. All entity data whose association degree between an upper-layer entity data in the upper-layer structure and all lower-layer entity data in the adjacent lower-layer structure is greater than or equal to the preset association threshold is used as the lower-layer entity data connected to the upper-layer entity data.

[0078] Similarly, the entity data between all other adjacent levels are connected to complete the construction of the knowledge graph.

[0079] Figure 2 This is a flowchart of a process for obtaining similarity values ​​provided by one embodiment of the present invention. The process for obtaining similarity values ​​includes:

[0080] S201. Calculate the cosine similarity between the first total vector and the second total vector, wherein the first total vector is a vector obtained by performing vector addition operation on the entity vectors of all entity data corresponding to the grassroots unit entity data, and the second total vector is a vector obtained by performing vector addition operation on the entity vectors of all entity data in the i-th cluster.

[0081] The cosine similarity can be expressed as: , wherein the The first total vector is a vector obtained by performing vector addition operation on the entity vectors of all entity data corresponding to the grassroots unit entity data, The second total vector is the vector obtained by performing vector addition operation on the entity vectors of all entity data in the i-th cluster. is the cosine similarity function. The value of i ranges from 1 to the number of clusters. The larger the cosine similarity, the greater the similarity between the cluster and the grassroots entity data.

[0082] S202. Subtract the second proportion from the first proportion and take the absolute value to obtain the absolute value of the proportion difference, and use the opposite of the absolute value of the proportion difference as the parameter of the natural exponential function to obtain the exponential value, wherein the first proportion is the proportion of the grassroots unit entity data in all the entity data in the standard database, and the second proportion is the proportion of the entity data in the i-th cluster in all the entity data in the record text data.

[0083] The absolute value of the ratio difference can be expressed as: , wherein the The first proportion is the proportion of the grassroots unit entity data in all the entity data in the standard database, The second proportion is the proportion of the entity data in the i-th cluster in all the entity data in the record text data.

[0084] It can also represent the frequency difference between cluster data and grassroots entity data. The smaller the difference, the greater the similarity between the cluster and grassroots entity data.

[0085] The index value can be expressed as: , wherein the The function is the natural exponential function.

[0086] S203 . Multiply the cosine similarity by the exponent value to obtain the similarity value.

[0087] The similarity value can be expressed as:

[0088] ;

[0089] described Indicates the The similarity between clusters and entity data.

[0090] Figure 3This is a flowchart of a process for obtaining a hierarchical correlation factor provided by one embodiment of the present invention. Calculating the hierarchical correlation factor between any cluster of undetermined hierarchy and the lowest-level cluster among clusters of determined hierarchy includes:

[0091] S301. Calculate the modulus of the first vector sum and the second vector sum after vector subtraction, wherein the first vector sum is the vector sum of the word vectors of all the entity data in the lowest-level cluster of the determined-level clusters, and the second vector sum is the vector sum of the word vectors of all the entity data in the undetermined-level clusters.

[0092] The modulus length after vector subtraction of the first vector sum and the second vector sum can be expressed as: , wherein the The first vector is the sum of the word vectors of all the entity data in the lowest level cluster of the determined level clusters, The second vector is the sum of the word vectors of the words contained in the cluster of the undetermined level (ie, the j-th cluster). The smaller it is, the smaller the difference between the clusters is, that is, the greater the hierarchical correlation factor between the two clusters is.

[0093] S302. Subtract the second number of features from the first number of features and take the absolute value to obtain the absolute value of the number of features, wherein the first number of features is the number of features of the lowest level cluster among the clusters of the determined level, and the second number of features is the number of features of the clusters of the undetermined level.

[0094] The absolute value of the number of features can be expressed as: , The first number of features is the number of features of the lowest level cluster among the clusters of the determined levels, The second feature number is the feature number of the cluster of the undetermined level (ie, the jth cluster). The number of entity data in each cluster that are titles, bold, and black is counted, and the number is recorded as the feature number of each cluster.

[0095] described The smaller it is, the smaller the difference between clusters is, which means the hierarchical correlation factor between the two clusters is larger.

[0096] S303. Using the inverse of the product of the absolute value of the number of features and the modulus as a parameter of a natural exponential function to obtain the hierarchical correlation factor.

[0097] The hierarchical correlation factor can be expressed as:

[0098] ;

[0099] described Function is the natural exponential function, For the The hierarchical correlation factor between the clusters of the first level and the lowest level cluster among the clusters of the determined level.

[0100] Figure 4 This is a flowchart of a process for obtaining a degree of association provided by one embodiment of the present invention. The process for obtaining a degree of association includes:

[0101] S401. Obtain the modulus length after performing a vector subtraction operation on the entity vector of the upper-layer entity data and the entity vector of the lower-layer entity data.

[0102] The modulus length after vector subtraction of the entity vector of the upper-layer entity data and the entity vector of the lower-layer entity data can be expressed as: , wherein the is the entity vector of the upper layer entity data, i.e. The first level of clusters entity vector of entity data, the is the entity vector of the lower layer entity data, i.e. The first level of clusters The entity vector of entity data. The smaller it is, the smaller the difference between the upper-level entity data and the lower-level entity data, and the greater the degree of association.

[0103] S402. Subtract the mean of the word frequencies of the words included in the lower-layer entity data from the mean of the word frequencies of the words included in the upper-layer entity data, and take the absolute value to obtain the absolute value of the mean word frequency difference.

[0104] The absolute value of the word frequency mean difference can be expressed as: , wherein the is the mean of the word frequencies of the words contained in the upper-level entity data, that is, Indicates the The first level of clusters The mean of the word frequencies of all words in the entity data, is the mean of the word frequencies of the words contained in the underlying entity data, i.e. Indicates the The first level of clusters The mean frequency of all words in the entity data. It indicates the difference in the mean frequency of words between the upper-level entity data and the lower-level entity data. The smaller the difference, the greater the degree of association between the upper-level entity data and the lower-level entity data.

[0105] S403. Obtain a distance value between the upper-layer entity data and the lower-layer entity data in the same text in the standard database.

[0106] The distance value can be expressed as: That is Entity data and The distance between entity data in the same text within the standard database.

[0107] Furthermore, the method further comprises:

[0108] When the upper-layer entity data and the lower-layer entity data appear simultaneously in at least two identical texts in the standard database, the average of the distances between the upper-layer entity data and the lower-layer entity data in each text is used as the distance value.

[0109] S404. The degree of association is obtained by multiplying the modulus, the absolute value of the difference in the mean word frequency, and the distance value in sequence, and taking the inverse of the multiplication result as the parameter of the natural exponential function.

[0110] The process of obtaining the association degree includes:

[0111] ;

[0112] described Indicates the The first level of clusters Entity data and The first level of clusters The degree of association between entity data, The function is the natural exponential function.

[0113] The present invention has the following beneficial effects:

[0114] First, record text data is collected, entity data is obtained based on the record text data, and the entity data is clustered to obtain entity data for several clusters. Clustering here refers to the classification of entity data in the record text data, and entity data within the same cluster is not very different. A standard database containing standard text data is constructed to obtain grassroots entity data. The grassroots entity data is the entity name corresponding to the grassroots unit. The grassroots entity data is obtained to subsequently determine the top-level cluster. The similarity value between the entity data of each cluster and the grassroots entity data is calculated. The cluster corresponding to the highest similarity value is the top-level cluster. The top-level cluster is obtained here to facilitate the subsequent acquisition of the clusters at the next level below the top-level cluster. The hierarchical correlation factor is calculated between any cluster of undetermined level and the lowest-level cluster among the clusters at the determined level. The cluster corresponding to the highest hierarchical correlation factor is the cluster at the next level below the clusters at the determined level. The clusters at the determined level include the top-level cluster. Here, the next level cluster of the top level cluster is obtained based on the top level cluster, that is, the second level cluster. The next level cluster of the second level cluster is obtained based on the second level cluster, that is, the third level cluster. And so on to determine the level to which each cluster belongs. The degree of association between any upper level entity data and any lower level entity data in the clusters of adjacent levels is calculated. When the degree of association exceeds the preset association threshold, the upper level entity data is connected to the lower level entity data, thereby completing the construction of the knowledge graph. Here, in order to obtain the degree of association between different entity data of adjacent levels, each entity data can be regarded as a node. When the degree of association exceeds the preset association threshold, the upper level entity data node is connected to the lower level entity data node. One upper level entity data node can be connected to multiple lower level entity data nodes. In this way, a knowledge graph is formed, which improves the closeness of the connection between entity data, and also improves the efficiency of grassroots unit search and viewing and the accuracy of the results.

[0115] It should be noted that the order in which the embodiments of the present invention are described above is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0116] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.

Claims

1. The method for constructing knowledge graph in the audit field based on AI technology is characterized by: The method comprises: Collecting recorded text data, acquiring entity data according to the recorded text data, and clustering the entity data to obtain entity data of a plurality of clusters; Constructing a standard database containing standard text data to obtain grassroots unit entity data, wherein the grassroots unit entity data is an entity name corresponding to the grassroots unit; Calculate the similarity between the entity data of each cluster and the grassroots unit entity data, and the cluster corresponding to the one with the largest similarity value is the top-level cluster; Calculate the hierarchical correlation factor between any cluster of undetermined hierarchy and the lowest-level cluster among the clusters of determined hierarchy, the cluster corresponding to the one with the largest hierarchical correlation factor is the cluster of the next level of the cluster of determined hierarchy, and the clusters of determined hierarchy include the top-level cluster; Calculate the degree of association between any upper-layer entity data and any lower-layer entity data in clusters of adjacent levels. When the degree of association exceeds a preset association threshold, the upper-layer entity data is connected to the lower-layer entity data, thereby completing the construction of the knowledge graph; The calculating of the similarity value between the entity data of each cluster and the grassroots entity data comprises: Calculating the cosine similarity between a first total vector and a second total vector, wherein the first total vector is a vector obtained by performing vector addition operation on the entity vectors of all entity data corresponding to the grassroots entity data, and the second total vector is a vector obtained by performing vector addition operation on the entity vectors of all entity data in the i-th cluster; The absolute value of the difference in proportion is obtained by subtracting the second proportion from the first proportion, and the inverse of the absolute value of the difference in proportion is used as a parameter of a natural exponential function to obtain an exponential value, wherein the first proportion is the proportion of the grassroots unit entity data in all the entity data in the standard database, and the second proportion is the proportion of the entity data in the i-th cluster in all the entity data in the record text data; The cosine similarity is multiplied by the exponent value to obtain the similarity value; The step of calculating the hierarchical correlation factor between any cluster of undetermined hierarchy and the lowest-level cluster among the clusters of determined hierarchy comprises: Calculating the module length after vector subtraction between the first vector sum and the second vector sum, wherein the first vector sum is the vector sum of the word vectors of all the entity data in the lowest level cluster of the determined level clusters, and the second vector sum is the vector sum of the word vectors of all the entity data in the undetermined level clusters; Subtract the second number of features from the first number of features and take the absolute value to obtain the absolute value of the number of features, wherein the first number of features is the number of features of the lowest level cluster among the clusters of the determined level, and the second number of features is the number of features of the clusters of the undetermined level; The hierarchical correlation factor is obtained by taking the inverse of the product of the absolute value of the number of features and the modulus as a parameter of a natural exponential function; The calculation of the association degree between any upper-layer entity data and any lower-layer entity data of adjacent-level clusters includes: Obtaining a modulus length after vector subtraction operation is performed between an entity vector of the upper-layer entity data and an entity vector of the lower-layer entity data; Subtracting the mean of the word frequencies of the words included in the lower-layer entity data from the mean of the word frequencies of the words included in the upper-layer entity data, and then taking the absolute value to obtain the absolute value of the mean difference of the word frequencies; Acquire a distance value between the upper-layer entity data and the lower-layer entity data in the same text in the standard database; The degree of association is obtained by multiplying the modulus, the absolute value of the difference in the mean of the word frequency, and the distance value in turn by taking the inverse of the multiplication result as the parameter of the natural exponential function.

2. The method for constructing an audit field knowledge graph based on AI technology according to claim 1, characterized in that: The recorded text data includes: audit reports, equipment operation documents, and industry reports; the standard text data includes: text data on audit industry regulations and standards; and the entity data includes: unit organization name, person name, time, place, and event.

3. The method for constructing an audit domain knowledge graph based on AI technology according to claim 1, characterized in that: Acquiring entity data according to the recorded text data includes: Cleaning the recorded text data, and then performing word segmentation on the cleaned recorded text data; The entity data in the recorded text data is obtained according to the BERT model, and the word vector of each word in the entity data is obtained.

4. The method for constructing an audit field knowledge graph based on AI technology as claimed in claim 3, characterized in that: When the entity data contains one word, the word vector of the word is the entity vector of the entity data. When the entity data contains at least two words, the vector sum of the word vectors of all the words is the entity vector of the entity data.

5. The method for constructing an audit field knowledge graph based on AI technology according to claim 1, characterized in that: Clustering the entity data to obtain entity data of several clusters includes: The entity data is clustered by a K-means clustering algorithm, and the number of clusters is obtained by an elbow method.

6. The method for constructing an audit field knowledge graph based on AI technology according to claim 1, characterized in that: The method further comprises: When the upper-layer entity data and the lower-layer entity data appear simultaneously in at least two identical texts in the standard database, the average of the distances between the upper-layer entity data and the lower-layer entity data in each text is used as the distance value.

7. The method for constructing an audit domain knowledge graph based on AI technology according to claim 1, characterized in that: The preset correlation threshold is 0.5.

Citation Information

Patent Citations

  • Method and device for constructing standard knowledge graph of electric power internet of things

    CN115329101A

  • Chinese named-entity recognition method, device, and computer-readable storage medium

    WO2021068329A1