Community search method for commodity recommendation in electronic commerce network

By converting the e-commerce network into an undirected attribute graph, combining deep learning and traditional structural constraints, extracting and refinement communities for product recommendations, the problem of insufficient implicit relationship mining in the existing model in the e-commerce network is solved, and efficient and accurate personalized recommendations are achieved.

CN120338910AActive Publication Date: 2025-07-18SOUTHWEST UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510315429.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-07-18
Estimated Expiration
2045-03-18

AI Technical Summary

Technical Problem

The existing product recommendation model has insufficient dependence on explicit interactive data in the e-commerce network, unable to fully explore the implicit relationships between goods, and difficult to find a balance between personalization and diversity. Traditional methods rely on predefined structural constraints lead to insufficient flexibility, while learning-based methods lack robustness.

Method used

Convert the e-commerce network into an undirected attribute graph, extract candidate rough communities through attribute enhancement conductance, combine deep learning and traditional structural constraints, and use neural community optimization models to refine the community, obtain refinement communities and make product recommendations.

Benefits of technology

It improves the accuracy and interpretability of community searches, improves the scalability and recommendation accuracy in large-scale networks, overcomes data sparse problems, and enhances the robustness and diversity of recommendation systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120338910A_ABST
    Figure CN120338910A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of computers, and particularly relates to a community search method for commodity recommendation in an e-commerce network, which comprises the following steps of: converting an e-commerce network structure into an undirected attribute graph G; initializing parameters, and calculating attribute enhanced conductance of each node in the undirected attribute graph according to the initialization parameters; extracting candidate rough communities according to attribute enhanced conductance; screening out rough communities from the candidate rough communities; processing the rough community by adopting the trained neural community optimization model to obtain a coding state; optimizing the rough community according to the coding state to obtain a refined community; commodity recommendation is carried out according to an online community search result; according to the method, the deep learning technology and the traditional predefined structure constraint are combined. According to the method, the advantages of the two are organically combined, so that the community search quality is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computers, and particularly relates to a community search method for product recommendation in an e-commerce network. Background Art

[0002] With the rapid development of e-commerce, the number of users and products on the platform has shown exponential growth. How to efficiently recommend interesting products to users has become a key issue. In an e-commerce network, there are complex interaction behaviors and multi-level relationship structures between users and products, and this information contains rich potential value. However, traditional recommendation algorithms have certain limitations when facing such a complex network. They usually rely on explicit interaction data between users and products and cannot fully explore the implicit relationships between products. In addition, recommendation systems also face problems such as data sparsity, cold start, and single recommendation results, and it is difficult to find a balance between personalization and diversity. To address these challenges, exploring dynamic mining methods for community structures in e-commerce networks has become an important research direction.

[0003] As an important technology in the field of graph mining, community search focuses on dynamically discovering tightly connected sub-communities for specific nodes or conditions in a complex network. This method is different from traditional global community partitioning. It pays more attention to local high-quality subgraphs, can quickly respond to query requirements, and generate tight communities related to users or products. In an e-commerce scenario, community search technology can more accurately explore potential interest areas of users by combining the interaction relationships between users and products and the relevance between products. For example, when a user shows interest in a certain type of product, community search can find a set of products closely related to this type of product from the product network, thereby achieving more targeted and interpretable recommendations. At the same time, community search technology can also effectively alleviate the cold start problem. By analyzing the relationships between products and products, and between users and users in the network structure, reasonable recommendations can be generated for new users or new products even in the absence of sufficient historical data. In addition, the recommendation results returned by community search are a subgraph or subset, and such interpretable recommendation results are more easily accepted and trusted by users.

[0004] Existing community search models for product recommendation can be roughly divided into two types: traditional community search methods and learning-based community search methods. The former usually identify communities by leveraging pre-determined structural constraints, such as k-core and k-truss based models. However, they impose cumbersome constraints on the target communities, resulting in structural inflexibility, while learning-based community search methods can alleviate this inflexibility. A currently popular approach is to define the community search problem as a node classification task. These methods adopt a two-stage framework. First, a model is trained using semi-supervised or unsupervised techniques to generate node embedding vectors. Then, these embedding vectors are used to evaluate the probability of each vertex belonging to the target community. Another approach is to define the community search problem as a generation task. Specifically, the model first uses a graph neural network to generate node representations, and then generates communities from the query nodes. Compared with node classification models, generation models provide greater flexibility and eliminate concerns about community connectivity.

