A task processing method, electronic device, medium and product

CN122985137APending Publication Date: 2026-10-27MIGU CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611083408.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0002]相关技术中,人工智能(Artificial Intelligence,AI)编码助手插件能根据自然语言生成代码,通常采用提示-生成的简单交互模式,无法实现全程的任务协作

Benefits of technology

[0013]本申请实施例提供一种计算机可读存储介质,存储有计算机程序或计算机可执行指令,用于被处理器执行时实现本申请实施例提供的任务处理方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122985137A_ABST
    Figure CN122985137A_ABST
Patent Text Reader

Abstract

The application provides a task processing method, related equipment, medium and product; wherein the method comprises: obtaining code requirement information; the code requirement information indicates a code generation task; determining a target label corresponding to the code generation task based on the code requirement information; the target label indicates an integrated development environment tool; and calling the integrated development environment tool to execute the code generation task. The target label can be used to automatically call the integrated development environment tool to execute the code generation task, and full-process task cooperation is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and more particularly to a task processing method, electronic device, medium, and product. Background Technology

[0002] In related technologies, artificial intelligence (AI) coding assistant plugins can generate code based on natural language, and usually adopt a simple prompt-generate interaction mode, which cannot achieve full-process task collaboration. Summary of the Invention

[0003] This application provides a task processing method, electronic device, medium, and product that can automatically call integrated development environment tools to execute code generation tasks based on target tags, thereby achieving full task collaboration.

[0004] The technical solution of this application embodiment is implemented as follows: This application provides a task processing method, the method comprising: Obtain code requirement information; the code requirement information indicates the code generation task; Based on the code requirement information, the target tag corresponding to the code generation task is determined; the target tag indicates the integrated development environment tool. The integrated development environment tool is invoked to execute the code generation task.

[0005] In the above solution, obtaining code requirement information includes: Obtain natural language instructions input by the user; the natural language instructions instruct the user to request the execution of the code generation task; The code requirement information is obtained based on the natural language instructions.

[0006] In the above scheme, obtaining the code requirement information based on the natural language instructions includes: Context information of the code generation task is obtained based on the natural language instructions; The prompt word template for the code generation task is obtained based on the context information; The code requirement information is obtained based on the natural language instructions and the prompt word template.

[0007] In the above scheme, obtaining the target tag corresponding to the code generation task based on the code requirement information includes: Based on the code requirement information, determine whether the code generation task is an executable task; If so, based on the code requirement information, the code generation task needs to call at least one tag, and the target tag is confirmed from at least one of the tags; the target tag indicates a tag with no execution risk.

[0008] In the above scheme, obtaining the target tag corresponding to the code generation task based on the code requirement information includes: Based on the code requirement information, determine whether the code generation task is an executable task; If not, obtain prompt information based on the code requirement information; the prompt information is used to supplement the code requirement information.

[0009] In the above scheme, the step of calling the integrated development environment tool to execute the code generation task includes: The interface parameters of the integrated development environment tool are determined based on a preset mapping relationship; The code generation task is executed by calling the interface parameters.

[0010] The method in the above scheme further includes: If the code generation task fails, obtain the error information; Based on the error information, the code requirement information is modified to obtain the modified code requirement information; The code generation task is executed based on the modified code requirements information.

[0011] This application embodiment provides a task processing apparatus, the apparatus comprising: The acquisition unit is used to acquire code requirement information; the code requirement information indicates the code generation task. The processing unit is configured to determine the target tag corresponding to the code generation task based on the code requirement information; the target tag indicates an integrated development environment tool. The processing unit is used to invoke the integrated development environment tool to execute the code generation task.

[0012] This application provides an electronic device, including: a processor and a memory for storing computer programs capable of running on the processor. When the processor runs the computer program, it executes the code generation method provided in the embodiments of this application.

[0013] This application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the task processing method provided in this application when executed by a processor.

[0014] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the task processing method provided in this application.

[0015] The embodiments of this application have the following beneficial effects: This application obtains code requirement information; the code requirement information indicates code generation tasks; the target label corresponding to the code generation task is determined based on the code requirement information; the target label indicates the integrated development environment tool; the integrated development environment tool is called to execute the code generation task; and the integrated development environment tool can be called to execute the code generation task automatically according to the target label, thereby realizing full task collaboration. Attached Figure Description

