Personalized pull request recommendation method based on double-view collaborative knowledge graph

By adopting a personalized pull request recommendation method based on a dual-view collaborative knowledge graph, and utilizing a large language model and a relation-aware graph attention network, we have achieved deep integration of user behavior features and PR content features. This solves the problems of feature fragmentation and insufficient multi-dimensional semantic integration in existing technologies, and improves the PR processing efficiency of open source projects.

CN121256112APending Publication Date: 2026-01-02HARBIN ENG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511421805.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Existing pull request recommendation methods fail to fully leverage skill characteristics from developers' historical comments, semantic information from PR code changes, and activity patterns from user behavior logs. This results in the inability to generate accurate and reliable recommendation results for newly joined developers, emerging technology stack projects, or PR requests from specific fields.

Method used

We adopt a personalized pull request recommendation method based on dual-view collaborative knowledge graph. Through large language model feature extraction, dual-view knowledge graph construction, relationship-aware graph attention network and multi-task joint optimization, we achieve deep integration of user behavior features and PR content features, thereby improving recommendation accuracy and interpretability.

Benefits of technology

It significantly improves the efficiency of PR processing for large open-source projects, especially in data-sparse scenarios, and can generate high-quality personalized PR recommendation lists, solving the problems of feature fragmentation and insufficient multi-dimensional semantic fusion in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121256112A_ABST
    Figure CN121256112A_ABST
Patent Text Reader

Abstract

The invention provides a personalized pull request recommendation method based on a double-view collaborative knowledge graph, belongs to the technical field of intelligent recommendation, and adopts large language model semantic extraction, double-view heterogeneous knowledge graph construction, relationship awareness graph attention spreading and multi-task joint optimization. According to the method, a user view and PR view collaborative intelligent recommendation framework is constructed, skill tags are extracted from user comments, theme features are mined from PR contents, and rich semantic association relationships are established, so that multi-dimensional matching of user preferences and the PR contents is realized; according to the method, a behavior activity quantitative model and a double-view attention mechanism are provided, so that the recommendation robustness in a sparse interaction scene is effectively improved; the problems that in an existing pull request recommendation method, user features and PR content features are separated, multi-dimensional semantic fusion is lacked, and the recommendation effect is poor in a data sparse scene are solved, and the method can be widely applied to intelligent code review and contribution management scenes of open source cooperation platforms such as GitHub and the like.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of intelligent recommendation, and particularly relates to a personalized pull request recommendation method based on a dual-view collaborative knowledge graph. BACKGROUND

[0002] In recent years, open source software development patterns have been thriving globally, and collaboration platforms such as GitHub and GitLab have become important infrastructure for modern software development. According to the 2023 GitHub Annual Report, the platform has hosted over 400 million code repositories, with millions of code commits and pull requests generated daily. While this large-scale collaborative development model has greatly promoted technological innovation, it has also brought serious challenges such as information overload and low review efficiency. In particular, in large open source projects, core maintainers need to handle dozens or even hundreds of pull requests every day, and how to efficiently match suitable code reviewers has become a key issue to improve development efficiency.

[0003] Traditional pull request (PR) recommendation methods can be mainly divided into three categories: content-based methods, collaborative filtering methods, and hybrid methods. Content-based methods mainly analyze the similarity between PR text content and developer historical comments; collaborative filtering methods are based on the collaboration network between developers for recommendation; hybrid methods attempt to combine multiple features. However, these methods have the following significant defects: (1) Most only consider single-dimensional features (or content or collaboration), lacking unified modeling of developer skills, interest preferences, and other multi-dimensional features; (2) fail to fully utilize structured semantic information in PRs (such as code change paths, labels, etc.); (3) recommendation performance drops sharply in data sparse scenarios (such as new developers or new projects).