[0005] In summary, although existing community search models for product recommendation have achieved success, their methods either rely entirely on pre-defined structural constraints or merely utilize deep learning techniques to identify target communities. Therefore, an important question arises: how to combine deep learning with traditional structural constraints to improve the accuracy of community search and thus meet the personalized recommendation needs of users' desired products. Summary of the Invention

[0006] To solve the above problems existing in the prior art, the present invention proposes a community search method for product recommendation in an e-commerce network, which includes: converting the e-commerce network structure into an undirected attributed graph G; initializing parameters, and calculating the attribute-enhanced conductance of each node in the undirected attributed graph according to the initialized parameters; extracting candidate rough communities according to the attribute-enhanced conductance; screening out rough communities from the candidate rough communities; processing the rough communities using a trained neural community optimization model to obtain an encoded state; optimizing the rough communities according to the encoded state to obtain refined communities; obtaining user data information, searching the user data information based on the refined communities, and recommending products to users according to the online community search results.

[0007] Advantages of the present invention:

[0008] The present invention combines deep learning techniques with traditional predefined structural constraints. This method organically combines the advantages of both, thus significantly improving the quality of community search. By combining the flexibility and adaptability of deep learning with the robustness and interpretability of classical conductance-based metrics, not only is the accuracy of community identification improved, but also a more efficient and scalable framework for community exploration in large-scale networks is provided. This method can characterize the community structure more precisely, especially in complex networks where attributes are crucial for node relationships, showing a more accurate community partitioning ability.

[0009] The present invention proposes a method for dynamically updating attribute conductance and proves through strict mathematical derivations that the time complexity of this method is linearly related to the scale of the graph. This result indicates that the scalability of this method on large-scale graphs has been significantly improved. Traditional conductance-based community search methods often face bottlenecks in computing resources and time when dealing with large-scale graphs, especially when the graph scale increases sharply. The dynamic update scheme of the present invention avoids the complexity of global calculations by efficiently calculating conductance changes, enabling the algorithm to maintain high performance on large-scale graphs.

[0010] The present invention is a community-based commodity recommendation method that can make full use of the similarity and group behavior characteristics among users to improve the accuracy and interpretability of recommendations. Since community partitioning is usually based on users' transaction relationships, social networks, or behavior patterns, users within the same community often share similar interests, preferences, or consumption habits. Therefore, community information can help overcome the data sparsity problem, enabling even users with few historical interactions to obtain reliable recommendations. In addition, the community structure can enhance the robustness of the recommendation system. Compared with individual behavior-driven recommendation methods, it can better capture the interaction patterns of users in the community and avoid the influence of individual abnormal behaviors on the recommendation results. At the same time, community-based recommendations can also improve the diversity and novelty of commodities. Especially by drawing on the consumption experiences of community members, it recommends commodities that have not been widely purchased but may match the potential interests of users, thereby improving exploration and user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 It is the overall framework structure diagram of the model of the present invention;

[0012] Figure 2 It is from the original attribute graph to the multi-graph of the present invention;

[0013] Figure 3 It is the rough community extraction process of the present invention;

[0014] Figure 4 It is the diagram of the process of starting to refine the candidate rough community of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0015] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0016] A community search method for product recommendation in an e-commerce network, the method comprising: converting the e-commerce network into an undirected attributed graph G; initializing parameters, and calculating the attribute enhanced conductance of each node in the undirected attributed graph according to the initialized parameters; extracting candidate rough communities according to the attribute enhanced conductance; screening out rough communities from the candidate rough communities; processing the rough communities by using a trained neural community optimization model to obtain an encoded state; optimizing the rough communities according to the encoded state to obtain refined communities; obtaining user data information, searching the user data information based on the refined communities, and recommending products to the user according to the online community search results.

