Service network community detection method based on multi-scale mutual information
Through the method of multi-scale node feature learning and community label prediction in latent space, the problem of existing technology being difficult to meet the community detection needs of different service networks at the same time is solved, and high-precision community detection is achieved.
Patent Information
- Application Number
- CN202411886169.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-12-20
AI Technical Summary
The existing community detection algorithms are difficult to meet the specific needs of different types of service networks at the same time, and cannot effectively identify node communities in the service network with tight internal connections but weak external connections.
A service network community detection method based on multi-scale mutual information is used to learn node features at multiple information scales in the latent space, extract latent space node feature data, and predict community labels through a community label classifier to achieve node feature data in Interactive information maximization at multiple information scale levels.
This method is compatible with the specific community detection requirements of different service networks, ensures that the distance between network nodes belonging to the same community is minimized in the latent space, and improves the accuracy of community detection.
Smart Images

Figure CN119337259A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data processing technology, and in particular to a service network community detection method based on multi-scale mutual information. Background Art
[0002] With the development of modern service industries, service industries have become increasingly complex and diversified. They are no longer simply one-way dependent relationships with primary industries (e.g., agriculture, fisheries, etc.) and secondary industries (e.g., mining, manufacturing, etc.), but rather complex and coupled interaction relationships. Therefore, the service networks of various service industries (e.g., transportation, catering, tourism, etc.) have gradually begun to show a trend of complex connections of all elements and have non-Euclidean topological structures. Among them, a generalized complex service network can include node elements such as service sites, resources, supply stations, users, manufacturers, and delivery centers, and through various connection forms between numerous node elements, a service network topological structure containing attribute information is jointly constructed.
[0003] In today's digital and complex development context, various service industries often have a large amount of multi-source, heterogeneous, redundant, and sparse general service data. At the same time, because the service industry is highly related to the primary and secondary industries and information is coupled, there are complex interaction relationships between the various network nodes in the corresponding service network that are difficult to decouple, making it difficult for traditional model-driven methods to meet the data processing needs of today's service networks in perception, decision-making, planning, control and other aspects.
[0004] For any service network, the task of detecting the community of network nodes is an important task in the perception link of the corresponding service network. It can identify the node communities with tight internal connections but weak external connections in the corresponding service network, so as to effectively locate the network nodes with similar service requirements or operating habits in the corresponding service network, and make it easier to make expected decisions for each network node. However, it is worth noting that the community detection algorithms currently used in the industry often rely on the topological structure characteristics of the service network, and adaptive adjustments at the algorithm level are required for different types of service networks, which cannot simultaneously meet the specific community detection needs of different service networks. Summary of the invention
[0005] In view of this, the purpose of the present application is to provide a service network community detection method based on multi-scale mutual information, which can perform node feature learning on the service network to be detected in the latent space by considering multiple information scales, so as to extract latent space node feature data that can maintain the interaction information maximization effect at multiple information scale levels with the service network node feature data before learning for community label prediction, so that each network node belonging to the same community can achieve the effect of minimizing the latent space distance, so as to be compatible with the specific community detection needs of different service networks from a data-driven perspective, and effectively ensure the accuracy of community detection.
[0006] In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows: In a first aspect, the present application provides a service network community detection method based on multi-scale mutual information, the method comprising: Obtain the actual graph structure data of the service network to be tested; Calling a latent space node feature extraction model to perform multi-scale mutual information learning on the actual graph structure data, and obtaining target latent space node feature data that satisfies the multi-scale mutual information maximization requirement with the actual graph structure data; The community label classifier is called to perform community label prediction based on the target latent space node feature data to obtain the actual community classification result of the service network to be detected.
[0007] In an optional embodiment, the method further comprises: Acquire original graph structure data and perturbed graph structure data of the sample service network, and determine the target local second-order neighborhood of each of all sample network nodes in the sample service network according to the original graph structure data; Initialize a feature learning encoder, a global-single node perception unit, and a local-single node perception unit, and call the feature learning encoder to perform node feature learning on the original graph structure data and the perturbed graph structure data in a latent space, respectively, to obtain original latent space node feature data and perturbed latent space node feature data; Calling the global-single node perception unit, calculating the reference global node feature based on the original latent space node feature data, and performing latent space inner distance measurement on the original latent space node feature data and the perturbed latent space node feature data with the reference global node feature, respectively, to obtain the original global-single node measurement result and the perturbed global-single node measurement result; Calling the local-single node perception unit, performing latent space feature fitting based on the original latent space node feature data and the target local second-order neighborhoods of all the sample network nodes to obtain local fitting feature data, and performing latent space inner distance measurement on the original latent space node feature data and the perturbed latent space node feature data with the local fitting feature data, respectively, to obtain the original local-single node measurement result and the perturbed local-single node measurement result; According to the original global-single-node measurement result, the perturbed global-single-node measurement result, the original local-single-node measurement result and the perturbed local-single-node measurement result, with the purpose of minimizing the target mutual information loss function, the feature learning encoder, the global-single-node perception unit and the local-single-node perception unit are jointly trained by back propagation; wherein the target mutual information loss function is obtained by superimposing the global-single-node mutual information loss function and the local-single-node mutual information loss function, the global-single-node mutual information loss function is associated with the original global-single-node measurement result and the perturbed global-single-node measurement result, and the local-single-node mutual information loss function is associated with the original local-single-node measurement result and the perturbed local-single-node measurement result; The trained feature learning encoder is used as the latent space node feature extraction model.
[0008] In an optional implementation, the step of determining the target local second-order neighborhood of each of all sample network nodes in the sample service network according to the original graph structure data includes: For each sample network node, construct an initial local second-order neighborhood of the sample network node based on the original graph structure data; Performing node appearance frequency statistics on the initial local second-order neighborhood to obtain actual node frequencies of all clustered network nodes existing in the initial local second-order neighborhood; Obtaining the node importance of each of the clustered network nodes at the original graph structure data, and calculating the initial sampling probability of each of the clustered network nodes according to the actual node frequency and node importance of each of the clustered network nodes; Performing probability value distribution correction on the initial sampling probabilities of all the aggregated network nodes to obtain effective sampling probabilities of all the aggregated network nodes; According to the respective effective sampling probabilities of all the clustered network nodes, target network nodes whose corresponding effective sampling probabilities obey Bernoulli sampling distribution are selected to construct a node set, and a target local second-order neighborhood of the sample network node is obtained.
[0009] In an optional embodiment, the sample service network The initial local second-order neighborhood of a sample network node is constructed using the following formula: ; in, It is used to represent the first Sample network nodes The initial local second-order neighborhood of Used to indicate the The neighbor node set of the sample network node, Used to represent a set of neighbor nodes The Neighboring network nodes The corresponding neighbor node set, Used to express Performs set union operation.
[0010] In an optional embodiment, the sample service network The sample network nodes correspond to The initial sampling probability of the clustered network nodes is calculated using the following formula: ; in, It is used to represent the first The sample network nodes correspond to Aggregate network nodes The initial sampling probability is It is used to represent the first The initial local second-order neighborhood of sample network nodes, Used to indicate the Aggregate network nodes In the said The actual node frequency in the initial local second-order neighborhood of the sample network node, Used to indicate the Aggregate network nodes The importance of the nodes at the original graph structure data, Used to represent exponential functions.
[0011] In an optional implementation, the reference global node feature is calculated using the following formula: ; in, for representing the reference global node feature, It is used to represent the total number of network nodes involved in the original latent space node feature data, For representing the first The latent space node features of network nodes.
[0012] In an optional embodiment, the local fitting feature data includes the local fitting features of the latent space of each of the sample network nodes, and the step of performing latent space feature fitting based on the original latent space node feature data and the target local second-order neighborhood of each of the sample network nodes to obtain the local fitting feature data includes: For each sample network node, a set union operation is performed on the sample network node, the set of neighbor nodes of the sample network node, and the target local second-order neighborhood to obtain a corresponding set of associated network nodes; The feature mean is calculated for the latent space node features corresponding to each of all associated network nodes in the associated network node set in the original latent space node feature data to obtain the latent space local fitting features of the sample network node.
[0013] In an optional embodiment, the sample service network The latent space local fitting features of a sample network node are calculated using the following formula: ; in, It is used to represent the first The latent space local fitting features of sample network nodes, It is used to represent the first The associated network node set of sample network nodes, Used to indicate the The total number of network nodes in the associated network node set of the sample network node, Used to indicate the The associated network node set of the sample network node Associated network nodes Latent space node features at the original latent space node feature data.
[0014] In an optional implementation, the global-single node mutual information loss function is expressed by the following formula: ; in, It is used to represent the global-single node mutual information loss function, It is used to represent the total number of network nodes involved in the original latent space node feature data, It is used to represent the total number of network nodes involved in the disturbance latent space node feature data, For representing the original graph structure data, For representing the perturbation graph structure data, It is used to represent the mathematical expectation function of the original graph structure data. is used to represent the mathematical expectation function of the perturbation graph structure data, for representing the reference global node feature, For representing the first The latent space node features of network nodes, It is used to represent the first The latent space node features of network nodes, For representing the first The original global-individual node measurement result of the latent space node features of the network nodes relative to the reference global node features, It is used to represent the first The perturbed global-individual node metric results of the latent space node features of the network nodes relative to the reference global node features.
[0015] In an optional implementation, the local-single node mutual information loss function is expressed by the following formula: ; in, It is used to represent the local-single node mutual information loss function, It is used to represent the total number of network nodes involved in the original latent space node feature data, It is used to represent the total number of network nodes involved in the disturbance latent space node feature data, For representing the original graph structure data, For representing the perturbation graph structure data, It is used to represent the mathematical expectation function of the original graph structure data. is used to represent the mathematical expectation function of the perturbation graph structure data, For representing the first The latent space node features of network nodes, It is used to represent the first The latent space node features of network nodes, It is used to represent the first The latent space local fitting features of sample network nodes, For representing the first The latent space node features of the network nodes are consistent with the The original local-single node measurement result between the latent space local fitting features of the sample network nodes, It is used to represent the first The latent space node features of the network nodes are consistent with the The perturbation local-single node measurement result between the latent space local fitting features of the sample network nodes.
[0016] In this case, the beneficial effects of the embodiments of the present application may include the following: The present application targets the actual graph structure data of the service network to be detected. By calling the latent space node feature extraction model, the actual graph structure data of the service network to be detected is subjected to node feature learning in the latent space taking into account multiple information scales, so as to extract target latent space node feature data that can maintain the interaction information maximization effect with the service network node feature data in the actual graph structure data at multiple information scale levels. Then, the community label classifier is called to perform community label prediction based on the target latent space node feature data to obtain the actual community classification result of the service network to be detected, so that each network node that is attributed to the same community in the actual community classification result can achieve the effect of minimizing the latent space distance, so as to be compatible with the specific community detection needs of different service networks from a data-driven perspective and effectively ensure the accuracy of community detection.
[0017] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A schematic diagram of the composition of a computer device provided in an embodiment of the present application; Figure 2 One of the flow diagrams of the service network community detection method based on multi-scale mutual information provided in the embodiment of the present application; Figure 3 The second flowchart of the service network community detection method based on multi-scale mutual information provided in the embodiment of the present application; Figure 4 for Figure 3Schematic diagram of the flow chart of the sub-steps included in step S310. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0021] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0022] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0023] In the description of the present application, it should be understood that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, or are the orientations or positional relationships in which the product of the application is conventionally placed when in use, or are the orientations or positional relationships conventionally understood by those skilled in the art. They are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0024] In the description of this application, it should also be noted that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0025] In addition, in the description of the present application, it is understood that the relational terms such as the term "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also includes other elements that are not clearly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements defined by the sentence "comprise one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood by specific circumstances.
[0026] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0027] Please refer to Figure 1 , Figure 1 : is a schematic diagram of the composition of the computer device 10 provided in the embodiment of the present application. In the embodiment of the present application, the computer device 10 can obtain the actual graph structure data of the service network of any service industry type, and perform network node feature learning based on the actual graph structure data obtained in the latent space considering multiple information scales (including the single node representation scale, the surrounding node fitting representation scale and the network global representation scale) from a data-driven perspective, so that the corresponding learned latent space node feature data can maintain the interaction information maximization effect with the service network node feature data in the actual graph structure data at multiple information scale levels, and then in the network community classification results predicted based on the learned latent space node feature data, ensure that each network node belonging to the same community can achieve the effect of minimizing the latent space distance, so as to provide a network community detection solution that is compatible with the specific community detection needs of different service networks and has high detection accuracy from a data-driven perspective.
[0028] In this process, the actual graph structure data includes the feature matrix and adjacency matrix of the corresponding service network. The feature matrix can be The adjacency matrix can be expressed as The characteristic matrix is represented by the vector length of all network nodes in the corresponding service network. The node feature vector of is composed of, and the adjacency matrix is used to represent the connection relationship between all network nodes and other network nodes in the corresponding service network, where It is used to represent the total number of network nodes of the corresponding service network. At this time, the service network node feature data in the actual graph structure data can be directly represented by the feature matrix, and the corresponding learned latent space node feature data can be represented by To express, For the corresponding service network The hidden space node characteristics of a network node; the arbitrary service industry type can be, but not limited to, transportation industry, catering industry, tourism industry, etc.; the computer device 10 can be, but not limited to, laptop computers, personal computers, servers and other computing devices.
[0029] In the embodiment of the present application, the computer device 10 may include a memory 11, a processor 12 and a communication unit 13. The memory 11, the processor 12 and the communication unit 13 are electrically connected to each other directly or indirectly to achieve data transmission or interaction.
[0030] In this embodiment, the memory 11 is used to store a computer program, and the processor 12 can execute the computer program accordingly after receiving the execution instruction. In addition, the memory 11 is also used to store a latent space node feature extraction model, wherein the latent space node feature extraction model can be compatible with the specific community detection requirements of different service networks from a data-driven perspective, and can perform node feature learning on any service network in a latent space considering multiple information scales to extract the latent space node feature data of the corresponding service network that meets the multi-scale mutual information maximization requirements (that is, the service network node feature data of the corresponding service network before learning maintains the interaction information maximization effect at multiple information scale levels), thereby realizing the multi-scale mutual information learning function for any service network, wherein the latent space node feature extraction model can be implemented using a feature learning encoder. At the same time, the memory 11 is also used to store community label classifiers corresponding to multiple service network types, wherein each service network type corresponds to a service industry type, and all the labelable community labels pre-configured by a single community label classifier belong to the same service industry type, and the labelable community labels corresponding to different service industry types can be partially the same or completely different.
[0031] In this embodiment, the communication unit 13 is used to establish a communication connection between the computer device 10 and other electronic devices through a network, and to send and receive data through the network, wherein the network includes a wired communication network and a wireless communication network. For example, the computer device 10 can obtain the actual graph structure data of a service network that needs to perceive the distribution status of internal communities through the communication unit 13, so as to perform high-precision network community perception based on the obtained actual graph structure data.
[0032] In this embodiment, the computer device 10 may pre-store a specific computer program related to the service network community detection function in the memory 11, and drive the processor 12 to execute the specific computer program stored in the memory 11, thereby providing a network community detection solution that is compatible with the specific community detection requirements of different service networks from a data-driven perspective, so as to utilize the provided network community detection solution to ensure that each network node belonging to the same community achieves the effect of minimizing the latent space distance in the network community classification results of any service network, thereby achieving high-precision network community detection operations for any service network.
[0033] Understandably, Figure 1 The block diagram shown is only a schematic diagram of a composition of the computer device 10. The computer device 10 may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0034] In the present application, in order to ensure that the computer device 10 can provide a network community detection solution that is compatible with the specific community detection requirements of different service networks and has high detection accuracy from a data-driven perspective, so as to achieve high-precision network community detection operations for any service network, the present embodiment of the application provides a service network community detection method based on multi-scale mutual information to achieve the above-mentioned purpose. The service network community detection method based on multi-scale mutual information provided by the present application is described in detail below.
[0035] Please refer to Figure 2 , Figure 2 This is one of the flow charts of the service network community detection method based on multi-scale mutual information provided in the embodiment of the present application. In the embodiment of the present application, Figure 2 The service network community detection method shown may include steps S210 to S230.
[0036] Step S210, obtaining actual graph structure data of the service network to be detected.
[0037] In this embodiment, the service network to be detected is a service network that needs to perceive the distribution of internal communities; the actual graph structure data includes the actual feature matrix and the actual adjacency matrix of the service network to be detected, and the actual feature matrix is composed of all network nodes in the service network to be detected, each of which has a preset vector length (for example, the vector length in the above text). ), the actual node feature vector of the actual adjacency matrix is used to represent the actual connection relationship between all network nodes in the service network to be detected and other network nodes respectively, and the actual feature matrix is the service network node feature data in the actual graph structure data.
[0038] Step S220, calling the latent space node feature extraction model to perform multi-scale mutual information learning on the actual graph structure data, and obtaining target latent space node feature data that meets the multi-scale mutual information maximization requirement with the actual graph structure data.
[0039] In this embodiment, for conventional network community detection operations, it is first necessary to determine the node feature information representation of each service node in the service network in the latent space, and then measure the distance between the node feature information representation of each network node in the latent space, so that the network nodes that meet the specific distance conditions can be classified into the same network community, ensuring that the latent space distance between multiple network nodes in the same network community is minimized. Therefore, for any service network, the problem of minimizing the internal latent space distance of a single network community is the core research direction to ensure the universality of the network community detection solution from the data-driven level, and the solution to this problem can essentially be transformed into solving the problem of maximizing the mutual information between the service network node feature data and the latent space node feature information representation (i.e., latent space node feature data).
[0040] In order to ensure that the determined latent space node feature information representation has sufficiently strong data validity, the latent space node feature extraction model provided in the present application will comprehensively consider the individual node representation scale, the surrounding node fitting representation scale and the network global representation scale in the latent space, and perform multi-scale node feature learning on the actual graph structure data of the service network to be detected, so as to ensure that the extracted target latent space node feature data can maintain the overall interaction information maximization effect with the service network node feature data in the actual graph structure data at multiple information scale levels, thereby realizing the multi-scale mutual information learning function of the service network to be detected at the data-driven level.
[0041] Step S230 , calling the community label classifier to perform community label prediction based on the target latent space node feature data, and obtaining the actual community classification result of the service network to be detected.
[0042] In this embodiment, when the target latent space node feature data of the service network to be detected is determined, the actual service network type of the service network to be detected can be identified, and then according to the service network type identification result, the community label classifiers corresponding to the multiple service network types stored in the memory 11 are searched for the target community label classifier that actually matches the service network to be detected, and then the target community label classifier is called to perform label feature classification processing on the target latent space node feature data of the service network to be detected according to the pre-configured annotable community label, so as to obtain the actual community classification result of the service network to be detected, so that the network nodes belonging to the same community in the actual community classification result can achieve the effect of minimizing the latent space distance, so as to ensure the accuracy of community detection.
[0043] Therefore, the present application can provide a network community detection solution that is compatible with the specific community detection requirements of different service networks from a data-driven perspective by executing the above steps S210 to S230, and use the provided network community detection solution to ensure that each network node that is attributed to the same community in the network community classification results of any service network can achieve the effect of minimizing the latent space distance, thereby realizing high-precision network community detection operations.
[0044] Optionally, see Figure 3 , Figure 3 This is a second flow chart of the service network community detection method based on multi-scale mutual information provided in the embodiment of the present application. Figure 2 Compared with the service network community detection method shown in Figure 4 The service network community detection method shown may also include steps S310 to S360, so as to utilize a feature learning encoder to train a latent space node feature extraction model that is compatible with the specific community detection requirements of different service networks, and enable the latent space node feature extraction model to achieve multi-scale mutual information maximization effect of node feature learning for any service network from a data-driven perspective.
[0045] Step S310: acquiring original graph structure data and perturbed graph structure data of the sample service network, and determining target local second-order neighborhoods of all sample network nodes in the sample service network according to the original graph structure data.
[0046] In this embodiment, the sample service network is a reference service network of any service network type, the original graph structure data is the positive sample data of the corresponding sample service network, and the perturbed graph structure data is the negative sample data of the corresponding sample service network. The original graph structure data includes the original feature matrix and the original adjacency matrix of the corresponding sample service network, and the original feature matrix is composed of all sample network nodes in the corresponding sample service network with a preset vector length (for example, the vector length in the above text). ), the original adjacency matrix is used to represent the original node connection relationship between all sample network nodes in the corresponding sample service network and other sample network nodes; the perturbation graph structure data is constructed on the basis of the original graph structure data through at least one of the perturbation operations such as network node removal, connection edge removal, connection edge addition, feature matrix modification, etc., and the perturbation network node composition involved in the perturbation graph structure data is a non-empty subset of the sample network node composition of the original graph structure data.
[0047] After the original graph structure data of the sample service network is obtained, the target local second-order neighborhood of each sample network node in the sample service network can be determined for all sample network nodes in the sample service network from the perspective of the surrounding node fitting representation scale, so as to fit and represent the node features of the corresponding sample network node based on the node features of each network node in the target local second-order neighborhood based on the message passing mechanism.
[0048] Optionally, in an implementation of this embodiment, the target local second-order neighborhood of each sample network node in the sample service network may be represented by the initial local second-order neighborhood of the corresponding sample network node. The initial local second-order neighborhood of a sample network node can be constructed using the following formula: ; in, It is used to represent the first Sample network nodes The initial local second-order neighborhood of Used to indicate the The neighbor node set of the sample network node, Used to represent a set of neighbor nodes The Neighboring network nodes The corresponding neighbor node set, Used to express A set union operation is performed, where the same network node can appear multiple times within a single initial local second-order neighborhood.
[0049] Optionally, see Figure 4 , Figure 4 yes Figure 3 Flow chart of the sub-steps included in step S310 of the embodiment. In another implementation of the present embodiment, in order to effectively reduce the amount of calculation of any sample network node in the process of fitting and characterizing surrounding node features, the step of "determining the target local second-order neighborhood of all sample network nodes in the sample service network according to the original graph structure data" in step S310 may include sub-steps S311 to S315, so as to ensure that the target local second-order neighborhood of each sample network node only records the aggregation network nodes that have a greater impact on the sample network node (i.e., the network nodes indirectly connected to the sample network node), thereby reducing the unnecessary amount of calculation in the subsequent surrounding node feature fitting and characterization process.
[0050] Sub-step S311, for each sample network node, construct an initial local second-order neighborhood of the sample network node based on the original graph structure data.
[0051] Among them, the sample service network The initial local second-order neighborhood of a sample network node can be constructed using the following formula: ; in, It is used to represent the first Sample network nodes The initial local second-order neighborhood of Used to indicate the The neighbor node set of the sample network node, Used to represent a set of neighbor nodes The Neighboring network nodes The corresponding neighbor node set, Used to express Performs set union operation.
[0052] Sub-step S312, performing node appearance frequency statistics on the initial local second-order neighborhood to obtain the actual node frequencies of all clustered network nodes existing in the initial local second-order neighborhood.
[0053] Sub-step S313, obtaining the node importance of each of the clustered network nodes at the original graph structure data, and calculating the initial sampling probability of each of the clustered network nodes according to the actual node frequency and node importance of each of the clustered network nodes.
[0054] For any sample network node, any one of the importance evaluation algorithms such as degree centrality algorithm, betweenness centrality algorithm, K-Shell algorithm, PageRank algorithm, etc. can be used to calculate the node importance of all clustered network nodes in the initial local second-order neighborhood of the sample network node, and obtain the node importance of all clustered network nodes at the original graph structure data. For a sample network node, the corresponding The initial sampling probability of the clustered network nodes is calculated using the following formula: ; in, It is used to represent the first The sample network nodes correspond to Aggregate network nodes The initial sampling probability is It is used to represent the first The initial local second-order neighborhood of sample network nodes, Used to indicate the Aggregate network nodes In the said The actual node frequency in the initial local second-order neighborhood of the sample network node, Used to indicate the Aggregate network nodes The importance of the nodes at the original graph structure data, Used to represent exponential functions.
[0055] Sub-step S314, performing probability value distribution correction on the initial sampling probabilities of all the aggregated network nodes to obtain the effective sampling probabilities of all the aggregated network nodes.
[0056] Among them, when the initial sampling probability corresponding to a certain aggregation network node exceeds 1, the effective adoption probability corresponding to the aggregation network node is 1; and when the initial sampling probability corresponding to a certain aggregation network node is less than or equal to 1, the effective adoption probability corresponding to the aggregation network node is the initial sampling probability.
[0057] Sub-step S315, according to the effective sampling probabilities of all clustered network nodes, select the target network node whose corresponding effective sampling probability obeys the Bernoulli sampling distribution to construct the node set, and obtain the target local second-order neighborhood of the sample network node.
[0058] Therefore, the present application can execute the above sub-steps S211 to S215 so that the target local second-order neighborhood of each sample network node in the sample service network only records the clustered network nodes that have a greater impact on the sample network node, so as to reduce the unnecessary calculation amount in the subsequent surrounding node feature fitting characterization process for the sample network node.
[0059] Step S320, initialize the feature learning encoder, the global-single node perception unit and the local-single node perception unit, and call the feature learning encoder to perform node feature learning on the original graph structure data and the perturbed graph structure data in the latent space, respectively, to obtain the original latent space node feature data and the perturbed latent space node feature data.
[0060] In this embodiment, the original latent space node feature data corresponds to the original graph structure data, and the perturbed latent space node feature data corresponds to the perturbed graph structure data.
[0061] In this embodiment, for the latent space node feature extraction model, since the essence of "minimizing the internal latent space distance of a single network community" is mutually transformed with "maximizing the mutual information between the service network node feature data and the latent space node feature information representation (i.e., latent space node feature data)", in the process of training the latent space node feature extraction model using the feature learning encoder, a global-single-node perception unit and a local-single-node perception unit that can measure the node latent space distance at multiple scales can be introduced for joint training. By minimizing the target mutual information loss function directly related to the "minimizing the internal latent space distance of a single network community", the finally trained latent space node feature extraction model can maintain the multi-scale mutual information maximization effect.
[0062] Among them, both the global-single node perception unit and the local-single node perception unit can be implemented by a multi-layer perceptron (Multi-Layer Perceptron, MLP), the global-single node perception unit can measure the inner distance between the node feature information representations in the latent space from the perspective of the single node representation scale and the global network representation scale, and the local-single node perception unit can measure the inner distance between the node feature information representations in the latent space from the perspective of the single node representation scale and the surrounding node fitting representation scale; the target mutual information loss function is constructed based on the Jason-Shannon divergence formula based on the internal distance measurement results of the global-single node perception unit and the local-single node perception unit, so that the "internal latent space distance minimization problem of a single network community" can be intuitively expressed as a function minimization problem of the target mutual information loss function. In other words, the multi-scale mutual information maximization problem of the latent space node feature extraction model during node feature learning is converted into a "function minimization problem of the target mutual information loss function".
[0063] Step S330, calling the global-single node perception unit, calculating the reference global node features based on the original latent space node feature data, and performing latent space inner distance measurement on the original latent space node feature data and the perturbed latent space node feature data with the reference global node features, respectively, to obtain the original global-single node measurement result and the perturbed global-single node measurement result.
[0064] In this embodiment, the global-single node perception unit can perform global feature fitting on the original latent space node feature data of the sample service network from the global representation scale of the network to obtain the reference global node features of the sample service network in the latent space, and then perform latent space internal distance measurement on the latent space node features of all sample network nodes in the original latent space node feature data with the reference global node features to obtain the original global-single node measurement results of all sample network nodes, and at the same time, perform latent space internal distance measurement on the latent space node features of all perturbed network nodes in the perturbed latent space node feature data with the reference global node features to obtain the perturbed global-single node measurement results of all perturbed network nodes, so as to achieve the node latent space distance measurement effect by comprehensively considering the single node representation scale and the network global representation scale.
[0065] In this process, the reference global node feature can be calculated using the following formula: ; in, for representing the reference global node feature, It is used to represent the total number of network nodes involved in the original latent space node feature data, For representing the first The latent space node features of network nodes.
[0066] Step S340, calling the local-single node perception unit, performing latent space feature fitting based on the original latent space node feature data and the target local second-order neighborhood of all sample network nodes, obtaining local fitting feature data, and performing latent space inner distance measurement on the original latent space node feature data and the perturbed latent space node feature data with the local fitting feature data, respectively, to obtain the original local-single node measurement result and the perturbed local-single node measurement result.
[0067] In this embodiment, the local fitting feature data includes the local fitting features of the latent space of all sample network nodes in the sample service network; for each sample network node in the sample service network, the local-single node perception unit can start from the surrounding node fitting representation scale, and obtain the local fitting features of the sample network node in the surrounding node fitting representation scale by performing information fitting representation on the latent space node feature information representation of the surrounding network nodes associated with the sample network node. The local-single node perception unit can perform latent space inner distance measurement on the latent space node features of all sample network nodes in the original latent space node feature data with the latent space local fitting features of all sample network nodes, and obtain the original local-single node measurement results of all sample network nodes relative to the local fitting feature data, and at the same time, perform latent space inner distance measurement on the latent space node features of all perturbed network nodes in the perturbed latent space node feature data with the latent space local fitting features of all sample network nodes, and obtain the perturbed local-single node measurement results of all perturbed network nodes relative to the local fitting feature data, so as to realize the node latent space distance measurement effect by comprehensively considering the single node representation scale and the surrounding node fitting representation scale.
[0068] In this process, for the sample service network, the step of "performing latent space feature fitting based on the original latent space node feature data and the target local second-order neighborhoods of all sample network nodes to obtain local fitting feature data" may include: For each sample network node, a set union operation is performed on the sample network node, the set of neighbor nodes of the sample network node, and the target local second-order neighborhood to obtain a corresponding set of associated network nodes; The feature mean is calculated for the latent space node features corresponding to each of all associated network nodes in the associated network node set in the original latent space node feature data to obtain the latent space local fitting features of the sample network node.
[0069] Among them, the sample service network The latent space local fitting features of a sample network node are calculated using the following formula: ; in, It is used to represent the first The latent space local fitting features of sample network nodes, It is used to represent the first The associated network node set of sample network nodes, Used to indicate the The total number of network nodes in the associated network node set of the sample network node, Used to indicate the The associated network node set of the sample network node Associated network nodes Latent space node features at the original latent space node feature data.
[0070] Step S350, based on the original global-single-node measurement results, the perturbed global-single-node measurement results, the original local-single-node measurement results and the perturbed local-single-node measurement results, with the purpose of minimizing the target mutual information loss function, the feature learning encoder, the global-single-node perception unit and the local-single-node perception unit are jointly trained by back propagation.
[0071] In this embodiment, the target mutual information loss function is obtained by superimposing a global-single node mutual information loss function and a local-single node mutual information loss function; the global-single node mutual information loss function is associated with the original global-single node measurement result and the perturbed global-single node measurement result, and the global-single node mutual information loss function is constructed based on the Jason-Shannong divergence formula by the inner distance measurement result of the global-single node perception unit, and can intuitively express the "internal latent space distance minimization problem of a single network community at the single node representation scale and the network global representation scale" as a function minimization problem of the global-single node mutual information loss function; the local-single node mutual information loss function is associated with the original local-single node measurement result and the perturbed local-single node measurement result, and the local-single node mutual information loss function is constructed based on the Jason-Shannong divergence formula by the inner distance measurement result of the local-single node perception unit, and can intuitively express the "internal latent space distance minimization problem of a single network community at the single node representation scale and the surrounding node fitting representation scale" as a function minimization problem of the local-single node mutual information loss function.
[0072] In this process, the global-single node mutual information loss function is expressed as follows: ; in, It is used to represent the global-single node mutual information loss function, It is used to represent the total number of network nodes involved in the original latent space node feature data, It is used to represent the total number of network nodes involved in the disturbance latent space node feature data, For representing the original graph structure data, For representing the perturbation graph structure data, It is used to represent the mathematical expectation function of the original graph structure data. is used to represent the mathematical expectation function of the perturbation graph structure data, for representing the reference global node feature, For representing the first The latent space node features of network nodes, It is used to represent the first The latent space node features of network nodes, For representing the first The original global-individual node measurement result of the latent space node features of the network nodes relative to the reference global node features, It is used to represent the first The perturbed global-individual node metric results of the latent space node features of the network nodes relative to the reference global node features.
[0073] In addition, the local-single node mutual information loss function is expressed by the following formula: ; in, It is used to represent the local-single node mutual information loss function, It is used to represent the total number of network nodes involved in the original latent space node feature data, It is used to represent the total number of network nodes involved in the disturbance latent space node feature data, For representing the original graph structure data, For representing the perturbation graph structure data, It is used to represent the mathematical expectation function of the original graph structure data. is used to represent the mathematical expectation function of the perturbation graph structure data, For representing the first The latent space node features of network nodes, It is used to represent the first The latent space node features of network nodes, It is used to represent the first The latent space local fitting features of sample network nodes, For representing the first The latent space node features of the network nodes are consistent with the The original local-single node measurement result between the latent space local fitting features of the sample network nodes, It is used to represent the first The latent space node features of the network nodes are consistent with the The perturbation local-single node measurement result between the latent space local fitting features of the sample network nodes.
[0074] Step S360, using the trained feature learning encoder as a latent space node feature extraction model.
[0075] Therefore, the present application can execute the above steps S310 to S360, and use the feature learning encoder to train a latent space node feature extraction model that is compatible with the specific community detection needs of different service networks, and enable the latent space node feature extraction model to achieve multi-scale mutual information maximization effect of node feature learning for any service network from a data-driven perspective.
[0076] The above are only various implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A service network community detection method based on multi-scale mutual information, characterized in that: The method comprises: Obtain the actual graph structure data of the service network to be tested; Calling a latent space node feature extraction model to perform multi-scale mutual information learning on the actual graph structure data, and obtaining target latent space node feature data that satisfies the multi-scale mutual information maximization requirement with the actual graph structure data; The community label classifier is called to perform community label prediction based on the target latent space node feature data to obtain the actual community classification result of the service network to be detected.
2. The method according to claim 1, characterized in that The method further comprises: Acquire original graph structure data and perturbed graph structure data of the sample service network, and determine the target local second-order neighborhood of each of all sample network nodes in the sample service network according to the original graph structure data; Initialize a feature learning encoder, a global-single node perception unit, and a local-single node perception unit, and call the feature learning encoder to perform node feature learning on the original graph structure data and the perturbed graph structure data in a latent space, respectively, to obtain original latent space node feature data and perturbed latent space node feature data; Calling the global-single node perception unit, calculating the reference global node feature based on the original latent space node feature data, and performing latent space inner distance measurement on the original latent space node feature data and the perturbed latent space node feature data with the reference global node feature, respectively, to obtain the original global-single node measurement result and the perturbed global-single node measurement result; Calling the local-single node perception unit, performing latent space feature fitting based on the original latent space node feature data and the target local second-order neighborhoods of all the sample network nodes to obtain local fitting feature data, and performing latent space inner distance measurement on the original latent space node feature data and the perturbed latent space node feature data with the local fitting feature data, respectively, to obtain the original local-single node measurement result and the perturbed local-single node measurement result; According to the original global-single-node measurement result, the perturbed global-single-node measurement result, the original local-single-node measurement result and the perturbed local-single-node measurement result, with the purpose of minimizing the target mutual information loss function, the feature learning encoder, the global-single-node perception unit and the local-single-node perception unit are jointly trained by back propagation; wherein the target mutual information loss function is obtained by superimposing the global-single-node mutual information loss function and the local-single-node mutual information loss function, the global-single-node mutual information loss function is associated with the original global-single-node measurement result and the perturbed global-single-node measurement result, and the local-single-node mutual information loss function is associated with the original local-single-node measurement result and the perturbed local-single-node measurement result; The trained feature learning encoder is used as the latent space node feature extraction model.
3. The method according to claim 2, characterized in that The step of determining the target local second-order neighborhood of each of all sample network nodes in the sample service network according to the original graph structure data comprises: For each sample network node, construct an initial local second-order neighborhood of the sample network node based on the original graph structure data; Performing node appearance frequency statistics on the initial local second-order neighborhood to obtain actual node frequencies of all clustered network nodes existing in the initial local second-order neighborhood; Obtaining the node importance of each of the clustered network nodes at the original graph structure data, and calculating the initial sampling probability of each of the clustered network nodes according to the actual node frequency and node importance of each of the clustered network nodes; Performing probability value distribution correction on the initial sampling probabilities of all the aggregated network nodes to obtain effective sampling probabilities of all the aggregated network nodes; According to the respective effective sampling probabilities of all the clustered network nodes, target network nodes whose corresponding effective sampling probabilities obey Bernoulli sampling distribution are selected to construct a node set, and a target local second-order neighborhood of the sample network node is obtained.
4. The method according to claim 3, characterized in that The sample service network The initial local second-order neighborhood of a sample network node is constructed using the following formula: ; in, It is used to represent the first Sample network nodes The initial local second-order neighborhood of Used to indicate the The neighbor node set of the sample network node, Used to represent a set of neighbor nodes The Neighboring network nodes The corresponding neighbor node set, Used to express Performs set union operation.
5. The method according to claim 3, characterized in that: The sample service network The sample network nodes correspond to The initial sampling probability of the clustered network nodes is calculated using the following formula: ; in, It is used to represent the first The sample network nodes correspond to Aggregate network nodes The initial sampling probability is It is used to represent the first The initial local second-order neighborhood of sample network nodes, Used to indicate the Aggregate network nodes In the said The actual node frequency in the initial local second-order neighborhood of the sample network node, Used to indicate the Aggregate network nodes The importance of the nodes at the original graph structure data, Used to represent exponential functions.
6. The method according to any one of claims 2 to 5, characterized in that: The reference global node feature is calculated using the following formula: ; in, for representing the reference global node feature, It is used to represent the total number of network nodes involved in the original latent space node feature data, For representing the first The latent space node features of each network node.
7. The method according to any one of claims 2 to 5, characterized in that: The local fitting feature data includes the local fitting features of the latent space of each of the sample network nodes, and the step of performing latent space feature fitting based on the original latent space node feature data and the target local second-order neighborhood of each of the sample network nodes to obtain the local fitting feature data includes: For each sample network node, a set union operation is performed on the sample network node, the set of neighbor nodes of the sample network node, and the target local second-order neighborhood to obtain a corresponding set of associated network nodes; The feature mean is calculated for the latent space node features corresponding to each of all associated network nodes in the associated network node set in the original latent space node feature data to obtain the latent space local fitting features of the sample network node.
8. The method according to claim 7, characterized in that The sample service network The latent space local fitting features of a sample network node are calculated using the following formula: ; in, It is used to represent the first The latent space local fitting features of sample network nodes, It is used to represent the first The associated network node set of sample network nodes, Used to indicate the The total number of network nodes in the associated network node set of the sample network node, Used to indicate the The associated network node set of the sample network node Associated network nodes Latent space node features at the original latent space node feature data.
9. The method according to any one of claims 2 to 5, characterized in that: The global-single node mutual information loss function is expressed as follows: ; in, It is used to represent the global-single node mutual information loss function, It is used to represent the total number of network nodes involved in the original latent space node feature data, It is used to represent the total number of network nodes involved in the disturbance latent space node feature data, For representing the original graph structure data, For representing the perturbation graph structure data, It is used to represent the mathematical expectation function of the original graph structure data. is used to represent the mathematical expectation function of the perturbation graph structure data, for representing the reference global node feature, For representing the first The latent space node features of network nodes, It is used to represent the first The latent space node features of network nodes, For representing the first The original global-individual node measurement result of the latent space node features of the network nodes relative to the reference global node features, It is used to represent the first The perturbed global-individual node metric results of the latent space node features of the network nodes relative to the reference global node features.
10. The method according to any one of claims 2 to 5, characterized in that: The local-single node mutual information loss function is expressed as follows: ; in, It is used to represent the local-single node mutual information loss function, It is used to represent the total number of network nodes involved in the original latent space node feature data, It is used to represent the total number of network nodes involved in the disturbance latent space node feature data, For representing the original graph structure data, For representing the perturbation graph structure data, It is used to represent the mathematical expectation function of the original graph structure data. is used to represent the mathematical expectation function of the perturbation graph structure data, For representing the first The latent space node features of network nodes, It is used to represent the first The latent space node features of network nodes, It is used to represent the first The latent space local fitting features of sample network nodes, For representing the first The latent space node features of the network nodes are consistent with the The original local-single node measurement result between the latent space local fitting features of the sample network nodes, It is used to represent the first The latent space node features of the network nodes are consistent with the The perturbation local-single node measurement result between the latent space local fitting features of the sample network nodes.
Citation Information
Patent Citations
Graph neural network method based on multi-scale graph contrast learning
CN115994560A
Community detection method and system based on network representation learning
CN116108892A
Service network perception learning method based on multi-level graph variational inference
CN118869430A
Elastic overlay network generation
US20230379256A1
Suspicious group-based click farming behavior detection method and apparatus, device and medium
WO2022142021A1