AI-based code quality intelligent review and automatic distribution system and method
By using an AI-based intelligent code quality review system, which leverages GitLab and large language models for in-depth code analysis, the system addresses the issues of rigid rules and high false positive rates in existing tools, achieving fully automated closed-loop management and efficient code quality feedback.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING CATHAY INTERNET INFORMATION TECH CO LTD
- Filing Date
- 2025-12-24
- Publication Date
- 2026-04-17
AI Technical Summary
Existing static code analysis tools have rigid rules and high false positive rates, making it difficult to achieve deep semantic understanding and contextual analysis, and thus unable to achieve fully automated closed-loop management.
An AI-based intelligent code quality review system is adopted, including an event triggering and capture unit, a code change extraction and analysis unit, an intelligent review engine startup unit, an AI analysis and decision-making unit, and a feedback and closed-loop unit. The system uses the GitLab platform to listen for code push events and performs in-depth analysis and automated feedback through a large language model.
It enables real-time response and intelligent analysis of code reviews, shortens the feedback cycle, improves development efficiency, covers a wider range of defect types, and supports customized review standards for enterprises.
Smart Images

Figure CN121879734A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software development and quality assurance technology, specifically to an AI-based intelligent code quality review and automated allocation system and method. Background Technology
[0002] In modern software development processes, code review is a crucial step in ensuring code quality, improving software security, and standardizing coding style.
[0003] Existing static code analysis tools (such as SonarQube and Checkmarx) can automate detection to some extent. However, these tools typically suffer from the following problems: rigid rules, high false positive rates, and limited detection dimensions, making it difficult to achieve deep semantic understanding and contextual analysis.
[0004] Therefore, there is an urgent need in this field for a code review solution that can respond in real time, perform intelligent analysis, and continuously evolve through feedback loops to ultimately achieve fully automated closed-loop management. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides an AI-based intelligent code quality review and automated allocation system and method to resolve the corresponding technical issues raised in the background section.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: an AI-based intelligent code quality review and automated allocation system, including an event triggering and capture unit, a code change extraction and analysis unit, an intelligent review engine startup unit, an AI analysis and decision-making unit, and a feedback and closed-loop unit; The event triggering and capturing unit is used to listen for code push events when developers submit code to a remote GitLab code repository after completing feature development locally, and to generate an HTTP request to send to the code change extraction and analysis unit. The code change extraction and analysis unit includes a Webhook receiving module and a code difference parsing module. The Webhook receiving module is used to obtain HTTP requests, verify GitLab's identity and parse events, confirm the legitimacy of the request and extract key information. The code difference parsing module is used to obtain key information and actively call GitLab's API to obtain the differences between the current commit and the previous code, parse out the modified and added files, and the specific lines of code for each change, and send them as the core source code to the AI analysis and decision-making unit. The intelligent review engine startup unit includes a rule management module and a prompt word assembly module. The rule management module is used to preset the scoring dimensions, weights, and detailed standards for code review. The prompt word assembly module is used to convert the raw data into instructions, combine code differences and review rules into prompt words, and send them to the AI analysis and decision-making unit. The AI analysis and decision-making unit includes an AI calling module, which is used to obtain the combined prompt words and send the prompt words to the selected large language model API to perform in-depth analysis of code changes and generate a corresponding review report to be sent to the feedback and closed-loop unit. The review report includes potential problems, suspicious code, improvement suggestions and corresponding code quality scores. The feedback and closed-loop unit includes an issue generation module, which is used to obtain review reports, match the code quality scores returned by the large model with pre-set rules, automatically create issues based on the matching results, assign them to the code submitter, and tag them to provide feedback to the developer for code repair.
[0007] Preferably, the AI calling module is configured with the large language models deepseek, gpt, and qwen.
[0008] As a preferred approach, the specific process for generating an HTTP request is as follows: After developers complete the writing and modification of code in their local development environment, they push the code change information containing the new features to the remote GitLab code repository. The GitLab platform listens for code push events, and upon receiving the code push, it automatically generates an HTTP request through the Webhook function and sends a callback notification to the code change extraction and analysis unit based on the HTTP request. The HTTP request contains all metadata for this event, including the project ID, commit hash, branch information, and committer.
[0009] As a preferred method, the specific process of verifying GitLab's identity and parsing events to confirm the legitimacy of the request and extract key information is as follows: Obtain the HTTP request and verify the GitLab authentication information in the HTTP request to ensure that the request source is legitimate. By calling the API interface provided by GitLab, retrieve the key information of the latest code changes involved in this commit, including the specific file changes, commit logs, and number of lines changed.
[0010] As a preferred approach, the modified and newly added files, as well as the specific lines of code for each change, are parsed out. The specific process for extracting the core source code is as follows: The system obtains key information and actively calls GitLab's API to retrieve and parse the difference data between this commit and the latest version in the previous code repository. This allows it to identify the list of modified files, the list of newly added files, and the specific lines of code for each change in each file, including line numbers and code snippets before and after the change. This forms the core source code data, which is then sent to the AI analysis and decision-making unit.
[0011] As a preferred approach, the specific process for pre-defined code review scoring dimensions, weightings, and detailed standards is as follows: The rules management module provides a configuration interface, allowing users to preset review rules based on project needs and code quality standards, customize scoring dimensions, the weight of each dimension, and detailed scoring criteria, and set different code quality tags based on the scores, as follows: : block; :serious; :main; :secondary; :hint; in, For fractions, , , , , All are preset label thresholds.
[0012] As a preferred approach, the specific process of converting the raw data into instructions and combining code differences and review rules into prompt words is as follows: The system acquires core source code data and preset review rules. Based on preset prompt word templates, it dynamically assembles file change information, code line content, and scoring dimensions, weights, and detailed scoring criteria from the core source code data into structured prompt words. The prompt words are set in two different types, including system prompts and user prompts. The system prompts define roles, contexts, and review criteria for the large language model; The user prompt will present the specific code change information obtained in a structured manner to the large language model.
[0013] As a preferred method, the specific process for generating the corresponding review report is as follows: The prompt words are obtained and sent to the selected large language model API, which is a pre-integrated large language model server. Based on the instructions in the prompt words, the submitted code is subjected to in-depth static analysis through the large language model API to identify potential logical errors, security vulnerabilities, coding style violations, and design defects. Based on the API analysis results of the large language model, a corresponding review report is generated and sent to the feedback and closed-loop unit. The review report includes potential problems, suspicious code, improvement suggestions and corresponding code quality scores. The structured review results are returned in JSON format, which includes the issues found, their location, severity level, suggested modifications, and a comprehensive code quality score calculated based on the number and severity of the issues.
[0014] As a preferred approach, based on the matching results, an Issue is automatically created and assigned to the code submitter, and a tag is added to provide feedback to the developer. The specific process for fixing the code is as follows: The overall code quality score is compared with a preset quality threshold. If the score is lower than the threshold, the code review is deemed unsuccessful. When a review fails, a new Issue is automatically created in the GitLab project. The specific issues found during the scan and suggested fixes are filled in, and the issue is assigned to the corresponding code committer. The code is then modified according to the description in the Issue. Once the fix is completed, the Issue is closed on GitLab to form a traceable code review loop.
[0015] An AI-based intelligent code quality review and automated allocation method includes the following steps: Step 1: Listen for code push events when developers complete feature development locally and commit the code to the remote GitLab repository through the GitLab platform, and generate an HTTP request. Step 2: Obtain the HTTP request, verify GitLab's identity and parse the event to confirm the request's legitimacy and extract key information; Step 3: Obtain key information and actively call GitLab's API to obtain the differences between this commit and previous code, parse out the modified and added files, and the specific lines of code for each change, as the core source code; Step 4: Set the scoring dimensions, weightings, and detailed standards for code review; Step 5: Convert the raw data into instructions, combining code differences and review rules into prompt words; Step 6: Obtain the combined prompt words and send them to the selected large language model API to conduct in-depth analysis of the code changes and generate a corresponding review report. The review report includes potential problems, suspicious code, improvement suggestions, and corresponding code quality scores. Step 7: Obtain the review report. Match the code quality score returned by the large model with the pre-set rules. Based on the matching results, automatically create an issue and assign it to the code submitter, and tag it to provide feedback to the developer for code fixes.
[0016] Compared with the prior art, the beneficial effects of the present invention are: (1) The Webhook mechanism provided by GitLab enables "code submission triggers", which requires no manual intervention, greatly shortens the feedback cycle and improves development efficiency.
[0017] (2) By leveraging the understanding capabilities of large AI models, it surpasses traditional static analysis tools and can perform contextual association and semantic analysis that is closer to that of human experts, covering a wider range of defect types.
[0018] (3) With a configurable rules engine, companies can easily customize review standards that suit their own projects. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the overall structure of a preferred embodiment of the present invention; Figure 2 This is a flowchart of the method shown in this invention; Figure 3 This is a system architecture diagram illustrating the present invention; Figure 4 This is a schematic diagram illustrating a specific embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Embodiments of the present invention: Please refer to Figures 1 to 4 As shown, an AI-based intelligent code quality review and automated allocation system includes an event triggering and capture unit, a code change extraction and analysis unit, an intelligent review engine startup unit, an AI analysis and decision-making unit, and a feedback and closed-loop unit. The event triggering and capturing unit is used to listen for code push events when developers complete feature development locally and submit code to a remote GitLab code repository through the GitLab platform, and generate an HTTP request to send to the code change extraction and analysis unit. The code change extraction and analysis unit includes a Webhook receiving module and a code difference parsing module. The Webhook receiving module is used to obtain HTTP requests, verify GitLab's identity and parse events, confirm the legitimacy of the request and extract key information. The code difference analysis module is used to obtain key information and actively call GitLab's API to obtain the differences between the current commit and the previous code, parse out the modified and added files, and the specific lines of code for each change, and send them as the core source code to the AI analysis and decision-making unit. The intelligent review engine startup unit includes a rule management module and a prompt word assembly module. The rule management module is used to preset the scoring dimensions, weights, and detailed standards for code review. The prompt word assembly module is used to convert raw data into instructions, combine code differences and review rules into prompt words, and send them to the AI analysis and decision-making unit. The AI analysis and decision-making unit includes an AI invocation module, which is used to obtain the combined prompt words and send the prompt words to the selected large language model API to perform in-depth analysis of code changes and generate corresponding review reports to be sent to the feedback and closed-loop unit. The review reports include potential problems, suspicious code, improvement suggestions and corresponding code quality scores. The feedback and closed-loop unit includes an issue generation module, which is used to obtain review reports, match the code quality scores returned by the large model with pre-set rules, automatically create issues based on the matching results, assign them to the code submitter, and tag them to provide feedback to the developers for code fixes.
[0022] The AI calling module is configured with the large language models deepseek, gpt, and qwen.
[0023] The specific process of generating an HTTP request is as follows: After developers complete the writing and modification of code in their local development environment, they push the code change information containing the new features to the remote GitLab code repository. The GitLab platform listens for code push events, and upon receiving the code push, it automatically generates an HTTP request through the Webhook function and sends a callback notification to the code change extraction and analysis unit based on the HTTP request. The HTTP request contains all metadata for this event, including the project ID, commit hash, branch information, and committer.
[0024] The specific process of verifying GitLab's identity and parsing events to confirm the legitimacy of the request and extract key information is as follows: Obtain the HTTP request and verify the GitLab authentication information in the HTTP request to ensure that the request source is legitimate. By calling the API interface provided by GitLab, retrieve the key information of the latest code changes involved in this commit, including the specific file changes, commit logs, and number of lines changed.
[0025] The process of parsing the modified and newly added files, as well as the specific lines of code for each change, as the core source code, is as follows: The system obtains key information and actively calls GitLab's API to retrieve and parse the difference data between this commit and the latest version in the previous code repository. This allows it to identify the list of modified files, the list of newly added files, and the specific lines of code for each change in each file, including line numbers and code snippets before and after the change. This forms the core source code data, which is then sent to the AI analysis and decision-making unit.
[0026] The specific process for setting the scoring dimensions, weightings, and detailed standards for code review is as follows: The rules management module provides a configuration interface, allowing users to preset review rules based on project needs and code quality standards, customize scoring dimensions, the weight of each dimension, and detailed scoring criteria, and set different code quality tags based on the scores, as follows: : block; :serious; :main; :secondary; :hint; in, For fractions, , , , , All are preset label thresholds.
[0027] The specific process of converting raw data into instructions and combining code differences and review rules into prompt words is as follows: The system acquires core source code data and preset review rules. Based on preset prompt templates, it dynamically assembles file change information, code line content, and scoring dimensions, weights, and detailed scoring criteria from the core source code data into structured prompts. There are two different types of prompts: system prompts and user prompts. The system prompts define roles, contexts, and review criteria for the large language model; The user prompts will present the specific code change information obtained in a structured manner to the large language model.
[0028] The specific process for generating the corresponding review report is as follows: The prompt words are obtained and sent to the selected large language model API. The selected large language model API is a pre-integrated large language model server. Based on the instructions in the prompt words, the large language model API is used to perform deep static analysis on the submitted code to identify potential logical errors, security vulnerabilities, coding style violations, and design defects. Based on the API analysis results of the large language model, a corresponding review report is generated and sent to the feedback and closed-loop unit. The review report includes potential problems, suspicious code, improvement suggestions and corresponding code quality scores. The structured review results are returned in JSON format, including the issues found, their location, severity level, suggested changes, and a comprehensive code quality score calculated based on the number and severity of the issues.
[0029] Based on the matching results, an issue is automatically created and assigned to the code submitter, and a tag is added to provide feedback to the developer. The specific process for fixing the code is as follows: The overall code quality score is compared with a preset quality threshold. If the score is lower than the threshold, the code review is deemed unsuccessful. When a review fails, a new Issue is automatically created in the GitLab project. The specific issues found during the scan and suggested fixes are filled in, and the issue is assigned to the corresponding code committer. The code is then modified according to the description in the Issue. Once the fix is completed, the Issue is closed on GitLab to form a traceable code review loop.
[0030] An AI-based intelligent code quality review and automated allocation method includes the following steps: Step 1: Listen for code push events when developers complete feature development locally and commit the code to the remote GitLab repository through the GitLab platform, and generate an HTTP request. Step 2: Obtain the HTTP request, verify GitLab's identity and parse the event to confirm the request's legitimacy and extract key information; Step 3: Obtain key information and actively call GitLab's API to obtain the differences between this commit and previous code, parse out the modified and added files, and the specific lines of code for each change, as the core source code; Step 4: Set the scoring dimensions, weightings, and detailed standards for code review; Step 5: Convert the raw data into instructions, combining code differences and review rules into prompt words; Step 6: Obtain the combined prompt words and send them to the selected large language model API to conduct in-depth analysis of code changes and generate a corresponding review report. The review report includes potential problems, suspicious code, improvement suggestions, and corresponding code quality scores. Step 7: Obtain the review report. Match the code quality score returned by the large model with the pre-set rules. Based on the matching results, automatically create an issue and assign it to the code submitter, and tag it to provide feedback to the developer for code fixes.
[0031] By combining GitLab's Webhook functionality with AI language model technology, an automated process can be achieved from code submission, detection and scanning, issue discovery to issue publication. When developers submit or merge code, GitLab proactively sends a request via Webhook to the code review process, providing details of the code changes. The review process then submits the code change information to a large language model for analysis and scoring. If the code quality score is below a preset threshold, a code scan report (Issue) is automatically created on GitLab, assigning a responsible party. The responsible party then modifies the code according to the description in the Issue. After the fix is completed, the Issue is closed on GitLab, thus forming a complete and traceable code review loop, ensuring that all discovered issues are effectively addressed and verified.
[0032] In this embodiment: The core workflow of this system involves four main components: the local development environment, the GitLab code hosting platform, the intelligent code review system, and the large language model. Their collaborative workflow is as follows: 1. Code Development and Submission: Developers complete code writing and modification in their local development environment, and then push code change information, including new features, to the remote GitLab code repository. This step marks the beginning of a new code review cycle.
[0033] 2. Automatic Triggering of the Review Process: After receiving the code push, the GitLab platform automatically sends an HTTP callback notification to the intelligent code review system of this invention through its Webhook function (this callback address needs to be pre-configured on the GitLab platform side). This notification carries the metadata of this commit (such as project ID, branch name, commit hash, etc.), thereby realizing the unattended automatic start of the review process.
[0034] 3. Obtaining Code Change Information: Upon receiving the notification, the intelligent code review system immediately retrieves detailed information about the latest code changes involved in the commit by calling the API provided by GitLab. This typically includes specific file changes (Diff), commit logs, and the number of lines changed, providing complete contextual data for subsequent intelligent analysis.
[0035] 4. Intelligent Assembly of Review Prompts: This step is crucial to the intelligence of this invention. Based on predefined review rules and best practices, the system dynamically assembles two different types of prompts: 4.1 System Prompts: This section sets roles, contexts, and review criteria for the large language model. For example, "You are a senior code security expert. Please rigorously check the following code for potential security vulnerabilities, performance issues, and code smells." Its purpose is to constrain the model's output and ensure the professionalism and relevance of the review.
[0036] 4.2. User Prompt: This section encapsulates the specific code change information obtained in step 3 in a structured manner and presents it clearly to the large language model. For example, it includes code snippets before and after the change and explicitly states the review requirements.
[0037] 5. Code scanning using a large language model: The assembled system prompts and user prompts will be sent together to a pre-integrated large language model server (such as Deepseek, Qwen, GPT series, etc.). Based on its powerful code understanding and natural language processing capabilities, the large language model performs in-depth static analysis on the submitted code, identifying potential logical errors, security vulnerabilities, coding style violations, design flaws, and other issues.
[0038] 6. Quality Assessment: After the large language model completes its analysis, it returns structured review results (in JSON format) to the intelligent code review system. These results include identified issues, their location, severity level, suggested modifications, and a comprehensive code quality score calculated based on the number and severity of the issues.
[0039] 7. Automated Decision-Making: The system compares the quality score given by the large model with a preset quality threshold. If the score is lower than the threshold, the code review is deemed unsuccessful.
[0040] 8. Issue Tracking and Closed-Loop Management: For issues that fail the review, the system automatically creates a new Issue in the GitLab project, filling in the specific issues found during the scan, suggested fixes, and other information, and assigns it to the relevant code committer. The responsible person modifies the code according to the description in the Issue, and after the fix is completed, closes the Issue on GitLab, thus forming a complete and traceable code review closed loop, ensuring that all discovered issues are effectively handled and verified.
[0041] The size of the interval and threshold is set to facilitate comparison. The size of the threshold depends on the amount of sample data and the number of bases set by those skilled in the art for each set of sample data; as long as it does not affect the ratio between the parameter and the quantized value.
[0042] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation. In the two embodiments provided in this application, it should be understood that the disclosed apparatus and system can be implemented in other ways; for example, the apparatus embodiments described above are merely illustrative, and the division of modules is merely a logical functional division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed; furthermore, the coupling or direct coupling or communication connection between the shown or discussed mutuals can be through some interfaces, and the indirect coupling or communication connection between the apparatus or modules can be electrical, mechanical or other forms. The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. An AI-based intelligent code quality review and automated allocation system, characterized in that, It includes an event triggering and capture unit, a code change extraction and analysis unit, an intelligent review engine launch unit, an AI analysis and decision-making unit, and a feedback and closed-loop unit; The event triggering and capturing unit is used to listen for code push events when developers submit code to a remote GitLab code repository after completing feature development locally, and to generate an HTTP request to send to the code change extraction and analysis unit. The code change extraction and analysis unit includes a Webhook receiving module and a code difference parsing module. The Webhook receiving module is used to obtain HTTP requests, verify GitLab's identity and parse events, confirm the legitimacy of the request and extract key information. The code difference parsing module is used to obtain key information and actively call GitLab's API to obtain the differences between the current commit and the previous code, parse out the modified and added files, and the specific lines of code for each change, and send them as the core source code to the AI analysis and decision-making unit. The intelligent review engine startup unit includes a rule management module and a prompt word assembly module. The rule management module is used to preset the scoring dimensions, weights, and detailed standards for code review. The prompt word assembly module is used to convert the raw data into instructions, combine code differences and review rules into prompt words, and send them to the AI analysis and decision-making unit. The AI analysis and decision-making unit includes an AI calling module, which is used to obtain the combined prompt words and send the prompt words to the selected large language model API to perform in-depth analysis of code changes and generate a corresponding review report to be sent to the feedback and closed-loop unit. The review report includes potential problems, suspicious code, improvement suggestions and corresponding code quality scores. The feedback and closed-loop unit includes an issue generation module, which is used to obtain review reports, match the code quality scores returned by the large model with pre-set rules, automatically create issues based on the matching results, assign them to the code submitter, and tag them to provide feedback to the developer for code repair.
2. The AI-based intelligent code quality review and automated allocation system according to claim 1, characterized in that, The AI calling module is configured with the large language models deepseek, gpt, and qwen.
3. The AI-based intelligent code quality review and automated allocation system according to claim 2, characterized in that, The specific process of generating an HTTP request is as follows: After developers complete the writing and modification of code in their local development environment, they push the code change information containing the new features to the remote GitLab code repository. The GitLab platform listens for code push events, and upon receiving the code push, it automatically generates an HTTP request through the Webhook function and sends a callback notification to the code change extraction and analysis unit based on the HTTP request. The HTTP request contains all metadata for this event, including the project ID, commit hash, branch information, and committer.
4. The AI-based intelligent code quality review and automated allocation system according to claim 3, characterized in that, The specific process of verifying GitLab's identity and parsing events to confirm the legitimacy of the request and extract key information is as follows: Obtain the HTTP request and verify the GitLab authentication information in the HTTP request to ensure that the request source is legitimate. By calling the API interface provided by GitLab, retrieve the key information of the latest code changes involved in this commit, including the specific file changes, commit logs, and number of lines changed.
5. The AI-based intelligent code quality review and automated allocation system according to claim 4, characterized in that, The process of parsing the modified and newly added files, as well as the specific lines of code for each change, as the core source code, is as follows: The system obtains key information and actively calls GitLab's API to retrieve and parse the difference data between this commit and the latest version in the previous code repository. This allows it to identify the list of modified files, the list of newly added files, and the specific lines of code for each change in each file, including line numbers and code snippets before and after the change. This forms the core source code data, which is then sent to the AI analysis and decision-making unit.
6. The AI-based intelligent code quality review and automated allocation system according to claim 5, characterized in that, The specific process for setting the scoring dimensions, weightings, and detailed standards for code review is as follows: The rules management module provides a configuration interface, allowing users to preset review rules based on project needs and code quality standards, customize scoring dimensions, the weight of each dimension, and detailed scoring criteria, and set different code quality tags based on the scores, as follows: : block; :serious; :main; :secondary; :hint; in, For fractions, , , , , All are preset label thresholds.
7. The AI-based intelligent code quality review and automated allocation system according to claim 6, characterized in that, The specific process of converting raw data into instructions and combining code differences and review rules into prompt words is as follows: The system acquires core source code data and preset review rules. Based on preset prompt word templates, it dynamically assembles file change information, code line content, and scoring dimensions, weights, and detailed scoring criteria from the core source code data into structured prompt words. The prompt words are set in two different types, including system prompts and user prompts. The system prompts define roles, contexts, and review criteria for the large language model; The user prompt will present the specific code change information obtained in a structured manner to the large language model.
8. The AI-based intelligent code quality review and automated allocation system according to claim 7, characterized in that, The specific process for generating the corresponding review report is as follows: The prompt words are obtained and sent to the selected large language model API, which is a pre-integrated large language model server. Based on the instructions in the prompt words, the submitted code is subjected to in-depth static analysis through the large language model API to identify potential logical errors, security vulnerabilities, coding style violations, and design defects. Based on the API analysis results of the large language model, a corresponding review report is generated and sent to the feedback and closed-loop unit. The review report includes potential problems, suspicious code, improvement suggestions and corresponding code quality scores. The structured review results are returned in JSON format, which includes the issues found, their location, severity level, suggested modifications, and a comprehensive code quality score calculated based on the number and severity of the issues.
9. The AI-based intelligent code quality review and automated allocation system according to claim 8, characterized in that, Based on the matching results, an issue is automatically created and assigned to the code submitter, and a tag is added to provide feedback to the developer. The specific process for fixing the code is as follows: The overall code quality score is compared with a preset quality threshold. If the score is lower than the threshold, the code review is deemed unsuccessful. When a review fails, a new Issue is automatically created in the GitLab project. The specific issues found during the scan and suggested fixes are filled in, and the issue is assigned to the corresponding code committer. The code is then modified according to the description in the Issue. Once the fix is completed, the Issue is closed on GitLab to form a traceable code review loop.
10. An AI-based intelligent code quality review and automated allocation method, applied to the AI-based intelligent code quality review and automated allocation system described in any one of claims 1-9, characterized in that, Includes the following steps: Step 1: Listen for code push events when developers complete feature development locally and commit the code to the remote GitLab repository through the GitLab platform, and generate an HTTP request. Step 2: Obtain the HTTP request, verify GitLab's identity and parse the event to confirm the request's legitimacy and extract key information; Step 3: Obtain key information and actively call GitLab's API to obtain the differences between this commit and previous code, parse out the modified and added files, and the specific lines of code for each change, as the core source code; Step 4: Set the scoring dimensions, weightings, and detailed standards for code review; Step 5: Convert the raw data into instructions, combining code differences and review rules into prompt words; Step 6: Obtain the combined prompt words and send them to the selected large language model API to conduct in-depth analysis of the code changes and generate a corresponding review report. The review report includes potential problems, suspicious code, improvement suggestions, and corresponding code quality scores. Step 7: Obtain the review report. Match the code quality score returned by the large model with the pre-set rules. Based on the matching results, automatically create an issue and assign it to the code submitter, and tag it to provide feedback to the developer for code fixes.