[0017] When converting the e-commerce network into an attributed graph, users are used as nodes, and edges are constructed based on their transaction, interaction, and social behaviors, thereby forming an undirected attributed graph. The attributes of users include behavioral characteristics such as purchase frequency, transaction category distribution, and repurchase rate. The construction of edges can be based on various relationships between users. For example, if two users have purchased the same category of products, traded with the same merchant, followed each other on the same social platform, or interacted in the product review area (such as replying or liking), an undirected edge is established between them. Finally, an undirected attributed graph G is obtained.

[0018] The undirected attributed graph G is where V is the set of user nodes, E is the set of connection edges established by users, and F is the attribute matrix of users. Given the undirected attributed graph scoring function g(·) and query node q ∈ V, the goal of community search is to determine a vertex set satisfying (1) q ∈ C q ; (2) C q is connected; (3) g(C q ) is optimal.

[0019] Such as Figure 1As shown. Specifically, the model first utilizes attribute-enhanced conductance to adaptively extract rough candidate communities by identifying h-hop subgraphs with optimal attribute-enhanced conductance. The attribute-enhanced conductance of the present invention captures both the topological structure (i.e., internal cohesion and external sparsity) and the attributes of nodes. Therefore, the generated rough candidate communities exhibit relatively good community quality. Subsequently, the model pre-trains a graph neural network as a state encoder to integrate community awareness into the state representation through the contrastive loss and triplet loss proposed in the present invention. After encoding the rough candidate communities into an initial state by the state encoder, reinforcement learning is used to initiate the community refinement process. At each step of refinement, the agent processes the state encoding of the community and refines the community by incorporating promising nodes while excluding noisy or irrelevant nodes. Then, the state encoder re-encodes the refined community to generate the next state, enabling the agent to continue with subsequent refinement steps. This iterative process continues until a predefined termination policy is satisfied.

[0020] A community search method for product recommendation in an e-commerce network, the specific steps including:

[0021] Step 1: Convert the e-commerce network into an undirected attributed graph G.

[0022] In an e-commerce platform, each user can be regarded as a node in a graph G and is attached with multiple attributes, which can characterize the basic information and behavior patterns of the user. Common user attributes include: age, gender, browsing history, purchase records, comments, likes, follows, etc. For categorical attributes, they are converted into a one-hot vector, and for numerical attributes, they are normalized. Edges are constructed based on a certain relationship between users. Specifically, edges are established based on co-purchase relationships, co-merchant transactions, social interaction relationships, similar behavior patterns, etc.

[0023] Step 2: Input graph G. In the present invention, the input graph G is an e-commerce network, and the information contained in graph G includes: the adjacency matrix of the original graph G, the original attribute (feature) matrix of the nodes in the original graph G, and the community labels in the original graph G. Among them, the original attribute matrix contains the original attribute (feature) vectors of all nodes.

[0024] Step 3: Calculate the attribute-enhanced conductance.

[0025] Given a graph G and a vertex set C, the conductance of C is defined as follows:

[0026]

[0027] Where represents the complement of the community, defined as The cut between the community C and its complement is denoted as And vol(C) = ∑u∈C Let \(d(u)\) denote the sum of the degrees of the nodes in community \(C\). Thus, the smaller the value of \(\varphi(C)\), the lower the number of edges exiting community \(C\) relative to the number of edges it contains. Therefore, a lower value of \(\varphi(C)\) indicates a higher quality of community \(C\). A more useful probabilistic interpretation of conductance is as follows.

[0028] Given a graph \(G\) and a community \(C\). Consider a random walk generated by the transition matrix \(P = D^{-1}A\) -1 starting from an initial state \(\omega_0\) in \(C\) (or ) and randomly selected according to the degree distribution. That is: )

[0029]

[0030] Specifically, the conductance of community \(C\) is the probability that a random walker starting within \(C\) (or ) will escape to the outside via a single-hop random walk. To distinguish it from the attribute-based conductance discussed later, the conductance is redefined as topology-based conductance, denoted by \(\varphi\) t (C). However, \(\varphi\) t (C) is insufficient in this case because it does not consider the attributes associated with the nodes. Inspired by the random walk interpretation of conductance, the present invention proposes a new concept of attribute-based conductance to capture both structural proximity and attribute similarity.