[0004] In recent years, knowledge graph technology has begun to be applied in the field of software engineering. In 2018, Zhang et al. first applied knowledge graphs to developer recommendation systems; in 2020, Wang et al. proposed a code review recommendation framework based on heterogeneous graphs. However, these methods still have limitations: (1) they mainly focus on social relationships between developers, ignoring the rich semantics of PR content; (2) they lack fine-grained modeling of developer behavior characteristics (such as activity level, area of expertise); (3) they fail to effectively integrate unstructured text information (such as code changes, comment content) and structured collaboration data.

[0005] With the breakthrough of Large Language Model (LLM) technology, in 2023, Chen et al. tried to extract PR semantic features using the BERT model, but this method only stays at the shallow text matching and fails to build deep semantic associations. In the same year, Liu's team proposed a hybrid model combining GNN and Transformer, which improved performance, but still could not solve the new project cold start problem.

[0006] Since existing PR recommendation methods have not fully mined the skill (behavior) features in the developer's historical comments, semantic information in PR code changes, and activity patterns in user behavior logs, these multi-modal data contain key developer ability and project demand features. By systematically integrating these heterogeneous information, the representation ability of the developer portrait and PR features can be significantly enhanced. Therefore, traditional methods often cannot generate accurate and reliable recommendations when faced with new developers, emerging technology stack projects, or PR requests in special fields. SUMMARY

[0007] To address the shortcomings of existing PR recommendation methods, the present application proposes a personalized pull request recommendation method based on a dual-view collaborative knowledge graph. By using large language model feature extraction, dual-view knowledge graph construction, relationship perception graph attention network, and multi-task joint optimization, the method realizes the deep integration of user behavior features and PR content features, improves recommendation accuracy and explainability, and is suitable for intelligent code review scenarios on open source collaboration platforms such as GitHub, significantly improving the PR processing efficiency of large open source projects such as Linux and Kubernetes.

[0008] The present application is implemented by the following technical solutions: a personalized pull request recommendation method based on a dual-view collaborative knowledge graph, which specifically includes the following steps: Step 1: Obtain the PR dataset of an open source project, preprocess the data, and divide it into a training set and a test set; Step 2: Build a PR recommendation model based on a dual-view collaborative knowledge graph; Step 3: Use the training set data divided in step 1 to train the PR recommendation model based on the dual-view collaborative knowledge graph built in step 2, and optimize the relationship perception attention mechanism and embedding representation; Step 4: Use the test set data divided in step 1 to evaluate the PR recommendation performance of the model trained in step 3, and generate a personalized PR recommendation list.

[0009] Further, in step 1: divide the dataset into a training set and a validation set according to 80%, 20%; Step 1.1: Extract user-PR interaction records, PR content, user comments, and behavior logs from open-source project repositories; Step 1.2: Clean and standardize the comments, titles, and code differences in the text content.

[0010] Further, in Step 2, Step 2.1: A multi-granularity semantic fusion mechanism is designed in the feature propagation stage; user behavior features and PR content features are integrated to quantify and model user activity, and z-score is calculated based on the number of comments, comment frequency, and recent activity to discretize into five levels of activity; in the semantic propagation process, the model uses a hierarchical attention mechanism to handle different types of node features: Step 2.2: Cross-modal information fusion based on dual-view collaborative attention mechanism, by dynamically integrating the feature representations of user view and PR view, a dual-view heterogeneous knowledge graph is constructed and node representations are initialized; Step 2.3: After completing cross-modal graph attention propagation, the final user embedding and PR embedding are concatenated and input into two layers of MLP to obtain matching scores, and the Top-K personalized recommendation list is output in descending order of score.

[0011] Further, in Step 3, Step 3.1: Training sample construction and batched input, the training set obtained in Step 1 is reorganized in the form of "user-positive sample PR-negative sample PR" triplets: Positive sample PR: PR that the user has actually commented on in the past; Negative sample PR: PR that the user has not commented on in the same time period and is similar in time to the positive sample PR; Step 3.2: Dual-view collaborative forward calculation; Within each batch, the model parallelly completes two forward paths, which are: User perspective path: centered on the user node, outputting user embedding; PR perspective path: centered on the PR node, outputting PR embedding; Step 3.3: Joint optimization of the weighted objective function containing binary cross-entropy loss function and Bayesian personalized ranking loss, and introduction of L2 regularization term to prevent overfitting, finally completing model training.