[0016] Figure 1 A flowchart illustrating a task processing method provided in this application; Figure 2 A flowchart illustrating another task processing method provided in this application; Figure 3 A flowchart illustrating the third task processing method provided in this application; Figure 4 A schematic diagram of the structure of a task processing device provided in this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0018] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0019] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0020] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0021] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the embodiments of this application is for descriptive purposes only and is not intended to limit the scope of this application.

[0022] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.

[0023] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0024] In related technologies, AI coding assistant plugins (such as GitHub Copilot and Tabnine) mainly implement code completion and generation functions based on a single large language model (LLM). They typically receive natural language prompts or code snippets input by the user and call a pre-trained LLM to generate code suggestions. These plugins are mostly integrated into the integrated development environment (IDE) as independent plugins to provide basic task processing capabilities.

[0025] The existing coding assistant plugins mainly have the following problems: 1. It only performs basic task processing and cannot be deeply integrated with development toolchains such as file system operations (such as reading and writing files), terminal command execution, and browser automated testing. This forces users to frequently switch between plugins and other tools, reducing development efficiency.

[0026] 2. Monotonous task processing: When faced with complex tasks that require collaboration of multiple tools (such as building projects and deploying tests), the lack of systematic tool call process management makes it difficult to achieve full-process automation from task processing to functional verification.

[0027] 3. Rigid interaction mode: It only supports simple prompt-generate interaction and cannot dynamically adjust subsequent operations based on the tool's execution results. For example, it cannot intelligently generate the next step of code based on file reading results and lacks context-aware tool collaboration capabilities.

[0028] 4. Limited scalability: The existing architecture does not adequately support new tool types. Integrating new tools (such as domain-specific code inspectors) requires extensive modifications to the underlying logic, resulting in poor scalability.

[0029] 5. Limited context awareness: The existing prompt word templates are designed to be generic and cannot obtain and analyze the project's file structure, code definition, runtime environment and other context information in real time and accurately, which leads to insufficient adaptability and accuracy of the generated code.

[0030] Figure 1 This is an optional flowchart illustrating the task processing method provided in the embodiments of this application. The following will be combined with... Figure 1 The steps shown are explained as follows: Figure 1 As shown, the method includes the following steps: Step S101: Obtain code requirement information; the code requirement information indicates the code generation task.

[0031] It is understood that the execution entity of this application embodiment is an IDE plugin, in which development instructions are submitted in natural language, such as "create a new API routing file and add a basic GET endpoint".

[0032] In practical applications, after obtaining natural language instructions, these instructions can be processed to obtain code requirement information. For example, an IDE plugin can send natural language instructions to the PromptEngineering Module. The PromptEngineering Module can load a pre-defined structured prompt template, use a tool interface layer to obtain real-time context information (such as obtaining a file list by executing `list_files`, or obtaining the home directory path by `os.homedir()`), and replace the collected context data in the corresponding placeholders of the prompt template (such as `${cwd.toPosix()}`). The natural language instructions and prompt template are then integrated to obtain the code requirement information.

[0033] Step S102: Determine the target label corresponding to the code generation task based on the code requirement information; the target label indicates the integrated development environment tool.

[0034] In practical applications, the prompt word engineering module can send code requirement information to the large language model. This code requirement information includes clear tool usage guidelines and contextual information. The LLM can then generate tags containing one or more tool call labels based on natural language instructions (such as...).<write_to_file> ...< / write_to_file> ) response.

[0035] The IDE plugin receives multiple tool call tags returned by the large language model and uses regular expressions (such as / <(\w+)>([\s\S))). The system uses an XML parser or a `<\ / \1> / g` function to extract tool tags, parameters, and content. Before performing high-risk operations (e.g., tags containing `requires_approval: true`), the IDE's UI module requests confirmation from the user to verify the target tag. Based on a predefined tag-tool mapping table, it obtains the interface parameters corresponding to the natural language command to invoke the corresponding function in the tool's interface layer. Step S103: Invoke the integrated development environment tool to execute the code generation task.

[0036] In practical applications, the IDE plugin executes the interface parameters corresponding to the natural language instructions based on the integrated development environment tool corresponding to the target tag, in order to call the corresponding functions in the tool's interface layer and execute the code generation task.

[0037] As can be seen from the above, this application achieves full-process task collaboration by obtaining code requirement information; the code requirement information instructing code generation tasks; determining the target tags corresponding to the code generation tasks based on the code requirement information; the target tags instructing integrated development environment (IDE) tools; calling IDE tools to execute code generation tasks; and automatically calling IDE tools to execute code generation tasks based on target tags.