[0031] In this embodiment, given an attributed graph a connection between nodes \(u\) and \(v\) through a specific attribute \(f\) is considered an attribute edge, denoted as \((u, v, f)\). That is, \((u, v, f)\) indicates that nodes \(u\) and \(v\) share the attribute \(f\) (i.e., and ).

[0032] In this embodiment, given an attributed graph the attribute degree of node \(u\), denoted as \(d\) a (u), is defined as the number of attribute edges connected to \(u\). Its calculation formula is as follows:

[0033]

[0034] The original attributed graph is mapped to a multigraph (i.e., two vertices can be connected by multiple edges), as Figure 2 shown. In this multigraph, the edges correspond to the attribute edges, and the degree of each node reflects its attribute degree. Unfortunately, the multigraph can be very dense (even close to quadratic), especially if there is an attribute value shared by a relatively large portion, e.g., 50% of the nodes in graph \(G\). Next, the present invention will show how to quickly obtain the attribute-enhanced conductance without materializing the multigraph.

[0035] In this embodiment, given an attributed graph G, the attribute-based transition probability from node u to node v is defined as follows:

[0036]

[0037] In this embodiment, an attribute-based transition probability model from u to v is established based on the attribute set of G. Consider Figure 2 the example of nodes v0 and v3. v0 is connected to v3 by two attribute edges (v0, v3, CS) and (v0, v3, ML). In addition, v0 has three attribute edges (v0, v1, CS), (v0, v5, CS), and (v0, v6, CS). Thus, the attribute degree of node v0 is 5, and the attribute transition probability from node v0 to v3 is

[0038] Given an attributed graph G and a community C, the attribute-based conductance φ a (C) is defined as follows:

[0039]

[0040] In the formula, denotes the number of attribute edges connecting community C and community , and vol a (C) = ∑ u∈C d a (u) represents the sum of the attribute degrees within C.

[0041] In this embodiment, the definition of the attribute-based conductance φ a (C) is similar to that of the topology-based conductance φ t (C), but the calculation of φ a (C) is much more complex. Understanding the attribute-based conductance from the perspective of attribute-based random walks can enhance its practicality. Specifically, formula (5) is reformulated as where denotes the random walk generated by the attribute-based transition matrix P a (i.e., formula (4)). Therefore, the smaller φ a (C) is, the lower the probability of transferring from community C (or ) to community (or C) through attribute-based one-hop random walks. Intuitively, this indicates that the nodes within the community largely have similar attributes, with limited overlap with the attributes of nodes outside the community. This observation is consistent with the principle of internal attribute cohesion and external attribute sparsity.

[0042] In this embodiment, the definition of attribute-enhanced conductance is introduced, which can capture both the topology and attributes of a community. Given an attributed graph G, a community C, and a preference parameter β, the attribute-enhanced conductance is defined as follows:

[0043] Φ(C) = β·φ t (C) + (1 - β)·φ a (C) (6)

[0044] where Φ(C) is weighted by φ t (C) and φ a (C) through the preference parameter β. This formula captures the trade-off between the topological structure and node attributes, and different communities with distinct characteristics can be identified by changing β. In particular, when β > 0.5, the community emphasizes the interaction edges between vertices. On the contrary, when β < 0.5, the focus shifts to the attribute similarity between vertices.

[0045] In this embodiment, let N h (q) = {v|dist(q, v) ≤ h} be the h-hop neighbors of the query node q, where dist(q, v) represents the shortest path distance between node q and v. Designate N h (q) as the candidate community. Intuitively, nodes closer to the query node are more likely to belong to the target community. This method implicitly defines the order of node addition (i.e., adding according to the batch distance). In Figure 1 , using v0 as the query node, the 1-hop, 2-hop, and 3-hop subgraphs are represented as C1, C2, and C3 respectively. First, calculate the conductance values based on topology, and obtain φ t (C1) = 0.55, φ t (C2) = 0.33, and φ t (C3) = 0.55. From these values, select C2 as the coarse community using topology-based conductance. Next, when merging attributes, the conductance values based on attributes are calculated as φ a (C1) = 0.25, φ a (C1) = 0.5 and φ a (C3) = 1. By setting β = 0.5, indicating equal weights for the topological structure and node attributes, the attribute-enhanced conductance values are adjusted to Φ(C1) = 0.40, Φ(C2) = 0.41, Φ(C3) = 1. In this example, select C1 as the coarse community because C1 better conforms to the community definition compared to C2.

