Extraction method of industry-to-public credit subgraph and related equipment

By performing meta-path group division and feature transfer operations on the full knowledge graph, the industry's public credit sub-graph was extracted, which solved the problems of loss of entity feature information and slow calculation speed in the existing technology, and achieved efficient public credit business analysis.

CN119669483AActive Publication Date: 2025-03-21AGRICULTURAL BANK OF CHINA
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411736580.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-21
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

In the analysis of corporate credit business, the Odgca algorithm is used to roughen it, resulting in loss of entity feature information, slow calculation speed, affecting the real-time and efficiency of the analysis.

Method used

By obtaining the full knowledge graph, dividing the meta-path groups, and performing feature transfer, structure transfer and entity deletion for different meta-path groups, calculating industry similarity, randomly roaming and supplementing entities, and finally performing edge empowerment compression to extract the industry's public credit sub-graph.

Benefits of technology

The compression speed is improved, sufficient entity characteristics are retained, the complexity of the knowledge graph is reduced, and the efficiency and real-time analysis is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119669483A_ABST
    Figure CN119669483A_ABST
Patent Text Reader

Abstract

The invention provides an industry-to-public credit sub-graph extraction method and related equipment, and the method comprises the steps: obtaining a full-amount knowledge graph, carrying out the meta-path compression, semantic compression, similar entity supplementation and edge weighting and compression of the full-amount knowledge graph, and finally obtaining an effective and small-scale industry-to-public credit sub-graph through compression. According to the scheme, preset semantic information is reserved through meta-path compression, deleted entity information is transferred to reserved entities through feature transfer, the scale is reduced, information loss is small, related entities are reserved from the aspect of the industry through semantic compression, the entities with high relevancy are selected through random walk, and therefore the user experience is improved. And long-lasting edges are deleted in edge weighting and compression, so that the complexity of the sub-graph is reduced, and the purposes of improving the compression speed and retaining enough entity features are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method for extracting an industry-to-public credit subgraph and related equipment. Background Art

[0002] Knowledge graphs can model and identify complex relationships between entities, such as the relationship between banks and customers, between customers and customers, between enterprises and supply chain partners, and between enterprises and competitors. These relationships are crucial for the analysis of public credit business, because credit and risk often spread in these relationships. In addition, knowledge graphs can integrate multi-source and multi-dimensional data, including corporate public information, news reports, market conditions, etc. This fusion of multi-dimensional data can provide a more comprehensive perspective on credit and risk assessment, and reduce the bias and errors that may be caused by a single data source. Therefore, it is a more effective method to analyze public credit business based on knowledge graphs. However, knowledge graphs are generally large in scale. Direct analysis on the full knowledge graph has high computational complexity and high resource consumption, which will affect the real-time and efficiency of the analysis.

[0003] In the prior art, the Odgca algorithm is used for coarsening to obtain the relevant business subgraph, without considering all the characteristic information of the entity. A lot of entity characteristic information is lost after compression, and the calculation using the Odgca algorithm is relatively slow. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides an industry-to-public credit sub-graph extraction method and related equipment to achieve the purpose of increasing the compression speed and retaining enough entity features.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] A first aspect of an embodiment of the present invention discloses a method for extracting an industry-to-corporate credit subgraph, the method comprising:

[0007] Obtaining a full knowledge graph; the full knowledge graph includes: a plurality of entities divided into important entities and non-important entities;

[0008] Divide the meta-paths corresponding to the edges in the full knowledge graph to obtain a first meta-path group, a second meta-path group, and a third meta-path group; the meta-paths in the first meta-path group only include the important entities, the meta-paths in the second meta-path group include both the important entities and the unimportant entities, and the meta-paths in the third meta-path group only include the unimportant entities;

[0009] For each meta-path in the third meta-path group on the full knowledge graph, if the non-important entity in the meta-path is adjacent to the important entity, then feature transfer is performed on the non-important entity; if the non-important entity in the meta-path is not adjacent to the important entity, then the non-important entity is deleted to obtain a first graph;

[0010] For each meta-path in the second meta-path group on the first graph, perform the feature transfer and structure transfer on the important entities in the meta-path, and delete the unimportant entities in the meta-path to obtain a second graph;

[0011] For each entity in the second graph, the industry similarity between the industry corresponding to the entity and the pre-specified target industry is calculated. If the industry similarity is less than a similarity threshold, the entity is deleted to obtain a third graph.

[0012] For each entity in the third graph, the entity is used as a starting entity, a random walk operation is performed in the second graph based on the starting entity to obtain a plurality of entities to be supplemented, and each of the entities to be supplemented is supplemented into the third graph to obtain a fourth graph;

[0013] For each edge in the fourth graph, if the corresponding edge category is not in the preset whitelist, weighted compression is performed to obtain the industry-to-corporate credit subgraph.

[0014] Preferably, each entity in the full knowledge graph is provided with a plurality of candidate lists, each candidate list corresponding to an entity category; for each meta-path in the third meta-path group on the full knowledge graph, if the non-important entity in the meta-path is adjacent to the important entity, the feature transfer is performed on the non-important entity; if the non-important entity in the meta-path is not adjacent to the important entity, the non-important entity is deleted to obtain a first graph, including:

[0015] For each meta-path in the third meta-path group on the full knowledge graph, adding the two non-important entities in the meta-path to each other's candidate lists of corresponding entity categories;