[0012] Further, in Step 4, Step 4.1: Input the test set data divided in Step 1 into the dual-view collaborative knowledge graph recommendation model trained in Step 3; Step 4.2: Generate a personalized PR recommendation ranking list by calculating the matching score of the user node and PR node embedding.

[0013] A personalized pull request recommendation method based on a dual-view collaborative knowledge graph The recommendation system comprises a preprocessing module, a model construction module, a training module and a prediction module The preprocessing module is used for obtaining a PR data set of an open source project, preprocessing the data thereof and dividing the data into a training set and a test set The model construction module is used for constructing a PR recommendation model based on a dual-view collaborative knowledge graph The training module trains the PR recommendation model based on the dual-view collaborative knowledge graph constructed by the model construction module using the training set data divided by the preprocessing module, and optimizes the relationship-aware attention mechanism and the embedding representation The prediction module uses the test set data divided by the preprocessing module to evaluate the PR recommendation performance of the model trained by the training module, and generates a personalized PR recommendation list.

[0014] An electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the above method when executing the computer program.

[0015] A computer-readable storage medium for storing computer instructions, which are executed by a processor to implement the steps of the above method.

[0016] Advantages of the present application 1. The present application proposes a recommendation framework based on a dual-view collaborative knowledge graph to address the three major core defects of existing PR recommendation methods: (1) user features and PR content features are separated; (2) lack of multi-dimensional semantic fusion; (3) performance degradation in data sparse scenarios. The present application deeply mines skill (behavior) features in user comments and semantic information in PR code changes through a large language model, and innovatively constructs a relationship-aware graph attention network to realize dynamic fusion of user behavior features and PR content features, significantly improving recommendation accuracy and interpretability.

[0017] 2、(1) Original dual-view modeling framework: Construct user view (skills, interests, activity) and PR view (change type, file path, label) knowledge graph respectively, realize deep interaction through cross-modal attention mechanism, solve the feature fragmentation problem; (2) Innovative introduction of LLM semantic enhancement: Use large language model to extract standardized semantic labels from unstructured text (code comments, PR description, etc.), build rich attribute association network; (3) Multi-task joint optimization design: Creatively combine binary cross-entropy loss and Bayesian personalized ranking loss, while maintaining click rate prediction accuracy, significantly improve ranking quality; (4) Behavior activity quantification model: Propose a dynamic scoring algorithm based on multi-dimensional behavior characteristics (number of comments, frequency, recent activity), effectively alleviate the data sparsity problem.

[0018] The application is particularly suitable for intelligent code review scenarios of open source collaboration platforms such as GitHub, and can significantly improve the PR processing efficiency of large open source projects (such as Linux, Kubernetes, etc.). BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 is a flowchart of the personalized pull request recommendation method based on the dual-view collaborative knowledge graph described in the application; Figure 2 is a model diagram of the personalized pull request recommendation method based on the dual-view collaborative knowledge graph described in the application. DETAILED DESCRIPTION

[0020] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the application.

[0021] The experimental methods used in the following examples are conventional methods unless otherwise specified. The materials, reagents, methods and instruments used are conventional materials, reagents, methods and instruments in the art unless otherwise specified, which can be obtained by commercial channels by those skilled in the art.

[0022] Example 1: As Figure 1The application provides a personalized pull request recommendation method based on a dual-view collaborative knowledge graph, which is used to solve the problems of the existing PR recommendation methods, that is, (1) the multi-dimensional features (skills, interests, activity, etc.) on the developer side and the semantic features (code changes, file paths, labels, etc.) on the PR side cannot be effectively fused; (2) the deep semantic mining of unstructured text information (such as code comments and PR descriptions) is lacked; (3) the recommendation performance is significantly reduced in the data sparse scene, and the technologies such as large language model feature extraction, dual-view knowledge graph construction, relationship perception graph attention network and multi-task joint optimization are adopted, In the embodiment, the method specifically comprises the following steps: Step 1: Obtain the PR dataset of an open source project, including user-PR interaction records, PR content, user comments and behavior logs, pre-process the data and divide it into a training set and a test set; In order to fully mine the potential features in the user historical behavior, a large language model is used to perform semantic analysis on the user comments, extract standardized skill labels and interest topics, and construct a semantic feature network of the user portrait.