[0046] From the analysis of formula (6), it can be seen that the main bottleneck in the calculation and update of attribute-enhanced conductance lies in the efficient calculation of vol a (C) and Quick update. To overcome this challenge, it is observed that a simple matrix-vector product can obtain the attribute degrees of all nodes. In addition,

[0047] In this embodiment, considering an attributed graph G, for any node u ∈ V, the attribute degree of u can be reformatted as where 1 n ∈ R 1×n (1 k ∈ R 1×k ) is a vector with all elements equal to 1. In addition, there is

[0048] In this embodiment, for a community C and any u ∈ C, there is and

[0049] Given a community C and any node u ∈ C, then there is:

[0050]

[0051] φ t (or φ a ) The challenge of incremental calculation is how to effectively maintain (or ). Note that |cut(u, C)| = |N(u) ∩ C| can be easily obtained in O(d(u)) time. However, calculating |cut a (u, C)| is more complex. This is because To improve efficiency, several important data structures are designed to effectively update φ t and φ a .

[0052]

[0053]

[0054] Step 5: Coarse community extraction.

[0055] Algorithm 1 provides the pseudocode for coarse community extraction. Specifically, in lines 1 - 3, it obtains the attribute degree vector d a , and initializes the candidate community C, the current search space tmp, and the internal attribute att. Subsequently, according to Lemma 2, it executes cut, vol, cut a and vol aThe incremental dynamic update process (lines 5 - 10). Lines 11 - 13 update the candidate community C and the optimal value Finally, line 14 returns C as the candidate community.

[0056] Figure 3 Example illustration of Algorithm 1. The left side shows the update process that occurs after adding each node. On the right side, the update of the data is elaborated using a node - attribute bipartite graph. The dark blue nodes represent the current search space tmp, while the dark green nodes represent the nodes to be added.

[0057] In this embodiment, reconsider Figure 2 , Figure 3 illustrates the process of expanding from the query node v0 to N 1 (v0). To demonstrate the dynamic update algorithm, focus is placed on the addition of node v3 (i.e., the second step). Initially, the community C consists of nodes v0 and v1. The neighbors of node v3 include v0, v1, v2, and v4, and there are two edges connecting v3 to the community C. Thus, |cut(v3,C)| = 2. Then cut is updated to cut = 6 + 4 - 2×2 = 6, while vol = 8 + 4 = 12. At this time, the internal attribute vector att is [2,1,0,0,0], indicating that two edges connecting the CS attribute and one edge connecting the ML attribute are associated with the community C. Therefore, represents three attribute edges by which node v3 is connected to the community C through its own attributes (i.e., CS and ML). The updated cut a becomes 7 + 5 - 2×3 = 6, and vol a = 9 + 5 = 14. With the addition of node v3, att is updated to [1,1,0,0,0]+[2,1,0,0,0] = [3,2,0,0,0]. This process is iterated, adding nodes in sequence until all nodes are added (i.e., Δ(h)).

[0058] Step 6: State encoding.

[0059] The community extraction module gives priority to scalability rather than community quality, so the rough candidate community needs to be further improved. Therefore, the present invention designs a neural community optimization method, whose structure is divided into two main parts. In the state encoder component, two loss functions are used to guide the pre - trained model, and these two loss functions integrate community - aware node representations as the state input for reinforcement learning. In the community refiner component, reinforcement learning is used to balance exploration and exploitation to determine the nodes to be added or deleted. This process ultimately produces high - quality communities.

