Code error repair method and system based on large model

Through the automated code error repair system that collaborates with multiple large models, the problem of unstable repair accuracy of a single large model is solved, efficient and reliable code error repair is achieved, maintenance costs and manual intervention are reduced, and a self-optimizing closed-loop system is formed.

CN120492319BActive Publication Date: 2025-09-30YIBIN KOALA YOURAN TECHNOLOGY CO LTD +1

Patent Information

Application Number
CN202510994144.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-09-30
Estimated Expiration
2045-07-18

AI Technical Summary

Technical Problem

In the existing technology, code error repair methods based on a single large model have problems such as unstable repair accuracy, lack of automated verification mechanism, insufficient model capability assessment, and lack of closed-loop feedback in the repair process, resulting in low repair efficiency and high cost.

Method used

An automated code error repair system that collaborates with multiple large models forms a closed-loop optimization mechanism by continuously monitoring error logs, dynamically selecting the highest-scoring large model for repair, and verifying the repair effect in a test environment to ensure repair quality and efficiency.

Benefits of technology

It improves the automation level and success rate of code error repair, reduces the need for manual intervention, significantly reduces the error impact time, improves system availability and repair quality, and forms a self-optimizing closed-loop system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120492319B_ABST
    Figure CN120492319B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of large model application technology, and discloses a code error repair method and system based on a large model. The method includes: deploying several large models dedicated to coding and initializing model scoring; continuously monitoring the error log of the target program, obtaining the current error information, and pulling the error code file corresponding to the current error information in the code repository; constructing a code repair prompt word, sending it to the large model with the highest model score, and guiding it to repair the error code; deploying the updated code file in a test environment, and using a request matching the error information to request replay of the updated code to verify whether the error is successfully repaired; if so, updating the target program according to the updated code file, and positively adjusting the model score of the currently used large model; if not, excluding the large model that failed to be repaired. The present invention realizes the automation of the entire process from error monitoring, code acquisition, error repair to deployment verification, reducing manual intervention.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of large model application technology, and in particular to a code error repair method and system based on a large model. Background Art

[0002] As software systems continue to grow in size and complexity, identifying and fixing code errors has become a major challenge in software development and maintenance. Currently, fixing code errors in software systems mainly relies on the following methods:

[0003] Traditional code error repair relies primarily on developers locating errors through log analysis, breakpoint debugging, and other methods, and then fixing them based on their personal experience and expertise. This approach relies heavily on the developer's technical proficiency and accumulated experience, resulting in high labor costs, low repair efficiency, and long response times. Especially in large-scale distributed systems or microservice architectures, the complexity of error locating and repairing increases exponentially, leading to high system maintenance costs.

[0004] In recent years, with the development of automated program repair (APR) technology, a number of template-based, search-based, and learning-based automatic repair methods have emerged. Template-based methods such as GenProg and RSRepair modify code using predefined repair patterns, but these methods have poor adaptability to new or atypical errors. Search-based methods such as SemFix and PAR search the space of possible patches to find repair solutions, but the search space is huge in large code bases and inefficient. Learning-based methods such as DeepFix and SequenceR use machine learning models to learn error patterns and repair strategies, but early models have limited generalization and ability to understand complex code contexts.

[0005] Recently, with breakthroughs in Large Language Models (LLMs) technology, large models such as Claude and the GPT series have demonstrated powerful code understanding and generation capabilities, and are being explored for use in code error repair. Studies have shown that large models can understand code semantics and generate reasonable repair suggestions. However, current code repair methods based on single large models still face the following challenges: unstable repair accuracy, with a single model's ability to handle different types of errors varying widely; a lack of automated repair verification mechanisms to ensure that the generated repair code will not introduce new issues; a lack of a model capability assessment system to select the most appropriate model based on historical performance; and a lack of closed-loop feedback during the repair process to prevent continuous learning and optimization from repair experience. Summary of the Invention

[0006] In order to address the deficiencies in the above-mentioned prior art, the present invention proposes an automated code error repair system and method based on the collaboration of multiple large models, aiming to improve the degree of automation, success rate and efficiency of code error repair.

[0007] In order to achieve the above-mentioned object of the invention, the technical solution provided by the present invention includes:

[0008] The code error repair method based on the large model includes the following steps:

[0009] S1. Deploy several large encoding models and initialize the model scores of each model;

[0010] S2. Continuously monitor the error log of the target program. When an ERROR-level error message is captured, obtain the current error message and pull the error code file corresponding to the current error message in the Git code repository;

