An explainable open source project recommendation method integrating node context information

By building a network of associations in the open-source community and utilizing depth-first search and tensor embedding techniques, the problems of information overload and collaboration difficulties were solved, improving the recommendation accuracy and community collaboration efficiency of open-source projects, and promoting the discovery and development of open-source projects.

CN118550951BActive Publication Date: 2024-11-12SUZHOU UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411020485.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-11-12
Estimated Expiration
2044-07-29

AI Technical Summary

Technical Problem

In the open source community, issues such as information overload, difficulties in distributed collaboration, and project dormancy make it difficult for open source projects to be recommended quickly and accurately, resulting in a large number of potential projects not being developed and improved, and a high rate of project demise.

Method used

By collecting developer behavior data from the GitHub platform, an open-source project association network is constructed. Depth-first search and tensor embedding techniques are used to mine association paths, build a recommendation model, and perform pruning sampling to improve recommendation accuracy.

Benefits of technology

It improves the efficiency of discovering and recommending open-source projects, promotes the healthy development of the open-source community, and enhances the accuracy of predicting correlations between projects and the understanding of collaboration patterns.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550951B_ABST
    Figure CN118550951B_ABST
Patent Text Reader

Abstract

The present invention discloses an interpretable open source project recommendation method that integrates node context information, comprising the following steps: (1) collecting and storing developer behavior data on the GitHub platform; (2) constructing an open source project association network; (3) constructing an association path based on node context information and spatiotemporal features; (4) constructing and training an open source project recommendation model to obtain weights between target node pairs; (5) using a pruning strategy to randomly sample association paths. The present invention reveals the global dependency and local association between nodes, thereby constructing a more effective association path, improving the accuracy of project recommendation, and effectively coping with the problem of data sparsity, thereby promoting the sustainable development and progress of the open source community.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of open source community ecosystem maintenance and open source project recommendation, and in particular to an explainable open source project recommendation method that integrates node context information. Background Art

[0002] Although open source technology has many values ​​in improving software development efficiency and promoting economic development, as the software demand, software products and developer scale in the software community are growing explosively, the "information overload" problem faced by open source project recommendations is becoming increasingly prominent. At this time, it is extremely difficult to quickly and accurately select suitable developers or software projects for target projects from a large amount of heterogeneous information and establish connections between them. In addition, in the open source software community, the development, improvement and maintenance of software projects mainly rely on distributed collaboration by developers around the world, and there are few direct connections between projects. This has led to a large number of competitive open source projects being difficult to gain the attention and feedback of other developers in a short period of time, and being forced to go dormant or even die. As many as 95.2% of projects on GitHub have not received the attention of developers, and many potential software projects have been forced to die because they cannot be further developed and improved. At the same time, studies have shown that more than 50% of source code files are reused in multiple open source projects, indicating that a large number of open source projects and open source software are similar and reusable. Summary of the invention

[0003] Purpose of the invention: The purpose of the present invention is to provide an interpretable open source project recommendation method that integrates node context information, aiming to address problems such as information overload, distributed collaboration difficulties, project dormancy, and code reuse difficulties in the open source community through a new recommendation method, improve the efficiency of open source project discovery and recommendation, and promote the healthy development of the open source community.

[0004] Technical solution: The method for recommending explainable open source projects by integrating node context information described in the present invention comprises the following steps:

[0005] (1) Collect and store the behavior data of developers on the GitHub platform;

[0006] (2) Build an open source project association network;

[0007] (3) Constructing association paths based on node context information and spatiotemporal features;

[0008] (4) Build and train an open source project recommendation model to obtain the weights between target node pairs;

[0009] (5) Use pruning strategy to randomly sample associated paths.

[0010] Furthermore, step (1) is as follows: using the GH Archive framework to crawl the log behavior data of all developers from the GitHub platform, and classifying the collected data into data streams with different characteristic indicators by combining business scenarios and open source metrics provided by CHAOSS; importing the summarized data streams into the list database ClickHouse, and using SQL to query the required data in the database.

[0011] Furthermore, step (2) is as follows: first, obtain the Issue, Issue_Comment, Pull_Request _Comment, Fork information of the open source project, as well as the Open_issue, Issue_Comment, Open _Pull_Request, Watch and Fork behavior information of the developer from the database; second, integrate the technical dependency and social information to build associations, calculate the project activity and project technical dependency and social association; then, perform a linear combination of the above three indicators, calculate the probability of a link between the target node pairs, and determine the network edges based on the preset threshold; finally, construct an open source project association network , where U is the project node, E is the node link representation, and W is the link weight.