[0060] In the state encoder component, community awareness is integrated into the embedded space of nodes. To this end, two loss functions are designed to achieve a strong correlation between nodes and communities: contrastive loss and triplet loss. Intuitively, an edge between two nodes indicates that they are likely to belong to the same community, while the absence of such an edge indicates that they do not belong to the same community. Therefore, the contrastive loss is used to model this relationship:

[0061] L C = ∑ u,v∈V A uv δ(h u , h v ) + (1 - A uv ) max(0, γ1 - δ(h u , h v )) (9)

[0062] where δ(·) represents the distance metric, and the cosine distance is used. γ1 is the margin hyperparameter representing the minimum distance. In the community search task, when seed nodes are provided, the remaining nodes can be divided into two different groups: the group within the same community and the group in different communities. To effectively capture this difference, the triplet loss is adopted:

[0063] L T = ∑ (q,q+,q-) max{δ(h q , h q+ ) - δ(h q , h q- ) + γ2, 0} (10)

[0064] where q, q + and q - represent the query node, the positive sample (i.e., q + and q are in the same community), and the negative sample (i.e., q - and q are in different communities), respectively. γ2 is the margin hyperparameter representing the minimum distance. Both of the above loss functions are considered. Therefore, the formal definition of the total loss is as follows:

[0065] L = L T + αL C (11)

[0066] where L is the loss function of the neural community optimization model, L T is the margin loss, α is the hyperparameter controlling the loss, L C is the triplet loss, A uv is the value of the u-th row and v-th column in the adjacency matrix, δ(h u , h v ) is the cosine distance between h u and h v hu is the embedding of node u, h v is the embedding of node v, γ1 is the edge hyperparameter of the minimum distance, q is the query node, q + is the positive sample, q - is the negative sample, δ(h q , h q+ ) is the cosine distance between h q and h q+ , h q is the embedding of the query node, h q+ is the embedding of the positive sample, h q- is the embedding of the negative sample, γ2 is the boundary hyperparameter.

[0067] Without loss of generality, this paper uses a graph convolutional network as the encoder of this component, which is defined as follows:

[0068]

[0069] Among them, W l+1 and b l+1 represent trainable weights, σ(·) represents a non-linear activation function, such as ReLU. Dr(·) is the dropout rate, which is used to prevent overfitting. In this paper, a two-layer GCN architecture is adopted.

[0070] Step 7: Refine the rough community.

[0071] In this embodiment, after obtaining the candidate communities, the community search problem is redefined as a community refinement graph optimization task.

[0072] Specifically, given a graph G and a candidate rough community C coa , and a score function Υ(·), the goal of community refinement is to identify a community C coa by adding or deleting the nodes of C opt with the best Υ(C opt ).

[0073] There are two main motivations for using reinforcement learning (abbreviated as RL). First, since the community optimization problem is NP-hard, a direct solution is impractical. Second, the goal of the present invention is to achieve adaptive node selection in the refinement stage, eliminating the need to establish a predetermined threshold or a fixed result community size for nodes. Fortunately, reinforcement learning naturally has the advantage of solving the above two problems. Therefore, the community refiner component is formalized as a Markov decision process (MDP), which is characterized by a tuple which is described as follows:

[0074] 1. State. During the refinement process, a trained state encoder is used to encode the community and its neighbors, which are then used as the input for the state representation. The initial state S1 is defined as follows:

[0075]

[0076] where is the boundary of C coa . I represents the indicator vector, which takes the value 1 when node u appears in community C coa and 0 otherwise.

[0077] 2. Action. At each step of this process, consider adding a node from the current state, specifically from the neighbors of the intermediate community, while removing a node from the community. Ideally, these two operations should run independently. To achieve this, two different prediction networks are designed for these different strategies. A multi-layer perceptron (MLP) is used as the policy network to decode the state vector into a scalar score value. Specifically, at step t, the two policy networks and evaluate the action spaces of the two strategies by assigning scores respectively:

[0078]

[0079] 3. State transition. After obtaining the scores, identify the node with the highest score from and add it to the community, while removing the node with the lowest score from C t . This process generates a new community C t+1 . The state transition is expressed as follows:

[0080]

