Code problem processing method and device

By modeling the code repository as a multi-agent network and optimizing it using convolutional editing operations and user feedback, the problem of handling cross-file code issues in complex code repositories is solved, improving the efficiency of code problem solving and the work efficiency of engineers.

WO2026091517A1PCT designated stage Publication Date: 2026-05-07HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
Filing Date
2025-06-04
Publication Date
2026-05-07

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently handle cross-file code issues in complex code repositories, resulting in a heavy workload for engineers and slow iteration speeds.

Method used

The code problems in the code repository are modeled as a multi-agent network. Through the collaborative processing of multiple agents, cross-file editing is achieved, and the code repository is optimized by using convolutional editing operations and user feedback.

Benefits of technology

It improves the ability to handle complex code problems, reduces the observation space and noise of intelligent agents, and improves the efficiency of solving code problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025098934_07052026_PF_FP_ABST
    Figure CN2025098934_07052026_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a code problem processing method and device. The method comprises: acquiring a code problem and a code repository, wherein the code problem indicates a code problem existing in the code repository, and the code repository comprises N code files; on the basis of the code problem and the code repository, determining a target intelligent agent network, wherein the target intelligent agent network comprises M intelligent agents and connection edges, the M intelligent agents correspond to P code files and are used for processing the P code files, the connection edges are used for connecting intelligent agents having an association relationship among the M agents, the P code files are code files among the N code files, and P is a positive integer less than or equal to N and greater than or equal to M; updating the code repository on the basis of a result obtained by the M intelligent agents collaboratively processing the P code files, so as to obtain a target code repository. In the present application, M intelligent agents collaboratively process P code files; thus, cross-file editing is achieved, and the processing capability for complex code problems can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

A method and apparatus for handling code problems

[0001] This application claims priority to Chinese patent application No. 202411526429.4, filed on October 29, 2024, entitled "A Method and Apparatus for Handling Code Problems", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of artificial intelligence (AI) technology, and in particular to a method and apparatus for processing code problems. Background Technology

[0003] Code problem solving has high commercial value. Currently, code problem solving mainly relies on engineers dedicating significant time to resolving each code issue individually. However, as engineering projects become increasingly complex, the volume and structure of code increase, and code problems involve more code files, requiring cross-file code modifications during problem-solving. Furthermore, engineering projects iterate at increasingly rapid paces, and many problems cannot be resolved during iterations due to engineers' time constraints. Summary of the Invention

[0004] The embodiments of this application provide a method and apparatus for handling code problems. By using multi-agent collaboration to modify code files in a code repository, cross-file editing can be achieved, thereby improving the ability to handle complex code problems.

[0005] Firstly, this application provides a method for processing code problems, including obtaining code problems and a code repository. The code problem indicates a code problem existing in the code repository, and the code repository includes N code files, where N is a positive integer greater than 1. Based on the code problem and the code repository, a target agent network is determined. The target agent network includes M agents and at least one connection edge between the M agents. The M agents correspond to P code files and are used to process the P code files. The at least one connection edge between the M agents is used to connect agents with related relationships among the M agents. The P code files are code files within the N code files, where M is a positive integer less than or equal to N, and P is a positive integer less than or equal to N and greater than or equal to M. The code repository is updated based on the result of the M agents collaboratively processing the P code files to obtain the target code repository.

[0006] This application models code problems in a code repository as a target agent network composed of multiple agents. These agents collaborate to process code problems, enabling cross-file editing and improving the ability to handle code problems in code repositories with a large number of code files.

[0007] In one possible implementation, each agent in the target agent network includes file content, code problem, and first problem analysis. The file content indicates the code content of the code file corresponding to each agent, and the first problem analysis indicates the relevance of the code file corresponding to each agent to the code problem. The connecting edges are directed edges, and the connecting edges have second problem analyses. The second problem analysis on the outgoing edges of each agent is determined based on the first problem analysis of each agent.

[0008] In this way, by connecting edges, the problem analysis of each agent can be passed to the agents with which it has a relationship, so that each agent can take into account the problem analysis results of the agents with which it has a relationship when processing code files, and achieve collaborative processing of multiple code files in the code repository.

[0009] In another possible implementation, the result of M agents collaboratively processing P code files is determined based on the following steps: the M agents perform at least one round of convolutional editing operations on the target agent network until the first problem analysis of all agents in the target agent network indicates that it is irrelevant to the code problem, thus obtaining the result of processing the P code files.

[0010] M intelligent agents autonomously complete collaborative editing tasks on P code files through at least one round of convolutional editing operations, achieving efficient cross-file editing and improving the ability to solve complex code problems.

[0011] In another possible implementation, each round of convolutional editing operations includes: each agent editing the code in its corresponding code file based on its code problem, file content, and second problem analysis on each agent's incoming edges; and each agent updating the second problem analysis on each agent's outgoing edges based on its own edited file content and the edited file content of its neighboring agents.

[0012] Each agent performs a round of convolutional editing operations. When editing the code in its own code file, it considers the problem analysis of its neighboring agents. After editing the code in its own code file, it updates the problem analysis on its outgoing edges to facilitate the effective transmission of problem analysis. This enables multiple agents to accurately collaborate on editing multiple related code files, thereby achieving cross-file editing of multiple code files.

[0013] In another possible implementation, each agent in the target agent network also includes an editing model, which performs convolutional editing operations.

[0014] In another possible implementation, the code problem handling method provided in this application further includes: receiving first user feedback information, which indicates the user's feedback on the target code repository; and based on the first user feedback information, continuing to perform convolutional editing operations on the target agent network. This allows the user to provide feedback on the edited code repository, and then adjusts the target code repository according to the feedback, ensuring the correctness of the final target code repository.

[0015] In another possible implementation, a specific approach to determining the target agent network based on the code problem and the code repository is as follows: An agent is generated for each code file in the code repository, resulting in N agents; an initial agent network is generated based on the relationships between the N code files, the initial agent network including the N agents and at least one connection edge between them, whereby the at least one connection edge connects the agents corresponding to the code files with relationships; agents in the initial agent network that are irrelevant to the code problem are filtered out to obtain the target agent network.

[0016] By generating an agent for each code file, each agent only needs to process one code file, which greatly reduces the agent's observation space and improves the agent's ability to solve complex code problems. At the same time, agents that are irrelevant to the code problem are filtered out, reducing the noise and cost brought by irrelevant agents.

[0017] In another possible implementation, filtering agents in the initial agent network that are irrelevant to the code problem to obtain the target agent network involves: N agents in the initial agent network perform collaborative analysis to identify agents irrelevant to the code problem; these irrelevant agents are then filtered to obtain the target agent network. This collaborative analysis of N agents increases the accuracy and efficiency of identifying irrelevant agents.

