AI technology-based audit domain knowledge graph construction method
Through AI technology-based methods, the knowledge graph construction in the field of power auditing has been solved, the problem of insufficient applicability of grassroots units is achieved, and more efficient and accurate search results are achieved. Through the calculation of clustering and hierarchical correlation factors, a tight Knowledge graph.
Patent Information
- Application Number
- CN202411678161.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-11-22
AI Technical Summary
The existing power audit knowledge graph is weak in applicability to power grassroots units, resulting in long search and inaccurate query results.
Using AI technology-based methods, by collecting and cleaning text data, acquiring entity data and clustering, a standard database containing standard text data is constructed, similar values and hierarchical correlation factors between entity data are calculated, and a tight knowledge graph is established. Improve the search efficiency and result accuracy of grassroots units.
It improves the closeness of the connection between entity data, enhances the search and viewing efficiency of grassroots units and the accuracy of results, and is suitable for the construction of knowledge graphs in the field of power auditing.
Smart Images

Figure CN119202273A_ABST
Abstract
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 used to represent and store knowledge. It usually displays entities (such as people, places, and things) and their relationships in the form of a graph. It constructs a comprehensive knowledge network through nodes (representing entities) and edges (representing relationships), so that information can be accurately organized in a semantic form and support queries, thereby greatly 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 level of retrieval and reasoning to optimize user experience and decision-making efficiency.
[0003] In the auditing field, the knowledge graph is a structured knowledge network that focuses on various entities, activities, and relationships in the auditing process. It organizes audit-related information elements (such as audit standards, processes, risk factors, control measures, financial data, etc.) into nodes and edges to show the relationships and dependencies between these information elements. The knowledge graph supports intelligent audit decision-making and data mining, which can help 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, a large-scale power auditing knowledge graph is constructed in a general way, resulting in a lot of time 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 power grassroots units, the purpose of the present invention is to provide a method for constructing an audit field knowledge graph based on AI technology. The technical solution adopted is as follows: 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; 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.
[0006] Furthermore, the recorded text data includes: audit 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.
[0007] Further, 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.
[0008] 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.
[0009] Furthermore, 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.
[0010] Further, the calculating of the similarity value between the entity data of each cluster and the grassroots entity data includes: 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.
[0011] Furthermore, the step of calculating the hierarchical correlation factor between any cluster of undetermined hierarchy and the cluster of the lowest hierarchy 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.
[0012] Furthermore, 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.
[0013] Furthermore, 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.
[0014] Furthermore, the preset association threshold is 0.5.
[0015] The present invention has the following beneficial effects: First, collect the recorded text data, obtain the entity data according to the recorded text data, and cluster the entity data to obtain the entity data of several clusters. The clustering here is to classify the entity data in the recorded text data, and the entity data in the same cluster is not much different. Construct a standard database containing standard text data to obtain grassroots entity data, and the grassroots entity data is the entity name corresponding to the grassroots unit. The grassroots entity data is obtained in order to determine the top cluster later. Calculate 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. The top cluster is obtained here to facilitate the acquisition of the next level cluster of the top cluster. Calculate 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, and the determined level cluster includes the top cluster. Here, the next level cluster of the top level cluster is obtained according to the top level cluster, that is, the second level cluster. The next level cluster of the second level cluster is obtained according to 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 entity data and any lower entity data in the clusters of adjacent levels is calculated. When the degree of association exceeds the preset association threshold, the upper entity data is connected to the lower 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 entity data node is connected to the lower entity data node, and one upper entity data node can be connected to multiple lower 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
[0016] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. 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 creative work.
[0017] Figure 1 A flowchart of a method for constructing an audit field knowledge graph based on AI technology provided by an embodiment of the present invention; Figure 2 A flowchart of a process for obtaining similarity values provided by one embodiment of the present invention; Figure 3 A flowchart of a process for obtaining a hierarchical correlation factor provided by an embodiment of the present invention; Figure 4 The flowchart is a process of obtaining the degree of association provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of 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 combination with the accompanying drawings and preferred embodiments. 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.
[0019] 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.
[0020] 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.
[0021] See also Figure 1 , which shows a flowchart of a method for constructing an audit field knowledge graph based on AI technology provided by an embodiment of the present invention, the method comprising: S101. Collect recorded text data, obtain entity data according to the recorded text data, and cluster the entity data to obtain entity data of several clusters.
[0022] 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.
[0023] It should be noted that the present invention includes but is not limited to being applied to 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.
[0024] Further, 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.
[0025] The recorded text data can be cleaned by using the text cleaning toolkit NLTK, and then the cleaned recorded text data can be segmented by using the Jieba word segmentation tool. The process of preprocessing the recorded text data using the text cleaning toolkit NLTK and the Jieba word segmentation tool is a well-known technology and will not be described in detail here.
[0026] 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.
[0027] 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.
[0028] In order to record various abnormal events that occur during the power audit process and facilitate the rapid progress of subsequent audit work, this solution will build a knowledge graph based on the recorded text data during the power audit process, which improves the convenience of the work of grassroots power audit personnel. First, the entity data is filtered out from the recorded text data, and the knowledge graphs of different levels are constructed through all the entity data. In order to determine the entity data corresponding to different levels, all the entity data needs to be divided, that is, clustered.
[0029] Furthermore, clustering the entity data to obtain entity data of several clusters includes: The entity data is clustered by the K-means clustering algorithm, and the number of clusters is obtained by the elbow method. Specifically, all entity data are clustered by the K-means clustering algorithm according to the entity vectors of all entity data, and the number of clusters is selected by the elbow method. The sum of squared errors in the elbow method here is the modulus of the result after the vector subtraction operation of all entity vectors in each cluster, because the closer the size and direction of two entity vectors are, the smaller the modulus after the vector subtraction operation. Among them, the K-means clustering algorithm and the elbow method are both well-known technologies.
[0030] 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.
[0031] The standard text data includes: text data on audit industry regulations and standards.
[0032] In the field of power auditing, the standard text data may include some text data such as power auditing industry regulations, rules and standards.
[0033] The grassroots 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.
[0034] S103. Calculate the similarity value 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.
[0035] 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.
[0036] 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 by the standard database in the standard database, the more suitable the entity data in the cluster is as the entity data in the highest-level node.
[0037] The entity data in the highest-level node refers to the entity data in the top-level cluster.
[0038] The process of obtaining the similarity value will be described in detail in the second embodiment and will not be repeated here.
[0039] S104. 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.
[0040] 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 adjacent level of the determined level.
[0041] When constructing a knowledge graph, the total vectors between words corresponding to entity data at adjacent levels should be small, that is, it can be quantified by the difference between the total vectors of words corresponding to entity data in the top cluster and any other clusters, that is, the smaller the difference, the more the cluster conforms to the adjacent clusters of the top cluster. In the knowledge graph, the higher the level of entity data, the larger the scope of expression, that is, the greater the possibility of being a title, that is, the greater the possibility of being bold and black at the same time; therefore, the difference between the number of entity data in each cluster that is a title, bold, and black can be used to quantify whether two clusters are clusters of adjacent levels. (The first level may correspond to each grassroots unit, the second level is the various types of work corresponding to the grassroots unit, the third level is the specific tasks corresponding to each type of work, and so on).
[0042] After the top cluster is determined, the top cluster is the cluster of the determined level. At this time, there is only one cluster of the determined level, and the top cluster is the lowest level cluster among the clusters of the determined level. At this time, the level correlation factor between any cluster of undetermined level and the top cluster is calculated, and the cluster corresponding to the one with the largest level correlation factor is the next level cluster of the top cluster, that is, the second level cluster.
[0043] After the top cluster is determined, the top cluster and the second cluster are the clusters of the determined level. At this time, the second cluster is the lowest level cluster in the clusters of the determined level. At this time, the level correlation factor between any cluster of undetermined level and the second cluster is calculated, and the cluster corresponding to the largest level correlation factor is the next level cluster of the second cluster, that is, the third cluster.
[0044] By analogy, each cluster can be assigned a level.
[0045] The process of obtaining the hierarchical association factor will be described in detail in the third embodiment and will not be repeated here.
[0046] S105. Calculate the degree of association between any upper-level entity data and any lower-level entity data in the 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.
[0047] After determining the level corresponding to each cluster, but the corresponding relationship of entity data in adjacent levels has not been determined, it is necessary to determine the connection between entity data in 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 occurrence 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 occurrence 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 related the two entity data are.
[0048] The process of obtaining the association degree will be described in detail in the fourth embodiment and will not be repeated here.
[0049] 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.
[0050] 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 are used as the lower-layer entity data connected to the upper-layer entity data.
[0051] Similarly, the entity data between all other adjacent levels are connected to complete the construction of the knowledge graph.
[0052] Figure 2 A flowchart of a process for obtaining a similarity value provided by an embodiment of the present invention, wherein the process for obtaining a similarity value includes: 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.
[0053] 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 a 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 basic unit entity data.
[0054] 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.
[0055] 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.
[0056] It can also represent the frequency difference between the cluster data and the grassroots unit entity data. The smaller the difference is, the greater the similarity between the cluster and the grassroots unit entity data is.
[0057] The index value can be expressed as: , wherein the The function is the natural exponential function.
[0058] S203. Multiply the cosine similarity by the exponent value to obtain the similarity value.
[0059] The similarity value can be expressed as: ; Said Indicates The similarity between clusters and basic unit entity data.
[0060] Figure 3 A flowchart of a process for obtaining a hierarchical correlation factor provided by an embodiment of the present invention, wherein the calculation of the hierarchical correlation factor between any cluster of an undetermined hierarchy and the lowest-level cluster among clusters of a determined hierarchy includes: 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 contained in the lowest-level cluster of the determined hierarchical clusters, and the second vector sum is the vector sum of the word vectors of all the entity data contained in the undetermined hierarchical clusters.
[0061] The modulus length after vector subtraction of the first vector sum and the second vector sum can be expressed as: , wherein the is the first vector and is the vector sum of the word vectors of all the entity data contained in the lowest level cluster in the determined level clusters, is the second vector and is the vector sum of the word vectors of all the words contained in the cluster of the undetermined level (i.e., the jth cluster). The smaller it is, the smaller the difference between the clusters is, that is, the larger the hierarchical correlation factor between the two clusters is.
[0062] 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.
[0063] 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 is a title, bold, or black is counted, and the number is recorded as the feature number of each cluster.
[0064] Said The smaller it is, the smaller the difference between the clusters is, which means that the hierarchical correlation factor between the two clusters is larger.
[0065] S303. The inverse number of the product of the absolute value of the number of features and the modulus length is used as a parameter of a natural exponential function to obtain the hierarchical correlation factor.
[0066] The hierarchical correlation factor can be expressed as: ; Said 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.
[0067] Figure 4 A flowchart of a process for obtaining a degree of association provided by an embodiment of the present invention, wherein the process for obtaining a degree of association includes: S401. Obtain the modulus length after performing vector subtraction operation on the entity vector of the upper-layer entity data and the entity vector of the lower-layer entity data.
[0068] 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 entity vector of entity data, is the entity vector of the underlying entity data, i.e. The first 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 is, and the greater the degree of association is.
[0069] 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 then take the absolute value to obtain the absolute value of the mean difference in word frequencies.
[0070] The absolute value of the word frequency mean difference can be expressed as: , wherein the is the mean frequency of the words contained in the upper-level entity data, that is, Indicates The first The average frequency 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 first 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.
[0071] 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.
[0072] 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.
[0073] Furthermore, 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.
[0074] S404. The reciprocals of the multiplication of the modulus, the absolute value of the difference in the mean frequency of the word frequencies, and the distance value are used as parameters of a natural exponential function to obtain the degree of association.
[0075] The process of obtaining the association degree includes: ; Said Indicates The first Entity data and The first The degree of association between entity data The function is the natural exponential function.
[0076] The present invention has the following beneficial effects: First, collect the recorded text data, obtain the entity data according to the recorded text data, and cluster the entity data to obtain the entity data of several clusters. The clustering here is to classify the entity data in the recorded text data, and the entity data in the same cluster is not much different. Construct a standard database containing standard text data to obtain grassroots entity data, and the grassroots entity data is the entity name corresponding to the grassroots unit. The grassroots entity data is obtained in order to determine the top cluster later. Calculate 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. The top cluster is obtained here to facilitate the acquisition of the next level cluster of the top cluster. Calculate 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, and the determined level cluster includes the top 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 entity data and any lower entity data in the clusters of adjacent levels is calculated. When the degree of association exceeds the preset association threshold, the upper entity data is connected to the lower 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 entity data node is connected to the lower entity data node, and one upper entity data node can be connected to multiple lower 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.
[0077] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0078] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and 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; 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.
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 field 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 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.
7. The method for constructing an audit domain knowledge graph based on AI technology according to claim 1, characterized in that: 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.
8. The method for constructing an audit field knowledge graph based on AI technology according to claim 1, characterized in that: 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.
9. The method for constructing an audit field knowledge graph based on AI technology as claimed in claim 8, 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.
10. 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
Cited By
Power grid professional knowledge graph construction method for green supply chain platform
CN121766416A