[0011] S3. Construct a code repair prompt including the current error information and the error code file, and send it to the large model with the highest model score to guide it to repair the error code and obtain an updated code file;

[0012] S4. Deploy the updated code file in the test environment, and replay the updated code using a request that matches the error information to verify whether the error is successfully repaired. If so, update the target program according to the updated code file, and positively adjust the model score of the currently used large model, and return to step S2. If not, exclude the large model that failed to be repaired, and return to step S3.

[0013] Preferably, the method further includes the step: S5. If the repair of all large models fails, an error is reported.

[0014] Preferably, the error reporting includes: reporting the current error information, the error code file and the updated code files outputted by all large models respectively.

[0015] Preferably, the method for verifying whether the error is successfully repaired in step S4 includes:

[0016] Use the request that matches the error message to request replay of the updated code, and listen to whether an error message of the same ERROR level as the current error occurs. If so, exclude the large model that failed to be repaired and return to step S3; if not, listen to whether other error messages of the ERROR level occur. If not, the repair is successful; if so, the repair fails, exclude the large model that failed to be repaired, and return to step S3.

[0017] Preferably, the method further includes the following steps: S6. Requesting replay of the updated target program according to the error information, monitoring whether an error message of the ERROR level occurs, and if so, negatively adjusting the model score of the currently used large model, and returning to step S3; if not, recording the success information.

[0018] The present invention also provides a code error repair system based on a large model, comprising:

[0019] The error monitoring module is used to continuously monitor the error log of the target program. When an error message of the ERROR level is captured, the module obtains the current error message and pulls the error code file corresponding to the current error message from the Git code repository.

[0020] The model management module is used to deploy several large coding models and maintain the model scores of each model;

[0021] A code repair module is used to construct a code repair prompt word including the current error information and the error code file, and send it to the large model with the highest model score to guide it to repair the error code and obtain an updated code file;

[0022] A verification deployment module is used to deploy the updated code file in a test environment, request replay of the updated code using a request that matches the error information, and verify whether the error is successfully repaired; if so, update the target program according to the updated code file, and instruct the model management module to positively adjust the model score of the currently used large model; if not, instruct the model management module to exclude the large model that failed to be repaired, and trigger the code repair module to use other large models for repair.

[0023] Preferably, it also includes:

[0024] The error reporting module is used to report an error when all large models fail to be repaired. The reported error includes the current error information, the error code file and the updated code files output by all large models respectively.

[0025] Preferably, the verification deployment module includes:

[0026] A test environment deployment unit, configured to deploy the updated code file in an isolated test environment;

[0027] a request replay unit, configured to request replay the updated code using a request matching the error information;

[0028] The error detection unit is used to monitor whether the same error level as the current error occurs during the request replay, and whether other error levels occur;

[0029] The result determination unit is used to determine whether the error is repaired successfully according to the monitoring result of the error detection unit.

[0030] Preferably, the method for verifying whether the error is repaired successfully includes:

[0031] Use a request that matches the error message to request replay of the updated code, and monitor whether an error message of the same ERROR level as the current error occurs. If so, instruct the model management module to exclude the large model that failed to be repaired, and trigger the code repair module to use other large models for repair; if not, instruct the error monitoring module to monitor whether other ERROR-level error messages occur. If not, determine that the repair is successful; if so, instruct the model management module to exclude the large model that failed to be repaired, and trigger the code repair module to use other large models for repair.

[0032] Preferably, it also includes:

[0033] The production environment monitoring module is used to request replay of the updated target program based on the error information and monitor whether an ERROR-level error message occurs; if so, it instructs the model management module to negatively adjust the model score of the currently used large model and triggers the code repair module to re-repair; if not, it records the success information.

[0034] Beneficial effects

[0035] 1. Improved automation of error repair: This invention automates the entire process, from error monitoring, code acquisition, error repair, to deployment verification, reducing manual intervention and significantly reducing the workload for developers to handle code errors. In particular, the system can respond to sudden errors in production environments in real time and automatically repair them, significantly reducing the impact of errors and improving system availability.

[0036] 2. Improved repair success rate: By deploying multiple large, dedicated coding models and establishing a dynamic selection mechanism, this invention overcomes the limitations of a single model's inability to handle specific error types. The system prioritizes the large model with the best historical performance for repair. If a repair fails, it automatically switches to another model, forming a collaborative repair mechanism that complements multiple models and significantly improves the overall repair success rate.