[0016] For each of the non-important entities adjacent to the important entity in the third-dimensional path group, the non-important entity is used as a transfer target entity for feature transfer; the feature transfer process includes: sorting the non-important entities in the candidate lists corresponding to the transfer target entity from high to low according to the interaction frequency, selecting the non-important entities sorted before the preset order, fusing the entity features of the selected non-important entities based on the mean-pooling method to obtain the fused features corresponding to the candidate lists; splicing the fused features, and weighting the spliced ​​fused features with the features of the transfer target entity;

[0017] Each of the non-important entities in the third-dimensional path group that is not adjacent to the important entity is deleted from the full knowledge graph to obtain a first graph.

[0018] Preferably, for each meta-path in the second meta-path group on the first graph, the feature transfer and structure transfer are performed on the important entities in the meta-path, and the unimportant entities in the meta-path are deleted to obtain the second graph, including:

[0019] For each meta-path in the second meta-path group on the first graph, according to the entity category of the non-important entity in the meta-path, adding the non-important entity to the candidate list corresponding to the important entity in the meta-path;

[0020] For each of the important entities in the second meta-path group, the feature transfer is performed with the important entity as the transfer target entity, and for each of the unimportant entities selected and ranked before the preset order during the feature transfer process, the edges associated with the unimportant entities in the first graph are transferred to the important entities, so that the edges associated with the unimportant entities are associated with the important entities and other important entities, and the unimportant entities are deleted from the first graph to obtain the second graph.

[0021] Preferably, for each entity in the second graph, calculating the industry similarity between the industry corresponding to the entity and a pre-specified target industry includes:

[0022] For each entity in the second graph, an industry feature is calculated based on the corresponding industry attribute, and the cosine similarity between the industry feature and the target industry feature of the target industry is calculated as the industry similarity.

[0023] Preferably, the method further comprises:

[0024] If there is a special entity that does not have the industry attribute, the industry attribute corresponding to the entity that is closest to the special entity and has the highest interaction frequency is screened out from the entities that have the industry attribute as the industry attribute of the special entity.

[0025] Preferably, for each entity in the third graph, the entity is taken as a starting entity, a random walk operation is performed in the second graph based on the starting entity to obtain a plurality of entities to be supplemented, and each of the entities to be supplemented is supplemented into the third graph to obtain a fourth graph, including:

[0026] For each entity in the third graph, the entity is used as a starting entity, and a random walk operation is performed in the second graph based on the starting entity to obtain a plurality of similar entities; the similar entities are connected to the starting entity in the second graph through a plurality of edges;

[0027] Filter out entities to be supplemented that do not exist in the third graph from each of the similar entities;

[0028] Each entity to be supplemented and the edges connecting the entity to be supplemented and other entities in the third graph are supplemented to the third graph to obtain a fourth graph.

[0029] Preferably, for each edge in the fourth graph, if the corresponding edge category is not in the preset whitelist, weighted compression is performed to obtain an industry-to-corporate credit subgraph, including:

[0030] For each edge in the fourth graph, if the corresponding edge category is not in the preset whitelist, it is determined as a target edge;

[0031] Calculate the difference between the current time and the target time corresponding to the target edge; the target time is the time when the association relationship of the target edge indication occurs;

[0032] Comparing the difference with a preset time range, and performing a weighting operation on the target edge based on the comparison result;

[0033] When the weight of the target edge is 0, the target edge is deleted from the fourth graph to obtain an industry-to-corporate credit subgraph.

[0034] A second aspect of an embodiment of the present invention discloses a device for extracting a sub-graph of industry-to-corporate credit, the device comprising:

[0035] An acquisition unit, configured to acquire a full knowledge graph; the full knowledge graph includes: a plurality of entities divided into important entities and non-important entities;

[0036] A division unit, used for dividing the meta-paths corresponding to the edges in the full knowledge graph to obtain a first meta-path group, a second meta-path group and a third meta-path group; the meta-paths in the first meta-path group only include the important entities, the meta-paths in the second meta-path group include both the important entities and the unimportant entities, and the meta-paths in the third meta-path group only include the unimportant entities;

[0037] A first meta-path compression unit is used for, for each meta-path in the third meta-path group on the full knowledge graph, if the non-important entity in the meta-path is adjacent to the important entity, performing feature transfer on the non-important entity, and if the non-important entity in the meta-path is not adjacent to the important entity, deleting the non-important entity to obtain a first graph;

[0038] A second meta-path compression unit is used to perform the feature transfer and structure transfer on the important entities in each meta-path in the second meta-path group on the first graph, and delete the unimportant entities in the meta-path to obtain a second graph;

[0039] A semantic compression unit, configured to calculate, for each entity in the second graph, an industry similarity between the industry corresponding to the entity and a pre-specified target industry, and if the industry similarity is less than a similarity threshold, delete the entity to obtain a third graph;

[0040] A supplementary similar entity unit is used for taking each entity in the third graph as a starting entity, performing a random walk operation in the second graph based on the starting entity to obtain a plurality of entities to be supplemented, and supplementing each of the entities to be supplemented into the third graph to obtain a fourth graph;

[0041] The edge weighting and compression unit is used to perform weighted compression on each edge in the fourth graph if the corresponding edge category is not in a preset whitelist, so as to obtain an industry-to-corporate credit subgraph.

[0042] A third aspect of an embodiment of the present invention discloses a storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement the method for extracting the industry-to-corporate credit sub-graph described in any one of the first aspects of the embodiments of the present invention.

[0043] A fourth aspect of an embodiment of the present invention discloses an electronic device, including: a memory and a processor;

[0044] The memory is used to store computer programs;

[0045] The processor is used to execute the computer program, specifically to implement the method for extracting the industry-to-corporate credit subgraph as described in any one of the first aspects of the embodiments of the present invention.