[0023] Step 1.1: Obtain the original PR data from open source platforms such as GitHub, including: PR metadata: title, description, creation time, status, etc.; code changes: diff file, modified file path, etc.; interaction records: comment content, commenter, comment time, etc.; user information: personal profile, contribution history, etc. For each PR interaction record, the application records the bidirectional association relationship (user-PR interaction and PR-user association) at the same time; Step 1.2: Use a large language model to extract semantic features of all users and PRs in the dataset: user skill labels: extract technical field labels (such as "machine learning", "front-end development", etc.) from user historical comments; PR topic classification: analyze PR title and description, and label the change type (such as "bug fixing", "function enhancement", etc.); code change analysis: parse the diff file to identify the affected module and technology stack; Step 1.3: Divide the dataset into a training set and a test set.

[0024] Step 2: Construct a PR recommendation model based on a dual-view collaborative knowledge graph; As Figure 2 In order to effectively solve the data sparsity problem, an innovative behavior activity quantification model is designed, which comprehensively considers three dimensions of the number of user comments, comment frequency and recent activity, and divides the users into five activity levels (HighlyActive to Dormant) through z-score standardization and weighted calculation, and the specific steps are as follows: Step 2.1: To enhance the representation ability of heterogeneous relationships in the knowledge graph, the invention innovatively designs a multi-granularity semantic fusion mechanism in the feature propagation stage; By integrating user behavior features and PR content features, a hierarchical representation learning framework is constructed. At the feature fusion level, first, the user activity is quantitatively modeled:

[0025] The formula takes into account the user's comment quantity , comment frequency , and recent activity three-dimensional behavior features, through z-score normalization and weighted summation, to achieve standardized evaluation of user activity.

[0026] In the semantic propagation process, the model uses a hierarchical attention mechanism to handle different types of node features: for user behavior (skill) features, the standardized labels extracted by LLM are used to construct "has_skill" relationship edges; for PR content features, path information is extracted from code differences to construct "has_path" relationship edges; for social relationships, "interact" relationship edges are constructed based on common comment history.

[0027] Step 2.2: Construct a dual-view heterogeneous knowledge graph and initialize node representations; In order to more comprehensively model the complex relationship semantics in the knowledge graph, the invention innovatively proposes a relationship fusion method based on a dual-view collaborative attention mechanism in the message passing process. This method dynamically integrates the feature representations of the user view and the PR view, significantly improving the fine-grained expression ability of relationship representation. The specific implementation process is as follows:

[0028] where, represents the embedding vector of the user node, represents the feature representation of the neighbor node. Unlike traditional methods, this model designs the attention weight α as a learnable parameter, allowing it to automatically adjust the importance of different neighbor nodes according to different semantic scenarios. This dynamic adjustment mechanism ensures that the model can adapt to various complex interaction patterns.

[0029] In the node representation update stage, the system uses an improved dual-view graph attention network architecture. For PR node p, its update process is realized through the following formula:

[0030] where, represents the base embedding representation of the layer, and respectively represent the relationship set of the user node and the PR node, and represent the relationship and are respectively the relationship-specific transformation matrix under the perspective of the user node and the PR node, is the relationship-based attention weight, which is obtained by calculating the feature similarity of the target node and the neighbor node under the relationship.

[0031] Through this perspective decoupling design, the user node and the PR node can retain different semantic aggregation priorities in the same propagation framework, so as to obtain a representation that is more in line with the semantics of their respective roles when cross-modal information fusion is performed.

[0032] The calculation of the attention weight adopts the following formula:

[0033] Step 2.3: Construct a prediction module to calculate the user-PR matching score and generate a personalized recommendation ranking; After completing the cross-modal graph attention propagation, the user node and the PR node both obtain rich semantic embedding representations. To realize personalized PR recommendation, the implementation further designs a lightweight but efficient prediction module. The module takes the user embedding and the PR embedding as input, first fuses the two through a vector concatenation operation, and inputs the fused feature vector into a two-layer multilayer perceptron (MLP) to calculate the matching score between the user and the PR

[0034] Among them, the MLP structure is as follows: the first layer is a fully connected layer with an input dimension of 2d and an output dimension of d, and the activation function is ReLU; the second layer is a fully connected layer with an input dimension of d and an output dimension of 1, and the activation function is Sigmoid.

[0035] In addition, to prevent overfitting, a Dropout layer is introduced in the MLP (in the experiment, the Dropout rate is 0.2). The final output matching score represents the possibility of the user u participating in reviewing the PR p , and the higher the score, the higher the recommendation priority.

[0036] ​Step 3: Train the dual-view collaborative knowledge graph model constructed in Step 2 using the training set data divided in Step 1, optimize the relationship-aware attention mechanism and embedding representation; On the basis of the aforementioned graph construction and embedding propagation, an end-to-end training process is proposed to ensure that the model has a stable and reproducible optimization path in the real open source project scenario. Specifically, the following steps are included: Step 3.1: Training sample construction and batched input, reorganize the training set obtained in Step 1 into "user-positive sample PR-negative sample PR" triplets: Positive sample PR: PR that the user has actually commented on in the past; Negative sample PR: PR that the user has not commented on in the same time period and is similar in time to the positive sample PR (ensuring difficulty and timeliness).

[0037] To avoid class imbalance, construct a 1:4 positive-negative ratio for each user; then send 512 triplets as a batch to GPU memory. Before entering the model, dynamic neighbor sampling is implemented: randomly retain up to 50 neighbors for each center node, which prevents GPU memory overflow and introduces randomness to improve robustness; Step 3.2: Dual-view collaborative forward calculation: Within each batch, the model parallelly completes two forward paths: (1) User perspective path: taking the user node as the center, aggregate skill, activity, topic preference, and other semantic subgraphs to output user embeddings; (2) PR perspective path: taking the PR node as the center, aggregate label, file path, contributor identity, and other semantic subgraphs to output PR embeddings. The two paths share relationship-aware attention parameters but use different transformation matrices to ensure that perspective differences are explicitly preserved.

[0038] Step 3.3: Design a joint loss function to combine binary cross-entropy loss and Bayesian personalized ranking loss to achieve end-to-end optimization of the model; To optimize both the click-through rate prediction accuracy and the ranking performance of the model, the present embodiment proposes a joint loss function (Joint Loss Function) that combines binary cross-entropy loss (Binary Cross-Entropy Loss, BCE) and Bayesian personalized ranking loss (Bayesian Personalized Ranking Loss, BPR) and introduces an L2 regularization term to prevent overfitting. Specifically, the joint loss function is defined as follows:

[0039] Where the binary cross-entropy loss is used to fit the explicit feedback of user-PR interaction:

[0040] wherein denotes all user-PR pairs in the training set, is the true interaction label.

[0041] Bayesian personalized ranking loss is used to optimize the ranking relationship between positive and negative samples:

[0042] wherein, denotes the set of positive and negative sample triplets constructed from the training set, is the PR that the user has interacted with (positive sample), is the PR that the user has not interacted with (negative sample). L2 regularization term is used to constrain the model complexity and prevent overfitting.

[0043] By minimizing the above joint loss function, the model can be optimized end-to-end in the training phase, and finally generate a high-quality Top-K personalized PR recommendation list for each user in the inference phase.

[0044] Step 4: Use the test set data divided in step 1 to evaluate the PR recommendation performance of the model trained in step 3, and generate a personalized PR recommendation list.

[0045] Step 4.1: Freeze all model parameters, and input the user-PR pairs in the test set into the model in batches; Step 4.2: After the model outputs the matching scores, generate a Top-K recommendation list for each user in descending order of score.