[0038] In some embodiments of this application, obtaining code requirement information includes: Obtain natural language instructions from the user; the natural language instructions instruct the user to request the execution of a code generation task; Code requirement information is obtained based on natural language instructions.

[0039] In practical applications, after obtaining natural language instructions, these instructions can be processed to obtain code requirement information. For example, an IDE plugin can send natural language instructions to the PromptEngineering Module. The PromptEngineering Module can load a pre-defined structured prompt template, use a tool interface layer to obtain real-time context information (such as obtaining a file list by executing `list_files`, or obtaining the home directory path by `os.homedir()`), and replace the collected context data in the corresponding placeholders of the prompt template (such as `${cwd.toPosix()}`). The natural language instructions and prompt template are then integrated to obtain the code requirement information.

[0040] A strict XML-like tag protocol can be established in the prompt words to transform abstract development operations (such as "read file") into standardized instructions that can be generated by a large language model and parsed and executed by a machine; XML-like tags (such as...) can be pre-defined in the prompt word template.<read_file> Define atomic tool operations, and the label parameters are bound to environment variables in real time through placeholder functions (such as ${cwd.toPosix()} → current path).

[0041] Before sending code request information to the large language model, the prompt word engineering module scans the entire prompt word template, searching for all placeholders in the format ${...}. For each placeholder, the module calls an internal evaluation function. For example, upon encountering ${cwd.toPosix()}, it calls the function in the tool interface layer to get the current working directory; upon encountering ${osName()}, it calls the function to get the operating system name. The evaluation result (such as / Users / test / project) replaces the original placeholder in plain text. Initial context injection: For more complex contexts, such as the project file tree, the system will automatically and silently execute this function in the background once when processing the first user request.<list_files path="."recursive="true"> Then, the returned list of files is formatted and inserted into a specific area of ​​the prompt word (such as the ENVIRONMENT_DETAILS block).

[0042] In some embodiments of this application, code requirement information is obtained based on natural language instructions, including: Obtain contextual information for code generation tasks based on natural language instructions; Obtain prompt word templates for code generation tasks based on contextual information; Code requirement information is obtained based on natural language instructions and prompt word templates.

[0043] In practical applications, after obtaining natural language instructions, these instructions can be processed to obtain code requirement information. For example, an IDE plugin can send natural language instructions to the PromptEngineering Module. The PromptEngineering Module can load a pre-defined structured prompt template, use a tool interface layer to obtain real-time context information (such as obtaining a file list by executing `list_files`, or obtaining the home directory path by `os.homedir()`), and replace the collected context data in the corresponding placeholders of the prompt template (such as `${cwd.toPosix()}`). The natural language instructions and prompt template are then integrated to obtain the code requirement information.

[0044] In some embodiments of this application, obtaining the target tag corresponding to the code generation task based on code requirement information includes: Determine whether the code generation task is executable based on the code requirement information; If so, obtaining code generation tasks based on code requirement information requires calling at least one tag and confirming the target tag from at least one tag; the target tag indicates a tag with no execution risk.