[0081] 4. Reward. The well-known Adjusted Rand Index (ARI) is used to evaluate the effectiveness of the proposed method in protecting the potential community structure. Specifically, the reward function is defined as follows:

[0082]

[0083] where represents the true community. For the process of adding nodes, r label is specifically used to enhance the incentive for effective community expansion:

[0084]

[0085] During the node removal process, the condition for r label is modified such that if the removal is not in In this adjustment, the reward mechanism is ensured to appropriately encourage the elimination of nodes irrelevant to the community.

[0086] 5. Flexible termination strategy. Existing methods often rely on community scoring thresholds or limit the number of nodes, which are not satisfactory due to their limitations. Inspired by this, the present invention introduces two flexible and smooth termination signals ε a and s r , which respectively notify two policy networks. Taking the append process as an example, the termination signal s a is defined as a virtual node, whose features are randomly generated and incorporated into the prediction together with other node features. When the RL model selects the s a node, the append process terminates. When terminating these two processes, the resulting state is considered the final community.

[0087] Figure 4 Offline training. Starting from a candidate rough community for the refinement process, a new set of states, actions, and rewards is generated at each step until a predefined termination strategy is activated. This process lasts for τ episodes, during which the obtained trajectories are used to train the agent.

[0088] 5. Offline training. As Figure 4 shown, in the offline training phase, a candidate rough community is first sampled from the training dataset, and the agent is allowed to perform the complete community refinement process. Specifically, the agent first encodes the state of the community (as shown by the color bar in the figure), then decodes this state into a score value using the policy network (represented by the blue and green bars), and then calculates the reward using the score value and updates the state. It should be emphasized that during the training process, in order to balance exploration and exploitation, an ε-greedy action strategy is adopted. Under this strategy, the probability of selecting the node with the highest (or lowest) score is 1 - ε, while the probability of taking a random action is ε. The value of ε linearly anneals from 1.0 to 0.05 throughout the refinement process. After completing the whole process, the training trajectory

[0089] The policy gradient method is a well-known policy learning method, including trust region policy optimization and proximal policy optimization. In this paper, proximal policy optimization is adopted as a key component of the model because it can stabilize the training process by imposing constraints on policy updates, thus preventing large and unstable changes. The loss function of proximal policy optimization is described as follows:

[0090]

[0091] where represents the ratio of the new policy to the old policy. A tDenote the advantage function, which is usually estimated using the temporal difference method. The clipping function clip(r t (φ), 1 - ε, 1 + ε) constrains the policy ratio r t (φ) within the interval [1 - ε, 1 + ε]. Among them, if r t (φ) is less than 1 - ε, it is set to 1 - ε; if r t (φ) is greater than 1 + ε, it is set to 1 + ε. This clipping mechanism is crucial for the loss function because it can prevent overly large updates to the policy during reinforcement learning training, thereby reducing the risk of instability in the training process.

[0092] 6. Online refinement. The online refinement stage starts when the agent encodes the candidate community and its neighbors into embedding vectors through the state encoder. These vectors are then decoded into node scores using the policy network. Different from the training stage, this stage does not involve exploratory actions; instead, the agent directly selects the node with the highest (or lowest) score to build a new community. This iterative process continues until a predetermined termination criterion is met.

[0093] Step 8: Conduct product recommendations based on the online community search results. Utilize the results of the community search to find the members in the same community who are most similar to the target user, and recommend the products they have purchased but the target user has not. The core assumption is that users within the community have highly similar shopping preferences, so the consumption records of neighboring users in the community can be used to fill the interest gaps of the target user. Specifically, if user A and user B belong to the same community and they show a high degree of similarity in their past consumption behaviors, and B has purchased a certain smart bracelet but A has not, then this bracelet may be a product that A is interested in and can be recommended to A.

[0094] The above - mentioned embodiments have further elaborated on the purpose, technical solutions, and advantages of the present invention. It should be understood that the above - mentioned embodiments are only the preferred embodiments of the present invention and are not used to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made to the present invention within the spirit and principle of the present invention should be included within the protection scope of the present invention.

Claims