[0012] Furthermore, step (3) includes the following steps:

[0013] (31) Use the depth-first search strategy to mine the associated paths of the target node pairs; the target node is used as the central node to construct a random tensor of fixed depth, and the central information and context information of each node are embedded in each node of G; based on the Latent Factor Model and Signed Latent Factor, average path length, modularity analysis and six degrees of separation theory, find out the factors that affect the target node pairs. The set of upstream and downstream nodes formed by the link ; Use depth-first search to find the target node Construct a neighborhood binary tree, limit the depth to k, and construct the associated path of the target node pair and :

[0014] ;

[0015] ;

[0016] in, represent At the i-th layer node The leaf node set of ; including the following four cases: (A) the associated nodes of the target link {U, V}; (B) the associated paths starting from the U and V nodes respectively; (C) the depth-first search of the associated paths starting from the U node; (D) the multi-dimensional embedding of nodes at different positions on the associated paths;

[0017] (32) Fix the relevant path lengths of all nodes in G and embed the target node v as the corresponding tensor:

[0018] ;

[0019] in, Represents the distance factor of the tensor depth simulation context node; where, represents the influence of node v as one of the central nodes on link formation, Represents node v as an associated path When the distance between the node and the central node is i, the link The impact of

[0020] (33) Based on the target node pair The topological features and associated path sets of the target link weights are reconstructed The expression form:

[0021] ;

[0022] in, is the F-norm expression, is the weight calculation architecture, , The target node pairs are All associated paths.

[0023] Furthermore, step (4) includes the following steps:

[0024] (41) Build a complete project association network, then embed the nodes in the network into tensors and use Construct a new error function with the original weight matrix:

[0025] ;

[0026] in, is the target link, The regular term is sparse, which effectively prevents overfitting; E is the network edge set;

[0027] (42) The error function is trained and the training is stopped when the preset conditions are met. Finally, the target weights of all confirmed edges are obtained and the weights are compared with the threshold to determine whether a new link is formed.

[0028] Furthermore, step (5) is as follows: Set a fixed pruning rate , for the target node pair The associated paths are sampled in equal proportion:

[0029] ;

[0030] ;

[0031] in, is the sampling path for node v, is the sampling path for node u.

[0032] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: through structural analysis of association networks and research on collaboration patterns, combined with the six degrees of separation theory, the set of context nodes that affect target links can be effectively limited; by embedding nodes as tensors, the context information of nodes on the path and the spatiotemporal influence on target links can be well integrated to provide more accurate feature extraction and link prediction; by proposing a deep tensor model, the context information and spatiotemporal feature preferences that affect the formation of links by target nodes can be deeply mined, which helps to improve the accuracy of feature information extraction, thereby better understanding the dynamics and evolutionary processes in the network, and providing more accurate support for project recommendation and community analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 is a flow chart of the present invention;

[0034] Figure 2 The target node pair association path and tensor embedding mechanism of the present invention;

[0035] Figure 3 This is the node context-based link prediction architecture of the present invention. DETAILED DESCRIPTION

[0036] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.

[0037] like Figure 1 As shown, an embodiment of the present invention provides an interpretable open source project recommendation method integrating node context information, including the following steps:

[0038] (1) Collect and store the behavior data of developers on the GitHub platform; specifically: use the GH Archive framework to crawl the log behavior data of all developers on the GitHub platform, and classify the collected data into data streams with different characteristic indicators by combining business scenarios and open source metrics provided by CHAOSS; import the summarized data streams into the list database ClickHouse, and use SQL to query the required data in the database.

[0039] (2) Construct an open source project association network; specifically as follows: First, obtain the Issue, Issue_Comment, Pull_Request _Comment, and Fork information of the open source project from the database, as well as the Open_issue, Issue_Comment, Open _Pull_Request, Watch, and Fork behavior information of the developer; second, integrate the technical dependency and social information to build an association, calculate the project activity and the project technical dependency and social association; then, perform a linear combination of the above three indicators, calculate the probability of a link between the target node pairs, and determine the network edges based on the preset threshold; finally, construct an open source project association network , where U is the project node, E is the node link representation, and W is the link weight.

[0040] (3) Constructing an association path based on node context information and spatiotemporal features; including the following steps:

[0041] (31) Use the depth-first search strategy to mine the associated paths of the target node pairs; the target node is used as the central node to construct a random tensor of fixed depth, and the central information and context information of each node are embedded in each node of G; based on the Latent Factor Model and Signed Latent Factor, average path length, modularity analysis and six degrees of separation theory, find out the factors that affect the target node pairs. The set of upstream and downstream nodes formed by the link ; Use depth-first search to find the target node Construct a neighborhood binary tree, limit the depth to k, and construct the associated path of the target node pair and :

[0042] ;

[0043] ;

[0044] in, represent At the i-th layer node The leaf node set of Figure 2 As shown, there are four cases: (A) the associated nodes of the target link {U, V}; (B) the associated paths starting from the U and V nodes respectively; (C) the depth-first search of the associated paths starting from the U node; (D) the multi-dimensional embedding of nodes at different positions on the associated paths;

[0045] (32) Figure 3 As shown, the relevant path lengths of all nodes in G are fixed, and the target node v is embedded as the corresponding tensor:

[0046] ;

[0047] in, Represents the distance factor of the tensor depth simulation context node; where, represents the influence of node v as one of the central nodes on link formation, Represents node v as an associated path When the distance between the node and the central node is i, the link The impact of

[0048] (33) Based on the target node pair The topological features and associated path sets of the target link weights are reconstructed The expression form:

[0049] ;

[0050] in, is the F-norm expression, is the weight calculation architecture, , The target node pairs are All associated paths.

[0051] (4) Build and train an open source project recommendation model to obtain the weights between target node pairs; this includes the following steps:

[0052] (41) Build a complete project association network, then embed the nodes in the network into tensors and use Construct a new error function with the original weight matrix:

[0053] ;

[0054] in, is the target link, The regular term is sparse, which effectively prevents overfitting. When the error function is closer to 0, it means that the model has a better fitting effect and the overall prediction accuracy is higher. E is the network edge set.

[0055] (42) The error function is trained and the training is stopped when the preset conditions are met. Finally, the target weights of all confirmed edges are obtained and the weights are compared with the threshold to determine whether a new link is formed.

[0056] (5) Use pruning strategy to randomly sample associated paths; the details are as follows: Set a fixed pruning rate , for the target node pair The associated paths are sampled in equal proportion:

[0057] ;

[0058] ;

[0059] in, is the sampling path for node v, is the sampling path for node u.

[0060] The specific tests are as follows:

[0061] Obtaining the data needed for the experiment

[0062] The original data set was obtained, and the top 100 projects were selected as experimental data based on the activity of the projects. In order to conduct in-depth analysis, two open source association networks were constructed: Repo_topic and Repo_relation.

[0063] In the Repo_topic network, each node represents an open source project. If the same features exist in the topics of two projects, there will be an edge between the two projects, and the weight of the edge represents the number of the same features. In this way, we can more accurately measure the similarity and relevance between projects.

[0064] In the Repo_relation network, each node also represents an open source project. If a developer contributes to two projects, there will be an edge between the two projects, and the weight of the edge represents the closeness between the projects. In this way, we can gain a deeper understanding of the collaborative relationship between developers and the degree of interaction between projects.

[0065] In order to ensure the fairness and objectivity of the research, two public datasets were also selected as shown in Table 1: USAir and NetScience. USAir represents the first dataset, where nodes represent airports. If there are flights between two airports, there will be an edge between them, and the weight of the edge represents the frequency of flights. NetScience represents the second dataset, where nodes represent scientists. If there is a cooperative relationship between two scientists, there will be an edge between them, and the weight of the edge represents the number of collaborations. By combining these datasets with network structure analysis, we can have a more comprehensive understanding of the internal mechanisms and collaboration patterns of the open source community, providing strong support for further project recommendations and community development.

[0066] Table 1 Statistical information of experimental datasets

[0067]

[0068] Comparison scheme: This paper selects common link prediction algorithms CN (Common Neighbors), AA (Adamic-Adar), RA (Resource Allocation), WCN (Weighted CN), WAA (WeightedCN), WRA (Weighted RA), LP (Local Path), LRW (Local Random Walk), and Katz as comparison schemes.

[0069] Evaluation indicators: The specific task of the experiment is to predict which unconnected node pairs will be connected and the weights of these links. This experiment randomly selects different numbers of links (edges) in the network as the test set, and the remaining links as the training set. In view of the imbalance problem that is common in open source software project networks, the traditional metric AUC (area under curve) is used to evaluate the prediction performance. AUC fully considers the classification ability of the model. In the case of sample imbalance, it can still make a reasonable evaluation of the classifier, so it is widely used as an evaluation indicator for link prediction results. The larger the AUC value, the better the prediction performance of the model, where AUC∈[0,1]. In subsequent experiments, the average AUC of 50 experimental results is used as the final AUC to enhance the accuracy of the results.