[0045] In practical applications, refer to Figure 2 As shown, the code generation task is an executable task that can enter execution mode. The large language model determines at least one tag based on the code requirement information. The IDE plugin receives multiple tool call tags returned by the large language model and uses regular expressions (such as / <(\w+)>([\s\S]). The system uses an XML parser or a `<\ / \1> / g` function to extract tool tags, parameters, and content. Before performing high-risk operations (such as when a tag contains `requires_approval:true`), the IDE's UI module requests confirmation from the user to verify the target tag. Based on a predefined tag-tool mapping table, it obtains the interface parameters corresponding to the natural language command to invoke the corresponding function in the tool's interface layer. In some embodiments of this application, obtaining the target tag corresponding to the code generation task based on code requirement information includes: Determine whether the code generation task is executable based on the code requirement information; If not, obtain prompt information based on code requirement information; the prompt information is used to supplement the code requirement information.

[0046] In practical applications, refer to Figure 2 As shown, the code generation task is a non-executable task, which can be understood as the user inputting a vague or complex instruction. At this time, the plan mode can be entered. The prompt word engineering module will enable specific parts of the template to generate prompt information. The prompt information can be sent to the large language model to adjust the code generation task into an executable task. The prompt information can be used to supplement code requirement information. The large language model can return an execution plan based on the prompt information. The plan can include a list of numbers, checkboxes, or even flowcharts or Gantt charts in Mermaid.js format. The IDE plugin can render it into a visual view.

[0047] In some embodiments of this application, invoking an integrated development environment (IDE) tool to perform code generation tasks includes: The interface parameters of the integrated development environment tools are determined based on the preset mapping relationship; Call the interface parameters to execute the code generation task.

[0048] In practical applications, as shown in Table 1, the preset mapping relationship can be a preset data structure used to map the parsed tag names to specific implementation functions in the tool interface layer.

[0049]

[0050] Table 1 In some embodiments of this application, the method further includes: If the code generation task fails, retrieve the error message; Based on the error information, the code requirement information is modified to obtain the modified code requirement information; The code generation task is executed based on the changed code requirements information.

[0051] In practical applications, refer to Figure 3 As shown, each call to the tool interface layer is wrapped in a try...catch block. When command execution fails (e.g., returning a non-zero exit code), file read / write exceptions occur, or API calls fail, error messages are captured. The captured error messages (including error codes, error messages, stack traces, stderr output, etc.) are formatted by the feedback loop module and provided as input to the large language model for the next step. The modified code requirements guide the large language model to analyze the cause and attempt to fix it. The large language model can then output...<replace_in_file> ...< / replace_in_file> To correct the error, it can be executed after the fix.<execute_command> <command> npm run build< / execute_command> This completes an automated error handling and recovery cycle.

[0052] As can be seen from the above, this application achieves full-process task collaboration by obtaining code requirement information; the code requirement information instructing code generation tasks; determining the target tags corresponding to the code generation tasks based on the code requirement information; the target tags instructing integrated development environment (IDE) tools; calling IDE tools to execute code generation tasks; and automatically calling IDE tools to execute code generation tasks based on target tags.

[0053] Based on the same inventive concept as described above, Figure 4 This is a schematic diagram of a task processing device provided in an embodiment of the present invention. The device includes: Acquisition unit 401 is used to acquire code requirement information; the code requirement information indicates the code generation task. Processing unit 402 is used to determine the target label corresponding to the code generation task based on code requirement information; the target label indicates the integrated development environment tool. Processing unit 402 is used to call integrated development environment tools to execute code generation tasks.

[0054] In some embodiments of this application, the acquisition unit 401 is used to acquire natural language instructions input by the user; the natural language instructions instruct the user to request the execution of a code generation task; Code requirement information is obtained based on natural language instructions.

[0055] In some embodiments of this application, the acquisition unit 401 is used to acquire context information of the code generation task based on natural language instructions; Obtain prompt word templates for code generation tasks based on contextual information; Code requirement information is obtained based on natural language instructions and prompt word templates.

[0056] In some embodiments of this application, the processing unit 402 is used to determine whether the code generation task is an executable task based on code requirement information; If so, obtaining code generation tasks based on code requirement information requires calling at least one tag and confirming the target tag from at least one tag; the target tag indicates a tag with no execution risk.

[0057] In some embodiments of this application, the processing unit 402 is used to determine whether the code generation task is an executable task based on code requirement information; If not, obtain prompt information based on code requirement information; the prompt information is used to supplement the code requirement information.

[0058] In some embodiments of this application, the processing unit 402 is used to determine the interface parameters of the integrated development environment tool based on a preset mapping relationship; Call the interface parameters to execute the code generation task.

[0059] In some embodiments of this application, the acquisition unit 401 is used to acquire error information if the code generation task fails to execute; Processing unit 402 is used to modify code requirement information based on error information to obtain modified code requirement information; The code generation task is executed based on the changed code requirements information.

[0060] Based on the foregoing embodiments, embodiments of this application provide an electronic device. Figure 5 This is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention. The electronic device 500 includes at least one processor 501 and a memory 502. Optionally, the electronic device 500 may further include at least one communication interface 503. The various components in the electronic device 500 are coupled together through a bus system 504. It can be understood that the bus system 504 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 504 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 5 The general designated all buses as Bus System 504.

[0061] Based on the hardware implementation of the above program modules, the communication interface 503 is able to interact with other communication devices. The processor 501 is connected to the communication interface 503 to enable information exchange with other communication devices and to execute the methods provided by one or more of the above-mentioned technical solutions when running a computer program; Memory 502, computer programs are stored in memory 502.

[0062] Specifically, processor 501 is used to acquire code requirement information; the code requirement information instructs code generation tasks. Based on code requirement information, determine the target tags corresponding to the code generation tasks; the target tags indicate the integrated development environment tools. Invoke the integrated development environment tools to perform code generation tasks.

[0063] In some embodiments of this application, processor 501 is configured to acquire natural language instructions input by a user; the natural language instructions instruct the user to request the execution of a code generation task; Code requirement information is obtained based on natural language instructions.

[0064] In some embodiments of this application, processor 501 is used to obtain context information of the code generation task based on natural language instructions; Obtain prompt word templates for code generation tasks based on contextual information; Code requirement information is obtained based on natural language instructions and prompt word templates.

[0065] In some embodiments of this application, processor 501 is used to determine whether a code generation task is an executable task based on code requirement information; If so, obtaining code generation tasks based on code requirement information requires calling at least one tag and confirming the target tag from at least one tag; the target tag indicates a tag with no execution risk.

[0066] In some embodiments of this application, processor 501 is used to determine whether a code generation task is an executable task based on code requirement information; If not, obtain prompt information based on code requirement information; the prompt information is used to supplement the code requirement information.

[0067] In some embodiments of this application, processor 501 is used to determine the interface parameters of integrated development environment tools based on a preset mapping relationship; Call the interface parameters to execute the code generation task.

[0068] In some embodiments of this application, processor 501 is used to obtain error information if the code generation task fails to execute; Based on the error information, the code requirement information is modified to obtain the modified code requirement information; The code generation task is executed based on the changed code requirements information.

[0069] It is understood that memory 502 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Sync Link Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory 502 described in this embodiment of the invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0070] The memory 502 in this embodiment of the invention is used to store various types of data to support the operation of the electronic device 500. Examples of such data include any computer program for operation on the electronic device 500, and programs implementing the methods of this embodiment of the invention may be included in the memory 502.