[0018] In another possible implementation, the N agents in the initial agent network perform collaborative analysis to identify agents among the N agents that are irrelevant to the code problem. A specific implementation of this is as follows: perform at least one round of convolutional analysis on the initial agent network until the first problem analysis of each agent in the initial agent network is no longer updated; based on the first problem analysis of each agent in the initial agent network after at least one round of convolutional analysis, identify agents among the N agents that are irrelevant to the code problem.

[0019] In another possible implementation, each round of convolutional analysis in the multi-round convolutional analysis operation includes: each agent in the initial agent network updates its first problem analysis based on the file content, code problem, and second problem analysis on each agent's incoming edges; each agent updates its second analysis result on its outgoing edges based on its own updated first problem analysis and the updated first problem analysis of its neighboring agents.

[0020] Each agent considers the relationships between a large number of code files through convolutional analysis operations, accurately identifies its own relevance to the code problem, and facilitates the subsequent filtering out of irrelevant agents to accurately construct the target agent network.

[0021] In another possible implementation, each agent in the initial agent network also includes an analysis model, which performs convolutional analysis operations.

[0022] In another possible implementation, the code problem handling method provided in this application further includes: receiving second user feedback information, the second user feedback information indicating the user's feedback on the target intelligent agent network; and adjusting the target intelligent agent network based on the second user feedback information.

[0023] Users are allowed to provide feedback on the target agent network, and the network is then adjusted based on this feedback to ensure the correctness of the final target agent network.

[0024] Secondly, this application also provides a code problem processing apparatus, which includes an acquisition module, a determination module, and an update module. The acquisition module acquires code problems and a code repository. The code problem indicates a code problem existing in the code repository, which includes N code files, where N is a positive integer greater than 1. The determination module determines a target agent network based on the code problem and the code repository. The target agent network includes M agents and at least one connection edge between the M agents. The M agents correspond to P code files and are used to process the P code files. The at least one connection edge between the M agents connects agents with related relationships among the M agents. The P code files are code files within the N code files, where M is a positive integer less than or equal to N, and P is a positive integer less than or equal to N and greater than or equal to M. The update module updates the code repository based on the result of the collaborative processing of the P code files by the M agents, thus obtaining the target code repository.

[0025] In one possible implementation, each agent in the target agent network includes file content, code problem, and first problem analysis. The file content indicates the code content of the code file corresponding to each agent, and the first problem analysis indicates the relevance of the code file corresponding to each agent to the code problem. The connecting edges are directed edges, and the connecting edges have second problem analyses. The second problem analysis on the outgoing edges of each agent is determined based on the first problem analysis of each agent.

[0026] In another possible implementation, the result of M agents collaboratively processing P code files is determined based on the following steps: the M agents perform at least one round of convolutional editing operations on the target agent network until the first problem analysis of all agents in the target agent network indicates that it is irrelevant to the code problem, thus obtaining the result of processing the P code files.

[0027] In another possible implementation, each round of convolutional editing operations includes: each agent editing the code in its corresponding code file based on its code problem, file content, and second problem analysis on each agent's incoming edges; and each agent updating the second problem analysis on each agent's outgoing edges based on its own edited file content and the edited file content of its neighboring agents.

[0028] In another possible implementation, each agent in the target agent network also includes an editing model, which performs convolutional editing operations.

[0029] In another possible implementation, the code problem processing apparatus provided in this application further includes a feedback module for receiving first user feedback information, which indicates the user's feedback on the target code repository; based on the first user feedback information, convolutional editing operations are continued on the target agent network. This allows the user to provide feedback on the edited code repository, and then adjusts the target code repository according to the feedback, ensuring the correctness of the final target code repository.

[0030] In another possible implementation, the determining module is specifically used to: generate an agent for each code file in the code repository, resulting in N agents; generate an initial agent network based on the relationships between the N code files, the initial agent network including the N agents and at least one connection edge between the N agents, the at least one connection edge between the N agents being used to connect the agents corresponding to the code files with relationships; filter out agents in the initial agent network that are irrelevant to the code problem, to obtain the target agent network.

[0031] In another possible implementation, filtering agents in the initial agent network that are irrelevant to the code problem to obtain the target agent network involves: N agents in the initial agent network perform collaborative analysis to identify agents irrelevant to the code problem; these irrelevant agents are then filtered to obtain the target agent network. This collaborative analysis of N agents increases the accuracy and efficiency of identifying irrelevant agents.

[0032] In another possible implementation, the N agents in the initial agent network perform collaborative analysis to identify agents among the N agents that are irrelevant to the code problem. A specific implementation of this is as follows: perform at least one round of convolutional analysis on the initial agent network until the first problem analysis of each agent in the initial agent network is no longer updated; based on the first problem analysis of each agent in the initial agent network after at least one round of convolutional analysis, identify agents among the N agents that are irrelevant to the code problem.

[0033] In another possible implementation, each round of convolutional analysis in the multi-round convolutional analysis operation includes: each agent in the initial agent network updates its first problem analysis based on the file content, code problem, and second problem analysis on each agent's incoming edges; each agent updates its second analysis result on its outgoing edges based on its own updated first problem analysis and the updated first problem analysis of its neighboring agents.

[0034] In another possible implementation, each agent in the initial agent network also includes an analysis model, which performs convolutional analysis operations.

[0035] In another possible implementation, the feedback module is also used to: receive second user feedback information, which indicates the user's feedback on the target agent network; and adjust the target agent network based on the second user feedback information.

[0036] Thirdly, embodiments of this application provide a computing device, including a memory and a processor, wherein the memory stores instructions that, when executed by the processor, cause the method described in the first aspect or any possible implementation of the first aspect to be implemented.

[0037] Fourthly, this application provides a computing device cluster, including at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the method described in the first aspect or any possible implementation of the first aspect.

[0038] Fifthly, this application provides a computer-readable storage medium including computer program instructions that, when executed by a cluster of computing devices, perform the method described in the first aspect or any possible implementation thereof. Exemplarily, the computing device cluster may include one or more computing devices.

[0039] Sixthly, this application provides a computer program product containing instructions that, when executed by a cluster of computing devices, cause the cluster of computing devices to perform the method described in the first aspect or any possible implementation thereof. Exemplarily, the cluster of computing devices may include one or more computing devices.

[0040] In a seventh aspect, embodiments of this application also provide a chip including at least one processor and a communication interface, the processor being configured to perform the method described in the first aspect or any possible implementation thereof.

[0041] It is understood that the beneficial effects of the second to seventh aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0042] Figure 1 shows a schematic diagram of the implementation architecture of the single large language model intelligent agent scheme;

[0043] Figure 2 shows a schematic diagram of the implementation architecture of a multi-language model intelligent agent scheme based on standard workflow;

[0044] Figure 3 shows a schematic diagram of a system architecture;