[0037] 3. Ensure Repair Quality: This invention fully verifies repair results in a test environment through a request replay mechanism. This not only checks whether the original error has been resolved, but also monitors whether new errors have been introduced, ensuring repair quality. This verification-first strategy avoids the risk of error repairs introducing new issues and improves repair reliability.

[0038] 4. Forming a self-optimizing closed-loop system: Through a model scoring mechanism, the system dynamically adjusts the scores of various models based on their repair performance, giving models with strong repair capabilities more opportunities to be selected. This dynamic evaluation mechanism based on historical performance forms a self-optimizing closed-loop system, ensuring that overall repair effectiveness continues to improve with increasing usage.

[0039] 5. Provides rich error handling data: When all models fail to successfully fix an error, the system automatically reports detailed error information and the results of each model's repair attempts, providing developers with rich error analysis data to facilitate further manual intervention and system optimization. This accumulated data can also be used for subsequent model training and system improvements.

[0040] 6. Reduce maintenance costs: Through automated error repair processes, the present invention significantly reduces the maintenance costs of software systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 This is a flow chart of a code error repair method based on a large model provided in a preferred embodiment of the present invention;

[0042] Figure 2 This is a flow chart of a code error repair method based on a large model provided in another preferred embodiment of the present invention;

[0043] Figure 3 This is a schematic diagram of the structure of a code error repair system based on a large model provided in a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0044] Example 1

[0045] like Figure 1 As shown, the present invention discloses a code error repair method based on a large model, comprising the steps of:

[0046] S1. Deploy several large encoding models and initialize the model scores of each model.

[0047] A coding-specific large model refers to a large language model that is specially designed, trained, or fine-tuned for processing software code-related tasks. Common coding-specific large models in this field include, but are not limited to, OpenAI's Codex series of models, Meta's Code Llama model, and other models that are fine-tuned specifically for coding tasks based on general-purpose large models (such as GPT-4, Claude, and LLaMA). This invention does not impose any further restrictions on the choice of large model.

[0048] The model score is a key indicator for measuring the historical repair performance and reliability of each model, and will serve as the primary basis for the subsequent dynamic selection of the best model for error repair attempts. Specific initialization methods include: Equal initialization: setting the same initial score for all models (for example, 0 points), indicating that in the absence of historical performance data, all models have the same initial trust; Prior knowledge-based initialization: If the performance of certain models in specific benchmarks or historical applications is known, different initial scores can be set for them, giving priority to models with known good performance.

[0049] It should be understood that the present invention deploys multiple large coding-specific models in order to utilize their respective advantages in different types of codes or errors to improve the coverage and success rate of the overall repair.

[0050] S2. Continuously monitor the error log of the target program. When an ERROR-level error message is captured, obtain the current error message and pull the error code file corresponding to the current error message from the code repository.

[0051] The continuous monitoring may be implemented by any one of the common log monitoring methods such as log file monitoring, log stream processing, or deploying an agent program to capture and forward, and the present invention does not make any further limitation.

[0052] The ERROR-level error information refers to a log entry that indicates a serious problem that causes abnormal program interruption, function failure, or data corruption and requires immediate attention and processing. In actual applications, those skilled in the art may also configure other serious error levels, such as FATAL, CRITICAL, etc., according to actual needs.

[0053] The code repository refers to any commonly used, pre-configured code repository, such as Git, SVN, or Mercurial. Retrieving the error code file can be done by parsing the stack trace in the error message. This involves analyzing the stack trace to extract the file name, class name, and line number of the code that caused the error. Then, based on a specific code version, the repository's API or command-line tool can be used to accurately retrieve a copy of one or more source files containing the error code.

[0054] S3. Construct a code repair prompt word including the current error information and the error code file, and send it to the large model with the highest model score to guide it to repair the error code and obtain an updated code file.

[0055] The code repair prompts are used to effectively guide the large model to understand the problem and generate a repair solution, which includes but is not limited to the following:

[0056] 1. Clear repair instructions: Clearly tell the big model that its task is to fix a specific error in the code. For example, "Please fix the NullPointerException in the following Java code" or "Analyze the provided Python code and error stack trace, then output the corrected code file content."

[0057] 2. Complete error information: The current error information obtained in S2 (including error message, detailed stack trace, relevant context, etc.) is fully included in the prompt word. The stack trace is particularly important for the model to locate the exact location of the error in the code.