[0046] Based on the above-mentioned method for extracting an industry-to-corporate credit subgraph and related equipment provided by the embodiment of the present invention, a full knowledge graph is obtained; the full knowledge graph includes: multiple entities divided into important entities and unimportant entities; the meta-paths corresponding to each edge in the full knowledge graph are divided to obtain a first meta-path group, a second meta-path group and a third meta-path group; the meta-paths in the first meta-path group only include the important entities, the meta-paths in the second meta-path group include both the important entities and the unimportant entities, and the meta-paths in the third meta-path group only include the unimportant entities; for each meta-path in the third meta-path group on the full knowledge graph, if the unimportant entity in the meta-path is adjacent to the important entity, the feature transfer is performed on the unimportant entity, and if the unimportant entity in the meta-path is not adjacent to the important entity, the unimportant entity is deleted. to obtain a first graph; for each meta-path in the second meta-path group on the first graph, perform the feature transfer and structure transfer on the important entities in the meta-path, and delete the non-important entities in the meta-path to obtain a second graph; for each entity in the second graph, calculate the industry similarity between the industry corresponding to the entity and a pre-specified target industry, if the industry similarity is less than a similarity threshold, delete the entity to obtain a third graph; for each entity in the third graph, take the entity as a starting entity, perform a random walk operation in the second graph based on the starting entity, obtain multiple entities to be supplemented, supplement each of the entities to be supplemented into the third graph to obtain a fourth graph; for each edge in the fourth graph, if the corresponding edge category is not in a pre-set whitelist, perform weighted compression to obtain an industry-to-corporate credit subgraph. In this scheme, meta-path compression is used to not only retain the predetermined semantic information, but also transfer the deleted entity information to the retained entity through feature transfer, thereby reducing the scale but with less information loss. Semantic compression is used to retain relevant entities from an industry perspective, and random walks are used to select entities with higher relevance. In the edge weighting and compression, older edges are deleted to reduce the complexity of the subgraph, thereby achieving the purpose of increasing the compression speed and retaining enough entity features. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0048] Figure 1 A flowchart of a method for extracting an industry-to-public credit subgraph disclosed in an embodiment of the present invention;

[0049] Figure 2 This is an example diagram of sorting candidate queues of a transfer target entity disclosed in an embodiment of the present invention;

[0050] Figure 3 A schematic diagram of a structural conversion disclosed in an embodiment of the present invention;

[0051] Figure 4 A schematic diagram of weighted compression disclosed in an embodiment of the present invention;

[0052] Figure 5 A structural diagram of a device for extracting a sub-graph of industry-to-corporate credit disclosed in an embodiment of the present invention;

[0053] Figure 6 The present invention is a structural diagram of an electronic device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0056] As can be seen from the background technology, in the prior art, the Odgca algorithm is used for coarsening to obtain relevant business subgraphs, without considering all the characteristic information of the entity, and a lot of entity characteristic information is lost after compression, and the calculation using the Odgca algorithm is relatively slow.

[0057] Therefore, an embodiment of the present invention discloses a method for extracting an industry-to-corporate credit subgraph and related equipment. In this scheme, meta-path compression is used to not only retain predetermined semantic information, but also transfer deleted entity information to the retained entity through feature transfer, thereby reducing the scale but with less information loss. Relevant entities are retained from an industry perspective through semantic compression, and older edges are deleted during edge weighting and compression to reduce the complexity of the graph, thereby achieving the purpose of increasing the compression speed and retaining enough entity features.

[0058] like Figure 1 FIG. 1 is a flowchart of a method for extracting an industry-to-corporate credit subgraph disclosed in an embodiment of the present invention, comprising the following steps:

[0059] Step S101: Obtain the full knowledge graph.

[0060] It should be noted that the financial knowledge graph contains several categories of entities, including companies, legal persons, accounts, addresses, equipment, etc. Among these entities, those that are important for corporate credit are called important entities, and other entities are called non-important entities.

[0061] Among them, the full knowledge graph includes: multiple entities divided into important entities and unimportant entities.

[0062] For a full knowledge graph G0 containing corporate credit entities and relationships, it includes a node set Node, an edge set Edge, and a node feature X.

[0063] The node set Node includes important entities Ent = {ent1, ent2, ..., entk} and unimportant entities IEnt = {ient1, ient2, ..., ientl}.

[0064] The edge set Edge contains edges that are more relevant to public credit analysis, and these edges are set as whitelist.

[0065] The node feature X contains the features of all entities, including attributes such as id and industry. For a specific entity, if there is a specific attribute value, the attribute is directly filled in. If there is no corresponding attribute value, the same rule is used to fill it in, such as based on the majority, based on the average, based on a specific value, etc.

[0066] Industry is an attribute of an entity. Some entities, such as company categories, have values ​​for this attribute, while some entities, such as address categories, have no values ​​for this attribute.

[0067] Step S102: Divide the meta-paths corresponding to the edges in the full knowledge graph into a first meta-path group, a second meta-path group, and a third meta-path group.

[0068] In step S102, firstly, each piece of meta-path information is loaded, and the meta-path information includes: meta-path, meta-path type, etc. A typical meta-path information is as follows: meta-path "address->person", meta-path type "non-important entity-important entity".

[0069] Then, we traverse the meta-paths corresponding to all the edges in the graph and divide them into three groups. The first meta-path group contains only important entities, the second meta-path group contains both important entities and non-important entities, and the third meta-path group contains only non-important entities.

[0070] For example,

[0071] The meta-paths of the first meta-path group include "company-person" and the like, the meta-paths of the second meta-path group include "person-device" and the like, and the meta-paths of the third meta-path group include "device-address" and the like.

