Information processing method and device for enterprise transaction relationship data
Through the division method based on enterprise correlation and similarity, combined with the optimization of transaction frequency and overlap, the problem of low accuracy of enterprise transaction relationship community division in the existing technology is solved, and more accurate and efficient division of enterprise information sets is achieved. .
Patent Information
- Application Number
- CN202010602342.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-28
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2040-06-28
AI Technical Summary
The existing community found that the algorithm has low accuracy when dividing corporate transaction relationships, resulting in inconsistent results of community division and difficulty in conducting effective analysis.
By dividing the enterprise information set based on the correlation and similarity of the enterprise, determining the enterprise similarity using cosine similarity and median ratio, and combining and optimizing transaction frequency and overlap, a knowledge graph is constructed for distributed calculations to improve accuracy sex.
It improves the accuracy and consistency of enterprise information set division, solves the problem of low accuracy of community division, and enhances the data processing efficiency and accuracy of enterprise transaction relationships.
Smart Images

Figure CN113850675B_ABST
Abstract
Description
Background Art
[0002] With the rapid development of the Internet, the community structure in the network reflects the distribution structure of the network. Nodes are classified according to their structural information in the network to form community groups. There are usually many intersections among members in the community, and a member may have multiple identities in the network and belong to multiple communities at the same time, resulting in community overlap. For example, in corporate transaction relationships, different companies will have close transaction relationships with companies in other fields due to their particularity, so the same company may belong to different corporate communities.
[0003] In order to effectively divide enterprises, a typical method is to use community discovery algorithms. Since the community discovery algorithms in the prior art divide communities into completely different communities each time, the accuracy of community division is low, which is not conducive to the subsequent analysis of the divided communities. Therefore, a new method is urgently needed to solve the above problems. Summary of the invention
[0004] The present disclosure provides an information processing method and device for enterprise transaction relationship data, which are used to solve the problem of low community division accuracy in the prior art.
[0005] In a first aspect, the present disclosure provides an information processing method for enterprise transaction relationship data, the method comprising:
[0006] In response to the enterprise transaction relationship processing instruction, a specified number of target enterprises are obtained according to the relevance of each enterprise;
[0007] According to the obtained similarities between the target enterprises, the target enterprises are divided to obtain the enterprise information set to which the target enterprises belong.
[0008] In one embodiment, the target enterprises are divided according to the obtained similarities between the target enterprises to obtain the enterprise information set to which the target enterprises belong, including:
[0009] Determine the enterprise similarity between target enterprises based on the acquired transaction relationships of target enterprises;
[0010] The target enterprises whose enterprise similarity is greater than a first specified value are added to the same enterprise information set, and the target enterprises whose enterprise similarity is less than the first specified value are divided into different enterprise information sets.
[0011] In one embodiment, determining the enterprise similarity of each target enterprise according to the acquired transaction relationship of each target enterprise includes:
[0012] If each target enterprise is a node in a directed graph, and the transaction relationship of each target enterprise is a vector edge in the directed graph, then the enterprise similarity of each target enterprise is determined according to the cosine similarity and betweenness ratio of the transaction relationship of each enterprise.
[0013] In one embodiment, determining the enterprise similarity of each target enterprise according to the cosine similarity and betweenness ratio of the transaction relationship of each enterprise includes:
[0014] The similarity of the enterprises is determined according to the following formula:
[0015]
[0016] Among them, v i Represents enterprise i, v j Representative company j; represents the cosine similarity between enterprise i and enterprise j, δ is the ratio of betweenness between enterprise i and enterprise j;
[0017] The betweenness ratio of enterprise i and enterprise j is determined according to the following formula:
[0018]
[0019] Where σ is the total number of shortest paths between any two enterprises in the directed graph; σ(v i ,v j ) is the number of shortest paths between any two enterprises in the directed graph that include enterprise i and enterprise j.
[0020] In one embodiment, determining the relevance of the enterprises includes:
[0021] The degree of association is proportional to the ratio of the number of designated enterprises of the enterprise to the number of designated enterprises of the neighboring enterprises of the enterprise; wherein the number of designated enterprises is the number of enterprises that provide products to the target enterprise;
[0022] The degree of association is determined according to the following formula:
[0023]
[0024] Where PR(i) is the relevance of enterprise i, N is the total number of enterprises; d is the damping factor, adj(i) is the set of neighboring enterprises of enterprise i; INi is the in-degree of enterprise i, and the in-degree is the number of enterprises that provide products to enterprise i; is the sum of the in-degrees of the neighboring enterprises of enterprise j, where k represents the kth neighboring enterprise of enterprise j, k∈[1,m].
[0025] In one embodiment, after dividing the target enterprises according to the obtained similarities between the target enterprises to obtain the enterprise information sets to which the target enterprises belong, the method further includes:
[0026] Obtaining enterprises outside the union of each enterprise information set as enterprises to be processed;
[0027] If the change in transaction frequency between enterprises in the target enterprise information set before and after the enterprise to be processed is incorporated into the target enterprise information set is greater than a first specified value, the enterprise to be processed is incorporated into the target enterprise information set.
[0028] In one embodiment, determining the transaction frequency includes:
[0029] The transaction frequency is determined according to the following formula:
[0030]
[0031] Among them, A represents the target enterprise to be incorporated into the enterprise information set S; Represents the sum of the number of connecting edges between target enterprises within the enterprise information set S; represents the sum of the number of connecting edges between each target enterprise in the enterprise information set S and other enterprises outside the enterprise information set S; α is a specified value; K inner (S, A) is the sum of the number of edges connecting the target enterprise A and each target enterprise in the enterprise information set S; It is the sum of the out-degree and in-degree of the target enterprise A. The out-degree is the number of enterprises that purchase products from the target enterprise A, and the in-degree is the number of enterprises that provide products to the target enterprise A.
[0032] In one embodiment, after merging the to-be-processed enterprise into the target enterprise information set, the method further includes:
[0033] Determine the overlap between the information sets of each enterprise;
[0034] Merge enterprise information sets whose overlap is greater than the second specified value.
[0035] In one embodiment, determining the overlap between the enterprise information sets includes:
[0036] The overlap degree O is calculated according to the following formula:
[0037]
[0038] Among them, C 1 ,C 2 Represent different enterprise information sets, min(|C 1 |,|C2 |) represents enterprise information set C 1 and enterprise information set C 2 Enterprise information set with a small number of enterprises.
[0039] In one embodiment, before the step of obtaining a specified number of target enterprises according to the relevance of each enterprise in response to the enterprise transaction relationship processing instruction, the step further includes:
[0040] Obtain transaction data of each enterprise;
[0041] Based on the transaction data of each enterprise, a knowledge graph based on the enterprise transaction relationship is obtained and stored in a distributed graph database;
[0042] The knowledge graph is distributedly computed using spark components on the distributed system infrastructure Hadoop platform to obtain the transaction relationships of various enterprises that support spark computing.
[0043] In a second aspect, the present disclosure provides an information processing device for enterprise transaction relationship data, the device comprising:
[0044] A target enterprise acquisition module, for responding to an enterprise transaction relationship processing instruction and acquiring a specified number of target enterprises according to the relevance of each enterprise;
[0045] The enterprise information set determination module is used to divide each target enterprise according to the obtained similarities between each target enterprise to obtain the enterprise information set to which each target enterprise belongs.
[0046] In one embodiment, the enterprise information set determination module is further used to:
[0047] Determine the enterprise similarity between target enterprises based on the acquired transaction relationships of target enterprises;
[0048] The target enterprises whose enterprise similarity is greater than a first specified value are added to the same enterprise information set, and the target enterprises whose enterprise similarity is less than the first specified value are divided into different enterprise information sets.
[0049] In one embodiment, the enterprise information set determination module is further used to:
[0050] If each target enterprise is a node in a directed graph, and the transaction relationship of each target enterprise is a vector edge in the directed graph, then the enterprise similarity of each target enterprise is determined according to the cosine similarity and betweenness ratio of the transaction relationship of each enterprise.
[0051] In one embodiment, the enterprise information set determination module is further used to:
[0052] The similarity of the enterprises is determined according to the following formula:
[0053]
[0054] Among them, v i Represents enterprise i, v j Representative company j; represents the cosine similarity between enterprise i and enterprise j, δ is the ratio of betweenness between enterprise i and enterprise j;
[0055] The betweenness ratio of enterprise i and enterprise j is determined according to the following formula:
[0056]
[0057] Where σ is the total number of shortest paths between any two enterprises in the directed graph; σ(v i ,v j ) is the number of shortest paths between any two enterprises in the directed graph that include enterprise i and enterprise j.
[0058] In one embodiment, the apparatus further comprises:
[0059] An enterprise association determination module, wherein the association is proportional to the ratio of the number of designated enterprises of the enterprise to the number of designated enterprises of the neighboring enterprises of the enterprise; wherein the number of designated enterprises is the number of enterprises that provide products to the target enterprise;
[0060] The degree of association is determined according to the following formula:
[0061]
[0062] Where PR(i) is the relevance of enterprise i, N is the total number of enterprises; d is the damping factor, adj(i) is the set of neighboring enterprises of enterprise i; INi is the in-degree of enterprise i, and the in-degree is the number of enterprises that provide products to enterprise i; is the sum of the in-degrees of the neighboring enterprises of enterprise j, where k represents the kth neighboring enterprise of enterprise j, k∈[1,m].
[0063] In one embodiment, the apparatus further comprises:
[0064] A module for obtaining enterprises to be processed, which is used to divide each target enterprise according to the similarities between the target enterprises, obtain the enterprise information sets to which each target enterprise belongs, and then obtain the enterprises outside the union of the enterprise information sets as the enterprises to be processed;
[0065] The merging module is used to merge the enterprise to be processed into the target enterprise information set if the change in transaction frequency between enterprises in the target enterprise information set before and after the enterprise to be processed is merged into the target enterprise information set is greater than a first specified value.
[0066] In one embodiment, the apparatus further comprises:
[0067] The transaction frequency determination module is used to determine the transaction frequency according to the following formula:
[0068]
[0069] Among them, A represents the target enterprise to be incorporated into the enterprise information set S; Represents the sum of the number of connecting edges between target enterprises within the enterprise information set S; represents the sum of the number of connecting edges between each target enterprise in the enterprise information set S and other enterprises outside the enterprise information set S; α is a specified value; K inner (S, A) is the sum of the number of edges connecting the target enterprise A and each target enterprise in the enterprise information set S; is the sum of the out-degree and in-degree of the target enterprise A.
[0070] In one embodiment, the apparatus further comprises:
[0071] An overlap determination module, used to determine the overlap between the enterprise information sets after merging the to-be-processed enterprise into the target enterprise information set;
[0072] The merging module is used to merge the enterprise information sets whose overlap is greater than a second specified value.
[0073] In one embodiment, the overlap determination module is specifically used to:
[0074] The overlap degree O is calculated according to the following formula:
[0075]
[0076] Among them, C 1 ,C 2 Represent different enterprise information sets, min(|C 1 |,|C 2 |) represents enterprise information set C 1 and enterprise information set C 2 Enterprise information set with a small number of enterprises.
[0077] In one embodiment, the apparatus further comprises:
[0078] An enterprise transaction data acquisition module, configured to acquire transaction data of each enterprise before acquiring a specified number of target enterprises according to the relevance of each enterprise in response to the enterprise transaction relationship processing instruction;
[0079] The knowledge graph construction module is used to obtain a knowledge graph based on the enterprise transaction relationship according to the transaction data of each enterprise, and store it in a distributed graph database;
[0080] The transaction relationship determination module is used to perform distributed computing on the knowledge graph using the spark component on the distributed system infrastructure Hadoop platform to obtain the transaction relationships of various enterprises that support spark computing.
[0081] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in the first aspect.
[0082] According to a fourth aspect provided by an embodiment of the present disclosure, a computer storage medium is provided, wherein the computer storage medium stores a computer program, and the computer program is used to execute the method as described in the first aspect.
[0083] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0084] The present disclosure provides a method and device for information processing of enterprise transaction relationship data. The method includes: in response to an enterprise transaction relationship processing instruction, obtaining a specified number of target enterprises according to the relevance of each enterprise; and dividing each target enterprise according to the similarity between the obtained target enterprises to obtain the enterprise information set to which each target enterprise belongs.
[0085] It should be noted that the enterprise information set in this disclosure is equivalent to the community in the background technology, and each target enterprise is equivalent to the core node in the background technology. When selecting target enterprises in this disclosure, the selection is made according to the relevance of each target enterprise. Therefore, the division of the enterprise information set according to the order of relevance makes the division of the enterprise information set more accurate, solving the problem of low accuracy of community division results in the prior art.
[0086] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0088] Figure 1 A schematic diagram of an applicable scenario in an embodiment of the present disclosure;
[0089] Figure 2 One of the flow charts of the information processing method for enterprise transaction relationship data according to one embodiment of the present disclosure;
[0090] Figure 3 This is a second flow chart of an information processing method for enterprise transaction relationship data according to an embodiment of the present disclosure;
[0091] Figure 4 An information processing device for enterprise transaction relationship data according to an embodiment of the present disclosure;
[0092] Figure 5 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0093] To further illustrate the technical solution provided by the embodiments of the present disclosure, this is described in detail below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of the present disclosure provide method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of the present disclosure. In the actual processing process or when the control device is executed, the method can be executed in the order of the method shown in the embodiments or drawings or in parallel.
[0094] The term "multiple" in the embodiments of the present disclosure refers to two or more than two, and other quantifiers are similar and should be understood. The preferred embodiments described herein are only used to illustrate and explain the present disclosure and are not used to limit the present disclosure. In addition, the embodiments in the present disclosure and the features in the embodiments may be combined with each other if there is no conflict.
[0095] The inventor has found that in the existing community division method, core nodes are randomly selected for community division each time, which may result in completely different communities each time the enterprise community is divided, so the accuracy of community division is low, which is not conducive to the subsequent analysis of the divided communities. Therefore, the present disclosure proposes an information processing method and device for enterprise transaction relationship data. The present disclosure is described in detail below in conjunction with the accompanying drawings.
[0096] like Figure 1 FIG. 1 is a schematic diagram of an applicable scenario in an embodiment of the present disclosure. The application scenario includes a terminal device 10, a server 11, Figure 1 In the example, one terminal device 10 is used, and the number of terminal devices 10 is not actually limited. The terminal device 10 and the server 11 can communicate with each other through a communication network. The terminal device 10 is, for example, a mobile phone, a tablet computer, and a personal computer. The server 11 can be implemented by a single server or by multiple servers. The server 11 can be implemented by a physical server or by a virtual server.
[0097] In a possible application scenario, the server 11 responds to the enterprise transaction relationship processing instruction and obtains a specified number of target enterprises according to the relevance of each enterprise. Then, according to the obtained similarity between each target enterprise, each target enterprise is divided to obtain the enterprise information set to which each target enterprise belongs. Finally, the divided enterprise information set is sent to the terminal device 10 for display.
[0098] In the embodiment of the present application, the target enterprises are selected according to the ranking of the relevance of each enterprise, thereby ensuring that the result of each community division is consistent. Therefore, the problem of low accuracy of community division caused by randomly selecting core nodes for community division in the prior art is solved. The present disclosure is described in detail below in conjunction with the accompanying drawings.
[0099] like Figure 2 As shown, Figure 2 The flowchart of the information processing method for enterprise transaction relationship data may include the following steps:
[0100] Step 201: In response to the enterprise transaction relationship processing instruction, a specified number of target enterprises are obtained according to the relevance of each enterprise;
[0101] For example, the enterprises may be arranged in descending order of their relevance, and a specified number of target enterprises may be obtained in the order of arrangement.
[0102] Step 202: According to the obtained similarities between the target enterprises, the target enterprises are divided to obtain the enterprise information set to which the target enterprises belong.
[0103] Therefore, the present disclosure obtains a specified number of target enterprises according to the relevance of each enterprise, and divides the enterprise information set with each target enterprise as a core enterprise. Therefore, the problem of low accuracy of community division caused by randomly selecting core nodes for community division in the prior art is solved, and when the relevance is set low, noise enterprises can be filtered out.
[0104] In order to obtain the transaction relationship of each enterprise and improve the operational efficiency of information processing of enterprise transaction relationship data, before executing step 201, in one embodiment, the transaction data of each enterprise is obtained; based on the transaction data of each enterprise, a knowledge graph constructed based on the enterprise transaction relationship is obtained and stored in a distributed graph database; the spark component is used on the distributed system infrastructure Hadoop platform to perform distributed computing on the knowledge graph to obtain the transaction relationship of each enterprise that supports spark computing.
[0105] It should be noted that the transaction data of each enterprise in the present disclosure is obtained from the Hbase column database. Moreover, the transaction data of each enterprise in the Hbase column database is parsed from the transaction files of each enterprise in the distributed file system HDFS.
[0106] Therefore, the present disclosure can effectively improve the computing efficiency of graph data by using Spark components for distributed computing on the Hadoop platform, quickly complete the distributed computing of each enterprise and obtain the transaction relationship between each enterprise, and improve the operating efficiency of information processing of enterprise transaction relationship data.
[0107] In order to further improve the accuracy of the division of enterprise information sets, in one embodiment, the overlap between the enterprise information sets is determined; and the enterprise information sets with overlap greater than a second specified value are merged.
[0108] For example, the overlap between enterprise information set A and enterprise information set B is 30%, and the overlap between enterprise information set B and enterprise information set C is 60%. If the second specified threshold is 50%, it is determined that the overlap between enterprise information set B and enterprise information set C is greater than the second specified threshold. Enterprise information set B and enterprise information set C are then merged.
[0109] Therefore, redundant communities are determined by determining the overlap between communities, and the redundant communities are merged, thereby further improving the accuracy of social information set division.
[0110] In one embodiment, the overlap degree O can be calculated according to formula (1):
[0111]
[0112] Among them, C 1 ,C 2 Represent different enterprise information sets, min(|C 1 |,|C 2 |) represents enterprise information set C 1 and enterprise information set C 2 Enterprise information set with a small number of enterprises.
[0113] Therefore, the overlap degree of the enterprise information set can be determined by the above formula.
[0114] In one embodiment, step 202 can be specifically implemented as follows: determining the enterprise similarity between target enterprises based on the acquired transaction relationships of each target enterprise; adding target enterprises whose enterprise similarity is greater than a first specified value to the same enterprise information set, and dividing target enterprises whose enterprise similarity is less than the first specified value into different enterprise information sets.
[0115] For example, the target enterprises obtained include target enterprise A, target enterprise B, target enterprise C, target enterprise D and target enterprise E. The following two situations may be included:
[0116] (1) If the similarity between target enterprise A and target enterprise B is greater than the first specified value, and the similarity between target enterprise B and target enterprise C is also greater than the first specified value, then target enterprise A, target enterprise B, and target enterprise C are added to the same enterprise information set. If the similarity between target enterprise D and target enterprise F is less than the first specified value, then target enterprise D and target enterprise F are added to different enterprise information sets.
[0117] (2) If the similarity between target enterprise A and target enterprise B is less than the first specified value. If the similarity between target enterprise B and target enterprise C is greater than the first specified value. Then target enterprise A and target enterprise B are added to different enterprise information sets. And target enterprise B and target enterprise C are added to the same enterprise information set. If the similarity between target enterprise D and target enterprise F is also less than the first specified value, then target enterprise D and target enterprise F are also added to different enterprise information sets.
[0118] Therefore, by determining the similarity between target enterprises, the enterprise information set to be added to each target enterprise is determined, thereby improving the accuracy and efficiency of the division of enterprise information sets.
[0119] In one embodiment, if each target enterprise is a node in a directed graph, and the transaction relationship of each target enterprise is a vector edge in the directed graph, the enterprise similarity of each target enterprise is determined based on the cosine similarity and betweenness ratio of the transaction relationship of each enterprise.
[0120] Specifically, the enterprise similarity of each target enterprise can be determined according to formula (2):
[0121]
[0122] Among them, v i Represents enterprise i, v j Representative company j; represents the cosine similarity between enterprise i and enterprise j, δ is the ratio of betweenness between enterprise i and enterprise j;
[0123] The betweenness ratio of enterprise i and enterprise j can be determined according to formula (3):
[0124]
[0125] Where σ is the total number of shortest paths between any two enterprises in the directed graph; σ(v i ,v j ) is the number of shortest paths between any two enterprises in the directed graph that include enterprise i and enterprise j.
[0126] Therefore, the enterprise similarity of each target enterprise can be determined by the cosine similarity and betweenness ratio of the transaction relationship of each enterprise, so as to merge redundant enterprises.
[0127] In one embodiment, the association degree is proportional to the ratio of the number of designated enterprises of the enterprise to the number of designated enterprises of the neighboring enterprises of the enterprise; wherein the number of designated enterprises is the number of enterprises that provide products to the target enterprise;
[0128] The correlation degree can be determined according to formula (4):
[0129]
[0130] Where PR(i) is the relevance of enterprise i, N is the total number of enterprises; d is the damping factor, adj(i) is the set of neighboring enterprises of enterprise i; INi is the in-degree of enterprise i, and the in-degree is the number of enterprises that provide products to enterprise i; is the sum of the in-degrees of the neighboring enterprises of enterprise j, where k represents the kth neighboring enterprise of enterprise j, and k∈[1,m], i is included in the value range of k.
[0131] Therefore, the above formula can be used to determine the correlation between each enterprise, so as to select a specified number of target enterprises.
[0132] In one embodiment, enterprises outside the union of each enterprise information set are obtained as enterprises to be processed;
[0133] If the change in transaction frequency between enterprises in the enterprise information set before and after the enterprise to be processed is incorporated into the target enterprise information set is greater than a first specified value, the enterprise to be processed is incorporated into the target enterprise information set.
[0134] For example, before the enterprise A to be processed is incorporated into the target enterprise information set, the transaction frequency of the target enterprise information set is a, and after the enterprise A to be processed is incorporated into the target enterprise information set, the transaction frequency of the target enterprise information set is b. Then, the change in the transaction frequency of the target enterprise is determined to be ab, and if ab is greater than the first specified value, the enterprise A to be processed is incorporated into the target enterprise information set.
[0135] Therefore, the enterprises to be processed that can be merged into the enterprise information set can be determined according to the transaction frequency.
[0136] The transaction frequency can be determined, in one embodiment, according to formula (5):
[0137]
[0138] Among them, A represents the target enterprise to be incorporated into the enterprise information set S; Represents the sum of the number of connecting edges between target enterprises within the enterprise information set S; represents the sum of the number of connecting edges between each target enterprise in the enterprise information set S and other enterprises outside the enterprise information set S; α is a specified value; K inner (S, A) is the sum of the number of edges connecting the target enterprise A and each target enterprise in the enterprise information set; It is the sum of the out-degree and in-degree of the target enterprise A. The out-degree is the number of enterprises that purchase products from the target enterprise A, and the in-degree is the number of enterprises that provide products to the target enterprise A.
[0139] It should be noted that formula (5) is obtained by decomposing and simplifying formula (6), where formula (6) is: The specific decomposition and simplification process may include:
[0140] In order to avoid the redundancy of recalculating the transaction frequency of the enterprise information set each time a to-be-processed enterprise is added, the numerator of formula (6) is simplified to formula (7):
[0141]
[0142] Among them, K in (S∪v) represents the sum of the number of connecting edges between target enterprises in the enterprise information set S after the target enterprise v is incorporated into the enterprise information set S. In an undirected unweighted graph, it is represented as the sum of the number of edges connecting the target enterprise v and each target enterprise in the enterprise information set S.
[0143] And simplify the denominator of formula (6) to formula (8):
[0144]
[0145] Among them, K out (S∪v) represents the sum of the number of connecting edges between each target enterprise in the enterprise information set S and other enterprises outside the enterprise information set S after the target enterprise v is incorporated into the enterprise information set S. K outer (GS,v) is represented by the sum of the number of edges connecting the target enterprise V with other enterprises except the target enterprises in the enterprise information set S in the unweighted undirected graph G.
[0146] By simplifying formula (7) and formula (8), the above formula (6) can be obtained.
[0147] Therefore, the present disclosure can directly determine the transaction frequency before and after the enterprise is added to the enterprise information set through the above formula.
[0148] In order to further understand the technical solution of the present disclosure, Figure 3 A detailed description may include the following steps:
[0149] Step 301: Obtain transaction data of each enterprise;
[0150] Step 302: Based on the transaction data of each enterprise, a knowledge graph based on the enterprise transaction relationship is obtained and stored in a distributed graph database;
[0151] Step 303: Using the Spark component on the distributed system infrastructure Hadoop platform to perform distributed computing on the knowledge graph, and obtaining the transaction relationships of various enterprises that support Spark computing;
[0152] Step 304: In response to the enterprise transaction relationship processing instruction, a specified number of target enterprises are obtained according to the relevance of each enterprise;
[0153] Step 305: determining the enterprise similarity between the target enterprises according to the acquired transaction relationships of the target enterprises;
[0154] Step 306: adding target enterprises whose enterprise similarity is greater than a first specified value to the same enterprise information set, and dividing target enterprises whose enterprise similarity is less than the first specified value into different enterprise information sets;
[0155] Step 307: sorting the number of target enterprises in each enterprise information set according to a specified order, and performing the operation of dividing the enterprise information set on each target enterprise information set in sequence according to the arrangement order;
[0156] Step 308: Determine the overlap between the enterprise information sets;
[0157] Step 309: Merge enterprise information sets whose overlap is greater than a second specified value.
[0158] Based on the same inventive concept, the information processing method for enterprise transaction relationship data disclosed above can also be implemented by an information processing device for enterprise transaction relationship data. The effect of the device is similar to that of the aforementioned method, and will not be repeated here.
[0159] Figure 4 The present invention is a schematic diagram of the structure of an information processing device for enterprise transaction relationship data according to an embodiment of the present disclosure.
[0160] like Figure 4 As shown, the information processing device 400 for enterprise transaction relationship data disclosed in the present invention may include a target enterprise acquisition module 410 and an enterprise information set determination module 420 .
[0161] The target enterprise acquisition module 410 is used to respond to the enterprise transaction relationship processing instruction and acquire a specified number of target enterprises according to the relevance of each enterprise;
[0162] The enterprise information set determination module 420 is used to divide each target enterprise according to the obtained similarities between each target enterprise to obtain the enterprise information set to which each target enterprise belongs.
[0163] In one embodiment, the enterprise information set determination module 420 is further configured to:
[0164] Determine the enterprise similarity between target enterprises based on the acquired transaction relationships of target enterprises;
[0165] The target enterprises whose enterprise similarity is greater than a first specified value are added to the same enterprise information set, and the target enterprises whose enterprise similarity is less than the first specified value are divided into different enterprise information sets.
[0166] In one embodiment, the enterprise information set determination module 420 is further configured to:
[0167] If each target enterprise is a node in a directed graph, and the transaction relationship of each target enterprise is a vector edge in the directed graph, then the enterprise similarity of each target enterprise is determined according to the cosine similarity and betweenness ratio of the transaction relationship of each enterprise.
[0168] In one embodiment, the enterprise information set determination module 420 is further configured to:
[0169] The similarity of the enterprises is determined according to the following formula:
[0170]
[0171] Among them, v i Represents enterprise i, v j Representative company j; represents the cosine similarity between enterprise i and enterprise j, δ is the ratio of betweenness between enterprise i and enterprise j;
[0172] The betweenness ratio of enterprise i and enterprise j is determined according to the following formula:
[0173]
[0174] Where σ is the total number of shortest paths between any two enterprises in the directed graph; σ(v i ,v j ) is the number of shortest paths between any two enterprises in the directed graph that include enterprise i and enterprise j.
[0175] In one embodiment, the apparatus further comprises:
[0176] An enterprise association determination module 430 is used for determining that the association is proportional to the ratio of the number of designated enterprises of the enterprise to the number of designated enterprises of the neighboring enterprises of the enterprise; wherein the number of designated enterprises is the number of enterprises that provide products to the target enterprise;
[0177] The degree of association is determined according to the following formula:
[0178]
[0179] Where PR(i) is the relevance of enterprise i, N is the total number of enterprises; d is the damping factor, adj(i) is the set of neighboring enterprises of enterprise i; INi is the in-degree of enterprise i, and the in-degree is the number of enterprises that provide products to enterprise i; is the sum of the in-degrees of the neighboring enterprises of enterprise j, where k represents the kth neighboring enterprise of enterprise j, k∈[1,m].
[0180] In one embodiment, the apparatus further comprises:
[0181] The to-be-processed enterprise acquisition module 440 is used to divide the target enterprises according to the acquired similarities between the target enterprises to obtain the enterprise information sets to which the target enterprises belong, and then acquire the enterprises outside the union of the enterprise information sets as the to-be-processed enterprises;
[0182] The merging module 450 is used to merge the enterprise to be processed into the target enterprise information set if the change in transaction frequency between enterprises in the target enterprise information set before and after the enterprise to be processed is merged into the target enterprise information set is greater than a first specified value.
[0183] In one embodiment, the apparatus further comprises:
[0184] The transaction frequency determination module 460 is used to determine the transaction frequency according to the following formula:
[0185]
[0186] Among them, A represents the target enterprise to be incorporated into the enterprise information set S; Represents the sum of the number of connecting edges between target enterprises within the enterprise information set S; represents the sum of the number of connecting edges between each target enterprise in the enterprise information set S and other enterprises outside the enterprise information set S; α is a specified value; K inner (S, A) is the sum of the number of edges connecting the target enterprise A and each target enterprise in the enterprise information set S; is the sum of the out-degree and in-degree of the target enterprise A.
[0187] In one embodiment, the apparatus further comprises:
[0188] The overlap determination module 470 is used to determine the overlap between the enterprise information sets after the to-be-processed enterprise is merged into the target enterprise information set;
[0189] The merging module 480 is used to merge the enterprise information sets whose overlap is greater than the second specified value.
[0190] In one embodiment, the overlap determination module 470 is specifically configured to:
[0191] The overlap degree O is calculated according to the following formula:
[0192]
[0193] Among them, C 1 ,C 2 Represent different enterprise information sets, min(|C 1 |,|C 2 |) represents enterprise information set C 1 and enterprise information set C 2 Enterprise information set with a small number of enterprises.
[0194] In one embodiment, the apparatus further comprises:
[0195] The enterprise transaction data acquisition module 490 is used to acquire the transaction data of each enterprise before acquiring a specified number of target enterprises according to the relevance of each enterprise in response to the enterprise transaction relationship processing instruction;
[0196] The knowledge graph construction module 491 is used to obtain a knowledge graph based on the enterprise transaction relationship according to the transaction data of each enterprise, and store it in a distributed graph database;
[0197] The transaction relationship determination module 492 is used to perform distributed computing on the knowledge graph using the spark component on the distributed system infrastructure Hadoop platform to obtain the transaction relationships of various enterprises that support spark computing.
[0198] After introducing an information processing method and device for enterprise transaction relationship data according to an exemplary embodiment of the present application, next, an electronic device according to another exemplary embodiment of the present application is introduced.
[0199] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.
[0200] In some possible implementations, the electronic device according to the present application may include at least one processor and at least one computer storage medium. The computer storage medium stores program code, and when the program code is executed by the processor, the processor executes the steps of the information processing method for enterprise transaction relationship data according to various exemplary embodiments of the present application described above in this specification. For example, the processor may execute the following steps: Figure 2 Steps 201-202 shown in .
[0201] Refer to the following Figure 5 The electronic device 500 according to this embodiment of the present application is described. Figure 5 The electronic device 500 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0202] like Figure 5 As shown, the electronic device 500 is in the form of a general electronic device. The components of the electronic device 500 may include but are not limited to: at least one processor 501, at least one computer storage medium 502, and a bus 503 connecting different system components (including the computer storage medium 502 and the processor 501).
[0203] Bus 503 represents one or more of several types of bus structures, including a computer storage media bus or computer storage media controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
[0204] The computer storage media 502 may include readable media in the form of volatile computer storage media, such as random access computer storage media (RAM) 521 and / or cache storage media 522 , and may further include read-only computer storage media (ROM) 523 .
[0205] The computer storage medium 502 may also include a program / utility 525 having a set (at least one) of program modules 524, such program modules 524 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0206] The electronic device 500 may also communicate with one or more external devices 505 (e.g., keyboards, pointing devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 500, and / or communicate with any device that enables the electronic device 500 to communicate with one or more other electronic devices (e.g., routers, modems, etc.). This communication may be performed through an input / output (I / O) interface 505. In addition, the electronic device 500 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 506. As shown, the network adapter 506 communicates with other modules for the electronic device 500 through a bus 503. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0207] In some possible implementations, various aspects of an information processing method for enterprise transaction relationship data provided by the present application may also be implemented in the form of a program product, which includes program code. When the program product runs on a computer device, the program code is used to enable the computer device to execute the steps of an information processing method for enterprise transaction relationship data according to various exemplary implementations of the present application described above in this specification.
[0208] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access computer storage medium (RAM), a read-only computer storage medium (ROM), an erasable programmable read-only computer storage medium (EPROM or flash memory), an optical fiber, a portable compact disk read-only computer storage medium (CD-ROM), an optical computer storage medium, a magnetic computer storage medium, or any suitable combination thereof.
[0209] The program product for information processing of enterprise transaction relationship data of the embodiment of the present application can adopt a portable compact disk read-only computer storage medium (CD-ROM) and include program code, and can be run on an electronic device. However, the program product of the present application is not limited to this. In this document, the readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device or device.
[0210] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein readable program code is carried. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium other than a readable storage medium, which may transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0211] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0212] The program code for performing the operation of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages, such as Java, C++, etc., and also conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user electronic device, partially on the user device, as an independent software package, partially on the user electronic device and partially on the remote electronic device, or completely on the remote electronic device or server. In the case of a remote electronic device, the remote electronic device can be connected to the user electronic device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external electronic device (e.g., using an Internet service provider to connect through the Internet).
[0213] It should be noted that, although several modules of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided into multiple modules to be embodied.
[0214] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0215] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk computer storage media, CD-ROM, optical computer storage media, etc.) that contain computer-usable program code.
[0216] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0217] These computer program instructions may also be stored in a computer-readable computer storage medium that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable computer storage medium produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0218] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0219] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for processing information of enterprise transaction relationship data, characterized in that: The method comprises: In response to the enterprise transaction relationship processing instruction, a specified number of target enterprises are obtained according to the relevance of each enterprise; wherein the relevance is proportional to the ratio of the number of specified enterprises of the enterprise to the number of specified enterprises of the neighboring enterprises of the enterprise; the number of specified enterprises is the number of enterprises that provide products to the target enterprise; and the relevance is determined according to the following formula: PR(i) is the relevance of enterprise i, N is the total number of enterprises; d is the damping factor, adj(i) is the set of neighboring enterprises of enterprise i; INi is the in-degree of enterprise i, and the in-degree is the number of enterprises that provide products to enterprise i; is the sum of the in-degrees of the neighboring enterprises of enterprise j, where k represents the kth neighboring enterprise of enterprise j, k∈[1,m]; If each target enterprise is a node in a directed graph, and the transaction relationship of each target enterprise is a vector edge in the directed graph, then the enterprise similarity of each target enterprise is determined according to the cosine similarity and betweenness ratio of the transaction relationship of each enterprise; wherein the enterprise similarity is determined according to the following formula: v i Represents enterprise i, v j Representative company j; represents the cosine similarity between enterprise i and enterprise j, δ is the ratio of betweenness between enterprise i and enterprise j; The betweenness ratio of enterprise i and enterprise j is determined according to the following formula: σ is the total number of shortest paths between any two enterprises in the directed graph; σ(v i ,v j ) is the number of shortest paths between any two enterprises in the directed graph that contain enterprise i and enterprise j; The target enterprises whose enterprise similarity is greater than a first specified value are added to the same enterprise information set, and the target enterprises whose enterprise similarity is less than the first specified value are divided into different enterprise information sets.
2. The method according to claim 1, characterized in that Also includes: Obtaining enterprises outside the union of each enterprise information set as enterprises to be processed; If the change in transaction frequency between enterprises in the target enterprise information set before and after the enterprise to be processed is incorporated into the target enterprise information set is greater than a first specified value, the enterprise to be processed is incorporated into the target enterprise information set.
3. The method according to claim 2, characterized in that Determining the transaction frequency includes: The transaction frequency is determined according to the following formula: Among them, A represents the target enterprise to be incorporated into the enterprise information set S; Represents the sum of the number of connecting edges between target enterprises within the enterprise information set S; represents the sum of the number of connecting edges between each target enterprise in the enterprise information set S and other enterprises outside the enterprise information set S; α is a specified value; K inner (S, A) is the sum of the number of edges connecting the target enterprise A and each target enterprise in the enterprise information set S; It is the sum of the out-degree and in-degree of the target enterprise A. The out-degree is the number of enterprises that purchase products from the target enterprise A, and the in-degree is the number of enterprises that provide products to the target enterprise A.
4. The method according to claim 2, characterized in that: After merging the to-be-processed enterprise into the target enterprise information set, the method further includes: Determine the overlap between the information sets of each enterprise; Merge enterprise information sets whose overlap is greater than the second specified value.
5. The method according to claim 4, characterized in that Determining the overlap between the enterprise information sets includes: The overlap degree O is calculated according to the following formula: Among them, C1 and C2 represent different enterprise information sets respectively, and min(|C1|,|C2|) represents the enterprise information set with fewer enterprises in enterprise information set C1 and enterprise information set C2.
6. The method according to claim 1, characterized in that Before the step of responding to the enterprise transaction relationship processing instruction and acquiring a specified number of target enterprises according to the relevance of each enterprise, the step further includes: Obtain transaction data of each enterprise; Based on the transaction data of each enterprise, a knowledge graph based on the enterprise transaction relationship is obtained and stored in a distributed graph database; The knowledge graph is distributedly computed using spark components on the distributed system infrastructure Hadoop platform to obtain the transaction relationships of various enterprises that support spark computing.
7. An information processing device for enterprise transaction relationship data, characterized in that: The device comprises: A target enterprise acquisition module, for responding to an enterprise transaction relationship processing instruction and acquiring a specified number of target enterprises according to the relevance of each enterprise; An enterprise association determination module, wherein the association is proportional to the ratio of the number of designated enterprises of the enterprise to the number of designated enterprises of the neighboring enterprises of the enterprise; wherein the number of designated enterprises is the number of enterprises that provide products to the target enterprise; The degree of association is determined according to the following formula: Where PR(i) is the relevance of enterprise i, N is the total number of enterprises; d is the damping factor, adj(i) is the set of neighboring enterprises of enterprise i; INi is the in-degree of enterprise i, and the in-degree is the number of enterprises that provide products to enterprise i; is the sum of the in-degrees of the neighboring enterprises of enterprise j, where k represents the kth neighboring enterprise of enterprise j, k∈[1,m]; The enterprise information set determination module is used to determine the enterprise similarity of each target enterprise according to the cosine similarity and betweenness ratio of the transaction relationship of each enterprise if each target enterprise is a node in a directed graph and the transaction relationship of each target enterprise is a vector edge in the directed graph; wherein the enterprise similarity is determined according to the following formula: v i Represents enterprise i, v j Representative company j; represents the cosine similarity between enterprise i and enterprise j, δ is the ratio of betweenness between enterprise i and enterprise j; The betweenness ratio of enterprise i and enterprise j is determined according to the following formula: σ is the total number of shortest paths between any two enterprises in the directed graph; σ(v i ,v j ) is the number of shortest paths between any two enterprises in the directed graph that contain enterprise i and enterprise j; The target enterprises whose enterprise similarity is greater than a first specified value are added to the same enterprise information set, and the target enterprises whose enterprise similarity is less than the first specified value are divided into different enterprise information sets.
8. The device according to claim 7, characterized in that The device also includes: A module for obtaining enterprises to be processed is used to obtain enterprises other than the union of the enterprise information sets as enterprises to be processed; The merging module is used to merge the enterprise to be processed into the target enterprise information set if the change in transaction frequency between enterprises in the target enterprise information set before and after the enterprise to be processed is merged into the target enterprise information set is greater than a first specified value.
9. The device according to claim 8, characterized in that The device also includes: The transaction frequency determination module is used to determine the transaction frequency according to the following formula: Among them, A represents the target enterprise to be incorporated into the enterprise information set S; Represents the sum of the number of connecting edges between target enterprises within the enterprise information set S; represents the sum of the number of connecting edges between each target enterprise in the enterprise information set S and other enterprises outside the enterprise information set S; α is a specified value; K inner (S, A) is the sum of the number of edges connecting the target enterprise A and each target enterprise in the enterprise information set S; is the sum of the out-degree and in-degree of the target enterprise A.
10. The device according to claim 8, characterized in that The device also includes: An overlap determination module, used to determine the overlap between the enterprise information sets after merging the to-be-processed enterprise into the target enterprise information set; The merging module is used to merge the enterprise information sets whose overlap is greater than a second specified value.
11. The device according to claim 10, characterized in that The overlap determination module is specifically used for: The overlap degree O is calculated according to the following formula: Among them, C1 and C2 represent different enterprise information sets respectively, and min(|C1|,|C2|) represents the enterprise information set with fewer enterprises in enterprise information set C1 and enterprise information set C2.
12. The device according to claim 7, characterized in that The device also includes: An enterprise transaction data acquisition module, configured to acquire transaction data of each enterprise before acquiring a specified number of target enterprises according to the relevance of each enterprise in response to the enterprise transaction relationship processing instruction; The knowledge graph construction module is used to obtain a knowledge graph based on the enterprise transaction relationship according to the transaction data of each enterprise, and store it in a distributed graph database; The transaction relationship determination module is used to perform distributed computing on the knowledge graph using the spark component on the distributed system infrastructure Hadoop platform to obtain the transaction relationships of various enterprises that support spark computing.
13. An electronic device, characterized in that: It comprises at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor; and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1-6.
14. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and the computer program is used to execute the method according to any one of claims 1-6.