[0045] Figure 4 shows a schematic diagram of the implementation flow of a code problem handling method provided in an embodiment of this application;

[0046] Figure 5 illustrates a schematic diagram of the initialization process of a file-based intelligent agent network.

[0047] Figure 6 shows a schematic diagram of convolutional analysis filtering of a document intelligent agent network according to an embodiment of this application;

[0048] Figure 7 shows a schematic diagram of convolutional editing of a problem-solving agent network according to an embodiment of this application;

[0049] Figure 8 is a signaling interaction diagram of a code problem handling method provided in an embodiment of this application;

[0050] Figure 9 is a schematic diagram of another signaling interaction of the code problem handling method provided in the embodiments of this application;

[0051] Figure 10 is a flowchart illustrating a method for handling code problems provided in an embodiment of this application;

[0052] Figure 11 is a schematic diagram of a code problem processing device provided in an embodiment of this application;

[0053] Figure 12 is a schematic diagram of the structure of a computing device provided in an embodiment of this application;

[0054] Figure 13 is a schematic diagram of a computing device cluster provided in an embodiment of this application;

[0055] Figure 14 is a schematic diagram of an application scenario of a computing device cluster provided in Figure 13. Detailed Implementation

[0056] The term "and / or" used in this article describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. The symbol " / " in this article indicates that the related objects are in an "or" relationship; for example, A / B means A or B.

[0057] The terms "first" and "second," etc., used in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same properties in the description of embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a list of elements is not necessarily limited to those elements, but may include other elements not expressly listed or inherent to such processes, methods, systems, products, or apparatus.

[0058] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0059] In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, for example, multiple processing units means two or more processing units, multiple elements means two or more elements, etc.

[0060] To accelerate code problem-solving and reduce engineers' workload, some technical solutions use large language models (LLMs) to simulate engineers in software engineering companies, demonstrating initial performance on simple code problems. However, in reality, code repositories may contain a large number of code files, and modifications to a single code file may span multiple files, posing significant challenges to these solutions.

[0061] For example, there are two main technical solutions for automatically solving code problems: one is a single large language model agent solution, and the other is a multi-large language model agent solution based on standard workflows.

[0062] Figure 1 shows a schematic diagram of the implementation architecture of the single large language model intelligent agent scheme. As shown in Figure 1, in the single large language model intelligent agent scheme, the single large language model intelligent agent directly uses the large language model based on the code repository and code problem, and directly outputs the updated code repository. It is basically unable to output a valid answer.

[0063] Figure 2 shows a schematic diagram of the implementation architecture of the multi-language model intelligent agent scheme based on standard workflow. As shown in Figure 2, in the multi-language model intelligent agent scheme based on standard workflow, the multi-language model intelligent agent based on standard workflow designs a corresponding large language model intelligent agent for each role in the process according to the standard workflow. It can solve some simple code problems, but its effectiveness is very low for complex code problems.

[0064] When a code repository contains dozens or even hundreds of files, large language model agents struggle to handle its complex relational structures and effectively understand extremely long contexts. This increases the agent's observation space, making it difficult for related technical solutions to handle effectively. When solving a problem requires navigating across multiple code files, changes to the content of one file often necessitate updates to other files, requiring coordination to solve a complex coding problem. This increases the decision space, making it difficult for related technical solutions to perform effective code editing.

[0065] In summary, the relevant technical solutions have the following problems: they are difficult to handle code problems in code repositories consisting of a large number of code files, and they are difficult to handle tasks that require solving code problems across files.

[0066] In view of this, embodiments of this application propose a method and apparatus for handling code problems. By modeling code problems in a code repository as an agent network composed of multiple agents, the multiple agents collaboratively handle code problems, enabling cross-file editing and improving the ability to handle code problems in code repositories with a large number of code files.

[0067] The following describes in detail, with reference to the accompanying drawings, the specific implementation of the code problem handling method and apparatus provided in the embodiments of this application.

[0068] Figure 3 illustrates a system architecture diagram. The system includes a terminal 310, a server 330, and a network 320 that connects the terminal 310 and the server 330. The server 330 may include one or more servers (Figure 3 illustrates only one server as an example), and the server 330 can provide code problem handling services for one or more terminals 310 to resolve code problems existing in the code repository.

[0069] In some embodiments, server 330 may also provide other services or software applications, including both non-virtual and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, such as to end users under a Software as a Service (SaaS) model.

[0070] In the system shown in Figure 3, server 330 may include one or more components that implement the functions performed by server 330. These components may include software components, hardware components, or combinations thereof that can be executed by one or more processors. A user of operating terminal 310 may sequentially use one or more client applications to interact with server 330 and utilize the services provided by these components. It should be understood that Figure 3 is merely an example of a system for implementing the various methods described in the embodiments of this application, and other different configurations are possible, which are not limited in this application.

[0071] The terminal 310 may have an application related to handling code problems installed, or a webpage related to handling code problems opened. The application and webpage can provide a code problem handling interface. The terminal 310 can receive the code repository that needs to be resolved and the code problem existing in the code repository from the user on the code problem handling interface, and send the above information to the service 330. The server 330 can edit and modify the code files in the code repository based on the received code repository and code problem, using the code problem handling method provided in this application embodiment, to resolve the code problem existing in the code repository, and return the processing result (i.e., the re-edited code repository) to the terminal 310 to be displayed to the user.

[0072] Terminal 310 may include various types of computer devices, such as portable handheld devices, general-purpose computers (e.g., personal computers or laptop computers), workstation computers, wearable devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as Microsoft Windows, Apple iOS, UNIX-like operating systems, Linux or Linux-like operating systems (e.g., Google Chrome OS); or various mobile operating systems, such as Microsoft Windows Mobile OS, Windows Phone, Android, iPhone OS, etc. Portable handheld devices may include cellular phones, smartphones, tablets, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays and smartwatches, etc.

[0073] Network 320 can be any type of network well known to those skilled in the art, and can use any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, 3G, 4G, 5G, etc., to support data communication. For example, one or more networks 320 can be a local area network (LAN), an Ethernet-based network, a token ring network, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, the public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, Wi-Fi), and / or any combination of these and / or other networks.