[0072] As shown in the following table:

[0073] Serial number Meta Path Meta Path Type The group to which the meta path belongs 1 Company-People Significant Entity-Significant Entity First element path group 2 People-Equipment Significant Entity - Non-significant Entity Second path group 3 Device-Address Non-significant entity - Non-significant entity Third-element path group 4 … … …

[0074] Step S103: For each meta-path in the third meta-path group on the full knowledge graph, if the non-important entity in the meta-path is adjacent to the important entity, the feature of the non-important entity is transferred; if the non-important entity in the meta-path is not adjacent to the important entity, the non-important entity is deleted to obtain the first graph.

[0075] In step S103, the non-important entity is adjacent to the important entity, which means that the two entities are directly associated through a certain type of edge (relationship).

[0076] In one embodiment, in order to achieve feature transfer between entities, each entity in the full knowledge graph is provided with multiple alternative lists, and each alternative list corresponds to an entity category.

[0077] For example, there are three different categories of entities: entity category a, entity category b and entity category c. There are three alternative lists set for any entity in entity category a, namely alternative list 1, alternative list 2 and alternative list 3, where alternative list 1 corresponds to entity category a, alternative list 2 corresponds to entity category b, and alternative list 3 corresponds to entity category c.

[0078] In the specific implementation process of step S103, first, for each meta-path in the third meta-path group on the full knowledge graph, two non-important entities in the meta-path are added to the candidate lists of the corresponding entity categories of each other.

[0079] For example, the meta-path contains two non-important entities: non-important entity 1 and non-important entity 2, whose entity categories are entity category a and entity category c respectively. Then, non-important entity 1 is added to the alternative list corresponding to entity category a in each alternative list of non-important entity 2, and non-important entity 2 is added to the alternative list corresponding to entity category c in each alternative list of non-important entity 1.

[0080] Then, for each non-important entity adjacent to the important entity in the third-element path group, the non-important entity is used as a transfer target entity for feature transfer.

[0081] It should be noted that the transfer target entity refers to the object that receives other non-important entity feature information that needs to be deleted.

[0082] The feature transfer process includes the following steps:

[0083] Step S201: sorting the non-important entities in each candidate list corresponding to the transfer target entity from high to low according to the interaction frequency, and selecting each non-important entity that is sorted before a preset order.

[0084] In step S201, the interaction frequency refers to the interaction frequency between the transfer target entity and each non-important entity in each corresponding candidate list.

[0085] like Figure 2 As shown, it is an example diagram of sorting candidate queues of a transfer target entity disclosed in an embodiment of the present invention.

[0086] Among them, the non-important entity x refers to the transfer target entity. The first m non-important entities are selected from the candidate queue corresponding to each category, where m is a positive integer.

[0087] Step S202: The entity features of each selected non-important entity are fused based on the mean-pooling method to obtain fused features corresponding to each candidate list.

[0088] In the specific implementation process of step S202, a non-important entity x is taken as an example as the transfer target entity. The feature of the non-important entity x is emb, and the list of entities with high frequency interaction in the candidate list of the i-th category is list i , list i The features of the entities in are fused by mean-pooling to obtain fused features. The formula of mean-pooling is as follows:

[0089]

[0090] in, is the feature vector obtained after mean-pooling, emb j is the feature of entity j, list i is the feature set of m high-frequency interaction entities selected from the candidate list, |list i | is a collection list i size.

[0091] Step S203: concatenate the fused features, and perform weighted processing on the concatenated fused features and the features of the transfer target entity.

[0092] In the specific implementation process of step S203, the fusion features obtained from the candidate lists of different entity categories of the non-important entity x are spliced, and the formula is as follows:

[0093]

[0094] || means concatenating two vectors, label is the label set in the full knowledge graph, and the feature emb obtained pool is a vector of length |label|*len(emb), where len represents the length calculation. pool Input into a multi-layer perceptron (MLP) network for feature extraction and dimensionality reduction, and obtain a vector of length len(emb). The calculation formula of MLP is as follows:

[0095] emb mlp =f(W*emb pool +b)

[0096] Where W is the parameter matrix, size is len(emb)*(|label|*len(emb)), b is the bias vector, length is len(emb). f is the activation function, here we choose the sigmoid function, its formula is:

[0097]

[0098] emb mlp The weighted average of and emb is used to obtain the new entity feature vector Emb, which is calculated as follows:

[0099] Emb=a*emb pool +emb

[0100] st:a+b=1,a≥0,b≥0

[0101] Step S104: for each meta-path in the second meta-path group on the first graph, perform feature transfer and structure transfer on important entities in the meta-path, and delete unimportant entities in the meta-path to obtain a second graph.

[0102] In step S104, the meta-paths in the second meta-path group are traversed on the first graph, and the non-important entities in the meta-paths are added to the candidate list of the corresponding category of the important entities.

[0103] Taking the "device-person" meta-path as an example, the device is a non-important entity, and the person is an important entity, and the device information is transferred to the person's attributes.

[0104] Generally, the relationships in meta-paths are many-to-many. The information of non-important entities is transferred to the important entities with the most relationships with them. For the meta-path of "device-person", the device information is transferred to the entity attributes of the person who interacts most with the device. When there are multiple meta-paths, they are performed in a given order. For example, if there are two meta-paths of "device-person" and "device-company", the device information is transferred to the person first. If there is no "device-person" relationship on a certain device entity, the information of the device entity is transferred to the company entity, and the device entity is added to the company entity in the candidate list.