[0058] 3. Error Code File Content: Embed the entire or relevant portion of the error code file retrieved from S2 with a prompt. For large files, prioritize including the error point and surrounding code snippets (e.g., N lines above and below), while also providing the complete file structure or key definitions to ensure contextual integrity.

[0059] 4. Output format requirements: Specify the format you expect the large model to return. For example, you may want to return the complete repaired file content, only the modified code snippets (diff format), or a brief explanation of the repair logic.

[0060] Those skilled in the art can use a predefined template to fill the above information into a specified position to form a structured input. The specific construction method is not the focus of the present invention and will not be described in detail here.

[0061] The top-scoring model is one that has historically proven to be more reliable or successful for this type of task, aiming to improve the success rate and efficiency of first-time repair attempts. If this method is being run for the first time or if all models currently have the same score, all models can be considered the top-scoring model and then selected randomly or according to pre-set rules.

[0062] S4. Deploy the updated code file in a test environment, and replay the updated code using a request that matches the error information to verify whether the error has been successfully repaired. If so, update the target program according to the updated code file, and positively adjust the model score of the currently used large model (for example, add 1), and return to step S2. If not, exclude the large model that failed to be repaired, and return to step S3.

[0063] This step includes three parts: fix verification, deployment, and model scoring feedback. Fix verification involves performing automated deployment operations in a pre-configured test environment that is isolated from the target program (production environment). This test environment should simulate the configuration of the production environment as closely as possible, including dependent libraries, operating system, middleware versions, and necessary test data. The goal of deployment is to replace the corresponding old version files in the test environment with the updated code files obtained from S3, and rebuild or restart the relevant service / application instances to run the new code containing the potential fix. This isolated deployment ensures that the verification process does not affect the actual running business.

[0064] When replaying a request, you need to replicate or simulate the specific user action, API call, or system event that caused the original error. The request that matches the error information is used as the original request. If the request can be reproduced, you can use the request parameters, user ID, or other contextual information recorded in the error log to reconstruct and send the same request. If the request cannot be reproduced, you can construct a test request that triggers the same code path or error condition based on the error type and stack trace.

[0065] It should be noted that the verification logic for whether the error has been successfully repaired includes, on the one hand, confirming whether the original error has disappeared, and on the other hand, paying attention to whether other ERROR-level errors caused by the current repair action have appeared. Therefore, in some preferred embodiments, a specific method for verifying whether the error has been successfully repaired is provided, including:

[0066] Request replay of the updated code using a request matching the error message is performed to monitor whether an error message of the same ERROR level as the current error occurs. If so, it indicates that the updated code file generated by the large model fails to resolve the original issue. Therefore, the repair attempt is determined to have failed, and the large model that failed the repair is removed. The process returns to step S3 for a new round of repair.

[0067] If not, it preliminarily indicates that the original error has been fixed. At this time, you need to continue to monitor whether any other ERROR-level error messages different from the original error occur during the request replay. These new ERRORs may indicate that the fix has introduced side effects or new defects.

[0068] If not, it means the original error has been resolved without introducing new serious issues. Only then is the fix considered successful.

[0069] If yes, this indicates that while the original error has been resolved, the repair has introduced new issues. Therefore, from the perspective of system stability, this repair attempt is still considered a failure. At this point, it is necessary to exclude the large model that failed repair and return to step S3 for a new round of repair.

[0070] It should be understood that in step S4, for successful repairs, on the one hand, the actual target program is updated based on the updated code file that has passed verification, and on the other hand, it is necessary to record this successful repair and enhance the trust in the model. Finally, it is necessary to return to step S2 and continue to monitor new error logs that may appear in the target program. For failed repairs, on the one hand, since the repair solution provided by the current large model failed to solve the problem, the large model that performed the failed repair attempt needs to be temporarily excluded from subsequent repair attempts for the current specific error instance. This means that this model will not be selected to handle the same error in the next retry, avoiding invalid repetition. On the other hand, since the current highest-scoring model has been temporarily excluded, the system will select the next highest-scoring model that has not been excluded based on the updated list of available models and their scores, use the same original error message and code file, construct a new prompt word, and initiate a new round of repair attempts. This step establishes a closed-loop verification mechanism to ensure that only repairs that have been proven effective through testing are applied. At the same time, feedback from the repair results is used to dynamically adjust the priorities of different large models to optimize subsequent repair efficiency.