[0046] Embodiment two: a personalized pull request recommendation method based on a dual-view collaborative knowledge graph; The recommendation system comprises a preprocessing module, a model construction module, a training module, and a prediction module The preprocessing module is used to obtain a PR dataset of an open source project, preprocess the data, and divide it into a training set and a test set; The model construction module is used to construct a PR recommendation model based on a dual-view collaborative knowledge graph; The training module uses the training set data divided by the preprocessing module to train the PR recommendation model based on the dual-view collaborative knowledge graph constructed by the model construction module, and optimizes the relationship-aware attention mechanism and embedding representation; The prediction module uses the test set data divided by the preprocessing module to evaluate the PR recommendation performance of the model trained by the training module, and generates a personalized PR recommendation list.

[0047] The trained PR recommendation model can be divided into: a user feature embedding module, a PR feature embedding module, a cross-modal graph attention propagation module, and a prediction module. In the user feature embedding module, a large language model is used to extract skill tags from historical review comments, and standardization is completed through a pre-defined skill ontology. A topic mining prompt template is used to extract topic preferences from reviewed PR titles. The z-score is calculated according to the number of comments, comment frequency and recent activity, and is discretized into five levels of activity. In the PR feature embedding module, a large language model inference is performed on the PR code difference to obtain semantic labels. The path nodes are generated by parsing the change file path and the has_path relationship is established. The PR submitter is used as the contributor node and the contributedBy relationship is constructed. In the cross-modal graph attention propagation module, the user perspective and the PR perspective are aggregated using a relationship-specific transformation matrix to aggregate the first-order neighbor embedding. The neighbor weight is calculated through a LeakyReLU attention mechanism and multi-hop information transmission is completed. A hierarchical stacked three-layer network is used to capture high-order collaborative signals. In the prediction module, the final user embedding and the PR embedding are concatenated and input into a two-layer MLP to obtain a matching score. The binary cross-entropy loss and the Bayesian personalized ranking loss are jointly minimized. The candidate PRs are output in descending order of score to obtain a Top-K personalized recommendation list.

[0048] An electronic device includes a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the above method when executing the computer program.

[0049] A computer-readable storage medium for storing computer instructions, which are executed by a processor to implement the steps of the above method.

[0050] The memory in the embodiments of the application can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory. Where the nonvolatile memory is a read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically EPROM (EEPROM), or flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example, and not limitation, many forms of RAM are available, for example, static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM). Note that the memory described herein is intended to include, among others, these and any other memory suitable for storing the data adaptively described herein.

[0051] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable apparatus. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired, such as coaxial cable, optical fiber, digital subscriber line (DSL) or wireless, such as infrared, wireless, microwave, etc. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media, such as floppy disks, hard disks, magnetic tapes, optical media, such as digital video discs (DVD), or semiconductor media, such as solid state discs (SSD), etc.

[0052] In the implementation process, each step of the above method can be completed by integrated logic circuit of hardware in the processor or instruction in the form of software. The steps of the method disclosed in the embodiments of the present application can be directly embodied as hardware processor execution or executed by combination of hardware and software modules in the processor. The software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, register or other mature storage medium in the art. The storage medium is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.

[0053] It should be noted that the processor in the embodiments of the present application can be an integrated circuit chip with signal processing capability. In the implementation process, each step of the method embodiments can be completed by the integrated logic circuit of hardware in the processor or the instructions in the form of software. The processor mentioned above can be a general processor, a digital signal processor DSP, an application specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as hardware code processor execution completion, or executed by hardware and software module combination in the code processor. The software module can be located in the random access memory, the flash memory, the read only memory, the programmable read only memory or the electrically erasable programmable memory, the register or other mature storage medium in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and combines the hardware to complete the steps of the above method.

[0054] The above describes in detail the personalized pull request recommendation method based on the dual-view collaborative knowledge graph, and the principle and implementation mode of the present application are described. The above embodiment is only used to help understand the method and core idea of the present application; at the same time, for the general technical personnel in the art, according to the idea of the present application, the specific implementation mode and application range will be changed, and the above description should not be understood as the limitation of the present application.