[0074] Server 330 may include one or more general-purpose computers, special-purpose server computers (e.g., personal computer servers, UNIX servers, terminal servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement or combination. Server 330 may include one or more virtual machines running a virtual operating system, or other computing architectures involving virtualization, such as one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices for the server. In various embodiments, server 330 may run one or more services or software applications that provide the functionality described below.

[0075] In some implementations, server 330 can be a server for a distributed system or a server integrated with blockchain. Server 330 can also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in the cloud computing service system, designed to address the shortcomings of traditional physical hosts and virtual private servers (VPS) services, such as high management difficulty and weak business scalability.

[0076] It should be noted that in some other examples, the terminal 310 can also execute the code problem handling method provided in the embodiments of this application to edit and modify the code files in the code repository to solve the code problems existing in the code repository, without the need for the server to cooperate. This application does not make specific limitations in this regard.

[0077] Figure 4 illustrates a schematic flowchart of a code problem handling method provided in an embodiment of this application. This method can be executed by any computing device, equipment, platform, or cluster of devices. This application does not specifically limit the specific computing device executing this method; a suitable computing device can be selected as needed. For example, it can be implemented on the server 330 shown in Figure 3 to provide code problem handling services to users. For ease of description, the form of the executing entity will not be distinguished in the following text; all instances will be described as code problem handling devices.

[0078] As shown in Figure 4, the code problem handling method provided in this application first initializes and generates a file intelligent agent network based on the code repository and the code problem.

[0079] For example, a user can input a code repository and code issues existing in the code repository through the client's interactive interface. Then, the client sends the code repository and code issues to the server (i.e., the server that deploys a code issue processing device to implement the code issue processing method provided in this application embodiment). The code issue processing device initializes and generates a file intelligent agent network based on the code repository and code issues.

[0080] The user interface offers multiple input methods for code repositories and code issues. For example, it provides input boxes and an upload button. Users can enter a description of the code issue in the input box and upload the code repository by clicking the upload button. Furthermore, the interface provides multiple options for common code issues, such as bug1, bug2, bug3, and bug4. Users can select the option that matches the code issue they need to resolve. Regarding code repositories, the interface offers multiple repositories for users to choose from, allowing them to select the repository where the code issue needs to be addressed.

[0081] The code repository contains multiple code files. The code problem processing device generates a corresponding large language model agent (hereinafter referred to as an agent) for each code file in the repository. For example, if the code repository contains N code files, the device generates one agent for each file, resulting in N agents. The device parses the code content of the code files in the repository to obtain the relationships between the N code files. Then, it connects the agents corresponding to the related code files using edges. For example, if the parsing determines that code file 1 and code file 2 have a calling relationship, then agent 1 corresponding to code file 1 and agent 2 corresponding to code file 2 are connected using edges.

[0082] Figure 5 illustrates a schematic diagram of the initialization process of a file-based intelligent agent network. As shown in Figure 5, the code repository includes six code files: file 1, file 2, file 3, file 4, file 5, and file 6. A corresponding intelligent agent is generated for each code file in the code repository; for example, intelligent agent 1 is generated for file 1, intelligent agent 2 for file 2, intelligent agent 3 for file 3, intelligent agent 4 for file 4, intelligent agent 5 for file 5, and intelligent agent 6 for file 6. Then, the call relationships between the code files in the code repository are parsed (for example, a code parsing tool can be used to parse the code files in the code repository to obtain the call relationships between the code files). Based on the call relationships between the code files, the association relationships between the intelligent agents corresponding to the code files are determined, and connection edges are constructed between intelligent agents with association relationships.

[0083] Taking code file 1 and code file 2 as examples, by parsing the code content of code file 1 and code file 2, it is found that code file 2 calls a class in code file 1. Therefore, it is determined that there is a calling relationship between code file 1 and code file 2, and then it is determined that there is an association relationship between agent 1 and agent 2. A connection edge is built between agent 1 and agent 2. Similarly, the association relationships between other agents are determined.

[0084] Optionally, each agent in the file agent network consists of five parts: an analysis model, an editing model, file content, code problem, and problem analysis. All problem analysis parts are initialized to empty, the code problem is initialized to the user-inputted code problem, and the file content is the specific content of the corresponding file. The analysis model analyzes the correlation between the code file and the code problem, and the editing model allows the user to edit and modify the code file based on the analysis results. Both the analysis model and the editing model can be implemented based on a large language model. Optionally, the analysis model and the editing model can be implemented based on the same large language model, or they can be implemented based on different large language models. In other words, the large language model on which each agent is based is a large language model with code problem analysis and code editing capabilities. Optionally, this large language model can be pre-trained on a large corpus and then fine-tuned based on the training dataset corresponding to the code editing task.

[0085] It is understandable that the relevance of code files to code issues means whether the code files are related to the code issues, and if so, the factors that cause the code issues. For example, if the code repository has bug1, and analysis shows that bug1 is caused by syntax errors in code files 2 and 5, and a logical error in code file 6, then the relevance of code files 1 and 2 to the code issues is: related to the code issues (can be indicated by 1), and they contain syntax errors; the relevance of code file 6 to the code issues is: related to the code issues, and it contains logical errors; the relevance of other code files to the code issues is: not related (can be indicated by 0).

[0086] In some other examples, to increase the efficiency of handling code issues, multiple code files in the code repository can be divided into multiple groups, and an agent can be generated for each group of code files. Agents with related relationships can be connected through connecting edges to build a file agent network. The number of code files in each group can be equal or unequal.

[0087] In one example, considering the significant storage and computational overhead of large language models, to save on deployment device costs, multiple agents in a file-based agent network can share a single large language model. In other words, a single large language model can be used to implement multiple agents within the file-based agent network. Of course, if the deployment device's storage and computational overhead is sufficient, multiple agents in a file-based agent network can also be implemented using multiple large language models; for example, a single agent can be implemented using a single large language model.

[0088] It is understood that the file agent network obtained by initialization shown in Figure 5 is only an example and does not constitute a limitation on the embodiments of this application. In reality, the number of code files in the code repository can be more, such as dozens or even hundreds, and the number of agents in the corresponding initialized file agent network is also dozens or even hundreds of the same as the number of code files.

[0089] Returning to Figure 4, after initializing the file agent network, K1 rounds of convolutional analysis are performed on it to identify agents irrelevant to the code problem. These irrelevant agents are then filtered out, leaving only those relevant to the code problem, resulting in the problem-solving agent network. Filtering out irrelevant agents through convolutional analysis avoids the cost and noise associated with them.

[0090] Figure 6 illustrates a schematic diagram of convolutional analysis filtering of a file agent network according to an embodiment of this application. As shown in Figure 6, agents in a file agent network can be viewed as nodes. Each round of convolutional analysis includes node analysis and edge analysis. The problem analysis on the agent node is updated through node analysis, and the problem analysis on the edge is updated through edge analysis. Through K1 rounds of convolutional analysis, the problem analysis on each node is aggregated with the problem analysis of all neighboring nodes, ensuring that the analysis of each agent considers the analysis of related agents. That is, the analysis of each code file considers the analysis of related code files, laying the foundation for subsequent cross-file editing and modification.

[0091] Optionally, the connections in the file agent network are unidirectional. To facilitate information transmission, the problem analysis of each agent node is placed on the outgoing edge, so that each agent node can aggregate the analysis results of its neighboring agent nodes. For example, each agent node sends its analysis results to the outgoing edge, and then each agent node aggregates the analysis results from all incoming edges, enabling each agent to capture the problem analysis of its neighboring agents.

[0092] It should be noted that each agent's neighboring agents refer to the agents connected to each agent by its incoming edges. For example, if the incoming edges of agent 1 are connected to agents 2 and 3, then the neighboring nodes of agent 1 are agents 2 and 3.

[0093] In each round of convolutional analysis, each agent first analyzes its relevance to the code problem based on its file content, the code problem, and the problem analysis on its incoming edges. For example, the file content, code problem, and problem analysis on each agent's incoming edges are used as input to each agent's analysis model. The output problem analysis result is placed on the agent's outgoing edges to facilitate the transmission of the problem analysis to surrounding neighboring nodes. Then, each agent updates its outgoing edge problem analysis by aggregating its own problem analysis and the problem analyses of neighboring agents. This process is iterated until each agent's problem analysis no longer needs updating. Finally, agents unrelated to the code problem are deleted, and only agents related to solving the code problem and their corresponding edges are retained, thus obtaining the problem-solving agent network.

[0094] As shown in Figure 6, the initial structure of the file agent network is shown in the graph structure on the left side of Figure 6, which includes six agents: Agent 1, Agent 2, Agent 3, Agent 4, Agent 5, and Agent 6. Through K1 rounds of convolutional analysis, agent nodes Agent 2, Agent 6, and Agent 5 that are related to solving the code problem are identified. Agent nodes Agent 1, Agent 3, and Agent 4 that are not related to the code problem are filtered out, and only agent nodes and connecting edges related to the code problem are retained. The target subgraph is obtained from the original graph structure, which is the graph structure shown on the right side of Figure 6. This graph structure is the problem-solving agent network obtained by convolutional filtering, including Agent 2, Agent 5, and Agent 6.

[0095] Understandably, each round of convolutional analysis will cause each agent node to aggregate the problem analysis of its first-order neighbor agent nodes. After K1 rounds of convolutional analysis, each agent node will aggregate the problem analysis of its K1-order neighbor agent nodes, so that each agent can capture the problem analysis information of its K1-order neighbor agent nodes. Therefore, the value of K1 depends on how many orders of neighbor agent nodes each agent node has in the graph structure corresponding to the file agent network, and the maximum value of K1 determines the value of K1.

[0096] This embodiment of the application filters the initial file agent network through convolutional analysis, removing agents irrelevant to the code problem and retaining only those related to solving the code problem and their connections. This avoids the cost and noise caused by irrelevant agents, thus enabling the localization of key modules causing the code problem and facilitating its efficient resolution. For example, in Figure 6, convolutional analysis filtering yields agents 2, 5, and 6 related to problem-solving. The key modules for solving the code problem are located as code files 2, 5, and 6, corresponding to agents 2, 5, and 6.

[0097] Returning to Figure 4, after obtaining the problem-solving agent network, K2 rounds of convolutional editing operations are performed on the problem-solving agent network. Multiple agents collaborate to complete the editing and modification of the code files corresponding to the problem-solving agent network, realizing cross-file code modification, completing the update of the code repository, and effectively solving the code problems existing in the code repository.

[0098] Figure 7 illustrates a schematic diagram of convolutional editing of a problem-solving agent network according to an embodiment of this application. As shown in Figure 7, each round of convolutional editing includes node editing and edge analysis. Node editing involves editing the code file corresponding to each agent node based on the problem analysis of the incoming edges of each node. Edge analysis updates the problem analysis on the outgoing edges of each node. This process is iterated K2 times to achieve collaborative editing among multiple files and complete the update of the code repository.

[0099] For example, in each round of convolutional editing, each agent edits the code based on the problem analysis on the incoming edges, its own file content, and the code problem. Taking agent 6 as an example, the problem analysis on agent 6's incoming edges, the file content on agent 6, and the code problem are used as inputs to agent 6's editing model, and the output is the edited file content. Then, each agent updates the problem analysis on its outgoing edges based on its current file content (i.e., the edited file content) and the current file content of other connected agents (i.e., the edited file content). Taking agent 2 as an example, agent 2's neighbor is agent 6. The file content on agent 2 and the file content on agent 6 are used as inputs to agent 2's analysis model, and the output is the updated result of agent 2's outgoing edge problem analysis. This process iterates until the problem is considered solved by all agents, that is, all edge problem analyses indicate that the problem is solved. For example, an edge problem analysis of 0 indicates that the problem is solved. Then, the code file modified in the last round is updated to the code repository, thus obtaining the target code repository.

[0100] Figure 8 is a signaling interaction diagram of a code problem processing method provided in an embodiment of this application. As shown in Figure 8, the user can input the code problem to be solved and the code repository containing the code problem through the interactive interface. The file agent network module pulls the code files from the code repository. Based on the code problem and the pulled code files, the file agent network module initializes and generates a file agent network. Then, it performs multiple rounds of convolutional filtering on the initially generated file agent network to filter out agents that are not related to the code problem, retaining only agents and connections related to the code problem, thus obtaining the multi-round convolutional filtering result. The file agent network module sends a request to the problem-solving agent network module to create a problem-solving agent network. This request carries the multi-round convolutional filtering result information. The problem-solving agent network module responds to the request, creates the problem-solving agent network according to the multi-round convolutional filtering result information, and then performs multi-round convolutional editing on the problem-solving agent network to achieve collaborative editing and modification of the code files corresponding to the problem-solving agent network. The edited and modified code files are then submitted to the code repository for updating the code repository, resulting in the target code repository.

[0101] In some other examples, the code problem handling method provided in this application embodiment may also not filter the file agent network. That is, after generating and initializing the file agent network, convolutional analysis is performed on the initial file agent network to update the problem analysis on each agent in the file agent network. Then, convolutional editing operations are performed directly on the file agent network to enable multiple agents to collaboratively edit and modify the code files in the code repository to obtain the target code repository. This can also realize cross-file code modification and effectively solve the code problems existing in the code repository.

[0102] In another example, the code problem handling method provided in this application embodiment allows users to provide feedback on the constructed problem-solving agent network, and then correct the problem-solving agent network based on the user's feedback. For example, after constructing and generating the problem-solving agent network, the problem-solving agent network module displays the generated problem-solving agent network information to the user through an interactive interface, and the user can input feedback information on the constructed problem-solving agent network through the interactive interface.

[0103] Optionally, the interactive interface can display the generated problem-solving agent network information to the user as a graph structure of the problem-solving agent network, such as the graph structure shown on the right side of Figure 6. By moving the mouse over a node in the graph structure or clicking on a node, the user can view the code file content, problem analysis, and code problem represented by that node. By checking the graph structure of the problem-solving agent network displayed on the interactive interface, if the user confirms that the graph structure is correct, the user confirms the pass. If the user finds that the graph structure is incorrect, the user can input feedback information through the interactive interface. For example, if the code problem is that there is a bug 1 in the code repository, and the graph structure of the problem-solving agent network is the structure shown on the right side of Figure 6, which only includes agents 2, 5, and 6, the user can judge from experience that the cause of bug 1 must be code file 1, so the user can report that agent 1 is missing. As another example, if the user finds that the problem analysis in agent 2 is a syntax error, but the user confirms that the problem analysis in agent 2 should be a logical error, then the user can report that the problem analysis in agent 2 is incorrect. The file agent network module will reinitialize the file agent network based on the feedback information, and then re-perform K1 rounds of convolutional analysis on the file agent network until the user feedback is satisfactory.

[0104] For example, given the graph structure of the problem-solving agent network after multiple rounds of convolutional analysis filtering, if the user feedback information is "missing agent 1", the file agent network is re-initialized, and the user feedback information "missing agent 1" is added to the code problem of each agent. Then, K1 rounds of convolutional analysis are performed on the re-initialized file agent network, so that each agent considers the user feedback information during the convolutional analysis inference process. Finally, the correct agents related to the code problem are identified, and the agents that are no longer related to the code problem are filtered out. The problem-solving agent network is then reconstructed to adjust the problem agent network according to the user feedback information.

[0105] To facilitate user feedback, the interface provides several common error options, such as missing agent, redundant agent, problem analysis error, and incorrect connection edge. Users can select the corresponding error option to input feedback. Optionally, the interface also provides an input box where users can enter a detailed description of their feedback.

[0106] In another example, the code problem handling method provided in this application embodiment allows users to view and provide feedback on code files after multiple rounds of convolutional editing, and then modify the code files based on the user's feedback. For example, after performing multiple rounds of convolutional editing, the problem-solving intelligent agent network module displays the modified code file to the user through an interactive interface. The user inputs feedback information on the edited code file through the interactive interface, and the problem-solving intelligent agent network module continues to adjust the code file based on the feedback information.

[0107] For example, the interactive interface displays the modified code files in the code repository to the user. The code problem is that there is a bug2 in the code repository. The user finds that the code file 1 in the code repository still has a syntax error that will continue to cause bug2. The user then inputs feedback information through the interactive interface that the code file 2 still has a syntax error. The problem-solving intelligent agent network module continues to perform convolutional editing operations based on the feedback information until the user finds that the edited code file in the code repository is correct.

[0108] For example, if a user reports a "syntax error in code file 2" message after K2 rounds of convolutional editing on a code file, then the code problem for each agent in the problem-solving agent network is updated to "syntax error in code file 2." Several more rounds of convolutional editing are then performed on the problem-solving agent network until each agent considers the updated code problem solved (i.e., the problem analysis on each agent's outgoing edges is "0," indicating it is unrelated to the code problem). This results in a re-convolutionally edited code file that resolves the user's feedback.

[0109] Figure 9 is a schematic diagram of another signaling interaction for the code problem processing method provided in this application embodiment. As shown in Figure 9, the user can input the code problem to be solved and the code repository containing the code problem through the interactive interface. The file agent network module pulls the code files from the code repository. The file agent network module initializes and generates a file agent network based on the code problem and the pulled code files. Then, it performs multiple rounds of convolutional filtering on the initially generated file agent network to filter out agents in the file agent network that are not related to the code problem, and only retains agents and connection edges related to the code problem, thus obtaining the result of multiple rounds of convolutional filtering. The file agent network module sends a request to the problem-solving agent network module to create a problem-solving agent network. This request carries information about the results of multiple rounds of convolutional filtering. The problem-solving agent network module responds to the request and creates the problem-solving agent network based on the results of the multiple rounds of convolutional filtering. After constructing the problem-solving agent network, the problem-solving agent network module provides the user with the problem-solving agent network structure. If the user finds an error in the problem-solving agent network structure, they will provide feedback. The file agent network will continue to perform multiple rounds of convolutional filtering operations based on the user feedback and regenerate the problem-solving agent network structure until the user feedback is correct. The problem-solving agent network module performs multiple rounds of convolutional editing on the problem-solving agent network to obtain a modified code file. The modified code file is then displayed to the user. If the user finds that there are still problems in the modified code file, they provide feedback. Based on this feedback, the problem-solving agent network module continues to perform multiple rounds of convolutional editing to modify the code file until the user feedback is correct. Finally, the code file that the user feedback indicates is correct is submitted to the code repository to update the code repository and obtain the target code repository.

[0110] Figure 10 is a flowchart illustrating a code problem handling method provided in an embodiment of this application. This method can be executed by any computing device, apparatus, platform, or cluster of devices. This application embodiment does not specifically limit the specific computing device executing this method; a suitable computing device can be selected as needed. For example, it can be implemented on the server 330 shown in Figure 3 to provide code problem handling services to users. For ease of description, the form of the executing entity will not be distinguished in the following text; all instances will be described as code problem handling devices.

[0111] In step S1001, code issues and code repositories are obtained.

[0112] Users can input code repositories and code issues within those repositories through the client's interactive interface. The code issue processing mechanism retrieves the code issues and code repositories based on the user's interaction information. The specific implementation of user-inputted code issues and repositories via the interactive interface can be found in the description above; for brevity, it will not be repeated here.

[0113] A code repository can contain N code files, where N is a positive integer greater than 1. Typically, a code repository contains tens or hundreds of code files, so N can be tens or hundreds.

[0114] In step S1002, the target intelligent agent network is determined based on the code problem and the code repository.

[0115] After acquiring the code problem and the code repository, the code problem processing device initializes a file agent network based on the code problem and the code repository. The file agent network includes M agents and connecting edges. The M agents correspond to M code files and are used to process the M code files. The connecting edges are used to connect agents with relationships among the M agents. The M code files are code files in the code repository.

[0116] For example, the code problem processing device generates a corresponding agent for each code file in the code repository. For instance, if the code repository contains N code files, the device generates an agent for each file, resulting in N agents. The device then calls a code parsing tool to parse the code, obtaining the call relationships between the various code files in the repository. Finally, it constructs connection edges between the agents corresponding to the code files with call relationships, building a file-generating agent network.

[0117] Optionally, each agent in the file agent network consists of five parts: an analysis model, an editing model, file content, code problem, and problem analysis. All problem analysis parts are initialized to empty, the code problem is initialized to the user-inputted code problem, and the file content is the specific content of the corresponding file. The analysis model analyzes the correlation between the code file and the code problem, and the editing model allows the user to edit and modify the code file based on the analysis results.

[0118] The code problem processing device performs K1-round convolutional analysis on the file agent network, updating the problem analysis of each agent in the network. This allows each agent to capture the problem analysis information of its neighbors, improving the accuracy of each agent's problem analysis and thus enhancing the accuracy of subsequent editing and modification. A detailed implementation of the K1-round convolutional analysis can be found in the description above; for brevity, it will not be elaborated upon here.

[0119] After obtaining the file agent network through K1 rounds of convolutional analysis, the network can be filtered. This involves identifying and removing agents irrelevant to the code problem, retaining only those relevant to the code problem. This avoids the cost and noise introduced by irrelevant agents during subsequent editing. For example, as shown in Figure 6, the network structure of the file agent network is the graph structure on the left side of Figure 6, including six agents: Agent 1, Agent 2, Agent 3, Agent 4, Agent 5, and Agent 6. After K1 rounds of convolutional analysis, agent nodes (Agent 1, Agent 3, and Agent 4) irrelevant to the code problem are identified and filtered out. Only agent nodes (Agent 2, Agent 5, and Agent 6) and connecting edges relevant to the code problem are retained, as shown in the graph structure on the right side of Figure 6. In this case, M is 3, N is 6, and M is less than N. The filtered file agent network is the target agent network (also known as the problem-solving agent network).

[0120] In another example, after obtaining the file agent network through K1 rounds of convolutional analysis, the file agent network may not be filtered. In this case, M equals N, meaning that the file agent network obtained after K1 rounds of convolutional analysis is the target agent network.

[0121] In one example, to ensure the accuracy of the target agent network, the code problem handling method provided in this application embodiment allows users to provide feedback on the constructed target agent network, and then corrects the target agent network based on the user's feedback. Detailed implementation of specific user feedback and the correction of the target agent network based on user feedback can be found in the description above, and will not be repeated here for brevity.

[0122] In step S1003, the M agents in the target agent network collaboratively update the code repository to obtain the target code repository.

[0123] In a target agent network, M agents collaboratively modify and edit M code files corresponding to the M agents in a code repository. For example, the code repository includes code file 1, code file 2, code file 3, code file 4, code file 5, and code file 6. The target agent network includes agent 2, agent 5, and agent 6, where agent 2 corresponds to code file 2, agent 5 corresponds to code file 5, and agent 6 corresponds to code file 6. Agents 2, 5, and 6 in the target agent network collaboratively modify and edit the code content of code files 2, 5, and 6, and then submit the modified code files 2, 5, and 6 to the code repository for updating, thus obtaining the target code repository.

[0124] In this embodiment, the code problem processing device can perform K1 rounds of convolutional editing on the target agent network to enable M agents in the target agent network to collaboratively edit and modify the code file corresponding to the problem-solving agent network. This achieves cross-file code modification, updates the code repository, and effectively solves the code problems existing in the code repository. Detailed implementation of the K1 rounds of convolutional editing can be found in the description of Figure 7 above; for brevity, it will not be repeated here.

[0125] In another example, the code problem handling method provided in this application embodiment allows users to view and provide feedback on code files that have undergone multiple rounds of convolutional editing, and then modify the code files based on the user's feedback. Detailed implementation of specific user feedback and code modification based on user feedback can be found in the description above, and will not be repeated here for brevity.

[0126] This application embodiment also provides a code problem processing device, as shown in FIG11, including:

[0127] Module 1101 is used to obtain code issues and code repositories. Code issues indicate code problems existing in the code repository. The code repository includes N code files, where N is a positive integer greater than 1.

[0128] The determination module 1102 is used to determine the target intelligent agent network based on the code problem and the code repository. The target intelligent agent network includes M intelligent agents and at least one connection edge between the M intelligent agents. The M intelligent agents correspond to P code files and are used to process the P code files. At least one connection edge between the M intelligent agents is used to connect the intelligent agents with related relationships among the M intelligent agents. The P code files are code files in N code files. M is a positive integer less than or equal to N, and P is a positive integer less than or equal to N and greater than or equal to M.

[0129] The update module 1103 is used to update the code repository based on the result of the collaborative processing of P code files by M intelligent agents, so as to obtain the target code repository.

[0130] The acquisition module 1101, determination module 1102, and update module 1103 can all be implemented in software or in hardware. For example, the implementation of the acquisition module 1101 will be described below. Similarly, the implementation of the determination module 1102 and update module 1103 can refer to the implementation of the acquisition module 1101.

[0131] As an example of a software functional unit, module 1101 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Further, the aforementioned computing instance may be one or more. For example, module 1101 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed within the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed within the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0132] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0133] As an example of a hardware functional unit, the acquisition module 1101 may include at least one computing device, such as a server. Alternatively, the acquisition module 1101 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0134] The multiple computing devices included in the acquisition module 1101 can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in the acquisition module 1101 can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in the acquisition module 1101 can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0135] It should be noted that, in other embodiments, the acquisition module 1101 can be used to execute any step in the code problem processing method, the determination module 1102 can be used to execute any step in the code problem processing method, and the update module 1103 can be used to execute any step in the code problem processing method. The steps implemented by the acquisition module 1101, the determination module 1102, and the update module 1103 can be specified as needed. By implementing different steps in the code problem processing method through the acquisition module 1101, the determination module 1102, and the update module 1103, all functions of the code problem processing device can be realized.