[0071] Consider the case where all deployed encoding-specific large models have been tried (for the current specific error instance) and have been excluded due to repair failure. In other words, there are no more available models that can be used for this repair task. Preferably, step S5 is executed: if all large models fail to repair, an error is reported. Specifically, the error reporting includes: reporting the current error information, the error code file, and the updated code files output by all large models. In this step, all key information related to the failed repair attempt is collected, packaged, and reported to a predetermined target location for manual diagnosis or manual repair by manual processors (such as developers or operation and maintenance experts), and provides historical data input for future improvements in large model training or optimization of repair strategies.

[0072] It should be noted that step S4 provides an immediate verification process, but since it is performed in an isolated test environment, it may not be able to fully simulate the complexity of the production environment (such as concurrent load, data diversity, interaction with other systems, and long-term operation, etc.). Therefore, in some preferred embodiments, it is considered to add a continuous monitoring and verification mechanism, the purpose of which is to evaluate the long-term effectiveness of the deployed fixes and capture potential regression issues or unresolved edge cases that may be introduced by the fixes. Figure 2 As shown, specifically including:

[0073] Step S6. Request to replay the updated target program according to the error information, and monitor whether an ERROR-level error message occurs. If so, negatively adjust the model score of the currently used large model and return to step S3; if not, record the success information.

[0074] At this point, the monitoring is focused on any ERROR-level error messages, not just the original specific error. If, during the monitoring period, request replay related to the original error results in any ERROR-level log messages (whether the original error reappears or a new error potentially introduced by the fix), this indicates a problem with the previously deployed fix (for example, it was incomplete, introduced side effects, or only worked under specific conditions). In this case, the model score of the currently used large model needs to be negatively adjusted (for example, by 1). This reflects that the model's fix, while passing initial testing, is unreliable in the long term. The newly captured ERROR message is then treated as a new instance of an error to be fixed, and the process returns to step S3. This step essentially adds a post-deployment feedback loop and quality assurance layer, enhancing self-optimization capabilities and the reliability of the final delivered code, making the entire repair process not just a one-time action but a process of continuous learning and adaptation.

[0075] Example 2

[0076] like Figure 3 As shown, the present invention also provides a code error repair system based on a large model, comprising:

[0077] The error monitoring module is used to continuously monitor the error log of the target program. When an error message of the ERROR level is captured, the module obtains the current error message and pulls the error code file corresponding to the current error message from the Git code repository.

[0078] The model management module is used to deploy several large coding models and maintain the model scores of each model;

[0079] A code repair module is used to construct a code repair prompt word including the current error information and the error code file, and send it to the large model with the highest model score to guide it to repair the error code and obtain an updated code file;

[0080] A verification deployment module is used to deploy the updated code file in a test environment, request replay of the updated code using a request that matches the error information, and verify whether the error is successfully repaired; if so, update the target program according to the updated code file, and instruct the model management module to positively adjust the model score of the currently used large model; if not, instruct the model management module to exclude the large model that failed to be repaired, and trigger the code repair module to use other large models for repair.

[0081] Preferably, it also includes:

[0082] The error reporting module is used to report an error when all large models fail to be repaired. The reported error includes the current error information, the error code file and the updated code files output by all large models respectively.

[0083] Preferably, the verification deployment module includes:

[0084] A test environment deployment unit, configured to deploy the updated code file in an isolated test environment;

[0085] a request replay unit, configured to request replay the updated code using a request matching the error information;

[0086] The error detection unit is used to monitor whether the same error level as the current error occurs during the request replay, and whether other error levels occur;

[0087] The result determination unit is used to determine whether the error is repaired successfully according to the monitoring result of the error detection unit.

[0088] Preferably, the method for verifying whether the error is repaired successfully includes:

[0089] Use a request that matches the error message to request replay of the updated code, and monitor whether an error message of the same ERROR level as the current error occurs. If so, instruct the model management module to exclude the large model that failed to be repaired, and trigger the code repair module to use other large models for repair; if not, instruct the error monitoring module to monitor whether other ERROR-level error messages occur. If not, determine that the repair is successful; if so, instruct the model management module to exclude the large model that failed to be repaired, and trigger the code repair module to use other large models for repair.

[0090] Preferably, it also includes:

[0091] The production environment monitoring module is used to request replay of the updated target program based on the error information and monitor whether an ERROR-level error message occurs; if so, it instructs the model management module to negatively adjust the model score of the currently used large model and triggers the code repair module to re-repair; if not, it records the success information.