Claims

1. A personalized pull request recommendation method based on a dual-perspective collaborative knowledge graph, characterized in that: The method specifically includes the following steps: Step 1: Obtain the PR dataset from the open-source project, preprocess the data, and divide it into training and test sets; Step 2: Construct a PR recommendation model based on a dual-view collaborative knowledge graph; Step 3: Using the training set data divided in Step 1, train the PR recommendation model based on dual-view collaborative knowledge graph constructed in Step 2, and optimize the relationship-aware attention mechanism and embedding representation. Step 4: Using the test set data divided in Step 1, evaluate the PR recommendation performance of the model trained in Step 3 and generate a personalized PR recommendation list.

2. The recommended method according to claim 1, characterized in that: In step 1: the dataset is divided into training set and validation set according to 80% and 20% respectively; Step 1.1: Extract user-PR interaction records, PR content, user comments, and behavior logs from the open-source project repository; Step 1.2: Clean and standardize the differences in comments, titles, and code in the text content.

3. The recommended method according to claim 2, characterized in that: In step 2, Step 2.1: A multi-granularity semantic fusion mechanism was designed in the feature propagation stage; user behavior features and PR content features were integrated to quantitatively model user activity, and z-score was calculated and discretized into five levels of activity based on the number of comments, comment frequency and recent activity. During semantic propagation, the model employs a hierarchical attention mechanism to handle different types of node features: Step 2.2: Perform cross-modal information fusion based on the dual-view collaborative attention mechanism. By dynamically integrating the feature representations of the user view and the PR view, a dual-view heterogeneous knowledge graph is constructed and node representations are initialized. Step 2.3: After completing the cross-modal graph attention propagation, concatenate the end-user embedding and the PR embedding and input them into a two-layer MLP to obtain the matching score. Output the Top-K personalized recommendation list for the candidate PRs in descending order of score.

4. The recommended method according to claim 3, characterized in that: In step 3, Step 3.1: Training sample construction and batch input. The training set obtained in Step 1 is reorganized into triplets of "user-positive sample PR-negative sample PR": Positive sample PR: PRs that users have actually reviewed in the past; Negative sample PR: PRs that did not receive user comments within the same time period and whose timing is close to that of positive sample PRs; Step 3.2: Dual-view collaborative forward computation; Within each batch, the model completes two forward paths in parallel: User-perspective path: Centered on the user node, outputting the user embedding; PR Perspective Path: Centered on the PR node, output the PR embedding; Step 3.3: Jointly optimize the weighted objective function, which includes the binary cross-entropy loss function and the Bayesian personalized ranking loss, and introduce an L2 regularization term to prevent overfitting, and finally complete the model training.

5. The recommended method according to claim 4, characterized in that: In step 4, Step 4.1: Input the test set data divided in Step 1 into the dual-view collaborative knowledge graph recommendation model trained in Step 3; Step 4.2: Generate a personalized PR recommendation ranking list by calculating the matching score between the user node and the PR node embedding.

6. A personalized pull request recommendation system based on a dual-perspective collaborative knowledge graph, characterized in that: The recommendation system is used to execute the personalized pull request recommendation method based on dual-view collaborative knowledge graph as described in any one of claims 1 to 5; The recommendation system includes: a preprocessing module, a model building module, a training module, and a prediction module. The preprocessing module is used to obtain the PR dataset of open source projects, preprocess the data and divide it into training and testing sets; The model building module is used to build a PR recommendation model based on a dual-view collaborative knowledge graph; The training module uses the training set data divided by the preprocessing module to train the PR recommendation model based on the dual-view collaborative knowledge graph constructed by the model building module, and optimizes the relationship-aware attention mechanism and embedding representation. The prediction module uses the test set data divided by the preprocessing module to evaluate the PR recommendation performance of the model trained by the training module and generate a personalized PR recommendation list.

7. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium for storing computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 5.