[0136] This application also provides a computing device 1200. As shown in FIG12, the computing device 1200 includes: a bus 1202, a processor 1204, a memory 1206, and a communication interface 1208. The processor 1204, the memory 1206, and the communication interface 1208 communicate with each other via the bus 1202. The computing device 1200 may be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 1200.

[0137] Bus 1202 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one line is used in Figure 12, but this does not imply that there is only one bus or one type of bus. Bus 1202 can include pathways for transmitting information between various components of computing device 1200 (e.g., memory 1206, processor 1204, communication interface 1208).

[0138] The processor 1204 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0139] The memory 1206 may include volatile memory, such as random access memory (RAM). The processor 1204 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0140] The memory 1206 stores executable program code, and the processor 1204 executes the executable program code to implement the functions of the aforementioned acquisition module 1101, determination module 1102, and update module 1103, thereby realizing the code problem handling method. That is, the memory 1206 stores instructions for executing the code problem handling method.

[0141] The communication interface 1208 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the computing device 1200 and other devices or communication networks.

[0142] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0143] As shown in Figure 13, the computing device cluster includes at least one computing device 1200. The memory 1206 of one or more computing devices 1200 in the computing device cluster may store the same instructions for processing code problems.

[0144] In some possible implementations, the memory 1206 of one or more computing devices 1200 in the computing device cluster may also store partial instructions for executing code problem processing methods. In other words, a combination of one or more computing devices 1200 can jointly execute instructions for executing code problem processing methods.