[0092] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the foregoing embodiments. The foregoing embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.

Claims

1. A code error repair method based on a large model, characterized in that: Including steps: S1. Deploy several large encoding models and initialize the model scores of each model; S2. Continuously monitor the error log of the target program. When an ERROR-level error message is captured, obtain the current error message and pull the error code file corresponding to the current error message in the code repository; S3. Construct a code repair prompt including the current error information and the error code file, and send it to the large model with the highest model score to guide it to repair the error code and obtain an updated code file; S4. Deploy the updated code file in the test environment and replay the updated code using a request matching the error information to verify whether the error has been successfully fixed. If so, update the target program based on the updated code file and positively adjust the model score of the currently used large model, returning to step S2. If not, the large model that failed to be repaired is excluded and the process returns to step S3; The method for verifying whether the error is successfully repaired in step S4 includes: Use the request that matches the error message to request replay of the updated code, and monitor whether an error message of the same ERROR level as the current error occurs. If so, exclude the large model that failed to be repaired and return to step S3; If not, monitor whether other ERROR-level error messages occur. If not, the repair is successful; if so, the repair fails, exclude the large model that failed to be repaired, and return to step S3.

2. The code error repair method based on a large model according to claim 1, characterized in that: The method further includes the step: S5. If the repair of all large models fails, an error is reported.

3. The code error repair method based on a large model according to claim 2, characterized in that: The error reporting includes: reporting the current error information, the error code file and the updated code files output by all large models respectively.

4. The method for repairing code errors based on a large model according to claim 1 or 2, characterized in that: It also includes the steps: S6. Requesting to replay the updated target program according to the error information, monitoring whether an ERROR-level error message occurs, if so, negatively adjusting the model score of the currently used large model, and returning to step S3; if not, recording the success information.

5. A code error repair system based on a large model, characterized by: include: The error monitoring module is used to continuously monitor the error log of the target program. When an error message of the ERROR level is captured, the module obtains the current error message and pulls the error code file corresponding to the current error message from the code repository. The model management module is used to deploy several large coding models and maintain the model scores of each model; A code repair module is used to construct a code repair prompt word including the current error information and the error code file, and send it to the large model with the highest model score to guide it to repair the error code and obtain an updated code file; A verification deployment module is used to deploy the updated code file in a test environment, request replay of the updated code using a request that matches the error information, and verify whether the error is successfully repaired; if so, update the target program according to the updated code file, and instruct the model management module to positively adjust the model score of the currently used large model; if not, instruct the model management module to exclude the large model that failed to be repaired, and trigger the code repair module to use other large models for repair.

6. The code error repair system based on a large model according to claim 5, characterized in that: Also includes: The error reporting module is used to report an error when all large models fail to be repaired. The reported error includes the current error information, the error code file and the updated code files output by all large models respectively.

7. The code error repair system based on a large model according to claim 5, characterized in that: The verification deployment module includes: A test environment deployment unit, configured to deploy the updated code file in an isolated test environment; a request replay unit, configured to request replay the updated code using a request matching the error information; The error detection unit is used to monitor whether the same error level as the current error occurs during the request replay process, as well as whether other error levels occur, and determine whether the error is successfully repaired based on the monitoring results; Methods for verifying whether the error has been fixed successfully include: Use a request that matches the error message to request replay of the updated code, and monitor whether an error message of the same ERROR level as the current error occurs. If so, instruct the model management module to exclude the large model that failed to be repaired, and trigger the code repair module to use other large models for repair; if not, instruct the error monitoring module to monitor whether other ERROR-level error messages occur. If not, determine that the repair is successful; if so, instruct the model management module to exclude the large model that failed to be repaired, and trigger the code repair module to use other large models for repair.

8. The large model-based code error repair system according to claim 5, characterized in that: Also includes: The production environment monitoring module is used to request replay of the updated target program according to the error information and monitor whether an error message of the ERROR level occurs; If so, the model management module is instructed to negatively adjust the model score of the currently used large model and trigger the code repair module to repair it again; if not, the success information is recorded.

Citation Information

Patent Citations

  • Multi-round reasoning and feedback optimization method and system for industrial software codes

    CN119440539A

  • White box unit test generation method and device based on code large model Agent

    CN119883868A

Cited By

  • Version control knowledge base-based internal and external network isolation large model collaborative operation system and method

    CN122640257A