[0071] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by processor 501. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of the present invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in a memory. The processor reads information from the memory and, in conjunction with its hardware, completes the steps of the aforementioned method.

[0072] In an exemplary embodiment, the electronic device 500 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the methods described above.

[0073] This application provides a computer program product, which includes a computer program or computer-executable instructions stored in a computer-readable storage medium. The processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the task processing method described in this application.

[0074] This application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the task processing method provided in this application. For example, ... Figure 1 The task processing method is shown.

[0075] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0076] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.

[0077] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).

[0078] As an example, computer-executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.

[0079] In summary, this application achieves full-process task collaboration by obtaining code requirement information; the code requirement information instructing code generation tasks; determining the target tags corresponding to the code generation tasks based on the code requirement information; the target tags instructing integrated development environment (IDE) tools; invoking IDE tools to execute code generation tasks; and automatically invoking IDE tools to execute code generation tasks based on target tags.

[0080] The above are merely embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A task processing method, characterized in that, The method includes: Obtain code requirement information; the code requirement information indicates the code generation task; Based on the code requirement information, the target tag corresponding to the code generation task is determined; the target tag indicates the integrated development environment tool. The integrated development environment tool is invoked to execute the code generation task.

2. The method according to claim 1, characterized in that, The process of obtaining code requirement information includes: Obtain natural language instructions input by the user; the natural language instructions instruct the user to request the execution of the code generation task; The code requirement information is obtained based on the natural language instructions.

3. The method according to claim 2, characterized in that, The process of obtaining the code requirement information based on the natural language instructions includes: Context information of the code generation task is obtained based on the natural language instructions; The prompt word template for the code generation task is obtained based on the context information; The code requirement information is obtained based on the natural language instructions and the prompt word template.

4. The method according to claim 1, characterized in that, The step of obtaining the target tag corresponding to the code generation task based on the code requirement information includes: Based on the code requirement information, determine whether the code generation task is an executable task; If so, based on the code requirement information, the code generation task needs to call at least one tag, and the target tag is confirmed from at least one of the tags; the target tag indicates a tag with no execution risk.

5. The method according to claim 1, characterized in that, The step of obtaining the target tag corresponding to the code generation task based on the code requirement information includes: Based on the code requirement information, determine whether the code generation task is an executable task; If not, obtain prompt information based on the code requirement information; the prompt information is used to supplement the code requirement information.

6. The method according to claim 1, characterized in that, The step of invoking the integrated development environment tool to execute the code generation task includes: The interface parameters of the integrated development environment tool are determined based on a preset mapping relationship; The code generation task is executed by calling the interface parameters.

7. The method according to claim 1, characterized in that, The method further includes: If the code generation task fails, obtain the error information; Based on the error information, the code requirement information is modified to obtain the modified code requirement information; The code generation task is executed based on the modified code requirements information.

8. An electronic device, characterized in that, include: The processor and the memory used to store computer programs that can run on the processor. When the processor is used to run the computer program, it performs the steps of the method according to any one of claims 1 to 7.

9. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.