Social Relationship Recommendation Method and System Based on Technical Capabilities
By building social activity graphs in GitHub and using graph neural network models to obtain technical capability expression vectors, the limitations of developers' ability mining in the existing technology are solved, and multi-dimensional social relationship recommendations are realized, and diversified needs in open source collaboration projects are met.
Patent Information
- Application Number
- CN202311451394.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-02
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2043-11-02
AI Technical Summary
The existing technology has limitations in mining developers' technical capabilities in GitHub, and cannot meet more social task recommendation scenarios, especially in open source collaboration projects, which cannot effectively utilize social relationships for recommendation.
By obtaining the attribute information of warehouse entities and associated entities in GitHub, a social activity graph is constructed, a graph neural network model is used to obtain the technical ability expression vector of nodes, and a scoring model is trained to recommend social relationships, including the technical ability expression of developers, warehouses, Issue and Pull Requests.
It realizes multi-dimensional social relationship recommendation based on technical capabilities, covers more recommendation scenarios, meets users' needs in open source collaboration projects, and improves the accuracy and coverage of recommendations.
Smart Images

Figure CN117271901B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and particularly to a social relationship recommendation method and system based on technical capabilities. Background Art
[0002] With the continuous development of open-source software and open-source communities, more and more developers and enterprises choose to host their code and projects on open-source platforms. As a global social development platform, GitHub provides functions such as Pull Request and Issue to help developers submit and contribute code, and also provides common social functions such as starred repositories, watched repositories, and followed developers.
[0003] Throughout the entire process of open-source collaboration projects, users need to find developers with similar technical capabilities to themselves for better communication or joining relevant organizations; when users hope to contribute open-source code, they need to know the repositories suitable for their capabilities; for repositories, appropriate maintainers also need to be designated for management; for Pull Requests submitted by users, appropriate reviewers need to be recommended, etc. These requirements require different object entities to have technical capabilities that match the recommendation needs. For example, the technical capabilities of developer entities depend on their related social relationships. Currently, there are limitations in mining the technical capabilities of object entities in GitHub. For example, most of the current mining of developers' technical capabilities in GitHub is limited to mining from the technical files contributed by developers, without considering the social relationships related to developers. The current recommended tasks mainly involve recommending repositories and popular projects that may be of interest, and cannot cover the entire process of collaborative development of open-source projects. Therefore, how to combine the social relationships of objects for technical capability mining to meet more social task recommendation scenarios is a problem that needs to be solved. Summary of the Invention
[0004] In view of this, this application aims to propose a social relationship recommendation method and system based on technical capabilities to solve the problem that the current mining of developers' technical capabilities has limitations and cannot meet more social task recommendation scenarios.
[0005] To achieve the above object, the technical solution of this application is as follows:
[0006] The first aspect of the embodiment of this application provides a social relationship recommendation method based on technical capabilities, and the method includes:
[0007] Obtain the attribute information of repository entities in GitHub and other associated entities; the other associated entities include: developer entities, Issue entities, and Pull Request entities; the attribute information includes code data and text information;
[0008] Construct a social activity graph based on the relationship information and respective attribute information among all the obtained entities; in the social activity graph, a single object within each entity is represented by a node, and the relationship between objects is represented by an edge;
[0009] Based on the attribute information of each node in the social activity graph, obtain the initial technical ability expression vector of the node, and further train a graph neural network model to obtain the technical ability expression vectors of all nodes;
[0010] Train a scoring model for recommending social relationships according to the technical ability expression vectors of all nodes in the social activity graph, and use the scoring model for social relationship recommendation.
[0011] Optionally, obtain the attribute information of repository entities and other associated entities in GitHub, including:
[0012] Obtain the code data in the repository entity through a git clone script;
[0013] Obtain the text information in all entities through request fields;
[0014] Determine the relationship information among all entities according to all the obtained attribute information;
[0015] Preprocess the attribute information and the relationship information.
[0016] Optionally, based on the attribute information of each node in the social activity graph, obtain the initial technical ability expression vector of the node, including:
[0017] Determine the type of the attribute information included in the node, and the types of the attribute information include code data type, natural language text data type, and discrete data type;
[0018] Respectively obtain the feature vectors of each attribute information of the node;
[0019] Combine the feature vectors of all the attribute information of the node to generate the initial technical ability expression vector of the node.
[0020] Optionally, further train a graph neural network model to obtain the technical ability expression vectors of all nodes, including:
[0021] Construct a graph neural network model; the graph neural network model includes a fully connected layer, a graph convolutional layer, a graph structure learning task layer, and a graph attribute learning task layer applicable to heterogeneous graphs;
[0022] Taking all developer nodes in the social activity graph as initial nodes, sampling node sequences in the social activity graph, and obtaining the embedding vectors of each node in the social activity graph through the Metapath2Vec model; the embedding vectors are used to represent the global structural information of the nodes.
[0023] Concatenate the initial technical ability expression vectors of each node in the social activity graph with the embedding vectors of the nodes, and update the initial technical ability expression vectors of all nodes in the social activity graph.
[0024] Extract multiple sampled subgraphs from the updated social activity graph, where each sampled subgraph contains a target node and multiple neighbor nodes adjacent to the target node.
[0025] Use all the extracted sampled subgraphs to train the graph neural network model to obtain the technical ability expression vectors of all nodes.
[0026] Optionally, extracting multiple sampled subgraphs from the updated social activity graph includes:
[0027] According to the number of graph convolutional layers in the graph neural network model, taking the target node as the center, extract sampled subgraphs from the social activity graph; the target node has neighbor nodes with the same order as the number of graph convolutional layers.
[0028] Perform negative sampling on the sampled subgraphs and add edges that do not exist in the social activity graph to the sampled subgraphs.
[0029] Optionally, training a scoring model for recommending social relationships according to the technical ability expression vectors of all nodes in the social activity graph includes:
[0030] Construct a scoring model based on a binary classifier; the scoring model includes: a fully connected layer, a ReLU activation layer, and a Sigmoid or Softmax output layer.
[0031] In the social activity graph, according to the content of the social relationship to be recommended, collect the same number of nodes as the positive and negative samples for training the scoring model.
[0032] Use the positive samples and the negative samples as the labels for training the scoring model, and use the technical ability expression vectors of the collected nodes as the input of the scoring model to train the scoring model, where the binary cross-entropy loss function is used as the loss function of the scoring model.
[0033] Optionally, collecting the same number of nodes as the positive and negative samples for training the scoring model according to the content of the social relationship to be recommended includes:
[0034] Collect a pair of developer nodes belonging to the same organization as the first positive sample, and randomly collect developer nodes not belonging to the same organization as the first negative sample. Train a scoring model for recommending similar developer groups using the first positive sample and the first negative sample;
[0035] Collect developer-repository data pairs of developers who have followed and successfully contributed to a repository as the second positive sample, and randomly collect developer-repository data pairs without a following or contribution relationship as the second negative sample. Train a scoring model for recommending suitable repositories for following and contributing using the second positive sample and the second negative sample;
[0036] Collect developer nodes that own a repository as the third positive sample, and randomly collect developer nodes that do not own the repository as the third negative sample. Train a scoring model for recommending repository maintainers using the third positive sample and the third negative sample;
[0037] Collect developer nodes that have selected a Pull Request as the fourth positive sample, and randomly collect developer nodes that have not selected the Pull Request as the fourth negative sample. Train a scoring model for recommending Pull Request reviewers using the fourth positive sample and the fourth negative sample.
[0038] Optionally, the method further includes:
[0039] Visualize the technical capabilities of each entity, including the following steps:
[0040] Filter the frequency of occurrence of topics in GitHub, and filter out topics with a frequency of occurrence less than the second threshold;
[0041] Construct a binary classifier corresponding to each topic based on all the filtered topics;
[0042] Select nodes containing the topic as positive samples, randomly sample the same number of nodes not containing the topic as negative samples, and use the technical ability expression vectors of the nodes as positive and negative samples as inputs to train the binary classifier; the nodes used as positive and negative samples belong to the same entity;
[0043] When all binary classifiers are trained, use each binary classifier to predict the probability that any node in the entity contains the topic corresponding to the binary classifier;
[0044] Combine the probabilities output by all binary classifiers as the topic vector of the node;
[0045] Perform visualization processing on the topic vector of the node to display the degree of emphasis of all topics contained in the node.
[0046] According to the second aspect of the embodiments of the present application, a social relationship recommendation system based on technical capabilities is provided for implementing the method provided in the first aspect of the embodiments of the present application. The system includes:
[0047] A data mining module for obtaining attribute information of repository entities and associated other entities in GitHub; the associated other entities include: developer entities, Issue entities, and Pull Request entities; the attribute information includes code data and text information;
[0048] A social activity graph construction module for constructing a social activity graph according to the relationship information and respective attribute information among all the obtained entities; in the social activity graph, a single object within each entity is represented by a node, and the relationship between objects is represented by a relationship edge;
[0049] A social relationship construction module for obtaining an initial technical capability expression vector of each node in the social activity graph, further training a graph neural network model, and obtaining technical capability expression vectors of all nodes;
[0050] A social relationship recommendation module for training a scoring model for recommending social relationships according to the technical capability expression vectors of all nodes in the social activity graph, and using the scoring model for social relationship recommendation.
[0051] Optionally, the system further includes:
[0052] A visualization module for visualizing the technical capabilities of each entity, including the following steps:
[0053] Screen the frequencies of the topics appearing in GitHub, and filter out the topics with frequencies less than a second threshold;
[0054] Construct a binary classifier corresponding to each topic according to all the screened topics;
[0055] Select the nodes containing the topic as positive samples, randomly sample nodes with the same number as the positive samples that do not contain the topic as negative samples, and use the technical capability expression vectors of the nodes as positive and negative samples as inputs to train the binary classifier; the nodes as positive and negative samples belong to the same entity;
[0056] When all the binary classifiers are trained, use each binary classifier to predict the probability that any node in the entity contains the topic corresponding to the binary classifier;
[0057] Combine the probabilities output by all the binary classifiers as the topic vector of the node;
[0058] Visualize the topic vectors of the nodes and display the emphasis degrees of all topics included in the nodes.
[0059] Adopt the social relationship recommendation method based on technical capabilities provided by this application, construct a social activity graph based on the attribute information of each object entity, obtain the initial technical capability expressions of each object entity, use a graph neural network to model the social relationships in this social activity graph, and fuse the initial technical capability expressions to obtain the developer technical capability expressions that simultaneously reflect social characteristics and development characteristics. At the same time, the entity technical capability expressions of repositories, Pull Requests, and Issues are also obtained. Construct a scoring model based on the obtained technical capability expressions of each entity to recommend social relationships.
[0060] The social relationship recommendation method based on technical capabilities provided by this application combines the attribute information of each object entity and the social relationships between each object entity to mine the technical capabilities of entities, and can mine multi-dimensional technical capability expressions of each entity. Therefore, when recommending social relationships based on the technical capabilities of each entity, it can cover more recommendation scenarios and meet the needs of users. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions of the embodiments of this application, the following will briefly introduce the drawings required to be used in the description of the embodiments of this application. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0062] Figure 1 is a flowchart of a social relationship recommendation method based on technical capabilities proposed in an embodiment of this application;
[0063] Figure 2 is a schematic diagram of a social relationship recommendation system based on technical capabilities proposed in an embodiment of this application;
[0064] Figure 3 is a schematic diagram of a social activity graph proposed in an embodiment of this application;
[0065] Figure 4 is a schematic diagram of a method for extracting a sampled subgraph proposed in an embodiment of this application;
[0066] Figure 5 is a schematic diagram of the structure of a graph neural network model proposed in an embodiment of this application;
[0067] Figure 6 is a schematic diagram of the structure of a scoring model proposed in an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0068] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0069] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that a specific feature, structure or characteristic related to the embodiment is included in at least one embodiment of the present application. Therefore, the appearances of "in one embodiment" or "in an embodiment" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner.
[0070] In various embodiments of the present application, it should be understood that the sequence numbers of the following processes do not mean the order of execution is prior or subsequent, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0071] Here, the exemplary embodiments will be described in detail, and the examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all the embodiments consistent with the present application. On the contrary, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0072] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
[0073] For the sake of convenience of description, in the present application, the collection of a class of objects is called the entity of this class of objects, that is, the entity is the general term of this class of objects. For example, the developer entity refers to the collection of all developers. There are multiple developer, repository, Pull Request, and Issue objects in the present application. Therefore, in the present application, the operations performed on each object in a collection are written as operations on the entity of this object. For example, obtaining the attribute information of the repository entity can be understood as obtaining the attribute information of each repository.
[0074] Next, the present application will be described in detail with reference to the accompanying drawings and in conjunction with the embodiments.
[0075] Figure 1 It is a flowchart of a social relationship recommendation method based on technical capabilities proposed in an embodiment of the present application.
[0076] S1: Obtain the attribute information of the repository entity and other associated entities in GitHub; the other associated entities include: developer entity, Issue entity, and Pull Request entity; the attribute information includes code data and text information.
[0077] S11: Obtain the code data in the repository entity through the git clone script;
[0078] S12: Obtain the text information in all entities through the request fields;
[0079] S13: Determine the relationship information between all entities according to the obtained all attribute information;
[0080] S14: Preprocess the attribute information and the relationship information.
[0081] In this embodiment, first, some repositories in GitHub are sampled to obtain the attribute information of the repository entity. Specifically, use the git clone script to obtain the code files included in the attribute information of the repository entity, and obtain the text information in the attribute information through the request field URL. For example, according to the "subscribers_url" field, obtain all developer information observing a certain repository.
[0082] Since the attribute information of the repository includes the information of developers, Issues, and Pull Requests associated with this repository, therefore, other associated entities can be found through the repository entity, and then the attribute information of other entities can be further obtained. When obtaining other entities associated with the repository entity, the relationship information between entities is also obtained at the same time. For example, when obtaining the developer who contributed to the repository through the repository, the contribution relationship between the two is also obtained at the same time. It should be noted that for the follow and be followed relationships between developers, they need to be obtained from the attribute information of the developer entity.
[0083] In this embodiment, after obtaining the attribute information of the repository entity, the developer entity, the Issue entity, and the Pull Request entity associated with the repository entity, and the relationship information between entities, data cleaning needs to be performed. The specific steps are as follows:
[0084] (1) Filter out developer nodes with special delimiters in their names. Considering that such developer nodes do not have real developer identities, they are filtered out. Special delimiters such as "-", "_", "[", and "]", etc.;
[0085] (2) Filter out the contribution relationships between developer nodes and repository nodes that contribute less than 10 to the repository, making the data used for subsequent analysis more representative;
[0086] (3) Since it is necessary to ensure that both the followers and the followed in the developer entity exist in the collected developer entity, developers who do not belong to the above developer entity are filtered out;
[0087] (4) Filter out Issues and Pull Requests without description information.
[0088] S2: Construct a social activity graph based on the relationship information and respective attribute information between all the obtained entities; in the social activity graph, a single object within each entity is represented by a node, and the relationship between objects is represented by an edge.
[0089] Figure 3 FIG. 11 is a schematic diagram of a social activity graph proposed in an embodiment of the present application. In this embodiment, a social activity graph is constructed according to the attribute information and relationship information of each entity after data cleaning. The social activity graph consists of nodes and edges, where the nodes are the objects within each entity, and one node identifies one object, such as a developer node and a repository node. The relationship between entities is represented by an edge. The edge in this social activity graph represents the relationship between the two nodes connected by this edge. For example, the contribution relationship between a developer node and a repository node. In this embodiment, the specific types of edges in the social activity graph are shown in Table 1.
[0090] Table 1
[0091]
[0092] S3: Based on the attribute information of each node in the social activity graph, obtain the initial technical ability expression vector of the node, and further train a graph neural network model to obtain the technical ability expression vectors of all nodes.
[0093] In this embodiment, according to the attribute information of each node in the established social activity graph, the initial technical ability expression vector of the node is obtained. Since there are different types of nodes in the social activity graph, for different types of nodes, the process of generating the initial technical ability expression vector is also different.
[0094] S31: Determine the type of the attribute information included in the node, and the type of the attribute information includes code data type, natural language text data type, and discrete data type.
[0095] In this embodiment, the attribute information used to generate the initial technical ability expression vector includes three types: code data, natural language text, and discrete data. Among them, the processing of natural language data is mainly carried out by extracting with a variant model xml-roberta-base of the BERT (Bidirectional Encoder Representations from Transformers) model; for the processing of code data, the code embedding model GraphCodeBERT is used as the core model to extract features from the code; for the processing of discrete data, the one-hot encoding combined with the principal component analysis (PCA) dimensionality reduction method is mainly used for processing.
[0096] S32: Obtain the feature vectors of each attribute information of the node respectively;
[0097] S33: Combine the feature vectors of all the attribute information of the node to generate the initial technical ability expression vector of the node.
[0098] In this embodiment, since the attribute information of the developer entity is too little, the initial technical ability of other entities except the developer entity is mined.
[0099] For the Issue entity, the attribute information contained in the Issue node is mainly the description information of the Issue, which is usually presented in the form of Markdown-marked text. Therefore, first preprocess the description information of the Issue, filter out non-text elements and special HTML and Markdown characters, and then splice the preprocessed text and input it into the xml-roberta-base model to obtain the initial technical ability expression vector of the Issue node. In this embodiment, the embedding vector of the "[CLS]" symbol is used as the initial technical ability expression vector of the Issue entity.
[0100] The warehouse has many types of attribute information, including code data, warehouse README data, warehouse description information, warehouse topic information, and warehouse programming languages.
[0101] The warehouse README data is also presented in the form of Markdown-marked text, so the same preprocessing method as the attribute information of the above Issue node is used for processing. The warehouse description information also belongs to natural language text. Therefore, splice the preprocessed warehouse README data and warehouse description information and input them into the xml-roberta-base model. The obtained embedding vector is denoted as E NL , that is, the feature vector of the warehouse README data.
[0102] For the code data included in the warehouse attribute information, first perform preprocessing to remove the non-code parts, and filter out relevant files in 6 programming languages according to the suffix name. Use a code analysis tool to extract all function definition blocks in a single code file, and remove the comment information in the extracted code blocks. Input the preprocessed code blocks into the code embedding model GraphCodeBERT to obtain the embedding vectors of individual code files in the warehouse. After obtaining the embedding vectors of all code files in the warehouse, calculate their mean value to obtain the feature vector E of the code data in this warehouse node CL .
[0103] The programming languages and topics included in the warehouse attribute information belong to discrete data. For these two types of data, represent the topic vector [t i1 , t i2 , t i3 ,..., t ip and the programming language vector [l i1 , l i2 , l i3 ,..., l iq through one-hot encoding. Among them, p and q are the numbers of discrete data of the topic type and programming language type respectively. In actual operation, the value of p reaches the ten-thousand level, but since a warehouse usually does not involve more than 10 topics or programming languages, there is a serious sparsity problem in the above-mentioned topic vector and programming language vector. In this embodiment, use the PCA model to perform dimensionality reduction processing on the above-mentioned topic vector and programming language vector to obtain the warehouse topic feature vector E T and the programming language feature vector E L .
[0104] The initial technical ability expression vector of the warehouse entity is generated by splicing the feature vectors of each attribute information of the warehouse, expressed as: E = Concat(E Nq , E CL , E T , E L ).
[0105] The Pull Request entity contains two types of attribute data, namely the description text in natural language form and the contribution submission mainly in code language. For the description text, adopt the same feature vector acquisition method as the above-mentioned Issue entity to obtain the feature vector E of the description text NLFor the code data submitted for contributions, preprocessing is first performed to merge multiple code changes to the same code file and filter out code contributions that do not modify the project's code files. For the code data submitted for contributions after preprocessing, the same processing method as the code data of the above repository entity is adopted to obtain the feature vector E of the contributions submitted in the PullRequest CL , and further generate the initial technical ability expression vector of the Pull Request: E = Concat(E NL , E CL ).
[0106] S34: Construct a graph neural network model; the graph neural network model includes a fully connected layer applicable to heterogeneous graphs, a graph convolutional layer, a graph structure learning task layer, and a graph attribute learning task layer.
[0107] The graph neural network model is a deep learning model based on graph structure, and its core idea is to capture graph structure information through the Graph Convolutional Layer.
[0108] In this embodiment, the graph neural network model is trained according to the initial technical ability expression vectors of each node obtained in the above steps. Since the types of attribute information in each node are different, the dimensions of the initial technical ability expression vectors of each node obtained in the above steps are inconsistent. Therefore, in order to unify the dimensions of the initial technical ability expression vectors of each node, a fully connected layer applicable to heterogeneous graphs is set in the graph neural network model, as Figure 5 shown.
[0109] Figure 5 is a schematic structural diagram of the graph neural network model proposed in an embodiment of the present application. As Figure 5 shown, in the graph neural network model, the fully connected layer unifies the dimensions of the vectors output for each type of heterogeneous node. The graph neural network model also includes three graph convolutional layers, one graph structure learning task layer, and one graph attribute learning task layer. After the initial technical ability expression vectors of each node are unified in vector dimension by the fully connected layer, the technical ability expression vector of the node is obtained through a graph neural network module composed of three convolutional layers. The obtained technical ability expression vectors of each node will be subsequently input into the graph structure learning task layer and the graph attribute learning task layer.
[0110] S35: Using all developer nodes in the social activity graph as initial nodes, sampling node sequences in the social activity graph, and obtaining the embedding vector of each node in the social activity graph through the Metapath2Vec model; the embedding vector is used to characterize the global structural information of the node;
[0111] S36: Concatenate the initial technical ability expression vectors of each node in the social activity graph with the embedding vectors of the nodes, and update the initial technical ability expression vectors of all nodes in the social activity graph.
[0112] In one embodiment, since there are too many nodes in the social activity graph, the computational cost is too high when training the graph neural network model. Therefore, a sampled subgraph is used to train the model. Since training based on the sampled subgraph may cause the model to fail to capture the global information of the nodes in the social activity graph, before using the sampled subgraph to train the model, it is necessary to first embed the global structure information into the node vectors.
[0113] Use the Metapath2Vec model to obtain the vector expression representing the global structure information of the nodes. Metapath2Vec is a method for learning node embeddings in a Heterogenous Information Network (HIN). Its core idea is to sample metapath node sequences through random walks and use a simple neural network to train the embedding vectors of the nodes, and this vector contains the global structure information of the nodes.
[0114] In this embodiment, the selected metapaths include: developer - submit - Pull Request, Pull Reqeust - belong to - repository, repository - contributed by - developer, developer - follow - developer, developer - star - repository, repository - contributed by - developer, developer - observe - repository, repository - contributed by - developer, developer - submit - Issue, Issue - belong to - repository, repository - contributed by - developer, and the node sequences sampled in the social activity graph with all developer entities as the initial nodes. By training the Metapath2Vec model, the embedding vector of each node is obtained.
[0115] Concatenate the initial technical ability expression vectors of each node obtained in the above embodiment with the embedding vectors, so that the sampled subgraph contains the information representing the global structure of the nodes.
[0116] S37: Extract multiple sampled subgraphs from the updated social activity graph. Each sampled subgraph contains a target node and multiple neighbor nodes adjacent to the target node.
[0117] In this embodiment, since there are nodes with different attributes in the social activity graph, that is, the social activity graph is a heterogeneous graph, and since the design of many graph convolutional layers is not applicable to heterogeneous graphs, in this embodiment, when performing message passing, message aggregation, and node update, a sampled subgraph is extracted from the social activity graph for training the graph neural network model, where each sampled subgraph has relationship edges of a single type. For example, the follow-up relationship between developers. Based on the extracted multiple sampled subgraphs, the graph neural network model is trained, so that the graph convolutional layer can be applicable.
[0118] S371: According to the number of graph convolutional layers in the graph neural network model, with the target node as the center, extract a sampled subgraph from the social activity graph; the target node has neighbor nodes with the same order as the number of graph convolutional layers.
[0119] Since when training a graph neural network with k layers of graph convolutional layers, the feature update of a node can utilize the information of up to k-order neighbors at most, therefore, in this embodiment, according to the number of graph convolutional layers in the graph neural network model, the order of neighbor nodes existing in the target node in the sampled subgraph is determined. Since in this embodiment, the graph neural network model includes three layers of graph convolutional layers, therefore, second-order neighbor nodes are extracted according to the target node and added to the sampled subgraph.
[0120] Figure 4 It is a schematic diagram of a method for extracting a sampled subgraph proposed in an embodiment of the present application. As Figure 4 shown, any node in the social activity graph is used as the target node, and this target node (the node labeled 1 in the figure) is used as the center of the sampled subgraph, and the second-order neighbor nodes of this target node are obtained. To save computational complexity, p neighbor nodes are randomly selected from the obtained second-order neighbor nodes for retention. Among them, the value of p can be set according to actual needs. Finally, the retained p neighbor nodes and the target node form a sampled subgraph centered on this target node. In this example, multiple sampled subgraphs are extracted from the social activity graph, and the graph neural network model that needs to be trained on the full graph data is converted into small-batch training on the extracted multiple sampled subgraphs, saving training resources.
[0121] S372: Perform negative sampling on the sampled subgraph, and add edges that do not exist in the social activity graph to the sampled subgraph.
[0122] In one embodiment, as Figure 4 shown by the dashed line in, in order to improve the generalization ability of the model, negative sampling is also performed on the extracted sampled subgraph, that is, edges that do not exist in the original graph are added to the sampled subgraph, so that the model learns the features of the edges that do not exist in the original graph. When performing negative sampling, the ratio of the number of negative sampling edges to the number of edges in the original graph can be set according to the actual situation.
[0123] S38: Use all the sampled sub - graphs extracted to train the graph neural network model and obtain the technical - ability expression vectors of all nodes.
[0124] In this embodiment, the sampled sub - graphs after vector splicing are used to train the graph neural network model. The training process is divided into two stages. The first stage is graph - structure learning, and the second stage is graph - attribute learning. The sampled sub - graph data after passing through the fully - connected layer and three graph - convolutional layers is input into the graph - structure learning task layer in the first stage, so as to model the social relationships between nodes in GitHub, train the model to predict whether there is a relationship edge between two nodes, and the specific types of edges between the nodes with relationships. The sampled sub - graph data after passing through the fully - connected layer and three graph - convolutional layers is input into the graph - attribute learning task layer in the second stage, and the model is trained to predict the contribution weights between developers and repositories. When the graph neural network model is trained, the technical - ability expression vectors of all nodes are obtained.
[0125] S4: According to the technical - ability expression vectors of all nodes in the social - activity graph, train a scoring model for recommending social relationships, and use the scoring model for social - relationship recommendation.
[0126] In this embodiment, based on the technical - ability expression vectors of all nodes in the obtained social - activity graph, a scoring model for recommending social relationships is constructed to apply the technical - ability expression vectors of nodes to different social - relationship recommendation tasks.
[0127] S41: Construct a scoring model based on a binary classifier; the scoring model includes: a fully - connected layer, a ReLU activation layer, and a Sigmoid or Softmax output layer;
[0128] S42: In the social - activity graph, according to the content of the social relationship to be recommended, collect the same number of nodes as the positive and negative samples for training the scoring model.
[0129] S43: Use the positive samples and the negative samples as the labels for training the scoring model, and use the technical - ability expression vectors of the collected nodes as the input of the scoring model to train the scoring model. Among them, the binary - cross - entropy loss function is used as the loss function of the scoring model.
[0130] A binary classifier is a machine - learning model used to divide input samples into two mutually exclusive categories. Its output is usually a binary value, representing the probability or decision that the sample belongs to one of the categories.
[0131] In this embodiment, a scoring model based on a binary classifier is constructed through a neural network. The scoring model includes multiple fully connected layers, ReLU activation layers, and Softmax / Sigmoid output layers, and the binary cross-entropy loss function is used as the loss function of the scoring model. Figure 6 It is a schematic structural diagram of the scoring model proposed in an embodiment of the present application. As Figure 6 shown, in this embodiment, the technical ability expression vectors of multiple entities are sent into multiple fully connected layers for dimensional transformation, and then pass through the ReLU activation layer for non-linear transformation, and finally the prediction labels are output through the Softmax function or the Sigmoid function. According to the characteristics of the binary classifier, the same number of positive samples and negative samples are collected as training samples in this embodiment.
[0132] Optionally, a pair of developer nodes belonging to the same organization are collected as the first positive samples, and developer nodes not belonging to the same organization are randomly collected as the first negative samples, and the scoring model for recommending similar developer groups is trained through the first positive samples and the first negative samples.
[0133] In one embodiment, the scoring model can be used to recommend developers with similar technical capabilities to the user, so as to help the user find a suitable organization and promote communication among developers. A pair of developers belonging to the same organization are collected as positive samples through the GitHub Restful API. Similarly, developers not belonging to the same organization with the same data volume (i.e., two) are randomly collected as negative samples. The similarity degree of the developer pairs in the positive samples is set to 1, and the similarity degree of the developer pairs in the negative samples is set to 0.
[0134] In the above embodiment, when the trained scoring model makes recommendations, the alternative developers can be preliminarily screened before inputting them into the scoring model. Since developers with similar technical capabilities usually have repositories with the same contributions, the range of alternative developers can be limited to "repositories with the same contributions as the user", thereby accelerating the calculation of the scoring model.
[0135] Optionally, developer-repository data pairs that follow and have successfully contributed to the repository are collected as the second positive samples, and developer-repository data pairs without a following or contribution relationship are randomly collected as the second negative samples, and the scoring model for recommending suitable repositories for following and contributing is trained through the second positive samples and the second negative samples.
[0136] In one embodiment, the scoring model can be used to recommend repositories suitable for users to follow and contribute to. From the collected data, the repositories that are followed and successfully contributed to are used as positive samples, and "developer-repository" data pairs with the same data volume are randomly collected as negative samples, where there is no following or contribution relationship between the developers and repositories in the negative samples. The matching degree of the "developer-repository" data pairs in the positive samples is set to 1, and the matching degree of the "developer-repository" data pairs in the negative samples is set to 0.
[0137] In the above embodiment, to accelerate the calculation of the scoring model, the range of alternative repositories can be limited to "the repositories followed, contributed to, and starred by the user, and the repositories contributed to by the developers with whom the user has a following relationship".
[0138] Optionally, the developer nodes that own repositories are collected as the third positive samples, and the developer nodes that do not own the repositories are randomly collected as the third negative samples, and a scoring model for recommending repository maintainers is trained through the third positive samples and the third negative samples.
[0139] In one embodiment, the scoring model can be used to recommend suitable maintainers for the open source repository. The "repository-owner of the repository" data pairs in the collected data are selected as positive samples, and "repository-developers other than the owner" with the same data volume are randomly collected as negative samples. The matching degree of the data pairs in the positive samples is set to 1, and the matching degree of the data pairs in the negative samples is set to 0.
[0140] In the above embodiment, since the maintainers of a repository usually come from the contributors of the repository, to accelerate the calculation of the scoring model, the range of alternative maintainers can be limited to "the contributors of the repository".
[0141] Optionally, the developer nodes that have selected a Pull Request are collected as the fourth positive samples, and the developer nodes that have not selected the Pull Request are randomly collected as the fourth negative samples, and a scoring model for recommending Pull Request reviewers is trained through the fourth positive samples and the fourth negative samples.
[0142] In one embodiment, the scoring model can be used to recommend suitable reviewers for the user's Pull Request. When collecting the training data pairs, for a merged Pull Request object of a certain repository, the reviewers of the Pull Request are collected as positive samples, and other developers except the reviewers of the Pull Request are randomly collected as negative samples with the same data volume. The matching degree of the data pairs in the positive samples is set to 1, and the matching degree of the data pairs in the negative samples is set to 0.
[0143] In the above embodiments, since the reviewers of Pull Requests are usually contributors to the repository where the Pull Request is located, the range of alternative developers can be limited to "contributors to the repository to which the Pull Request belongs", thereby accelerating the calculation of the scoring model.
[0144] S5: Visualize the technical capabilities of each entity, including the following steps:
[0145] Screen the frequencies of the topics that appear in GitHub, and filter out the topics with frequencies less than the second threshold;
[0146] Based on all the screened topics, construct a binary classifier corresponding to each topic;
[0147] Select the nodes containing the topic as positive samples, randomly sample the same number of nodes that do not contain the topic as negative samples, and use the technical capability expression vectors of the nodes as positive and negative samples as inputs to train the binary classifier; the nodes as positive and negative samples belong to the same entity;
[0148] When all the binary classifiers are trained, use each binary classifier to predict the probability that any node in the entity contains the topic corresponding to the binary classifier;
[0149] Combine the probabilities output by all the binary classifiers as the topic vector of the node;
[0150] Perform visualization processing on the topic vector of the node, and display the emphasis degrees of all the topics contained in the node.
[0151] In one embodiment, the technical capabilities of the nodes obtained in the above embodiments can also be visually displayed. There are multiple typical topics in GitHub. In this embodiment, the technical capability expressions of the nodes are aligned with the typical topics to describe the distribution of the emphasis of the technical capabilities of each entity on the typical topics.
[0152] First, screen according to the frequencies of the topics, and filter out the topics with frequencies less than 100. For each of the remaining topics, construct a binary classifier respectively to predict whether a node contains the topic. Similar to the way of collecting samples when training the scoring model above, when constructing a binary classifier for a topic, collect the objects with the topic as positive samples, collect the same number of objects without the topic as negative samples, and obtain the topic vector of the node through the trained binary classifiers corresponding to multiple topics.
[0153] For example, taking the warehouse entity as an example, the number of technical ability expression vectors of any warehouse is input into the trained binary classifier corresponding to the theme, and the obtained output is the probability that the warehouse has this theme. Combine the results respectively output by the binary classifiers corresponding to all themes to generate a theme vector [p1, p2... p n , where p i (i ∈ [1, n]) represents the probability that the warehouse has the i-th theme, that is, this theme vector can characterize the degree of emphasis on technical ability of the warehouse in each theme.
[0154] Visualize the theme vector of the node to facilitate the display of the degree of emphasis on the technical ability of the node. For example, the degree of emphasis on the technical ability of the developer can be displayed on the developer's homepage to promote better understanding and communication among users in the open source community.
[0155] Based on the same inventive concept, an embodiment of the present application provides a social relationship recommendation system based on technical ability. Refer to Figure 2 , Figure 2 is a schematic diagram of a social relationship recommendation system 200 based on technical ability proposed in an embodiment of the present application. As Figure 2 shown, the system includes:
[0156] A data mining module 201, configured to obtain the attribute information of the warehouse entity and other associated entities in GitHub; the other associated entities include: developer entity, Issue entity and Pull Request entity; the attribute information includes code data and text information;
[0157] A social activity graph construction module 202, configured to construct a social activity graph according to the relationship information and respective attribute information between all obtained entities; in the social activity graph, a single object within each entity is represented by a node, and the relationship between objects is represented by a relationship edge;
[0158] A social relationship construction module 203, configured to obtain the initial technical ability expression vector of each node based on the attribute information of each node in the social activity graph, and further train a graph neural network model to obtain the technical ability expression vectors of all nodes;
[0159] A social relationship recommendation module 204, configured to train a scoring model for recommending social relationships according to the technical ability expression vectors of all nodes in the social activity graph, and use the scoring model for social relationship recommendation.
[0160] Optionally, the data mining module 201 includes:
[0161] A code mining module, configured to obtain the code data in the warehouse entity through a git clone script;
[0162] A text mining module for obtaining text information in all entities through request fields;
[0163] A relationship acquisition module for determining relationship information between all entities based on all the acquired attribute information;
[0164] A preprocessing module for preprocessing the attribute information and the relationship information.
[0165] Optionally, the social relationship construction module 203 includes:
[0166] An initial technical ability acquisition sub-module for determining the type of attribute information included in the node, where the type of attribute information includes code data type, natural language text data type, and discrete data type;
[0167] Respectively obtain the feature vectors of each attribute information of the node;
[0168] Combine the feature vectors of all the attribute information of the node to generate an initial technical ability expression vector of the node.
[0169] Optionally, the social relationship construction module 203 further includes:
[0170] A technical ability acquisition sub-module for constructing a graph neural network model; the graph neural network model includes a fully connected layer, a graph convolutional layer, a graph structure learning task layer, and a graph attribute learning task layer applicable to heterogeneous graphs;
[0171] Taking all developer nodes in the social activity graph as initial nodes, sampling node sequences in the social activity graph, and obtaining the embedding vectors of each node in the social activity graph through the Metapath2Vec model; the embedding vectors are used to represent the global structure information of the node;
[0172] Concatenate the initial technical ability expression vector of each node in the social activity graph with the embedding vector of the node to update the initial technical ability expression vectors of all nodes in the social activity graph;
[0173] Extract multiple sampled subgraphs from the updated social activity graph, where each sampled subgraph contains a target node and multiple neighbor nodes adjacent to the target node;
[0174] Use all the extracted sampled subgraphs to train the graph neural network model to obtain the technical ability expression vectors of all nodes.
[0175] Optionally, the technical ability acquisition sub-module includes:
[0176] A sub - graph extraction module, configured to extract a sampled sub - graph from the social activity graph centered on the target node according to the number of graph convolutional layers in the graph neural network model; the target node has neighbor nodes with the same order as the number of graph convolutional layers.
[0177] Perform negative sampling on the sampled sub - graph, and add edges that do not exist in the social activity graph to the sampled sub - graph.
[0178] Optionally, the social relationship recommendation module 204 includes:
[0179] A scoring model construction sub - module, configured to construct a scoring model based on a binary classifier; the scoring model includes: a fully - connected layer, a ReLU activation layer, and a Sigmoid or Softmax output layer.
[0180] A sample collection sub - module, configured to collect the same number of nodes in the social activity graph as positive and negative samples for training the scoring model according to the content of the social relationship to be recommended.
[0181] A training sub - module, configured to use the positive samples and the negative samples as labels for training the scoring model, and use the technical ability expression vectors of the collected nodes as inputs to the scoring model to train the scoring model. Among them, the binary cross - entropy loss function is used as the loss function of the scoring model.
[0182] Optionally, the sample collection sub - module is configured to perform the following steps:
[0183] Collect a pair of developer nodes belonging to the same organization as the first positive sample, and randomly collect developer nodes not belonging to the same organization as the first negative sample, and train a scoring model for recommending similar developer groups through the first positive sample and the first negative sample.
[0184] Collect developer - repository data pairs of developers who follow and have successfully contributed to a repository as the second positive sample, and randomly collect developer - repository data pairs without a follow - up or contribution relationship as the second negative sample, and train a scoring model for recommending suitable repositories for follow - up and contribution through the second positive sample and the second negative sample.
[0185] Collect developer nodes who own a repository as the third positive sample, and randomly collect developer nodes who do not own the repository as the third negative sample, and train a scoring model for recommending repository maintainers through the third positive sample and the third negative sample.
[0186] The developer nodes of the Pull Request are collected and selected as the fourth positive samples, and the developer nodes that do not select the Pull Request are randomly collected as the fourth negative samples. A scoring model for recommending Pull Request reviewers is trained through the fourth positive samples and the fourth negative samples.
[0187] Optionally, the social relationship recommendation system based on technical capabilities further includes a visualization module for visualizing the technical capabilities of each entity, including the following steps:
[0188] Filter the frequency of the topics that appear in GitHub, and filter out the topics with a frequency less than the second threshold;
[0189] According to all the filtered topics, construct a binary classifier corresponding to each topic;
[0190] Select the nodes containing the topic as positive samples, and randomly sample the same number of nodes that do not contain the topic as negative samples. Use the technical ability expression vectors of the nodes as positive samples and negative samples as inputs to train the binary classifier; the nodes as positive samples and negative samples belong to the same entity;
[0191] When all the binary classifiers are trained, use each binary classifier to predict the probability that any node in the entity contains the topic corresponding to the binary classifier;
[0192] Combine the probabilities output by all the binary classifiers as the topic vector of the node;
[0193] Perform visualization processing on the topic vector of the node, and display the emphasis degree of all the topics contained in the node.
[0194] Regarding the system in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.
[0195] The above are only the preferred embodiments of the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0196] For the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and components involved are not necessarily essential to the present application.
[0197] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, an apparatus, or a computer program product. Therefore, the embodiments of the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0198] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal devices generate a device for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0199] These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing terminal device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device implements the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0200] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0201] Although the preferred embodiments of the embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they know the basic creative concepts. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.
[0202] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising said element.
[0203] The above has introduced in detail the social relationship recommendation method and system based on technical capabilities provided by this application. Specific examples are used in this text to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to this application.
Claims
1. A social relationship recommendation method based on technical capabilities, characterized in that: include: Get the attribute information of the repository entity and other related entities in GitHub; The other associated entities include: developer entity, issue entity and pull request entity; the attribute information includes code data and text information; Constructing a social activity graph based on the relationship information and attribute information of all entities; in the social activity graph, a single object in each entity is represented by a node, and the relationship between objects is represented by an edge; Based on the attribute information of each node in the social activity graph, the initial technical capability expression vector of the node is obtained, and the graph neural network model is further trained to obtain the technical capability expression vectors of all nodes, including: constructing a graph neural network model; the graph neural network model includes a fully connected layer, a graph convolution layer, a graph structure learning task layer and a graph attribute learning task layer suitable for heterogeneous graphs; taking all developer nodes in the social activity graph as initial nodes, sampling a node sequence in the social activity graph, and obtaining the embedding vector of each node in the social activity graph through the Metapath2Vec model; the embedding vector is used to characterize the global structural information of the node; the initial technical capability expression vector of each node in the social activity graph is spliced with the embedding vector of the node to update the initial technical capability expression vector of all nodes in the social activity graph; extracting multiple sampling subgraphs from the updated social activity graph, each sampling subgraph containing a target node and multiple neighboring nodes adjacent to the target node; using all the extracted sampling subgraphs to train the graph neural network model to obtain the technical capability expression vectors of all nodes; A scoring model for recommending social relationships is trained based on the technical capability expression vectors of all nodes in the social activity graph, and the scoring model is used to perform social relationship recommendations.
2. The method for recommending social relationships based on technical capabilities according to claim 1, characterized in that: Get the attribute information of the repository entity and other related entities in GitHub, including: Obtain the code data in the repository entity through the git clone script; Get text information in all entities by requesting fields; Based on all the attribute information obtained, determine the relationship information between all entities; The attribute information and the relationship information are preprocessed.
3. The method for recommending social relationships based on technical capabilities according to claim 1, characterized in that: Obtaining an initial technical capability expression vector of each node based on attribute information of the node in the social activity graph includes: Determining the type of attribute information contained in the node, the type of attribute information including code data type, natural language text data type and discrete data type; Obtaining the feature vector of each attribute information of the node respectively; The feature vectors of all attribute information of the node are combined to generate an initial technical capability expression vector of the node.
4. The method for recommending social relationships based on technical capabilities according to claim 1, wherein: Extract multiple sampling subgraphs from the updated social activity graph, including: Extracting a sampling subgraph from the social activity graph with the target node as the center according to the number of graph convolution layers in the graph neural network model; the target node has neighbor nodes of the same order as the number of the graph convolution layers; Negative sampling is performed on the sampling subgraph, and edges that do not exist in the social activity graph are added to the sampling subgraph.
5. The method for recommending social relationships based on technical capabilities according to claim 1, characterized in that: Training a scoring model for recommending social relationships based on the technical capability expression vectors of all nodes in the social activity graph, including: Constructing a scoring model based on a binary classifier; the scoring model includes: a fully connected layer, a ReLU activation layer, and a Sigmoid or Softmax output layer; In the social activity graph, according to the content of the social relationship to be recommended, collecting the same number of nodes as positive samples and negative samples for training the scoring model; The positive samples and the negative samples are used as labels for training the scoring model, and the collected technical capability expression vectors of the nodes are used as inputs of the scoring model to train the scoring model, wherein a binary cross entropy loss function is used as the loss function of the scoring model.
6. The method for recommending social relationships based on technical capabilities according to claim 5, characterized in that: According to the content of the social relationship to be recommended, the same number of nodes are collected as positive samples and negative samples for training the scoring model, including: A pair of developer nodes belonging to the same organization is collected as a first positive sample, and developer nodes that do not belong to the same organization are randomly collected as a first negative sample. The first positive sample and the first negative sample are used to train a scoring model for recommending similar developer groups. Collect developer-repository data pairs that have followed and successfully contributed to repositories as the second positive samples, and randomly collect developer-repository data pairs that have no following or contribution relationship as the second negative samples. Use the second positive and negative samples to train a scoring model for recommending repositories that are suitable for following and contributing. Collect developer nodes that own a repository as a third positive sample, randomly collect developer nodes that do not own the repository as a third negative sample, and use the third positive and third negative samples to train a scoring model for recommending repository maintainers. The developer node that selected the Pull Request is collected as a fourth positive sample, and the developer node that did not select the Pull Request is randomly collected as a fourth negative sample. The scoring model for recommending Pull Request reviewers is trained by the fourth positive sample and the fourth negative sample.
7. The method for recommending social relationships based on technical capabilities according to claim 1, characterized in that: Also includes: Visualizing the technical capabilities of each entity includes the following steps: Filter the frequency of topic appearances in GitHub and remove topics whose frequency is less than the second threshold; Based on all the screened topics, a binary classifier corresponding to each topic is constructed; Nodes containing the topic are selected as positive samples, and the same number of nodes that do not contain the topic are randomly sampled as negative samples. The technical capability expression vectors of the nodes used as positive and negative samples are used as input to train the binary classifier; the nodes used as positive and negative samples belong to the same entity; After all binary classifiers are trained, each binary classifier is used to predict the probability that any node in the entity contains the topic corresponding to the binary classifier; Combining the probabilities output by all binary classifiers as the topic vector of the node; The topic vector of the node is visualized to display the emphasis of all topics contained in the node.
8. A social relationship recommendation system based on technical capabilities, used to implement the method of any one of claims 1 to 7, characterized in that: include: Data mining module, used to obtain attribute information of repository entities and other related entities in GitHub; The other associated entities include: developer entity, issue entity and pull request entity; the attribute information includes code data and text information; A social activity graph construction module is used to construct a social activity graph based on the relationship information and attribute information of all entities obtained; in the social activity graph, a single object in each entity is represented by a node, and the relationship between objects is represented by an edge; A social relationship construction module is used to obtain the initial technical capability expression vector of each node in the social activity graph based on the attribute information of the node, and further train the graph neural network model to obtain the technical capability expression vectors of all nodes; The social relationship recommendation module is used to train a scoring model for recommending social relationships based on the technical capability expression vectors of all nodes in the social activity graph, and use the scoring model to recommend social relationships.
9. The social relationship recommendation system based on technical capabilities according to claim 8, characterized in that: The system further includes a visualization module for visualizing the technical capabilities of each entity, including the following steps: Filter the frequency of topic appearances in GitHub and remove topics whose frequency is less than the second threshold; Based on all the screened topics, a binary classifier corresponding to each topic is constructed; Nodes containing the topic are selected as positive samples, and the same number of nodes that do not contain the topic are randomly sampled as negative samples. The technical capability expression vectors of the nodes used as positive and negative samples are used as input to train the binary classifier; the nodes used as positive and negative samples belong to the same entity; After all binary classifiers are trained, each binary classifier is used to predict the probability that any node in the entity contains the topic corresponding to the binary classifier; Combining the probabilities output by all binary classifiers as the topic vector of the node; The topic vector of the node is visualized to display the emphasis of all topics contained in the node.
Citation Information
Patent Citations
Developer recommendation method based on GitHub social technology network
CN116051210A
Machine learning model for recommending software
US20220317985A1