[0070] Experimental results: According to the comparison scheme, evaluation index and parameter settings, the AUC values ​​of the method proposed in the present invention and the comparison scheme on four sets of data are evaluated, as shown in Table 2.

[0071] Table 2 Prediction accuracy of all schemes

[0072]

[0073] Among them, APE is the method proposed by the present invention.

[0074] The present invention achieved the highest prediction accuracy in the three data sets of Hepth, NetScience and Openproject, and was only slightly inferior to RA in the USAir data set. The overall experimental results show that the scheme proposed in the present invention is obviously feasible and has high recommendation accuracy.

Claims

1. An explainable open source project recommendation method that integrates node context information, It is characterized in that The following steps are involved: (1) Collect and store the behavior data of developers on the GitHub platform; (2) Construct an open source project association network; specifically as follows: First, obtain the Issue, Issue_ Comment, Pull_Request _Comment, and Fork information of the open source project from the database, as well as the Open_issue, Issue_Comment, Open _Pull_Request, Watch, and Fork behavior information of the developer; second, integrate the technical dependency and social information to build an association, calculate the project activity and the project technical dependency and social association; then, perform a linear combination of the above three indicators, calculate the probability of a link between the target node pairs, and determine the network edges based on the preset threshold; finally, construct an open source project association network, where is the project node, is the node link representation, and is the link weight; (3) Constructing an association path based on node context information and spatiotemporal features; including the following steps: (31) Use the depth-first search strategy to mine the associated paths of the target node pairs; the target node is used as the central node to construct a random tensor of fixed depth, and the central information and context information of each node are embedded in each node of G; based on the Latent Factor Model and Signed Latent Factor, average path length, modularity analysis and six degrees of separation theory, find out the factors that affect the target node pairs. The set of upstream and downstream nodes formed by the link ; Using depth-first search, for the target node Construct a neighborhood binary tree, limit the depth to k, and construct the associated path of the target node pair and : ; ; in, represent At the i-th layer node The leaf node set of ; including the following four cases: (A) the associated nodes of the target link {U, V}; (B) the associated paths starting from U and V nodes respectively; (C) the depth-first search of the associated paths starting from U node; (D) the multi-dimensional embedding of nodes at different positions on the associated paths; (32) Fix the relevant path lengths of all nodes in G and embed the target node v as the corresponding tensor: ; in, Represents the distance factor of the tensor depth simulation context node; where, represents the influence of node v as one of the central nodes on link formation, Represents node v as an associated path When the distance between the node and the central node is i, the link The impact of (33) Based on the target node pair The topological features and associated path sets of the target link weights are reconstructed The expression form: ; in, is the F-norm expression, is the weight calculation architecture, , The target node pairs are All associated paths; (4) Build and train an open source project recommendation model to obtain the weights between target node pairs; (5) Use pruning strategy to randomly sample associated paths.

2. According to claim 1, an interpretable open source project recommendation method integrating node context information, It is characterized in that Step (1) is as follows: Use the GH Archive framework to crawl the log behavior data of all developers from the GitHub platform, and classify the collected data into data streams with different characteristic indicators by combining business scenarios and open source metrics provided by CHAOSS; Import the summarized data stream into the list database ClickHouse, and use SQL to query the required data in the database.

3. The interpretable open source project recommendation method integrating node context information according to claim 1, It is characterized in that Step (4) includes the following steps: (41) Build a complete project association network, then embed the nodes in the network into tensors and use Construct a new error function with the original weight matrix: ; in, is the target link, The regular term is sparse, which effectively prevents overfitting; E is the network edge set; (42) The error function is trained and the training is stopped when the preset conditions are met. Finally, the target weights of all confirmed edges are obtained and the weights are compared with the threshold to determine whether a new link is formed.

4. The interpretable open source project recommendation method integrating node context information according to claim 1, It is characterized in that Step (5) is as follows: Set a fixed pruning rate , for the target node pair The associated paths are sampled in equal proportion: ; ; in, is the sampling path for node v, is the sampling path for node u.

Citation Information

Patent Citations

  • User intention-oriented space-time mapping knowledge domain construction method

    CN115827898A

  • Next position recommendation method based on spatio-temporal context and category preference

    CN116150511A

  • Emergency command and dispatch platform construction method and system based on deep learning

    CN116757460A

  • Node intimacy-based interpretable open source project recommendation method

    CN118365221A