[0105] In the specific implementation process of step S104, first, for each meta-path in the second meta-path group on the first graph, according to the entity category of the non-important entity in the meta-path, the non-important entity is added to the candidate list corresponding to the important entity in the meta-path.

[0106] It should be noted that the adding process is similar to the adding process between the non-important entities described above, except that in step S104, the non-important entity is unilaterally added to the candidate list corresponding to the important entity.

[0107] Then, for each important entity in the second meta-path group, the important entity is used as the transfer target entity for feature transfer, and for each non-important entity selected and sorted before the preset order in the feature transfer process, the edge associated with the non-important entity in the first graph is transferred to the important entity, so that the edge associated with the non-important entity is associated with the important entity and other important entities, and the non-important entity is deleted from the first graph to obtain the second graph.

[0108] It should be noted that after the traversal is completed, the important entity selects m non-important entities with high interaction frequency from each candidate list according to the entity category, transfers the information of the selected non-important entities to the important entities, and deletes all non-important entities on the first graph to obtain the second graph. The information transfer method includes feature transfer and structure transfer, which are as follows:

[0109] Feature transfer: The entity features Emb of the selected non-important entities are fused based on the mean-pooling method, and the fused features are weighted with the features of the transfer target entity in a certain proportion. For the processing process, please refer to the above embodiment of the present invention. The updated features are still recorded as Emb.

[0110] Structural transfer: transfer the relationship of non-important entities to important entities. Specifically: transfer all edges associated with the non-important entity to the important entity, and use the important entity to replace the non-important entity on the edge. The attributes of the two edges connected to the non-important entity are averaged and used as the attributes of the newly generated edge.

[0111] like Figure 3 The figure is a schematic diagram of a structural conversion disclosed in an embodiment of the present invention.

[0112] Among them, entity 1 and entity 2 are important entities, entity 3 and entity 4 are unimportant entities. After structural transfer, entity 1 and entity 2 are connected, and the newly generated edge c is represented by a dotted line in the figure. The attributes on edge a and edge b are averaged and used as the attributes of edge c. Finally, entity 3 and entity 4 are deleted.

[0113] It can be understood that the second graph only contains important entities and edges between important entities.

[0114] Step S105: For each entity in the second graph, calculate the industry similarity between the industry corresponding to the entity and the pre-specified target industry. If the industry similarity is less than the similarity threshold, delete the entity to obtain the third graph.

[0115] In step S105, the industry characteristics of the target industry are derived from the specified industry and enterprise information. The industry of interest can be directly specified, or the enterprise of interest can be specified. The industry of interest is the industry to which the enterprise of interest belongs.

[0116] In one embodiment, the industry similarity between the industry corresponding to each entity in the second graph calculated in the past and the target industry is obtained.

[0117] If there are entities whose industry similarity has not been calculated in the past, or the time point when the similarity was calculated in the past does not meet the requirements, that is, it is expired, the industry similarity needs to be recalculated.

[0118] In the specific implementation process of step S105, for each entity in the second graph, the industry characteristics are calculated based on the corresponding industry attributes, and the cosine similarity between the industry characteristics and the target industry characteristics of the target industry is calculated as the industry similarity.

[0119] The industry to which each entity belongs is determined based on its industry attributes, and the average of the industry attributes of each entity in the same industry is used as the industry characteristic of the industry. If an entity does not have an industry attribute, it will not be included in the calculation.

[0120] Preferably, after the industry similarity between the industry to which each entity belongs and the target industry is calculated, it is stored and the time when the industry similarity is obtained is recorded.

[0121] Preferably, if there is a special entity without industry attributes, the industry attributes corresponding to the entity closest to the special entity and with the highest interaction frequency are screened out from the entities with industry attributes as the industry attributes of the special entity.

[0122] Step S106: For each entity in the third graph, take the entity as the starting entity, perform a random walk operation in the second graph based on the starting entity, obtain multiple entities to be supplemented, supplement each entity to be supplemented into the third graph, and obtain a fourth graph.

[0123] In step S106, starting from the entity in the third graph, a random walk is performed on the second graph to find a nodeSet of real points that are closely related to the entity in the third graph, and the entity in the nodeSet and the edges connecting it to other entities in the third graph are added to the third graph to obtain a fourth graph. The specific implementation process is as follows:

[0124] In the specific implementation process of step S106, first, for each entity in the third graph, the entity is taken as a starting entity, and a random walk operation is performed in the second graph based on the starting entity to obtain multiple similar entities.

[0125] It should be noted that the similar entities are connected to the starting entity in the second graph through multiple edges, that is, the similar entities are closely related to the starting entity in the second graph.

[0126] Then, the entities to be supplemented that do not exist in the third graph are screened out from the various similar entities.

[0127] It is understandable that since each entity in the third graph is traversed as a starting entity, each similar entity may include entities that already exist in the third graph. These entities do not need to be added to the third graph, so they need to be screened to obtain the entities to be added.

[0128] Finally, each entity to be supplemented and the edges connecting the entity to be supplemented and other entities in the third graph are supplemented to the third graph to obtain the fourth graph.

[0129] In one embodiment, random walks are performed based on multiple starting entities, and multi-core CPUs or GPUs can be used for parallel computing. For each computing unit, the random walk algorithm is run independently, and entities that are not in the third graph are screened out, and finally the results of all computing units are aggregated and deduplicated. During the calculation process, since there is no modification operation on the second graph, multiple computing units can share the same second graph.

[0130] Step S107: For each edge in the fourth graph, if the corresponding edge category is not in the preset whitelist, weighted compression is performed to obtain the industry-to-corporate credit subgraph.

