A community search method for product recommendation in e-commerce networks
By combining deep learning with traditional structural constraints in community search methods within e-commerce networks, and utilizing attribute-enhanced conductivity and neural community optimization models, the problems of insufficient flexibility and accuracy of existing models are solved, achieving efficient and accurate product recommendation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2026-03-10
AI Technical Summary
Existing product recommendation models in e-commerce networks suffer from insufficient flexibility due to reliance on predefined structural constraints or insufficient accuracy due to reliance solely on deep learning, making it difficult to meet personalized and diverse recommendation needs.
By combining deep learning with traditional predefined structural constraints, this method transforms the e-commerce network into an undirected attribute graph, calculates attribute-enhanced conductivity, extracts candidate coarse communities, and refines them using a neural community optimization model to obtain refined communities for product recommendation.
It significantly improves the accuracy and interpretability of community search, enhances the efficiency of community exploration in large-scale networks, accurately characterizes community structure, overcomes data sparsity problems, and enhances the robustness and diversity of recommendation systems.
Smart Images

Figure CN120338910B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer science, and specifically relates to a community search method for product recommendation in an e-commerce network. Background Technology
[0002] With the rapid development of e-commerce, the number of users and products on platforms has grown exponentially. Efficiently recommending products of interest to users has become a crucial issue. In e-commerce networks, there are complex interactions and multi-layered relationship structures between users and products, containing rich potential value. However, traditional recommendation algorithms have limitations when facing such complex networks. They typically rely on explicit user-product interaction data and cannot fully explore the implicit relationships between products. Furthermore, recommendation systems also face problems such as data sparsity, cold start, and limited recommendation results, making it 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] Community search, a key technique in graph mining, focuses on dynamically discovering tightly connected sub-communities within complex networks, targeting specific nodes or conditions. Unlike traditional global community partitioning, this approach prioritizes high-quality local subgraphs, enabling rapid response to queries and the generation of closely related communities for users or products. In e-commerce, community search combines user-product interactions with product correlations to more accurately uncover potential user interest areas. For example, when a user shows interest in a particular product category, community search can identify a set of closely related products from the product network, providing more targeted and interpretive recommendations. Furthermore, community search effectively mitigates the cold start problem by analyzing relationships between products and users within the network structure, generating reasonable recommendations for new users or products even in the absence of sufficient historical data. Moreover, community search returns a subgraph or subset, making these interpretive recommendations more readily accepted and trusted by users.
[0004] Existing community search models for product recommendation can be broadly categorized into two types: traditional community search methods and learning-based community search methods. The former typically identifies communities by utilizing pre-defined structural constraints, such as k-kernel-based and k-derivative-based models. However, these impose cumbersome constraints on the target community, leading to structural inflexibility. Learning-based community search methods can alleviate the inflexibility of traditional community search methods. A popular approach is to define the community search problem as a node classification task. These methods employ a two-stage framework. First, the model is trained using semi-supervised or unsupervised techniques to generate node embedding vectors. Then, these embedding vectors are used to evaluate the probability that each vertex belongs to the target community. Another approach defines the community search problem as a generative task. Specifically, the model first uses a graph neural network to generate node representations and then generates communities from query nodes. Compared to node classification models, generative models offer greater flexibility and eliminate concerns about community connectivity.
[0005] In summary, while existing community search models for product recommendations have achieved success, their methods either rely entirely on predefined structural constraints or simply 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 users' personalized product recommendation needs. Summary of the Invention
[0006] To address the problems existing in the prior art, this invention proposes a community search method for product recommendation in e-commerce networks. The method includes: converting the e-commerce network into an undirected attribute graph G; initializing parameters and calculating the attribute enhancement conductance of each node in the undirected attribute graph based on the initialization parameters; extracting candidate coarse communities based on the attribute enhancement conductance; selecting coarse communities from the candidate coarse communities; processing the coarse communities using a trained neural community optimization model to obtain an encoding state; optimizing the coarse communities based on the encoding state to obtain refined communities; acquiring user data information; searching the user data information based on the refined communities; and recommending products to users based on the online community search results.
[0007] The beneficial effects of this invention are:
[0008] This invention combines deep learning techniques with traditional predefined structural constraints. This method organically combines the advantages of both, 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, it not only improves the accuracy of community identification but also provides a more efficient and scalable framework for community exploration in large-scale networks. This method can more finely characterize community structures, especially in complex networks where attributes are crucial to node relationships, demonstrating a more accurate community partitioning capability.
[0009] This invention proposes a method for dynamically updating the property conductance, and rigorous mathematical derivation proves that the time complexity of this method is linearly related to the graph size. This result demonstrates a significant improvement in the scalability of this method on large-scale graphs. Traditional conductance-based community search methods often face bottlenecks in computational resources and time when dealing with large-scale graphs, especially when the graph size increases dramatically. The dynamic update scheme of this invention avoids the complexity of global computation by efficiently calculating conductance changes, enabling the algorithm to maintain high performance even on large-scale graphs.
[0010] This invention presents a community-based product recommendation method that leverages user similarities and group behavioral characteristics to improve the accuracy and interpretability of recommendations. Since community segmentation is typically based on user transaction relationships, social networks, or behavioral patterns, users within the same community often share similar interests, preferences, or consumption habits. Therefore, community information helps overcome data sparsity issues, enabling reliable recommendations even for users with limited historical interactions. Furthermore, community structure enhances the robustness of the recommendation system. Compared to individual behavior-driven recommendation methods, it better captures user interaction patterns within the community, avoiding the impact of isolated abnormal behaviors on recommendation results. Simultaneously, community-based recommendations can improve product diversity and novelty, especially by drawing on the consumption experiences of community members to recommend products that are not yet widely purchased but may align with users' potential interests, thereby increasing exploratory nature and user satisfaction. Attached Figure Description
[0011] Figure 1 This is a diagram illustrating the overall framework of the model of the present invention;
[0012] Figure 2 This invention transforms the original attribute graph into a multigraph.
[0013] Figure 3 This is the rough community extraction process of the present invention;
[0014] Figure 4 This is a diagram illustrating the initial refinement process of the candidate coarse community in this invention. Detailed Implementation
[0015] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0016] A community search method for product recommendation in an e-commerce network includes: converting the e-commerce network into an undirected attribute graph G; initializing parameters and calculating the attribute-enhancing conductance of each node in the undirected attribute graph based on the initialization parameters; extracting candidate coarse communities based on the attribute-enhancing conductance; selecting coarse communities from the candidate coarse communities; processing the coarse communities using a trained neural community optimization model to obtain an encoding state; optimizing the coarse communities based on the encoding state to obtain refined communities; acquiring user data information; searching the user data information based on the refined communities; and recommending products to users based on the online community search results.
[0017] When converting an e-commerce network into an attribute graph, users are used as nodes, and edges are constructed based on their transactions, interactions, and social behaviors, thus forming an undirected attribute graph. User attributes include behavioral characteristics such as purchase frequency, transaction category distribution, and repurchase rate. Edge construction can be based on various user relationships. For example, if two users have purchased the same type of goods, transacted with the same merchant, followed each other on the same social platform, or interacted in the product review section (such as replying or liking), then an undirected edge is established between them. Ultimately, an undirected attribute graph G is obtained.
[0018] An undirected attribute graph G is Where V is the set of user nodes, E is the set of connections established by the user, and F is the attribute matrix of the user. Given an undirected attribute graph... Given a scoring function g(·) and a query node q∈V, the goal of community search is to determine a set of vertices. Satisfying (1) q∈C q (2)C q Connected; (3)g(C q The optimal value is ).
[0019] like Figure 1As shown. Specifically, the model first utilizes attribute-enhanced conductance to adaptively extract coarse candidate communities by identifying h-hop subgraphs with optimal attribute-enhanced conductance. The attribute-enhanced conductance of this invention simultaneously captures the properties of the topology (i.e., internal cohesion and external sparsity) and nodes. Therefore, the resulting coarse candidate communities exhibit relatively good community quality. Subsequently, the model pre-trains a graph neural network as a state encoder, integrating community awareness into the state representation through the contrastive loss and triple loss proposed in this invention. After the state encoder encodes the coarse candidate communities into initial states, a community refinement process is initiated using reinforcement learning. At each refinement step, the agent processes the community's state encoding and refines the community by including 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 executing 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, comprising the following steps:
[0021] Step 1: Convert the e-commerce network into an undirected attribute graph G.
[0022] In e-commerce platforms, each user can be viewed as a node in a graph G, accompanied by multiple attributes that characterize the user's basic information and behavioral patterns. Common user attributes include age, gender, browsing history, purchase history, comments, likes, and following information. Categorical attributes are converted into a one-hot vector, while numerical attributes are normalized. Edges are constructed based on the relationships that exist between users. Specifically, edges are established based on shared purchasing relationships, transactions with the same merchants, social interaction relationships, and similar behavioral patterns.
[0023] Step 2: Input graph G. In this invention, the input graph G is an e-commerce network. 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 tags in the original graph G. Among them, the original attribute matrix contains the original attribute (feature) vectors of all nodes.
[0024] Step 3: Calculate property-enhanced conductivity.
[0025] Given a graph G and a vertex set C, the conductance of C is defined as follows:
[0026]
[0027] in The complement of a community is defined as follows: The cut between community C and its complement is represented as And vol(C) = ∑u∈C Let d(u) represent the sum of the degrees of the nodes in community C. Therefore, a smaller value of φ(C) indicates a relatively lower number of edges leaving community C compared to the number of edges it contains. Thus, a lower value of φ(C) indicates a higher quality community C. A more useful probabilistic interpretation of conductance is as follows.
[0028] Given a graph G and a community C, consider a transition matrix P = D. -1 A generated random walk The initial state ω0 is in C (or In this context, selections are made randomly according to a degree distribution. That is:
[0029]
[0030] Specifically, the conductivity of community C is the electrical conductivity of a random walker within C (or The initial probability will escape to the outside through a single-hop random walk. To distinguish it from the attribute-based conductance discussed later, conductance is redefined as topology-based conductance, denoted by φ. t (C) indicates. However, φ t (C) is insufficient in this case because it does not take into account node-related properties. Inspired by the random walk interpretation of conductance, this invention proposes a novel concept of property-based conductance to capture structural proximity and property similarity.
[0031] In this embodiment, a property graph is given. 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 attribute f (i.e., ...). and ).
[0032] In this embodiment, a property graph is given. The attribute degree of node u is denoted as d. a (u) is defined as the number of attribute edges connected to u. Its calculation formula is as follows:
[0033]
[0034] Mapping the original attribute graph to a multigraph (i.e., two vertices can be connected by multiple edges), such as Figure 2 As shown in the diagram, in this multigraph, edges correspond to attribute edges, and the degree of each node reflects the degree of its attribute. Unfortunately, multigraphs can be very dense (even approaching quadratic forms), especially if an attribute value is shared by a fairly large portion, such as 50% of the nodes in graph G. The present invention will then demonstrate how to quickly obtain attribute-enhanced conductivity without specifying the multigraph.
[0035] In this embodiment, given an attribute graph G, the attribute-based transition probability from node u to node v is defined as follows:
[0036]
[0037] In this embodiment, We will build a transition probability model from u to v based on the attribute set of G. Consider... Figure 2 Consider the example of nodes v0 and v3. v0 is connected to v3 via two attribute edges (v0, v3, CS) and (v0, v3, ML). Additionally, v0 has three more attribute edges: (v0, v1, CS), (v0, v5, CS), and (v0, v6, CS). Therefore, the attribute degree of node v0 is 5, and the attribute transition probability from node v0 to v3 is...
[0038] Given a property graph G and a community C, the property-based conductance φ a (C) is defined as follows:
[0039]
[0040] In the formula, This indicates a connection between community C and community C. The number of attribute edges, vol a (C)=∑ u∈C d a (u) represents the sum of the intrinsic attributes of C.
[0041] In this embodiment, the conductivity φ is based on the attribute. a (C) and topology-based conductance φ t (C) has a similar definition, but the calculation of φ a (C) is much more complex. Understanding attribute-based conductance from the perspective of attribute-based random walks enhances its practicality. Specifically, formula (5) is restated as follows: in The attribute-based transition matrix P represents... a (i.e., the random walk generated by formula (4)). Therefore, φ a The smaller (C) is, the more likely it is that a one-hop random walk based on attributes is performed on the community C (or ) transferred to the community The lower the probability of (or C), the more likely it is to be true. Intuitively, this suggests that nodes within a community have largely similar properties, while the overlap with the properties of nodes outside the community is limited. This observation is consistent with the principle of cohesion of internal properties and sparsity of external properties.
[0042] In this embodiment, the definition of attribute-enhanced conductance is introduced, which can simultaneously capture the topology and attributes of a community. Given an attribute graph G, a community C, and a preference parameter β, attribute-enhanced conductance is defined as follows:
[0043] Φ(C)=β·φ t (C)+(1-β)·φ a (C) (6)
[0044] Wherein, Φ(C) is composed of φ t (C) and φ a (C) is derived through a weighted approach using the preference parameter β. This formula captures the trade-off between topology and node attributes, identifying communities with different characteristics by varying β. Specifically, when β > 0.5, communities emphasize interaction edges between vertices. Conversely, when β < 0.5, the focus shifts to attribute similarity between vertices.
[0045] In this embodiment, let N be... h (q) = {v|dist(q,v)≤h} represents the h-hop neighbors of the query node q, where dist(q,v) represents the shortest path distance between nodes q and v. Specify N. h (q) represents 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 in which nodes are added (i.e., added based on batch distance). Figure 1 In this diagram, v0 is used as the query node, and the 1-hop, 2-hop, and 3-hop subgraphs are represented as C1, C2, and C3, respectively. First, the topology-based conductance is calculated to obtain φ. t (C1)=0.55, φ t (C2) = 0.33, and φ t (C3) = 0.55. From these values, C2 is selected as the coarse community using topology-based conductance. Next, when merging attributes, the attribute-based conductance value is calculated as φ. a (C1)=0.25, φ a (C1) = 0.5 and φ a (C3) = 1. By setting β = 0.5, indicating that the weights of topology and node attributes are equal, the attribute enhancement conductivity values are adjusted to Φ(C1) = 0.40, Φ(C2) = 0.41, and Φ(C3) = 1. In this example, C1 is chosen as the coarse community because it better fits the community definition compared to C2.
[0046] Analysis of formula (6) reveals that the main bottleneck in the calculation and updating of property-enhanced conductivity lies in vol. a (C) efficient computing and Rapid updates are possible. To overcome this challenge, it was observed that a simple matrix-vector product can obtain the attribute degrees of all nodes. Furthermore, rapid dynamic updates can be achieved by simply maintaining a few arrays.
[0047] In this embodiment, consider an attribute graph G, where for any node u∈V, the attribute degree of u can be reformatted as follows: Among them 1 n ∈R 1×n (1 k ∈R 1×k ) is a vector in which all elements are equal to 1. Furthermore, there is
[0048] In this embodiment, for community C and any u∈C, we have as well as
[0049] Given a community C and any node u∈C, then:
[0050]
[0051] φ t (or φ) a The challenge of incremental computation is how to effectively maintain... (or Note that |cut(u,C)|=|N(u)∩C| can be easily obtained in O(d(u)) time. However, computing |cut(u,C)|... a (u,C) is more complex. This is because... To improve efficiency, several important data structures were designed to efficiently update φ. t and φ a .
[0052]
[0053]
[0054] Step 5: Coarse community extraction.
[0055] Algorithm 1 provides pseudocode for coarse community extraction. Specifically, in lines 1-3, it obtains the attribute degree vector d using Lemma 1. a It initializes the candidate community C, the current search space tmp, and the internal attribute att. Then, according to Lemma 2, it performs cut, vol, and 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 each node is added. On the right side, the data update is illustrated using a node-attribute bipartite graph. Dark blue nodes represent the current search space tmp, while dark green nodes represent nodes to be added.
[0057] In this embodiment, a reconsideration Figure 2 , Figure 3 This illustrates the expansion from query node v0 to N. 1 The process of (v0). To demonstrate the dynamic update algorithm, the focus is on the addition of node v3 (i.e., the second step). Initially, community C consists of nodes v0 and v1. Node v3's neighbors include v0, v1, v2, and v4, with two edges connecting v3 to community C. Therefore, |cut(v3,C)| = 2. Then cut is updated to cut = 6 + 4 - 2 × 2 = 6, and vol = 8 + 4 = 12. At this point, the internal attribute vector at is [2,1,0,0,0], indicating that the two edges connecting the CS attribute and the one edge connecting the ML attribute are associated with community C. Therefore, This indicates that node v3 is connected to three attribute edges of community C through its own attributes (i.e., CS and ML). (Updated cut) a It becomes 7 + 5 - 2 × 3 = 6, 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 sequentially until all nodes (i.e., Δ(h)) are added.
[0058] Step 6: Status coding.
[0059] The community extraction module prioritizes scalability over community quality, thus requiring further refinement of the coarse candidate communities. Therefore, this invention designs a neural community optimization method, structurally divided into two main parts. In the state encoder component, two loss functions are used to guide the pre-trained model, integrating community-aware node representations as state inputs for reinforcement learning. In the community refiner component, reinforcement learning is used to balance exploration and exploitation, thereby determining which nodes to add or remove. This process ultimately yields 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 realize the strong correlation between nodes and communities: contrastive loss and triple 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, 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, using cosine distance. γ1 is the marginal hyperparameter representing the minimum distance. In the community search task, when a seed node is provided, the remaining nodes can be divided into two distinct groups: those within the same community and those from different communities. To effectively capture this difference, a triple loss is employed:
[0063] L T =∑ (q,q+,q-) max{δ(h q ,h q+ )-δ(h q ,h q- )+γ2,0} (10)
[0064] Where q, q + and q - Representing the query node and positive sample (i.e., q) respectively. + (and q in the same community) and negative samples (i.e. q) - (and q in different communities). γ2 is the boundary hyperparameter, representing the minimum distance. Considering both loss functions mentioned above, 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 L represents the marginal loss, α is the hyperparameter for controlling the loss, and L represents the marginal loss. C For triple loss, A uv Let δ(h) be the value of row u and column v in the adjacency matrix. u ,h v ) for h u and h v The cosine distance between them, hu For the embedding of node u, h v Let v be the embedding of node v, γ1 be the edge hyperparameter of minimum distance, and q be the query node. + For positive samples, q - For negative samples, δ(h) q ,h q+ ) for h q and h q+ The cosine distance between them, h q For embedding query nodes, h q+ For the embedding of positive samples, h q- γ2 is the embedding of negative samples, and γ2 is the boundary hyperparameter.
[0067] Without loss of generality, this paper uses a graph convolutional network as the encoder for this component, defined as follows:
[0068]
[0069] in, W l+1 and b l+1 σ represents the trainable weights, and σ(·) represents a non-linear activation function, such as ReLU. Dr(·) is the dropout rate, 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 candidate communities, the community search problem is redefined as a community refinement graph optimization task.
[0072] Specifically, given a graph G and a candidate coarse community C coa And a fractional function Υ(·), the goal of community refinement is to add or remove C coa The node, using the optimal Υ(C) opt To identify a community C opt .
[0073] There are two main motivations for using reinforcement learning (RL). First, the community optimization problem is NP-hard, making direct solutions impractical. Second, the goal of this invention is to achieve adaptive node selection during the refinement stage, eliminating the need to establish predetermined thresholds for nodes or fix the resulting community size. Fortunately, reinforcement learning naturally has the advantage of solving these two problems. Therefore, the community refiner component is formalized as a Markov decision process (MDP), characterized by tuples. Its expression is 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 input to the state representation. The initial state S1 is defined as follows:
[0075]
[0076] in, It is C coa The boundary. I represents the indicator vector when node u appears in community C. coa If the value is in the middle, it takes 1; otherwise, it takes 0.
[0077] 2. Actions. At each step of this process, consider adding a node from the current state, specifically adding a node from the neighbors of the intermediate community, while simultaneously deleting a node from the community. Ideally, these two operations should run independently. To achieve this, two different prediction networks are designed for these different policies. A multilayer perceptron (MLP) is used as the policy network to decode the state vector into scalar scores. Specifically, at step t, the two policy networks... and The action spaces of the two strategies are evaluated by assigning scores respectively:
[0078]
[0079] 3. State transition. After obtaining the score, from... The node with the highest score is identified and added to the community, while from C... t Remove the node with the lowest score. This process generates a new community C. t+1 The state transition is described as follows:
[0080]
[0081] 4. Rewards. The effectiveness of the proposed method in protecting potential community structures is evaluated using the well-known Adjusted RAND Index (ARI). Specifically, the reward function is defined as follows:
[0082]
[0083] in, Represents the truth community. For the process of adding nodes, r label Incentives specifically designed to enhance effective community expansion:
[0084]
[0085] During node removal, r label The condition has been modified to if the removal is not present. This adjustment ensures that the reward mechanism appropriately incentivizes 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 unsatisfactory due to their limitations. Inspired by this, this invention introduces two flexible and smooth termination signals ε. a and s r The two policy networks are notified respectively. Taking the append process as an example, the termination signal s is sent. a Defined as a virtual node whose features are randomly generated and incorporated into the prediction along with features from other nodes. When the RL model selects s a When a node is reached, the append process terminates. The state resulting from terminating both processes is considered the final community.
[0087] Figure 4 Offline training. The refinement process begins with a candidate coarse community, generating a new set of states, operations, and rewards at each step until a predefined terminating policy is activated. This process lasts for τ episodes, during which the obtained data is utilized... The trajectory is used to train the agent.
[0088] 5. Offline training. For example... Figure 4 As shown, during the offline training phase, a candidate coarse community is first sampled from the training dataset, allowing the agent to perform a complete community refinement process. Specifically, the agent first encodes the community's state (as shown by the color bars in the figure), then decodes the state into a score value (represented by the blue and green bars) using a policy network, and then calculates the reward using the score value to update the state. It is important to emphasize that an ε-greedy action policy is employed during training to strike a balance between exploration and exploitation. Under this policy, 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 ε decreases from 1.0 to 0.05 during the entire refinement process via linear annealing. After completing the entire process, the training trajectory is derived.
[0089] Policy gradient methods are a well-known policy learning approach, encompassing trust interval policy optimization and proximal policy optimization. In this paper, proximal policy optimization is employed as a key component of the model because it stabilizes the training process by imposing constraints on policy updates, thus preventing large, unstable changes. The loss function for proximal policy optimization is described below:
[0090]
[0091] in, This represents the ratio of the new strategy to the old strategy. A tThe advantage function is typically estimated using time difference methods. The clipping function is `clip(r)`. t (φ), 1-ε, 1+ε) constrain the policy ratio r in the interval [1-ε, 1+ε]. t (φ). Where, if r t If (φ) is less than 1-ε, then set it to 1-ε; if r t If (φ) is greater than 1+ε, then set it to 1+ε. This pruning mechanism is crucial for the loss function because it prevents excessive updates to the policy during reinforcement learning training, thereby reducing the risk of instability during training.
[0092] 6. Online Refinement. The online refinement phase begins with the agent encoding candidate communities and their neighbors into embedding vectors using a state encoder. These vectors are then decoded into node scores using a policy network. Unlike the training phase, this phase 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: Recommend products based on online community search results. Utilize community search results to find members within the same community who are most similar to the target user and recommend products they have purchased that the target user has not yet bought. The core assumption is that users within a community have highly similar shopping preferences; therefore, the consumption records of neighboring users can be used to fill gaps in the target user's interests. Specifically, if user A and user B belong to the same community and their past consumption behaviors show high similarity, and B has purchased a certain smart bracelet that A has not, then that bracelet is likely a product that A would be interested in and can be recommended to them.
[0094] The above-described embodiments further illustrate the purpose, technical solution, and advantages of the present invention. It should be understood that the above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made to the present invention within the spirit and principles 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 electronic commerce network, characterized by, The method comprises the following steps: Converting an e-commerce network into an undirected attribute graph G; Initializing parameters, and calculating attribute enhanced conductance of each node in the undirected attribute graph according to the initialized parameters; Extracting candidate coarse communities according to the attribute enhanced conductance; Screening coarse communities from the candidate coarse communities; processing the coarse communities by using a trained neural community optimization model to obtain an encoding state; Optimizing the coarse communities according to the encoding state to obtain refined communities; Obtaining user data information, searching the user data information based on the refined communities, and recommending commodities to users according to an online community search result; The calculation of the attribute enhanced conductance of each node in the undirected attribute graph comprises the following steps: calculating a probability of random walk of a node in the undirected attribute graph; constructing a topological structure graph of the undirected attribute graph according to the probability of random walk; calculating an attribute conductance of the undirected attribute graph; calculating a topological conductance of the topological structure graph; and calculating the attribute enhanced conductance according to the attribute conductance and the topological conductance; The calculation of the attribute conductance of the undirected attribute graph comprises the following steps: where φ a (C) is the attribute conductance of the undirected attribute graph, is the set of attribute edges connecting community C with community vol a (C) is the sum of the attribute degrees of C, v i is the set of nodes inside community C, v j is the set of nodes outside community C, f is the shared attribute; d a (u) is the attribute degree of node u, indicating the number of attribute edges connected to node u.
2. The community search method for product recommendation in an e-commerce network according to claim 1, wherein, An undirected attribute graph G is Wherein, V is a user node set, E is a user-established connection edge set, and F is a user attribute matrix.
3. The community search method for product recommendation in an e-commerce network according to claim 1, wherein, The calculation of the topological conductance of the topological structure graph comprises the following steps: where φ t (C) is the topological conductance in the undirected graph, is the edge connecting community C and vol(C) is the sum of the node degrees within C.
4. The community search method for product recommendation in an e-commerce network according to claim 1, wherein, The calculation of the attribute enhanced conductance is as follows: Φ(C) = β - φ t (C) + (1 - β) - φ a (C) where β is a preference parameter, φ t (C) is the topological conductance, φ a (C) is the attribute conductance of the undirected attributed graph.
5. The community search method for product recommendation in an e-commerce network according to claim 1, wherein, The processing of the coarse communities by using the trained neural community optimization model comprises the following steps: pre-training a state encoder with community awareness; processing the coarse communities by using the pre-trained state encoder; inputting a processing result into two strategy networks, and training the two strategy networks by using a reinforcement learning algorithm; and refining the coarse communities by using the trained strategy networks.
6. The community search method for product recommendation in an e-commerce network according to claim 5, wherein, The loss function for training the neural community optimization model is as follows: L = L T + aL C where L is the loss function of the neural community optimization model, L T is the marginal loss, a is a hyperparameter controlling the loss, L C is the triple loss, A uv is the value of the u row and v 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 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, and γ2 is the boundary hyperparameter.
7. The community search method for product recommendation in an e-commerce network according to claim 1, wherein, The optimization of the coarse communities according to the encoding state comprises the following steps: defining an initial state of the coarse communities; encoding an intermediate community by using the state encoder; decoding the encoded intermediate community by using a decoder to obtain an action to be taken in the next step; performing state transition according to the action to be taken in the next step; and completing community refinement when a preset termination condition is reached.
Citation Information
Patent Citations
Method and device for detecting large-scale social network communities
CN103942308A
Community searching method based on subgraph conductance
CN118839038A