1. A community search method for product recommendation in an e-commerce network, characterized in that, Including: Convert the e-commerce network structure into an undirected attributed graph G; Initialize parameters, and calculate the attribute enhanced conductance of each node in the undirected attributed graph according to the initialized parameters; Extract candidate rough communities according to the attribute enhanced conductance; Select rough communities from the candidate rough communities; Process the rough communities using the trained neural community optimization model to obtain the encoding state; Optimize the rough communities according to the encoding state to obtain refined communities; Obtain user data information, search the user data information based on the refined communities, and recommend goods to users according to the online community search results.

2. The community search method for product recommendation in an e-commerce network according to claim 1, wherein The undirected attribute graph G is where V is the set of user nodes, E is the set of connection edges established by the user, and F is the attribute matrix of the user.

3. The community search method for product recommendation in an e-commerce network according to claim 1, wherein Calculating the attribute enhanced conductance of each node in the undirected attributed graph includes: calculating the probability of random walk of nodes in the undirected attributed graph; constructing the topological structure graph of the undirected attributed graph according to the probability of random walk; calculating the attribute conductance of the undirected attributed graph; calculating the topological conductance of the topological structure graph; calculating the attribute enhanced conductance according to the attribute conductance and the topological conductance.

4. The community search method for product recommendation in an e-commerce network according to claim 3, characterized in that Calculating the attribute conductance of the undirected attributed graph includes: Among them, φ a (C) is the attribute conductance of the undirected attributed graph, is the number of attributed edges connecting community C and community , vol a (C) is the sum of the attributed degrees within C, v i is a node inside community C, v j is a node outside community C, f is the shared attribute, d a (u) is the attributed degree of node u.

5. The community search method for product recommendation in an e-commerce network according to claim 3, characterized in that Calculating the topological conductance of the topological structure graph includes: Among them, φ t (C) is the topological conductance in the undirected graph, is the edge connecting community C and , and vol(C) is the sum of the degrees of the nodes within C.

6. The community search method for product recommendation in an e-commerce network according to claim 3, characterized in that, Calculating the attribute enhanced conductance as: Φ(C) = β·φ t (C) + (1 - β)·φ a (C) where β is the preference parameter, φ t (C) is the topological conductance, φ a (C) is the attribute conductance of the undirected attribute graph.

7. The community search method for product recommendation in an e-commerce network according to claim 1, characterized in that Processing the rough communities using the trained neural community optimization model includes: pre-training a state encoder with community awareness; processing the rough communities using the pre-trained state encoder; inputting the processing results into two policy networks and training them through a reinforcement learning algorithm; using the trained policy networks to refine the rough communities.

8. A community search method for product recommendation in an e-commerce network according to claim 7, characterized in that, The loss function for training the neural community optimization model is: L = L T + αL C Among them, L is the loss function of the neural community optimization model, L T is the margin loss, α is the hyperparameter controlling the loss, L C is the triplet loss, A uv is the value at the u-th row and v-th column in the adjacency matrix, δ(h u , h v ) is the cosine distance between h u and h v , h u is the embedding of the u node, h v is the embedding of the v node, γ1 is the margin hyperparameter of the minimum distance, q is the query node, q + is the positive sample, q - is the negative sample, δ(h q , h q+ ) is the cosine distance between h q and h q+ , h q is the embedding of the query node, h q+ is the embedding of the positive sample, h q- is the embedding of the negative sample, γ2 is the boundary hyperparameter.

9. A community search method for product recommendation in an e-commerce network according to claim 1, characterized in that, Optimizing the rough communities according to the encoding state includes: defining the initial state of the rough communities; encoding the intermediate communities using the state encoder; decoding the encoded intermediate communities using the decoder to obtain the actions to be taken next; performing state transition according to the next actions; reaching the preset termination condition to complete community refinement.

Citation Information

Patent Citations

  • Method and device for detecting large-scale social network communities

    CN103942308A

  • Local community discovery method and device based on node enhanced hypergraph

    CN115994831A

  • Community searching method based on subgraph conductance

    CN118839038A

  • Search method and system based on forbidden node awareness

    US20230229715A1