[0131] In step S107, the categories of the edges in the whitelist are categories that are strongly related to credit, such as credit, guarantee, etc. All edges of the specified categories in the whitelist are retained, and weighted compression is performed on the edges that do not belong to the categories in the whitelist, and finally the industry-to-corporate credit subgraph is obtained.

[0132] The specific implementation process of step S107 includes the following steps:

[0133] Step S301: For each edge in the fourth graph, if the corresponding edge category is not in the preset whitelist, it is determined as a target edge.

[0134] Step S302: Calculate the difference between the current time and the target time corresponding to the target edge.

[0135] The target time is the time when the association relationship of the target edge indication occurs.

[0136] Step S303: Compare the difference with the preset time range, and perform a weighting operation on the target edge based on the comparison result.

[0137] In step S303, a weighting operation is performed on the target edge using a weighting formula, and the weighting formula is as follows:

[0138] When T-ET≤t 1 When w = w o ;

[0139] When t 1 <T-ET≤t 2 When w = w o e -c(T-t1) ;

[0140] When t 2 When <T-ET, w=0.

[0141] w o is the original weight set according to the edge type, ET is the time on the edge (i.e., target time), and t 1 and t 2are two time thresholds, t 1 to 2 That is the preset time range, and c is the parameter in exponential decay.

[0142] Step S304: When the weight of the target edge is 0, the target edge is deleted from the fourth graph to obtain the industry-to-corporate credit subgraph.

[0143] like Figure 4 As shown, it is a schematic diagram of weighted compression disclosed in an embodiment of the present invention.

[0144] Among them, the edge categories of T1 and T4 are in the whitelist and are retained. Other edges are weighted and compressed. The difference between the target time and the current time T corresponding to T5 is greater than the threshold t 2 , then delete the T5 edge.

[0145] Based on the above-mentioned method for extracting an industry-to-corporate credit subgraph disclosed in an embodiment of the present invention, in this scheme, meta-path compression is used to not only retain the predetermined semantic information, but also transfer the deleted entity information to the retained entity through feature transfer, thereby reducing the scale but with less information loss. Relevant entities are retained from an industry perspective through semantic compression, and entities with higher relevance are selected through random walks. In the edge weighting and compression, older edges are deleted to reduce the complexity of the graph, and finally a more effective and smaller-scale graph is compressed to achieve the purpose of increasing the compression speed and retaining enough entity features.

[0146] Corresponding to the method for extracting the industry-to-public credit subgraph disclosed in the above embodiment of the present invention, Figure 5 As shown, it is a structural diagram of an extraction device for an industry-to-corporate credit subgraph disclosed in an embodiment of the present invention, including: an acquisition unit 501, a division unit 502, a first meta-path compression unit 503, a second meta-path compression unit 504, a semantic compression unit 505, a supplementary similar entity unit 506 and an edge weighting and compression unit 507.

[0147] The acquisition unit 501 is used to acquire the full knowledge graph; the full knowledge graph includes: multiple entities divided into important entities and unimportant entities.

[0148] The division unit 502 is used to divide the meta-paths corresponding to each edge in the full knowledge graph into a first meta-path group, a second meta-path group and a third meta-path group; the meta-paths in the first meta-path group only contain important entities, the meta-paths in the second meta-path group contain both important entities and unimportant entities, and the meta-paths in the third meta-path group only contain unimportant entities.

[0149] The first meta-path compression unit 503 is used to perform feature transfer on the non-important entity for each meta-path in the third meta-path group on the full knowledge graph if the non-important entity in the meta-path is adjacent to the important entity, and to delete the non-important entity if the non-important entity in the meta-path is not adjacent to the important entity, so as to obtain the first graph.

[0150] The second meta-path compression unit 504 is used to perform feature transfer and structure transfer on important entities in each meta-path in the second meta-path group on the first graph, and delete unimportant entities in the meta-path to obtain a second graph.

[0151] The semantic compression unit 505 is used to calculate the industry similarity between the industry corresponding to the entity and the pre-specified target industry for each entity in the second graph. If the industry similarity is less than the similarity threshold, the entity is deleted to obtain the third graph.

[0152] The supplementary similar entity unit 506 is used to take each entity in the third graph as the starting entity, perform a random walk operation in the second graph based on the starting entity, obtain multiple entities to be supplemented, and supplement each entity to be supplemented into the third graph to obtain a fourth graph.

[0153] The edge weighting and compression unit 507 is used to perform weighting compression on each edge in the fourth graph if the corresponding edge category is not in the preset whitelist, so as to obtain the industry-to-corporate credit subgraph.

[0154] In one embodiment, each entity in the full knowledge graph is provided with a plurality of candidate lists, each candidate list corresponds to an entity category, and accordingly, the first meta-path compression unit 503 is specifically used to:

[0155] For each meta-path in the third meta-path group on the full knowledge graph, add the two non-important entities in the meta-path to each other's candidate lists of corresponding entity categories;

[0156] For each non-important entity adjacent to the important entity in the third-dimensional path group, the non-important entity is used as a transfer target entity for feature transfer; the feature transfer process includes: sorting the non-important entities in each candidate list corresponding to the transfer target entity from high to low according to the interaction frequency, selecting each non-important entity sorted before the preset order, fusing the entity features of each selected non-important entity based on the mean-pooling method to obtain the fused features corresponding to each candidate list; splicing each fused feature, and weighting each spliced ​​fused feature and the feature of the transfer target entity;

[0157] For each non-important entity in the third-dimensional path group that is not adjacent to the important entity, it is deleted from the full knowledge graph to obtain the first graph.

[0158] Accordingly, the second meta-path compression unit 504 is specifically configured to:

[0159] For each meta-path in the second meta-path group on the first graph, according to the entity category of the non-important entity in the meta-path, add the non-important entity to the candidate list corresponding to the important entity in the meta-path;

[0160] For each important entity in the second meta-path group, the important entity is used as the transfer target entity for feature transfer, and for each non-important entity selected and sorted before the preset order in the feature transfer process, the edge associated with the non-important entity in the first graph is transferred to the important entity, so that the edge associated with the non-important entity is associated with the important entity and other important entities, and the non-important entity is deleted from the first graph to obtain the second graph.

[0161] In one embodiment, the semantic compression unit is specifically used to:

[0162] For each entity in the second graph, the industry characteristics are calculated based on the corresponding industry attributes, and the cosine similarity between the industry characteristics and the target industry characteristics of the target industry is calculated as the industry similarity. If the industry similarity is less than the similarity threshold, the entity is deleted to obtain the third graph.

[0163] If there is a special entity without industry attributes, the industry attributes corresponding to the entity closest to the special entity and with the highest interaction frequency are selected from the entities with industry attributes as the industry attributes of the special entity.

[0164] In one embodiment, the edge weighting and compression unit 507 is specifically configured to:

[0165] For each edge in the fourth graph, if the corresponding edge category is not in the preset whitelist, it is determined as a target edge;

[0166] Calculate the difference between the current time and the target time corresponding to the target edge; the target time is the time when the association relationship indicated by the target edge occurs;

[0167] Compare the difference with the preset time range, and perform weighting operations on the target edge based on the comparison result;

[0168] When the weight of the target edge is 0, the target edge is deleted from the fourth graph to obtain the industry-to-corporate credit subgraph.

[0169] In one embodiment, the supplementary adjacent entity unit 506 is specifically used for:

[0170] For each entity in the third graph, the entity is taken as a starting entity, and a random walk operation is performed in the second graph based on the starting entity to obtain multiple similar entities; the similar entities are connected to the starting entity in the second graph through multiple edges;

[0171] Filter out entities to be supplemented that do not exist in the third graph from various similar entities;

[0172] Each entity to be supplemented and the edges connecting the entity to be supplemented and other entities in the third graph are supplemented to the third graph to obtain a fourth graph.

[0173] Based on the above-mentioned embodiment of the present invention, an industry-to-corporate credit subgraph extraction device is disclosed. In this scheme, meta-path compression is used to not only retain the predetermined semantic information, but also transfer the deleted entity information to the retained entity through feature transfer, thereby reducing the scale but with less information loss. Relevant entities are retained from an industry perspective through semantic compression, and entities with higher relevance are selected through random walks. In the edge weighting and compression, older edges are deleted to reduce the complexity of the graph. Finally, a more effective and smaller-scale graph is compressed to achieve the purpose of increasing the compression speed and retaining enough entity features.

[0174] The present invention also provides an electronic device, please refer to Figure 6 , the electronic device includes a memory 601 and a processor 602.

[0175] Wherein, the memory 601 is used to store computer programs;

[0176] The processor 602 is used to execute a computer program, specifically to implement the method for extracting the industry-to-public credit sub-graph provided in any embodiment of the present application.

[0177] The present application also provides a computer storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement the method for extracting the industry-to-public credit sub-graph provided in any embodiment of the present application.

[0178] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0179] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0180] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for extracting an industry-to-public credit subgraph, characterized in that: The method comprises: Obtaining a full knowledge graph; the full knowledge graph includes: a plurality of entities divided into important entities and non-important entities; Divide the meta-paths corresponding to the edges in the full knowledge graph to obtain a first meta-path group, a second meta-path group, and a third meta-path group; the meta-paths in the first meta-path group only include the important entities, the meta-paths in the second meta-path group include both the important entities and the unimportant entities, and the meta-paths in the third meta-path group only include the unimportant entities; For each meta-path in the third meta-path group on the full knowledge graph, if the non-important entity in the meta-path is adjacent to the important entity, then feature transfer is performed on the non-important entity; if the non-important entity in the meta-path is not adjacent to the important entity, then the non-important entity is deleted to obtain a first graph; For each meta-path in the second meta-path group on the first graph, perform the feature transfer and structure transfer on the important entities in the meta-path, and delete the unimportant entities in the meta-path to obtain a second graph; For each entity in the second graph, the industry similarity between the industry corresponding to the entity and the pre-specified target industry is calculated. If the industry similarity is less than a similarity threshold, the entity is deleted to obtain a third graph. For each entity in the third graph, the entity is used as a starting entity, a random walk operation is performed in the second graph based on the starting entity to obtain a plurality of entities to be supplemented, and each of the entities to be supplemented is supplemented into the third graph to obtain a fourth graph; For each edge in the fourth graph, if the corresponding edge category is not in the preset whitelist, weighted compression is performed to obtain the industry-to-corporate credit subgraph.

2. The method according to claim 1, characterized in that Each entity in the full knowledge graph is provided with a plurality of candidate lists, each candidate list corresponds to an entity category; for each meta-path in the third meta-path group on the full knowledge graph, if the non-important entity in the meta-path is adjacent to the important entity, the feature transfer is performed on the non-important entity; if the non-important entity in the meta-path is not adjacent to the important entity, the non-important entity is deleted, and a first graph is obtained, including: For each meta-path in the third meta-path group on the full knowledge graph, adding the two non-important entities in the meta-path to each other's candidate lists of corresponding entity categories; For each of the non-important entities adjacent to the important entity in the third-dimensional path group, the non-important entity is used as a transfer target entity for feature transfer; the feature transfer process includes: sorting the non-important entities in the candidate lists corresponding to the transfer target entity from high to low according to the interaction frequency, selecting the non-important entities sorted before the preset order, fusing the entity features of the selected non-important entities based on the mean-pooling method to obtain the fused features corresponding to the candidate lists; splicing the fused features, and weighting the spliced ​​fused features with the features of the transfer target entity; Each of the non-important entities in the third-dimensional path group that is not adjacent to the important entity is deleted from the full knowledge graph to obtain a first graph.