[0145] It should be noted that the memory 1206 in different computing devices 1200 within the computing device cluster can store different instructions, which are used to execute parts of the functions of the code problem processing device. That is, the instructions stored in the memory 1206 of different computing devices 1200 can implement the functions of one or more modules among the acquisition module 1101, determination module 1102, and update module 1103.

[0146] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 14 illustrates one possible implementation. As shown in Figure 14, two computing devices 1200A and 1200B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this type of possible implementation, the memory 1206 in computing device 1200A stores instructions for executing the functions of the acquisition module 1101 and the determination module 1102. Simultaneously, the memory 1206 in computing device 1200B stores instructions for executing the function of the update module 1103.

[0147] It should be understood that the functions of computing device 1200A shown in Figure 14 can also be performed by multiple computing devices 1200. Similarly, the functions of computing device 1200B can also be performed by multiple computing devices 1200.

[0148] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to execute a method for processing code problems.

[0149] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct a computing device to execute code to process a problem.

[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for handling code problems, characterized in that, include: Obtain code issues and code repositories, wherein the code issues indicate code problems existing in the code repository, and the code repository includes N code files, where N is a positive integer greater than 1; Based on the code problem and the code repository, a target agent network is determined. The target agent network includes M agents and at least one connection edge between the M agents. The M agents correspond to P code files and are used to process the P code files. The at least one connection edge between the M agents is used to connect agents with related relationships among the M agents. The P code files are code files from the N code files. M is a positive integer less than or equal to N, and P is a positive integer less than or equal to N and greater than or equal to M. The code repository is updated based on the results of the collaborative processing of the P code files by the M intelligent agents to obtain the target code repository.

2. The method according to claim 1, characterized in that, Each agent in the target agent network includes file content, the code problem, and a first problem analysis. The file content indicates the code content of the code file corresponding to each agent, and the first problem analysis indicates the relevance between the code file corresponding to each agent and the code problem. The connecting edge is a directed edge, and the connecting edge has a second problem analysis. The second problem analysis on the outgoing edge of each agent is determined based on the first problem analysis of each agent.

3. The method according to claim 2, characterized in that, The result of the collaborative processing of the P code files by the M intelligent agents is determined based on the following steps: The M agents perform at least one round of convolutional editing on the target agent network until the first problem analysis of all agents in the target agent network indicates that it is irrelevant to the code problem, thus obtaining the result of processing the P code files.

4. The method according to claim 3, characterized in that, Each round of convolutional editing operations in the multi-round convolutional editing operation includes: Each agent, based on the code problem, the file content, and the second problem analysis on the incoming edges of each agent, edits the code in the code file corresponding to each agent; Each agent updates the second problem analysis on the outgoing edges of each agent based on its own edited file content and the edited file content of its neighboring agents.

5. The method according to claim 3 or 4, characterized in that, Each agent in the target agent network also includes an editing model, which performs the convolutional editing operation.

6. The method according to any one of claims 3-5, characterized in that, Also includes: Receive first user feedback information, which indicates the user's feedback on the target code repository; Based on the first user feedback information, the convolutional editing operation is continued on the target intelligent agent network.

7. The method according to any one of claims 2-6, characterized in that, The step of determining the target agent network based on the code problem and the code repository includes: One agent is generated for each code file in the code repository, resulting in N agents; Based on the association relationships between the N code files, an initial agent network is generated. The initial agent network includes the N agents and at least one connection edge between the N agents. The at least one connection edge between the N agents is used to connect the agents corresponding to the code files with association relationships. The target agent network is obtained by filtering out agents in the initial agent network that are irrelevant to the code problem.

8. The method according to claim 7, characterized in that, The step of filtering agents in the initial agent network that are irrelevant to the code problem to obtain the target agent network includes: The N agents in the initial agent network perform collaborative analysis to identify the agents among the N agents that are irrelevant to the code problem; The target agent network is obtained by filtering out agents that are irrelevant to the code problem.

9. The method according to claim 8, characterized in that, The N agents in the initial agent network perform collaborative analysis to identify agents among the N agents that are irrelevant to the code problem, including: Perform at least one round of convolutional analysis on the initial agent network until the first problem analysis of each agent in the initial agent network is no longer updated; Based on the first problem analysis of each agent in the initial agent network after at least one round of convolutional analysis, identify the agents among the N agents that are irrelevant to the code problem.

10. The method according to claim 9, characterized in that, Each round of convolutional analysis in the multi-round convolutional analysis operation includes: In the initial agent network, each agent updates its first problem analysis based on the file content, the code problem, and the second problem analysis on each agent's incoming edges. Each agent updates its second analysis result on the outgoing edges based on its own updated first problem analysis and the updated first problem analysis of its neighboring agents.

11. The method according to claim 9 or 10, characterized in that, Each agent in the initial agent network also includes an analysis model, which performs the convolutional analysis operation.

12. The method according to any one of claims 9-11, characterized in that, Also includes: Receive second user feedback information, which indicates the user's feedback on the target intelligent agent network; Based on the second user feedback information, the target intelligent agent network is adjusted.

13. A device for processing code problems, characterized in that, include: The acquisition module is used to acquire code issues and code repositories. The code issues indicate code problems existing in the code repository, and the code repository includes N code files, where N is a positive integer greater than 1. A determination module is used to determine a target agent network based on the code problem and the code repository. The target agent network includes M agents and at least one connection edge between the M agents. The M agents correspond to P code files, and the module is used to process the P code files. The at least one connection edge between the M agents is used to connect agents with related relationships among the M agents. The P code files are code files from the N code files. M is a positive integer less than or equal to N, and P is a positive integer less than or equal to N and greater than or equal to M. An update module is used to update the code repository based on the results of the collaborative processing of the P code files by the M intelligent agents, so as to obtain the target code repository.

14. A computing device cluster, characterized in that, It includes at least one computing device, each computing device including a processor and memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method as described in any one of claims 1-12.

15. A computer-readable storage medium, characterized in that, The method includes computer program instructions that, when executed by a cluster of computing devices, cause the cluster of computing devices to perform the method as described in any one of claims 1-12, wherein the cluster of computing devices includes at least one computing device.

16. A computer program product containing instructions, characterized in that, When the instruction is executed by the computing device cluster, the computing device cluster causes the computing device cluster to perform the method as described in any one of claims 1-12, wherein the computing device cluster includes at least one computing device.

Citation Information

Patent Citations

  • Problem solving method and device based on intelligent agent

    CN116628158A

  • Military intelligent software automatic translation method based on multi-agent cooperation

    CN118519640A

  • Problem processing method and device based on multiple agents and product

    CN118672782A

  • Multi-agent cooperation system and method for material science

    CN118737346A

  • System, methods and apparatus for complex behaviors of collectives of intelligent mobile software agents

    US20060167917A1