A Community Detection Method for Service Networks Based on Multi-Scale Mutual Information
By performing multi-scale node feature learning and community label prediction in hidden space, the problem that the existing technology is difficult to meet the specific community detection needs of different service networks is solved, and high-precision community detection and hidden space distance minimization effects are achieved.
Patent Information
- Application Number
- CN202411886169.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2044-12-20
AI Technical Summary
The existing community detection algorithms are difficult to meet the specific needs of different service networks at the same time, and cannot effectively identify node communities in the service network with tight internal connections but weak external connections.
The service network community detection method based on multi-scale mutual information is adopted, node feature learning of multiple information scales is carried out in hidden space, node feature data of target hidden space is extracted, and community tag prediction is carried out through community tag classifier to achieve the accuracy of community detection.
By considering multiple information scales in hidden space, it can be effectively compatible with the specific community detection needs of different service networks, ensure the accuracy of community detection, and minimize the hidden space distance of network nodes assigned to the same community.
Smart Images

Figure CN119337259B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of big data processing. Specifically, it relates to a service network community detection method based on multi-scale mutual information. Background Art
[0002] With the development of the modern service industry, the service industry has become increasingly complex and diversified. It no longer has a simple one-way dependence relationship with the primary industry (such as agriculture, fishery, etc.) and the secondary industry (such as mining, manufacturing, etc.), but shows a complex and coupled interaction relationship. Therefore, the service networks of various service industries (such as transportation, catering, tourism, etc.) have gradually shown a trend of full-element complex connection and have a non-Euclidean topological structure. Among them, a generalized complex service network can include node elements such as service stations, resources, supply stations, users, manufacturers, distribution centers, etc., and through various connection forms among numerous node elements, jointly construct a service network topological structure containing attribute information.
[0003] In the current 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, due to the high correlation and information coupling between the service industry and the primary and secondary industries, there are complex interaction relationships that are difficult to decouple between each network node in the corresponding service network, making it difficult for traditional model-driven methods to meet the data processing requirements of today's service networks in aspects such as perception, decision-making, planning, and control.
[0004] For any service network, the network node community detection task is an important task in the perception link of the corresponding service network. It can identify node communities with strong internal connections but weak external connections in the corresponding service network, effectively locate network nodes with similar service requirements or operation habits in the corresponding service network, and facilitate formulating decisions that meet expectations for each network node. However, it should be noted that the community detection algorithms currently used in the industry often rely on the topological structure characteristics of the service network and need to be adaptively adjusted at the algorithm level for different types of service networks, and cannot simultaneously meet the specific community detection requirements 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 considering multiple information scales in the latent space, so as to extract latent space node feature data that can maintain the maximum effect of interaction information with the service network node feature data before learning at multiple information scale levels for community label prediction, minimize the latent space distance of each network node belonging to the same community, so as to be compatible with the specific community detection requirements of different service networks from the perspective of data-driven, and effectively ensure the accuracy of community detection.
[0006] In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:
[0007] In the first aspect, the present application provides a service network community detection method based on multi-scale mutual information, and the method includes:
[0008] Obtain the actual graph structure data of the service network to be detected;
[0009] Call the latent space node feature extraction model to perform multi-scale mutual information learning on the actual graph structure data, and obtain target latent space node feature data that meets the multi-scale mutual information maximization requirement with the actual graph structure data;
[0010] Call the community label classifier to perform community label prediction based on the target latent space node feature data, and obtain the actual community classification result of the service network to be detected.
[0011] In an alternative embodiment, the method further includes:
[0012] Obtain the original graph structure data and the perturbed graph structure data of the sample service network, and determine the target local second-order neighborhood of each sample network node in the sample service network according to the original graph structure data;
[0013] Initialize the feature learning encoder, the global-singleton node perception unit and the local-singleton 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 respectively in the latent space, and obtain the original latent space node feature data and the perturbed latent space node feature data;
[0014] Call the global-singleton node perception unit to calculate the reference global node feature based on the original latent space node feature data, and perform in-latent space distance measurement on the original latent space node feature data and the perturbed latent space node feature data respectively with the reference global node feature, and obtain the original global-singleton node measurement result and the perturbed global-singleton node measurement result;
[0015] Invoke the local - monomer node perception unit, perform 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, obtain local fitting feature data, and perform latent space inner - distance metrics on the original latent space node feature data and the perturbed latent space node feature data respectively with the local fitting feature data to obtain the original local - monomer node metric result and the perturbed local - monomer node metric result;
[0016] According to the original global - monomer node metric result, the perturbed global - monomer node metric result, the original local - monomer node metric result, and the perturbed local - monomer node metric result, for the purpose of minimizing the target mutual information loss function, perform backpropagation joint training on the feature learning encoder, the global - monomer node perception unit, and the local - monomer node perception unit; wherein, the target mutual information loss function is obtained by superimposing the global - monomer node mutual information loss function and the local - monomer node mutual information loss function, the global - monomer node mutual information loss function is associated with the original global - monomer node metric result and the perturbed global - monomer node metric result, and the local - monomer node mutual information loss function is associated with the original local - monomer node metric result and the perturbed local - monomer node metric result;
[0017] Use the trained feature learning encoder as the latent space node feature extraction model.
[0018] In an alternative embodiment, the step of determining the target local second - order neighborhood of each sample network node in the sample service network according to the original graph structure data includes:
[0019] For each sample network node, construct the initial local second - order neighborhood of this sample network node based on the original graph structure data;
[0020] Perform node occurrence frequency statistics on the initial local second - order neighborhood to obtain the actual node frequencies of all aggregated network nodes existing in the initial local second - order neighborhood;
[0021] Obtain the node importance of all aggregated network nodes at the original graph structure data, and calculate the initial sampling probabilities of all aggregated network nodes according to the actual node frequencies and node importance of all aggregated network nodes;
[0022] Perform probability value distribution correction on the initial sampling probabilities of all aggregated network nodes to obtain the effective sampling probabilities of all aggregated network nodes;
[0023] According to the effective sampling probabilities of all the aggregated network nodes, target network nodes with corresponding effective sampling probabilities following the Bernoulli sampling distribution are selected to construct a node set, and the target local second-order neighborhood of the sample network nodes is obtained.
[0024] In an alternative embodiment, the initial local second-order neighborhood of the th sample network node in the sample service network is constructed using the following formula:
[0025] ;
[0026] where is used to represent the initial local second-order neighborhood of the th sample network node in the sample service network, is used to represent the set of neighbor nodes of the th sample network node, is used to represent the set of neighbor nodes corresponding to the th neighbor network node in the neighbor node set , is used to represent the union operation on . is used to represent performing a union operation.
[0027] In an alternative embodiment, the initial sampling probability of the th sample network node corresponding to the th type of aggregated network node is calculated using the following formula:
[0028] ;
[0029] where is used to represent the initial sampling probability of the th sample network node corresponding to the th type of aggregated network node, is used to represent the initial local second-order neighborhood of the th sample network node in the sample service network, is used to represent the th type of aggregated network node in the initial local second-order neighborhood of the th sample network node, is used to represent the actual node frequency of the th type of aggregated network node in the initial local second-order neighborhood of the th sample network node, is used to represent the exponential function.
[0030] In an alternative embodiment, the reference global node feature is calculated using the following formula:
[0031] ;
[0032] where is used to represent the reference global node feature, is used to represent the total number of network nodes involved in the original latent space node feature data, is used to represent the th latent space node feature of the
[0033] In an alternative embodiment, the local fitting feature data includes the latent space local fitting features of all sample network nodes respectively. Then, 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 respectively to obtain the local fitting feature data includes:
[0034] For each sample network node, perform a union operation 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 associated network node set;
[0035] Calculate the feature mean of the latent space node features corresponding to all associated network nodes in the associated network node set respectively in the original latent space node feature data to obtain the latent space local fitting feature of the sample network node.
[0036] In an alternative embodiment, the latent space local fitting feature of the th sample network node in the sample service network is calculated using the following formula:
[0037] ;
[0038] where is used to represent the latent space local fitting feature of the th sample network node in the sample service network, is used to represent the associated network node set of the th sample network node in the sample service network, is used to represent the total number of network nodes in the associated network node set of the th sample network node, is used to represent the th associated network node in the associated network node set of the th sample network node The latent space node features at the original latent space node feature data.
[0039] In an alternative embodiment, the global - monomer node mutual information loss function is represented by the following formula:
[0040] ;
[0041] where, is used to represent the global - monomer node mutual information loss function, is used to represent the total number of network nodes involved in the original latent space node feature data, is used to represent the total number of network nodes involved in the perturbed latent space node feature data, is used to represent the original graph structure data, is used to represent the perturbed graph structure data, is used to represent the mathematical expectation function with respect to the original graph structure data, is used to represent the mathematical expectation function with respect to the perturbed graph structure data, is used to represent the reference global node features, is used to represent the th latent space node feature of the th network node in the original latent space node feature data, th latent space node feature of the th network node in the perturbed latent space node feature data, is used to represent the original global - monomer node metric result of the th latent space node feature of the th network node in the original latent space node feature data relative to the reference global node features,
[0042] In an alternative embodiment, the local - monomer node mutual information loss function is represented by the following formula:
[0043] ;
[0044] where, is used to represent the local - monomer node mutual information loss function, is used to represent the total number of network nodes involved in the original latent space node feature data, is used to represent the total number of network nodes involved in the perturbed latent space node feature data, is used to represent the original graph structure data, For representing the perturbed graph structure data, For representing the mathematical expectation function with respect to the original graph structure data, For representing the mathematical expectation function with respect to the perturbed graph structure data, For representing the latent space node feature of the th network node in the original latent space node feature data, For representing the latent space node feature of the th network node in the perturbed latent space node feature data, For representing the latent space node feature of the th network node in the original latent space node feature data and the original local - monomer node metric result between the latent space node feature of the th sample network node in the sample service network, For representing the latent space node feature of the
[0045] In this case, the beneficial effects of the embodiments of the present application may include the following:
[0046] In the present application, for the actual graph structure data of the service network to be detected, by calling the latent space node feature extraction model to perform node feature learning on the actual graph structure data of the service network to be detected considering multiple information scales in the latent space, the target latent space node feature data that can maintain the maximization effect of interaction information with the service network node feature data in the actual graph structure data at multiple information scale levels is extracted. Then, the community label classifier is called to perform community label prediction based on the target latent space node feature data, and the actual community classification result of the service network to be detected is obtained, so that the latent space distance of each network node classified into the same community in the actual community classification result is minimized, so as to be compatible with the specific community detection requirements of different service networks from the perspective of data - driven and effectively ensure the accuracy of community detection.
[0047] To make the above - mentioned objects, features, and advantages of the present application more obvious and understandable, the following specific preferred embodiments are given, and in conjunction with the accompanying drawings, the detailed description is as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the embodiments. It should be understood that the following drawings only show some embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other relevant drawings can also be obtained based on these drawings.
[0049] Figure 1 Schematic diagram of the composition of the computer device provided by the embodiment of the present application;
[0050] Figure 2 One of the flow schematic diagrams of the service network community detection method based on multi-scale mutual information provided by the embodiment of the present application;
[0051] Figure 3 Another flow schematic diagram of the service network community detection method based on multi-scale mutual information provided by the embodiment of the present application;
[0052] Figure 4 For Figure 3 The flow schematic diagram of the sub-steps included in step S310 in Detailed implementation manners
[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Usually, the components of the embodiments of the present application described and shown in the accompanying drawings here can be arranged and designed in various different configurations.
[0054] 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 to be protected, but merely represents the selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0055] It should be noted that similar reference numerals and letters indicate similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0056] In the description of the present application, it should be understood that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of this application is usually placed during use, or the orientation or positional relationship commonly understood by those skilled in the art. It is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying 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 construed as a limitation to the present application.
[0057] In the description of the present application, it should also be noted that unless otherwise clearly specified and defined, the terms "set", "install", "connect", and "couple" 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 directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to specific circumstances.
[0058] In addition, in the description of the present application, it can be understood that the relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, the element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to specific circumstances.
[0059] The following will describe in detail some embodiments of the present application with reference to the drawings. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0060] Please refer to Figure 1 , Figure 1It is a schematic diagram of the composition of the computer device 10 provided in the embodiments of the present application. In the embodiments 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 starting from the data-driven perspective, perform network node feature learning under 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) based on the obtained actual graph structure data, so that the corresponding learned latent space node feature data can maintain the maximum interaction information effect with the service network node feature data in the actual graph structure data at multiple information scale levels. Furthermore, in the network community classification result predicted based on the learned latent space node feature data, it is ensured that each network node belonging to the same community can achieve the minimum latent space distance effect, so as to provide a network community detection solution that can be compatible with the specific community detection requirements of different service networks and has high detection accuracy from the data-driven perspective.
[0061] In this process, the actual graph structure data includes the feature matrix and the adjacency matrix of the corresponding service network. The feature matrix can be represented by and the adjacency matrix can be represented by . The feature matrix is composed of node feature vectors with a vector length of for each network node in the corresponding service network. The adjacency matrix is used to represent the connection relationship between each network node in the corresponding service network and other network nodes, where is used to represent the total number of network nodes in 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 , where is the latent space node feature of the th network node in the corresponding service network; The any service industry type can be, but is not limited to, the transportation industry, the catering industry, the tourism industry, etc.; The computer device 10 can be, but is not limited to, computing devices such as laptop computers, personal computers, servers, etc.
[0062] In the embodiments of the present application, the computer device 10 may include a memory 11, a processor 12, and a communication unit 13. Among them, the memory 11, the processor 12, and each element of the communication unit 13 are directly or indirectly electrically connected to each other to achieve data transmission or interaction.
[0063] In this embodiment, the memory 11 is used to store computer programs. After receiving an execution instruction, the processor 12 can correspondingly execute the computer programs. In addition, the memory 11 is also used to store a latent space node feature extraction model, where 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 considering multiple information scales in the latent space to extract latent space node feature data that meets the requirement of maximizing multi-scale mutual information for the corresponding service network (i.e., maintaining the maximum interaction information effect at multiple information scale levels with the service network node feature data of the corresponding service network before learning), so as to achieve the multi-scale mutual information learning function for any service network. The latent space node feature extraction model can be implemented by a feature learning encoder. At the same time, the memory 11 is also used to store community label classifiers corresponding to various service network types, where each service network type corresponds to a service industry type, and all the annotatable community labels pre-configured for a single community label classifier belong to the same service industry type. The annotatable community labels corresponding to different service industry types can be partially the same or completely different.
[0064] 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 transmit and receive data through the network, where 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 sense the internal community distribution through the communication unit 13, so as to perform high-precision network community perception based on the obtained actual graph structure data.
[0065] In this embodiment, the computer device 10 can pre-store a specific computer program related to the service network community detection function in the memory 11, and by driving the processor 12 to correspondingly execute the specific computer program stored in the memory 11, provide a network community detection solution that can be compatible with the specific community detection requirements of different service networks from a data-driven perspective, so as to ensure the minimum latent space distance effect for each network node belonging to the same community in the network community classification result of any service network, thereby achieving high-precision network community detection operations for any service network.
[0066] It can be understood that Figure 1 The block diagram shown is only a schematic diagram of the composition of the computer device 10, and the computer device 10 may also include Figure 1 more or fewer components than those shown Figure 1 or have a different configuration from that shown.Figure 1 Each component shown can be implemented by hardware, software, or a combination thereof.
[0067] In this application, to ensure that the computer device 10 can provide a network community detection solution that can be compatible with the specific community detection requirements of different service networks and has high detection accuracy from the perspective of data driving, and to implement high-precision network community detection operations for any service network, an embodiment of this application provides a service network community detection method based on multi-scale mutual information to achieve the foregoing purpose. The service network community detection method based on multi-scale mutual information provided by this application will be described in detail below.
[0068] Please refer to Figure 2 , Figure 2 which is one of the schematic flowcharts of the service network community detection method based on multi-scale mutual information provided by an embodiment of this application. In the embodiment of this application, Figure 2 the service network community detection method shown may include steps S210 to S230.
[0069] Step S210, obtaining the actual graph structure data of the service network to be detected.
[0070] In this embodiment, the service network to be detected is a service network that needs to perceive the internal community distribution; 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 actual node feature vectors of all network nodes in the service network to be detected each having a preset vector length (for example, the vector length in the above text ), and 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, and the actual feature matrix is the service network node feature data in the actual graph structure data.
[0071] Step S220, calling a hidden space node feature extraction model to perform multi-scale mutual information learning on the actual graph structure data to obtain target hidden space node feature data that satisfies the multi-scale mutual information maximization requirement for the actual graph structure data.
[0072] In this embodiment, for the conventional network community detection operation, first, it is necessary to determine the node feature information representation of each service node in the service network under the latent space, and then perform distance measurement on the node feature information representations of each network node under the latent space, so as to classify the network nodes that meet specific distance conditions into the same network community, ensuring that the latent space distance between multiple network nodes within 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 scheme from the data-driven level, and the solution idea of this problem can actually be transformed into the problem of maximizing the mutual information between the service network node feature data and the latent space node feature information representation (i.e., the latent space node feature data).
[0073] To ensure that the determined latent space node feature information representation has strong enough data validity, the latent space node feature extraction model provided in this application will comprehensively consider from the single-node representation scale, the surrounding node fitting representation scale, and the network global representation scale under 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 maximization effect of the interaction information 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 for the service network to be detected at the data-driven level.
[0074] Step S230, call the community label classifier to predict the community labels based on the target latent space node feature data, and obtain the actual community classification result of the service network to be detected.
[0075] 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, among the community label classifiers corresponding to each of the multiple service network types stored in the memory 11, the target community label classifier that actually matches the service network to be detected is found, 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 labelable community labels, so as to obtain the actual community classification result of the service network to be detected, making the latent space distance between the network nodes classified into the same community in the actual community classification result minimized to ensure the accuracy of community detection.
[0076] Thus, by performing the above steps S210 to S230, the present application can provide a network community detection solution that can be compatible with the specific community detection requirements of different service networks from the perspective of data driving, and use the provided network community detection solution to ensure that the network nodes belonging to the same community in the network community classification result of any service network can achieve the effect of minimizing the implicit space distance, so as to realize the network community detection operation with high accuracy.
[0077] Optionally, please refer to Figure 3 , Figure 3 which is the second flowchart of the service network community detection method provided by the embodiment of the present application. In the embodiment of the present application, compared with the service network community detection method shown in Figure 2 , Figure 4 the service network community detection method shown can further include steps S310 to S360 to train an implicit space node feature extraction model that can be compatible with the specific community detection requirements of different service networks by using a feature learning encoder, and enable the implicit space node feature extraction model to achieve the effect of maximizing the multi-scale mutual information of node feature learning for any service network from the perspective of data driving.
[0078] Step S310, obtain the original graph structure data and the perturbed graph structure data of the sample service network, and determine the target local second-order neighborhood of each sample network node in the sample service network according to the original graph structure data.
[0079] 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 corresponding to the sample service network, and the perturbed graph structure data is the negative sample data corresponding to the sample service network. Among them, the original graph structure data includes the original feature matrix and the original adjacency matrix corresponding to the sample service network, and the original feature matrix is composed of the original feature vectors of each sample network node in the corresponding sample service network with a preset vector length (for example, the vector length in the above text ), and the original adjacency matrix is used to represent the original node connection relationship between each sample network node in the corresponding sample service network and other sample network nodes; the perturbed graph structure data is constructed by at least one of perturbation operations such as network node removal, connection edge removal, connection edge addition, and feature matrix modification on the basis of the original graph structure data, and the perturbed network nodes involved in the perturbed graph structure data form a non-empty subset of the sample network nodes of the original graph structure data.
[0080] After obtaining the original graph structure data of the sample service network, considering the fitting representation scale of surrounding nodes, for all sample network nodes in the sample service network, the target local second-order neighborhood of each sample network node in the sample service network can be determined respectively, so as to fit and represent the node features corresponding to the sample network nodes based on the node features of each network node in the target local second-order neighborhood through the message passing mechanism.
[0081] Optionally, in an implementation manner of this embodiment, the target local second-order neighborhood of each sample network node in the sample service network can be represented by the initial local second-order neighborhood of the corresponding sample network node. Among them, the initial local second-order neighborhood of the th sample network node in the sample service network can be constructed by the following formula:
[0082] ;
[0083] Among them, is used to represent the initial local second-order neighborhood of the th sample network node in the sample service network, is used to represent the set of neighbor nodes of the th sample network node, is used to represent the set of neighbor nodes corresponding to the th neighbor network node in the neighbor node set , is used to represent the union operation on , where the same network node that can appear repeatedly within a single initial local second-order neighborhood. is used to represent the union operation on
[0084] , where the same network node that can appear repeatedly within a single initial local second-order neighborhood. Optionally, please refer to Figure 4 , Figure 4 is Figure 3 the schematic flowchart of the sub-steps included in step S310 in. In another implementation manner of this embodiment, to effectively reduce the computational complexity of any sample network node in the process of fitting and representing the features of surrounding nodes, the step "determine the target local second-order neighborhood of each sample network node in the sample service network according to the original graph structure data" in step S310 can 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 aggregated network nodes that have a greater impact on this sample network node (that is, the network nodes that are indirectly connected to this sample network node), and reduce the unnecessary computational complexity in the subsequent process of fitting and representing the features of surrounding nodes.
[0085] Sub-step S311: For each sample network node, construct the initial local second-order neighborhood of this sample network node based on the original graph structure data.
[0086] Among them, for the th sample network node in the sample service network, the initial local second-order neighborhood can be constructed by the following formula:
[0087] ;
[0088] Among them, is used to represent the th sample network node in the sample service network 's initial local second-order neighborhood, is used to represent the neighbor node set of the th sample network node, is used to represent the neighbor node set in the th neighbor network node corresponding to, is used to represent the performing a union operation on the set.
[0089] Sub-step S312: Conduct a node occurrence frequency statistics on the initial local second-order neighborhood to obtain the actual node frequencies of all the aggregated network nodes existing in the initial local second-order neighborhood.
[0090] Sub-step S313: Obtain the node importance of all the aggregated network nodes at the original graph structure data, and calculate the initial sampling probabilities of all the aggregated network nodes according to the actual node frequencies and node importance of all the aggregated network nodes.
[0091] Among them, for any sample network node, any one of the importance evaluation algorithms such as the degree centrality algorithm, betweenness centrality algorithm, K-Shell algorithm, PageRank algorithm, etc. can be used to calculate the node importance of all the aggregated network nodes in the initial local second-order neighborhood of this sample network node, so as to obtain the node importance of all the aggregated network nodes at the original graph structure data. And for the th sample network node in the sample service network, the initial sampling probability of the th aggregated network node corresponding to this sample network node is calculated by the following formula:
[0092] ;
[0093] Among them, is used to represent the The initial sampling probability of the th aggregated network node corresponding to a sample network node, which is used to represent the initial local second - order neighborhood of the th sample network node in the sample service network, which is used to represent the th aggregated network node and the actual node frequency within the initial local second - order neighborhood of the th sample network node, which is used to represent the th aggregated network node and the node importance at the original graph structure data, which is used to represent the exponential function.
[0094] Sub - step S314: Perform probability value distribution correction on the initial sampling probabilities of all aggregated network nodes respectively to obtain the effective sampling probabilities of all aggregated network nodes respectively.
[0095] Among them, when the initial sampling probability corresponding to a certain aggregated network node exceeds 1, the effective sampling probability corresponding to this aggregated network node is 1; when the initial sampling probability corresponding to a certain aggregated network node is less than or equal to 1, the effective sampling probability corresponding to this aggregated network node is the initial sampling probability.
[0096] Sub - step S315: According to the effective sampling probabilities of all aggregated network nodes respectively, select target network nodes whose corresponding effective sampling probabilities follow the Bernoulli sampling distribution to construct a node set, and obtain the target local second - order neighborhood of this sample network node.
[0097] Thus, by executing the above - mentioned sub - steps S211 to sub - step S215, the present application can make the target local second - order neighborhood of each sample network node in the sample service network only record the aggregated network nodes that have a greater impact on this sample network node, so as to reduce the unnecessary computational amount in the subsequent process of fitting and representing the features of surrounding nodes for this sample network node.
[0098] 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 respectively in the hidden space to obtain the original hidden - space node feature data and the perturbed hidden - space node feature data.
[0099] In this embodiment, the original hidden - space node feature data corresponds to the original graph structure data, and the perturbed hidden - space node feature data corresponds to the perturbed graph structure data.
[0100] In this embodiment, for the hidden space node feature extraction model, since the essence of the "minimization problem of the internal hidden space distance of a single network community" is mutually transformed with the "maximization problem of the mutual information between the service network node feature data and the hidden space node feature information representation (i.e., the hidden space node feature data)", during the process of training the hidden space node feature extraction model by using the feature learning encoder, a global-single node perception unit and a local-single node perception unit that can measure the node hidden space distance in multiple scales can be introduced for joint training. By minimizing the objective mutual information loss function directly associated with the "minimization problem of the internal hidden space distance of a single network community", equivalently, the finally trained hidden space node feature extraction model can maintain the effect of maximizing the multi-scale mutual information.
[0101] Among them, both the global-single node perception unit and the local-single node perception unit can be implemented by a multi-layer perceptron (MLP). The global-single node perception unit can measure the internal distance between node feature information representations in the hidden space by comprehensively considering the single node representation scale and the network global representation scale. The local-single node perception unit can measure the internal distance between node feature information representations in the hidden space by comprehensively considering the single node representation scale and the fitting representation scale of surrounding nodes. The objective mutual information loss function is constructed based on the Jensen-Shannon divergence formula from the internal distance measurement results of the global-single node perception unit and the local-single node perception unit respectively, so that the "minimization problem of the internal hidden space distance of a single network community" can be intuitively represented as the function minimization problem of the objective mutual information loss function. That is to say, the multi-scale mutual information maximization problem during the node feature learning of the hidden space node feature extraction model is converted into the "function minimization problem of the objective mutual information loss function".
[0102] Step S330: Invoke the global-single node perception unit, calculate the reference global node feature based on the original hidden space node feature data, and perform hidden space internal distance measurement on the original hidden space node feature data and the perturbed hidden space node feature data respectively with the reference global node feature to obtain the original global-single node measurement result and the perturbed global-single node measurement result.
[0103] In this embodiment, the global - monomer node perception unit can perform global feature fitting on the original latent space node feature data of the sample service network from the scale of the global network representation, obtain the reference global node features of the sample service network in the latent space, and then measure the in - latent - space distance between the latent space node features of all sample network nodes in the original latent space node feature data and the reference global node features respectively, to obtain the original global - monomer node measurement results of all sample network nodes. At the same time, measure the in - latent - space distance between the latent space node features of all perturbed network nodes in the perturbed latent space node feature data and the reference global node features respectively, to obtain the perturbed global - monomer node measurement results of all perturbed network nodes, so as to achieve the node in - latent - space distance measurement effect considering both the monomer node representation scale and the network global representation scale.
[0104] In this process, the reference global node features can be calculated using the following formula:
[0105] ;
[0106] where, is used to represent the reference global node features, is used to represent the total number of network nodes involved in the original latent space node feature data, is used to represent the th network node's latent space node feature in the original latent space node feature data.
[0107] Step S340, call the local - monomer node perception unit, perform 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 respectively, obtain the local fitting feature data, and measure the in - latent - space distance between the original latent space node feature data and the perturbed latent space node feature data and the local fitting feature data respectively, to obtain the original local - monomer node measurement results and the perturbed local - monomer node measurement results.
[0108] In this embodiment, the local fitting feature data includes the latent space local fitting features 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 fitting representation scale of surrounding nodes, and through information fitting representation of the latent space node feature information representation of the surrounding network nodes associated with the sample network node, obtain the local fitting feature of the sample network node at the fitting representation scale of the surrounding nodes. The local-single node perception unit can obtain the original local-single node measurement results of all sample network nodes relative to the local fitting feature data by performing latent space inner distance measurement on the latent space node features of all sample network nodes in the original latent space node feature data and the latent space local fitting features of all sample network nodes respectively, 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 and the latent space local fitting features of all sample network nodes respectively, to obtain the perturbed local-single node measurement results of all perturbed network nodes relative to the local fitting feature data, so as to achieve the node latent space distance measurement effect considering both the single node representation scale and the surrounding node fitting representation scale.
[0109] 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 neighborhood of all sample network nodes respectively to obtain local fitting feature data" may include:
[0110] For each sample network node, perform a union operation on the sample network node, the neighbor node set of the sample network node, and the target local second-order neighborhood to obtain a corresponding associated network node set;
[0111] Calculate the feature mean of the latent space node features corresponding to 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 feature of the sample network node.
[0112] Among them, the latent space local fitting feature of the th sample network node in the sample service network is calculated using the following formula:
[0113] ;
[0114] Among them, is used to represent the latent space local fitting feature of the th sample network node in the sample service network, is used to represent the The set of associated network nodes of a sample network node, for representing the total number of network nodes in the set of associated network nodes of the th sample network node, for representing the th associated network node in the set of associated network nodes of the th sample network node The latent space node feature at the original latent space node feature data.
[0115] Step S350, according to the original global - monomer node metric result, the perturbed global - monomer node metric result, the original local - monomer node metric result, and the perturbed local - monomer node metric result, for the purpose of minimizing the objective mutual information loss function, perform backpropagation joint training on the feature learning encoder, the global - monomer node perception unit, and the local - monomer node perception unit.
[0116] In this embodiment, the objective mutual information loss function is obtained by superimposing the global - monomer node mutual information loss function and the local - monomer node mutual information loss function; the global - monomer node mutual information loss function is associated with the original global - monomer node metric result and the perturbed global - monomer node metric result, and the global - monomer node mutual information loss function is constructed based on the Jensen - Shannon divergence formula from the inner - distance metric result of the global - monomer node perception unit, which can intuitively represent the problem of minimizing the internal latent space distance of "a single network community at the monomer node representation scale and the network global representation scale" as the function minimization problem of the global - monomer node mutual information loss function; the local - monomer node mutual information loss function is associated with the original local - monomer node metric result and the perturbed local - monomer node metric result, and the local - monomer node mutual information loss function is constructed based on the Jensen - Shannon divergence formula from the inner - distance metric result of the local - monomer node perception unit, which can intuitively represent the problem of minimizing the internal latent space distance of "a single network community at the monomer node representation scale and the surrounding node fitting representation scale" as the function minimization problem of the local - monomer node mutual information loss function.
[0117] During this process, the global - monomer node mutual information loss function is represented by the following formula:
[0118] ;
[0119] where is used to represent the global - monomer node mutual information loss function, is used to represent the total number of network nodes involved in the original latent space node feature data, Used to represent the total number of network nodes involved in the perturbed latent space node feature data, Used to represent the original graph structure data, Used to represent the perturbed graph structure data, Used to represent the mathematical expectation function regarding the original graph structure data, Used to represent the mathematical expectation function regarding the perturbed graph structure data, Used to represent the reference global node feature, Used to represent the latent space node feature of the th network node in the original latent space node feature data, latent space node feature of the th network node in the perturbed latent space node feature data, original global - monomer node metric result of the latent space node feature of the th network node in the original latent space node feature data relative to the reference global node feature, perturbed global - monomer node metric result of the latent space node feature of the
[0120] In addition, the local - monomer node mutual information loss function is represented by the following formula:
[0121] ;
[0122] where, Used to represent the local - monomer node mutual information loss function, Used to represent the total number of network nodes involved in the original latent space node feature data, Used to represent the total number of network nodes involved in the perturbed latent space node feature data, Used to represent the original graph structure data, Used to represent the perturbed graph structure data, Used to represent the mathematical expectation function regarding the original graph structure data, Used to represent the mathematical expectation function regarding the perturbed graph structure data, Used to represent the latent space node feature of the th network node in the original latent space node feature data, latent space node feature of the th network node in the perturbed latent space node feature data, th network node in the sample service network The local fitting features of the latent space of a sample network node used to represent the latent space node features of the th network node in the original latent space node feature data and the original local - monomer node metric result between the local fitting features of the latent space of the th sample network node latent space node features of the th network node in the perturbed latent space node feature data and the perturbed local - monomer node metric result between the local fitting features of the latent space of the
[0123] Step S360: Use the trained feature learning encoder as the latent space node feature extraction model.
[0124] Thus, through the execution of the above steps S310 to S360, the present application can train a latent space node feature extraction model that can be compatible with the specific community detection requirements of different service networks by using the feature learning encoder, and enable this latent space node feature extraction model to achieve the effect of maximizing the multi - scale mutual information of node feature learning for any service network from the perspective of data - driven.
[0125] The above are only various implementation manners of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to 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 meets the multi-scale mutual information maximization requirement with the actual graph structure data; wherein the latent space node feature extraction model is implemented by a feature learning encoder, and the latent space node feature extraction model performs network node feature learning on the actual graph structure data by considering multiple information scales in latent space, so that the corresponding learned latent space node feature data and the service network node feature data in the actual graph structure data maintain the interaction information maximization effect at multiple information scale levels, so as to realize the multi-scale mutual information learning function of the actual graph structure data, wherein the multiple information scales include a single node representation scale, a surrounding node fitting representation scale, and a network global representation scale; The community label classifier is called to predict the community label based on the target latent space node feature data to obtain the actual community classification result of the service network to be detected, wherein the latent space distance between each network node belonging to the same community in the actual community classification result is the smallest.
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; wherein the global-single node perception unit and the local-single node perception unit are both implemented using a multi-layer perceptron; 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
Community detection method and system based on network representation learning
CN116108892A
Service network perception learning method based on multi-level graph variational inference
CN118869430A