3. The method according to claim 2, characterized in that For each meta-path in the second meta-path group on the first graph, performing the feature transfer and structure transfer on the important entities in the meta-path, and deleting the unimportant entities in the meta-path to obtain a second graph, including: For each meta-path in the second meta-path group on the first graph, according to the entity category of the non-important entity in the meta-path, adding the non-important entity to the candidate list corresponding to the important entity in the meta-path; For each of the important entities in the second meta-path group, the feature transfer is performed with the important entity as the transfer target entity, and for each of the unimportant entities selected and ranked before the preset order during the feature transfer process, the edges associated with the unimportant entities in the first graph are transferred to the important entities, so that the edges associated with the unimportant entities are associated with the important entities and other important entities, and the unimportant entities are deleted from the first graph to obtain the second graph.

4. The method according to claim 1, characterized in that The step of calculating, for each entity in the second graph, the industry similarity between the industry corresponding to the entity and a pre-specified target industry includes: For each entity in the second graph, an industry feature is calculated based on the corresponding industry attribute, and the cosine similarity between the industry feature and the target industry feature of the target industry is calculated as the industry similarity.

5. The method according to claim 4, characterized in that The method further comprises: If there is a special entity that does not have the industry attribute, the industry attribute corresponding to the entity that is closest to the special entity and has the highest interaction frequency is screened out from the entities that have the industry attribute as the industry attribute of the special entity.

6. The method according to claim 1, characterized in that For each entity in the third graph, the entity is used as a starting entity, a random walk operation is performed in the second graph based on the starting entity to obtain a plurality of entities to be supplemented, and each of the entities to be supplemented is supplemented into the third graph to obtain a fourth graph, including: For each entity in the third graph, the entity is used as a starting entity, and a random walk operation is performed in the second graph based on the starting entity to obtain a plurality of similar entities; the similar entities are connected to the starting entity in the second graph through a plurality of edges; Filter out entities to be supplemented that do not exist in the third graph from each of the similar entities; Each entity to be supplemented and the edges connecting the entity to be supplemented and other entities in the third graph are supplemented to the third graph to obtain a fourth graph.

7. The method according to any one of claims 1 to 6, characterized in that: For each edge in the fourth graph, if the corresponding edge category is not in the preset whitelist, weighted compression is performed to obtain an industry-to-corporate credit subgraph, including: For each edge in the fourth graph, if the corresponding edge category is not in the preset whitelist, it is determined as a target edge; Calculate the difference between the current time and the target time corresponding to the target edge; the target time is the time when the association relationship of the target edge indication occurs; Comparing the difference with a preset time range, and performing a weighting operation on the target edge based on the comparison result; When the weight of the target edge is 0, the target edge is deleted from the fourth graph to obtain an industry-to-corporate credit subgraph.

8. A device for extracting a sub-graph of industry-to-corporate credit, characterized in that: The device comprises: An acquisition unit, configured to acquire a full knowledge graph; the full knowledge graph includes: a plurality of entities divided into important entities and non-important entities; A division unit, used for dividing the meta-paths corresponding to the edges in the full knowledge graph to obtain a first meta-path group, a second meta-path group and a third meta-path group; the meta-paths in the first meta-path group only include the important entities, the meta-paths in the second meta-path group include both the important entities and the unimportant entities, and the meta-paths in the third meta-path group only include the unimportant entities; A first meta-path compression unit is used for, for each meta-path in the third meta-path group on the full knowledge graph, if the non-important entity in the meta-path is adjacent to the important entity, performing feature transfer on the non-important entity, and if the non-important entity in the meta-path is not adjacent to the important entity, deleting the non-important entity to obtain a first graph; A second meta-path compression unit is used to perform the feature transfer and structure transfer on the important entities in each meta-path in the second meta-path group on the first graph, and delete the unimportant entities in the meta-path to obtain a second graph; A semantic compression unit, configured to calculate, for each entity in the second graph, an industry similarity between the industry corresponding to the entity and a pre-specified target industry, and if the industry similarity is less than a similarity threshold, delete the entity to obtain a third graph; A supplementary similar entity unit is used for taking each entity in the third graph as a starting entity, performing a random walk operation in the second graph based on the starting entity to obtain a plurality of entities to be supplemented, and supplementing each of the entities to be supplemented into the third graph to obtain a fourth graph; The edge weighting and compression unit is used to perform weighted compression on each edge in the fourth graph if the corresponding edge category is not in a preset whitelist, so as to obtain an industry-to-corporate credit subgraph.

9. A storage medium, characterized in that: Used to store a computer program, which, when executed, is specifically used to implement the method for extracting the industry-to-public credit subgraph as described in any one of claims 1 to 7.

10. An electronic device, characterized in that: include: Memory and processor; The memory is used to store computer programs; The processor is used to execute the computer program, specifically to implement the method for extracting the industry-to-public credit subgraph as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Credit assessment method and system based on knowledge graph and deep learning

    CN115358754A

  • Knowledge graph construction method and device for public business

    CN117151754A

  • Knowledge graph inductive relationship prediction method, system and device and medium

    CN117787395A