Code processing method and device based on large model, electronic equipment and storage medium

Through the code processing method based on the big model, the code files are automatically determined and processed, and the problems of complex and inefficient manual operations in the existing technology are solved, and the effect of simplifying operations and improving efficiency is achieved.

CN119597264AActive Publication Date: 2025-03-11BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411643678.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-03-11
Estimated Expiration
2044-11-15

AI Technical Summary

Technical Problem

During the existing code processing, users need to manually open and process the code files, which are complex and inefficient, resulting in poor user experience.

Method used

Using a large-model-based code processing method, the code processing results and dialogue text are obtained by obtaining the dialogue text describing the code processing task, inputting it to the large-model, outputting the code processing results and dialogue text, and displaying it on the interactive interface, automatically determining the code file to be processed.

Benefits of technology

It simplifies user operations, improves code processing efficiency, optimizes user experience, so that users can complete code processing tasks without manually specifying code files, just conducting dialogue operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597264A_ABST
    Figure CN119597264A_ABST
Patent Text Reader

Abstract

The invention provides a code processing method and device based on a large model, electronic equipment and a storage medium, and relates to the technical field of artificial intelligence, in particular to the technical field of natural language processing, deep learning and large models. The method comprises the steps of obtaining a first dialogue text used for describing a code processing task; taking at least one of a newly added code file and an original code file as a target code file corresponding to the code processing task; inputting the first dialogue text into a large model, and outputting a code processing result of the target code file and a second dialogue text for the first dialogue text by the large model; the code processing result and a target dialogue text are displayed on an interaction interface, and the target dialogue text comprises at least one of the first dialogue text and the second dialogue text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to the field of natural language processing, deep learning, and large model technology, and in particular to a code processing method, device, electronic device, storage medium, and computer program product based on a large model. Background Art

[0002] In the related art, the code processing process mostly requires users to open the code file to be processed on the client and manually process the opened code file. The user operation is complicated and the code processing efficiency is low, resulting in a poor user experience in the code processing scenario. Summary of the invention

[0003] The present disclosure proposes a code processing method, device, electronic device, storage medium and computer program product based on a large model.

[0004] According to a first aspect of the present disclosure, a code processing method based on a large model is proposed, including: obtaining a first dialogue text for describing a code processing task; using at least one of a newly added code file and an original code file as a target code file corresponding to the code processing task; inputting the first dialogue text into a large model, and having the large model output a code processing result of the target code file and a second dialogue text for the first dialogue text; displaying the code processing result and the target dialogue text on an interactive interface, wherein the target dialogue text includes at least one of the first dialogue text and the second dialogue text.

[0005] According to a second aspect of the present disclosure, a code processing device based on a large model is proposed, including: a first acquisition module, used to acquire a first dialogue text for describing a code processing task; a second acquisition module, used to use at least one of a newly added code file and an original code file as a target code file corresponding to the code processing task; a processing module, used to input the first dialogue text into a large model, and the large model outputs a code processing result of the target code file and a second dialogue text for the first dialogue text; a display module, used to display the code processing result and the target dialogue text on an interactive interface, wherein the target dialogue text includes at least one of the first dialogue text and the second dialogue text.

[0006] According to a third aspect of the present disclosure, an electronic device is proposed, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the large model-based code processing method proposed in the first aspect above.

[0007] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is proposed, wherein the computer instructions are used to enable the computer to execute the large model-based code processing method proposed in the first aspect above.

[0008] According to a fifth aspect of the present disclosure, a computer program product is proposed, including a computer program, which, when executed by a processor, implements the large model-based code processing method proposed in the first aspect above.

[0009] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0011] Figure 1 A flowchart of a code processing method based on a large model according to an embodiment of the present disclosure;

[0012] Figure 2 A flowchart of a code processing method based on a large model according to another embodiment of the present disclosure;

[0013] Figure 3 A flowchart of a code processing method based on a large model according to another embodiment of the present disclosure;

[0014] Figure 4 A flowchart of a code processing method based on a large model according to another embodiment of the present disclosure;

[0015] Figure 5 A flowchart of a code processing method based on a large model according to another embodiment of the present disclosure;

[0016] Figure 6 A flowchart of a code processing method based on a large model according to another embodiment of the present disclosure;

[0017] Figure 7 A flowchart of a code processing method based on a large model according to another embodiment of the present disclosure;

[0018] Figure 8 A schematic diagram of a code processing method based on a large model according to an embodiment of the present disclosure;

[0019] Fig. 9 is a schematic diagram of an interactive interface of an embodiment of the present disclosure;

[0020] Fig.10 This is a schematic diagram of the structure of a code processing device based on a large model according to an embodiment of the present disclosure;

[0021] Fig.11 A schematic block diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0022] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0023] AI (Artificial Intelligence) is a technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. At present, AI technology has the advantages of high automation, high precision and low cost, and has been widely used.

[0024] NLP (Natural Language Processing) is a science that studies computer systems that can effectively implement natural language communication, especially the software systems therein. It is an important direction in the fields of computer science and artificial intelligence.

[0025] DL (Deep Learning) is a new research direction in the field of ML (Machine Learning). It is a science that learns the inherent laws and representation levels of sample data, enabling machines to have analytical learning capabilities like humans and to recognize data such as text, images, and sounds. It is widely used in speech and image recognition.

[0026] A large model refers to a machine learning model with a large parameter scale and complexity. It requires a lot of computing resources and storage space to train and store, and often requires distributed computing and special hardware acceleration technology. Large models have stronger generalization and expression capabilities. Large models include LLM (Large Language Model). A large language model refers to a deep learning model trained with a large amount of text data, which can generate natural language text or understand the meaning of language text. Large language models can handle a variety of natural language tasks, such as text classification, question and answer, dialogue, etc., and are an important path to artificial intelligence.

[0027] Figure 1FIG. 1 is a flow chart of a code processing method based on a large model according to an embodiment of the present disclosure. Figure 1 As shown, the method includes:

[0028] S101, obtaining a first dialogue text for describing a code processing task.

[0029] It should be noted that the execution subject of the code processing method based on the large model in the embodiment of the present disclosure may be a hardware device with data information processing capabilities and / or the necessary software required to drive the hardware device to work. Optionally, the execution subject may include a workstation, a server, a computer, a user terminal and other intelligent devices. Among them, the user terminal includes but is not limited to a mobile phone, a computer, an intelligent voice interaction device, an intelligent home appliance, a vehicle-mounted terminal, etc.

[0030] It should be noted that there are not too many restrictions on the task types of code processing tasks. For example, they may include code adjustment tasks (such as code addition, deletion, and modification), code testing tasks (such as code unit testing), code verification tasks (such as code security verification), code repair tasks (such as code vulnerability repair), etc. Code security verification includes code vulnerability detection, etc.

[0031] It should be noted that the first dialogue text is a text composed of natural language, and there are no excessive restrictions on the first dialogue text. For example, it can be composed of at least one language such as Chinese, English, etc.

[0032] For example, the first dialogue text may include "Help me add some logs and handle exceptions", "Write me a unit test code and improve the test coverage", "Help me perform unit testing on xx1", "Help me perform vulnerability scanning on xx1", "Help me perform vulnerability repair on xx1", etc. "xx1" is used to represent a code file.

[0033] In one embodiment, obtaining the first dialogue text for describing the code processing task includes extracting the first dialogue text from the input operation in response to detecting an input operation for the dialogue text. For example, an input box for inputting the dialogue text may be displayed on the interactive interface, and the user may perform an input operation for the dialogue text in the input box. Accordingly, the client may extract the first dialogue text from the input operation in response to detecting the input operation for the dialogue text.

[0034] In one embodiment, obtaining the first dialogue text for describing the code processing task includes collecting voice information of the user, performing text recognition on the voice information, and obtaining the first dialogue text. For example, an icon for recording voice information may be displayed on the interactive interface, and the user may click the icon and speak. Correspondingly, the client may collect the user's voice information in response to the click operation on the icon, perform text recognition on the voice information, and obtain the first dialogue text.

[0035] S102: Use at least one of the newly added code file and the original code file as a target code file corresponding to the code processing task.

[0036] It should be noted that the target code file refers to the code file to be processed by the code processing task, and the target code file may include at least one of a newly added code file and an original code file, and the target code file is at least one. The newly added code file refers to the code file added during the processing of the code processing task, and needs to be obtained through the newly added code file. The original code file refers to the code file that already exists before the code processing task is processed, such as any code file in the local storage space.

[0037] It is understandable that different code processing tasks may correspond to different target code files.

[0038] S103, inputting the first dialogue text into the large model, and the large model outputting the code processing result of the target code file and the second dialogue text for the first dialogue text.

[0039] It should be noted that the large model can be implemented by any large model in the relevant technology, and no further limitation is given here. For example, it can be a Transformer model, and it should be noted that the Transformer model is a neural network model based on the self-attention mechanism. For example, the large model can be a large language model. For example, the large model is deployed in a server.

[0040] It should be noted that there are no excessive restrictions on the code processing results.

[0041] Exemplarily, taking a code adjustment task as an example, the code processing result includes a code adjustment result, such as newly added code, deleted code, code before modification, code after modification, the position of the adjusted code in the code file, etc.

[0042] Exemplarily, taking a code testing task as an example, the code processing result includes a code testing result, such as whether the code file passes the test, the test indicators of the code file, a code testing log, and the like.

[0043] Exemplarily, taking the code verification task as an example, the code processing results include code verification results, such as whether the code file passes the verification, the verification indicators of the code file, whether there are vulnerabilities in the code file, the number of vulnerabilities in the code file, the risk level of the vulnerability, the code with vulnerabilities, the location of the code with vulnerabilities in the code file, the code verification log, etc.

[0044] Exemplarily, taking a code repair task as an example, the code processing result includes a code repair result, such as a code repair strategy, a code repair log, and the like.

[0045] Exemplarily, the code processing result includes an initial processing result and a final processing result, wherein the initial processing result refers to the initial processing result of the code processing task, and the final processing result refers to the final processing result of the code processing task. The initial processing result and the final processing result may be different. For example, taking the code generation task as an example, the initial processing result may include the initial code, and the final processing result may include the final code.

[0046] In one embodiment, the method further includes determining the task type of the code processing task based on the first dialogue text through the big model, determining the target tool from multiple candidate tools based on the task type through the big model, calling the target tool through the big model, and generating the code processing result through the target tool. It should be noted that the multiple candidate tools include the target tool, and the target tool is at least one. There are no excessive restrictions on the candidate tools and the target tool, for example, they may include code generation tools, code testing tools, code verification tools, code repair tools, etc.

[0047] In one embodiment, the method further includes generating an initial processing result based on the first conversation text through a large model, and adjusting the initial processing result through the large model to obtain a final processing result.

[0048] Exemplarily, the method also includes, in response to the code processing task including a code generation task, calling a code generation tool through the big model, and generating initial code through the code generation tool, calling a code verification tool through the big model to verify the initial code, and in response to the verification result of the initial code indicating that the initial code has not passed the verification, calling a code repair tool through the big model, and repairing the initial code through the code repair tool to obtain the final code.

[0049] Alternatively, in response to the verification result of the initial code indicating that the initial code has not passed the verification, the code generation tool is re-called through the large model, and candidate codes are generated through the code generation tool until the candidate code passes the verification, and the candidate code that passes the verification is used as the final code.

[0050] It should be noted that the second dialogue text is a text composed of natural language, and there are no excessive restrictions on the second dialogue text. For example, it can be composed of at least one language such as Chinese, English, etc.

[0051] For example, the second dialogue text may include "Of course, I can help you add logging functionality and better exception handling in xx1. We will use xx2 to add logging, and add xx3 around key operations to handle possible exceptions. The following are modifications to xx1." "xx2" is used to represent the code generation tool, and "xx3" is used to represent the code block.

[0052] For example, the second dialogue text may include "The above are all the vulnerabilities I scanned and repaired for you. Finally, let's make a summary. In this task, a files were detected and c vulnerabilities were found in b files. We tried to automatically repair d of them. Next, you can view the summary information in the chart below and use the repair results I gave by clicking the Adopt button, or you can refer to the vulnerability details and repair suggestions to try manual repair."

[0053] In one embodiment, the method also includes obtaining task information of the code processing task based on the first dialogue text through the big model, adding the code processing results and / or task progress to the task information through the big model, and generating a second dialogue text based on the task information through the big model.

[0054] In some examples, the method further includes adding the second dialogue text to the task information.

[0055] It should be noted that there are not too many restrictions on task information. For example, it may include task type, file information of the target code file corresponding to the code processing task (such as file name), code processing results, task progress (such as unprocessed, processing, processed), target dialogue text, etc.

[0056] In some examples, a second dialogue text is generated based on task information using a large model, including determining a target dialogue template from multiple candidate dialogue templates based on a task type of a code-processing task using a large model, and generating a second dialogue text based on the target dialogue template and the task information using a large model.

[0057] S104, displaying the code processing result and the target dialogue text on the interactive interface, wherein the target dialogue text includes at least one of the first dialogue text and the second dialogue text.

[0058] It should be noted that the display areas of the code processing result and the target dialogue text on the interactive interface may be different. For example, the interactive interface includes a first display area and a second display area. The code processing result can be displayed in the first display area, and the target dialogue text can be displayed in the second display area. Fig. 9 As shown, the first display area is located in the left area of ​​the interactive interface, and the second display area is located in the right area of ​​the interactive interface (such as a sidebar).

[0059] Exemplarily, taking the code adjustment task as an example, the interactive interface includes a coding area and a dialogue area. The code adjustment result can be displayed in the coding area, and the target dialogue text can be displayed in the dialogue area.

[0060] Exemplarily, the display style of the code adjustment result is a Diff (Differences) style, which is convenient for the user to understand the code adjustment situation more intuitively.

[0061] Exemplarily, the code processing results and / or target dialogue text can be displayed on the interactive interface in a streaming display mode. It should be noted that the streaming display mode refers to displaying the display content in multiple times and step by step, such as line by line. Compared with displaying the complete display content to the user at one time, it can respond to the user's code processing needs more quickly and optimize the user experience in the code processing scenario.

[0062] The code processing method based on the big model proposed in the present disclosure obtains a first dialogue text for describing a code processing task, takes at least one of a newly added code file and an original code file as a target code file corresponding to the code processing task, inputs the first dialogue text into the big model, and the big model outputs a code processing result of the target code file and a second dialogue text for the first dialogue text, and displays the code processing result and the target dialogue text on an interactive interface, wherein the target dialogue text includes at least one of the first dialogue text and the second dialogue text. Thus, the newly added code file and / or the original code file can be used as the code file to be processed, and the automatic determination of the code file to be processed can be realized. The user only needs to perform a dialogue operation, and there is no need for the user to manually add a code file, and there is no need for the user to specify (such as select, open) the code file to be processed on the client, which simplifies the user operation. In addition, the code processing result and the second dialogue text of the target code file can be obtained based on the first dialogue text through the big model, and the code processing task can be automatically processed, which improves the code processing efficiency, and the code processing result and the target dialogue text can be displayed on the interactive interface, which is convenient for the user to more intuitively understand the processing of the code processing task, and optimizes the user experience in the code processing scenario.

[0063] In the above embodiment, in step S102, at least one of the newly added code file and the original code file is used as the target code file corresponding to the code processing task. Figure 2 Further understanding, Figure 2 FIG. 1 is a flow chart of a code processing method based on a large model according to another embodiment of the present disclosure. Figure 2 As shown, the method includes:

[0064] S201, obtaining a first dialogue text for describing a code processing task.

[0065] The relevant contents of step S201 can be found in the above embodiment and will not be described again here.

[0066] S202, in response to the code processing task meeting the set condition, adding a code file, and using the newly added code file as a target code file.

[0067] It should be noted that there are no excessive restrictions on the setting conditions.

[0068] In one embodiment, the method further includes determining that the code processing task meets the set condition in response to the task type of the code processing task being a set type. Thus, when the task type of the code processing task is a set type, a code file can be added and the added code file is used as the code file to be processed.

[0069] Exemplarily, the method further includes, in response to the code processing task including at least one of generating test code and adding a new code template, determining that the code processing task meets the set condition. Thus, in the case where the code processing task includes generating test code and / or adding a new code template, a new code file can be added and the new code file is used as the code file to be processed.

[0070] S203, in response to the code processing task not meeting the set condition, determining a target code file from a plurality of original code files.

[0071] In one embodiment, determining the target code file from the plurality of original code files includes determining a search parameter for the target code file based on the first dialog text, and determining the target code file from the plurality of original code files based on the search parameter. Thus, the search parameter may be determined taking into account the first dialog text to determine the target code file from the plurality of original code files.

[0072] It should be noted that there are no excessive restrictions on the search parameters, for example, they may include the identifier, storage path, file type, etc. of the target code file.

[0073] In some examples, determining a search parameter for the target code file based on the first dialog text includes extracting the search parameter from the first dialog text.

[0074] In some examples, based on the first dialog text, determining the search parameters of the target code file includes performing semantic analysis on the first dialog text through a large model to obtain the search parameters.

[0075] S204, inputting the first dialogue text into the large model, and having the large model output the code processing result of the target code file and the second dialogue text for the first dialogue text.

[0076] S205, displaying the code processing result and the target dialogue text on the interactive interface, wherein the target dialogue text includes at least one of the first dialogue text and the second dialogue text.

[0077] The relevant contents of steps S204-S205 can be found in the above embodiment and will not be repeated here.

[0078] The code processing method based on the large model proposed in the present disclosure adds a new code file in response to the code processing task meeting the set conditions, and uses the newly added code file as the target code file. In response to the code processing task not meeting the set conditions, the target code file is determined from multiple original code files. Thus, it is possible to identify whether the code processing task meets the set conditions to determine whether a new code file needs to be added. For example, when the code processing task meets the set conditions, a new code file is added, and the newly added code file is used as the code file to be processed. When the code processing task does not meet the set conditions, the code file to be processed is determined from multiple original code files.

[0079] Based on any of the above embodiments, the method further includes displaying the target code file on the interactive interface in response to the target code file not being displayed on the interactive interface, and continuing to display the target code file on the interactive interface in response to the target code file being displayed on the interactive interface. Thus, the code file to be processed can be automatically displayed on the interactive interface without the user having to manually open the code file to be processed on the client, thereby simplifying the user operation.

[0080] Based on any of the above embodiments, displaying the code processing result on the interactive interface includes displaying the code adjustment result in the display area of ​​the target code file on the interactive interface in response to the code processing result including the code adjustment result. Thus, the code adjustment result can be displayed in the display area of ​​the code file to be processed on the interactive interface, so that the user can understand the code adjustment situation more intuitively.

[0081] For example, in response to the code processing result of the target code file A including the generated code block 1, the code block 1 may be displayed in green in the display area of ​​the target code file A on the interactive interface.

[0082] For example, in response to the code processing result of the target code file B including the deleted code block 2, the code block 2 may be displayed in red in the display area of ​​the target code file B on the interactive interface.

[0083] In the above embodiment, regarding the display of the code processing result on the interactive interface in step S104, it can be combined with Figure 3 Further understanding, Figure 3 FIG. 1 is a flow chart of a code processing method based on a large model according to another embodiment of the present disclosure. Figure 3 As shown, the method includes:

[0084] S301, obtaining a first dialogue text for describing a code processing task.

[0085] S302: Use at least one of the newly added code file and the original code file as a target code file corresponding to the code processing task.

[0086] S303: In response to the target code file not being displayed on the interactive interface, display the target code file on the interactive interface.

[0087] S304: In response to the target code file being displayed on the interactive interface, continue to display the target code file on the interactive interface.

[0088] S305, inputting the first dialogue text into the large model, and having the large model output the code processing result of the target code file and the second dialogue text for the first dialogue text.

[0089] The relevant contents of steps S301 - S305 can be found in the above embodiment and will not be described again here.

[0090] S306: In response to the code processing result including the code adjustment result, based on the position of the code adjustment result in the target code file, determine a target display area of ​​the code adjustment result on the interactive interface.

[0091] S307, displaying the code adjustment result in the target display area.

[0092] It should be noted that the target display area of ​​the code adjustment result on the interactive interface can be located within the display area of ​​the target code file on the interactive interface, or outside the display area of ​​the target code file on the interactive interface, and no further restrictions are made here.

[0093] In one embodiment, based on the position of the code adjustment result in the target code file, a target display area of ​​the code adjustment result on the interactive interface is determined, including obtaining the position of the candidate code snippet in the target code file, and a mapping relationship between the candidate code snippet and the candidate display area on the interactive interface, and obtaining a candidate display area having a mapping relationship with the position of the code adjustment result in the target code file as the target display area.

[0094] In one embodiment, based on the position of the code adjustment result in the target code file, determining the target display area of ​​the code adjustment result on the interactive interface includes obtaining, based on the position of the code adjustment result in the target code file, a candidate code segment adjacent to the code adjustment result in the target code file as the target code segment, and using the surrounding area of ​​the display area of ​​the target code segment on the interactive interface as the target display area. It should be noted that there are no excessive restrictions on the surrounding area, for example, it may include a left area, a right area, etc.

[0095] It should be noted that there are no excessive restrictions on the position of the code adjustment result in the target code file, for example, the position may include the code line number.

[0096] S308, displaying the target dialogue text on the interactive interface, wherein the target dialogue text includes at least one of the first dialogue text and the second dialogue text.

[0097] The relevant contents of step S308 can be found in the above embodiment and will not be repeated here.

[0098] The code processing method based on the large model proposed in the present disclosure, in response to the code processing result including the code adjustment result, determines the target display area of ​​the code adjustment result on the interactive interface based on the position of the code adjustment result in the target code file, and displays the code adjustment result in the target display area. Thus, the position of the code adjustment result in the code file to be processed can be taken into consideration to determine the target display area of ​​the code adjustment result to display the code adjustment result, thereby improving the flexibility of displaying the code adjustment result.

[0099] In the above embodiment, regarding the display of the code processing result and the target dialogue text on the interactive interface in step S104, it can be combined with Figure 4 Further understanding, Figure 4 FIG. 1 is a flow chart of a code processing method based on a large model according to another embodiment of the present disclosure. Figure 4 As shown, the method includes:

[0100] S401, obtaining a first dialogue text for describing a code processing task.

[0101] S402: Use at least one of the newly added code file and the original code file as a target code file corresponding to the code processing task.

[0102] S403, inputting the first dialogue text into the large model, and having the large model output the code processing result of the target code file and the second dialogue text for the first dialogue text.

[0103] The relevant contents of steps S401 - S403 can be found in the above embodiment and will not be described again here.

[0104] S404: In response to there being multiple code processing tasks, the code processing results and the target dialogue text corresponding to the same code processing task are displayed in association on the interactive interface.

[0105] It should be noted that the code processing result corresponding to the code processing task refers to the code processing result of the target code file corresponding to the code processing task.

[0106] For example, the code processing tasks include code processing tasks 1 to 3. Taking code processing task 1 as an example, the code processing result corresponding to code processing task 1 and the target dialogue text corresponding to code processing task 1 can be displayed in association on the interactive interface. Taking code processing task 2 as an example, the code processing result corresponding to code processing task 2 and the target dialogue text corresponding to code processing task 2 can be displayed in association on the interactive interface. Taking code processing task 3 as an example, the code processing result corresponding to code processing task 3 and the target dialogue text corresponding to code processing task 3 can be displayed in association on the interactive interface.

[0107] It should be noted that there are no excessive restrictions on the specific manner of associating and displaying the code processing results and target dialogue text corresponding to the same code processing task.

[0108] Exemplarily, the code processing result and the target dialogue text corresponding to the same code processing task are displayed in association, including, in response to detecting a first operation on the code processing result corresponding to the i-th code processing task, displaying the target dialogue text corresponding to the i-th code processing task on the interactive interface. It should be noted that there are no excessive restrictions on the first operation, for example, it may include a mouse hover operation, a click operation, etc.

[0109] Exemplarily, the code processing results and target dialogue text corresponding to the same code processing task are displayed in association, including displaying the code processing result corresponding to the ith code processing task on the interactive interface in response to detecting a first operation on the target dialogue text corresponding to the ith code processing task.

[0110] Exemplarily, the code processing result and the target dialogue text corresponding to the same code processing task are displayed in association, including establishing a hyperlink between the code processing result and the target dialogue text corresponding to the same code processing task.

[0111] Exemplarily, the code processing results and target dialogue text corresponding to the same code processing task are displayed in association, including displaying the target dialogue text corresponding to the ith code processing task in an area surrounding the display area of ​​the code processing result corresponding to the ith code processing task on the interactive interface.

[0112] The code processing method based on the large model proposed in the present disclosure, in response to the fact that there are multiple code processing tasks, displays the code processing results and target dialogue text corresponding to the same code processing task in association on the interactive interface. Thus, in the case of multiple code processing tasks, the code processing results and target dialogue text corresponding to the same code processing task can be displayed in association on the interactive interface, making it easier for users to distinguish the code processing results and target dialogue texts corresponding to each of the multiple code processing tasks, simplifying user operations and optimizing the user experience in the code processing scenario.

[0113] Based on any of the above embodiments, the method further includes generating a task list based on the task information of each of the multiple code processing tasks in response to the multiple code processing tasks, and displaying the task list on the interactive interface. Thus, in the case of multiple code processing tasks, the task information of each of the multiple code processing tasks can be taken into consideration to generate and display the task list, so that the user can more intuitively understand the task information of each of the multiple code processing tasks, thereby optimizing the user experience in the code processing scenario.

[0114] Exemplarily, the i-th list item of the task list may be generated based on the task information of the i-th code processing task (such as the first dialogue text and the task progress), wherein the i-th list item is used to represent the i-th code processing task.

[0115] In the above embodiment, regarding the display of the code processing result and the target dialogue text on the interactive interface in step S104, it can be combined with Figure 5 Further understanding, Figure 5 FIG. 1 is a flow chart of a code processing method based on a large model according to another embodiment of the present disclosure. Figure 5 As shown, the method includes:

[0116] S501, obtaining a first dialogue text for describing a code processing task.

[0117] S502: Use at least one of the newly added code file and the original code file as a target code file corresponding to the code processing task.

[0118] S503, inputting the first dialogue text into the large model, and having the large model output the code processing result of the target code file and the second dialogue text for the first dialogue text.

[0119] S504: In response to there being multiple code processing tasks, generate a task list based on task information of each of the multiple code processing tasks.

[0120] S505, displaying a task list on the interactive interface.

[0121] The relevant contents of steps S501-S505 can be found in the above embodiment and will not be repeated here.

[0122] S506: In response to detecting a selection operation on a code processing task in the task list, obtaining the code processing task selected by the selection operation.

[0123] S507, displaying the code processing result and target dialogue text corresponding to the selected code processing task on the interactive interface.

[0124] It should be noted that there are not too many restrictions on the selection operation, for example, it may include a click operation, a mouse hover operation, etc.

[0125] Exemplarily, the i-th list item of the task list can be generated based on the task information of the i-th code processing task, wherein the i-th list item is used to represent the i-th code processing task, and in response to detecting a selection operation on the i-th list item in the task list, the i-th code processing task can be selected as the code processing task selected by the selection operation.

[0126] For example, a task list can be displayed on the interactive interface, where the task list includes 10 list items. In response to detecting a selection operation on the third list item in the task list, the third code processing task is selected as the code processing task selected by the selection operation, and the code processing result and target dialogue text corresponding to the third code processing task are displayed on the interactive interface.

[0127] The code processing method based on a large model proposed in the present disclosure, in response to detecting a selection operation for a code processing task in a task list, obtains the code processing task selected by the selection operation, and displays the code processing result and target dialogue text corresponding to the selected code processing task on an interactive interface. Thus, the user's selection operation for a code processing task in the task list can trigger the display of the code processing result and the target dialogue text, that is, the code processing result and the target dialogue text corresponding to the code processing task selected by the user are displayed on the interactive interface, which can realize personalized display of the code processing result and the target dialogue text, and optimize the user experience in the code processing scenario.

[0128] Figure 6 FIG. 1 is a flow chart of a code processing method based on a large model according to another embodiment of the present disclosure. Figure 6 As shown, the method includes:

[0129] S601, obtaining a first dialogue text for describing a code processing task.

[0130] S602: Use at least one of the newly added code file and the original code file as a target code file corresponding to the code processing task.

[0131] S603, inputting the first dialogue text into the large model, and having the large model output the code processing result of the target code file and the second dialogue text for the first dialogue text.

[0132] S604, displaying the code processing result and the target dialogue text on the interactive interface, wherein the target dialogue text includes at least one of the first dialogue text and the second dialogue text.

[0133] The relevant contents of steps S601-S604 can be found in the above embodiment and will not be repeated here.

[0134] S605, displaying the target page component on the interactive interface, wherein there is a corresponding relationship between the target page component and the code processing result.

[0135] S606: In response to detecting a setting operation for a target page component, determining whether a code processing result corresponding to the target page component is effective or invalid.

[0136] It should be noted that there are no excessive restrictions on setting operations, for example, they may include click operations.

[0137] In one embodiment, the target page component includes a first page component, and there is a one-to-one correspondence between the first page component and the code processing result. In response to detecting a setting operation for the target page component, it is determined whether the code processing result corresponding to the target page component is effective or invalid, including responding to detecting a setting operation for the first page component, determining that the code processing result corresponding to the first page component is effective.

[0138] Exemplarily, the first page component includes icons such as "adopt", "accept", and "agree". Fig. 9 As shown, the first page component is the "Adopt" icon.

[0139] In one embodiment, the target page component includes a second page component, and there is a one-to-one correspondence between the second page component and the code processing result. In response to detecting a setting operation for the target page component, it is determined whether the code processing result corresponding to the target page component is effective or invalid, including responding to detecting a setting operation for the second page component, determining that the code processing result corresponding to the second page component is invalid.

[0140] Exemplarily, the second page component includes icons such as "abandon", "reject" and the like. Fig. 9 As shown, the second page component is a "discard" icon.

[0141] In one embodiment, the target page component includes a third page component, and in response to detecting a setting operation for the target page component, determining whether a code processing result corresponding to the target page component is effective or invalid includes determining that each code processing result is effective in response to detecting a setting operation for the third page component. It can be understood that there is a corresponding relationship between the third page component and each code processing result.

[0142] Exemplarily, the third page component includes icons such as "Adopt All", "Accept All", and "Agree All". Fig. 9 As shown, the third page component is the "Adopt All" icon.

[0143] In one embodiment, the target page component includes a fourth page component, and in response to detecting a setting operation for the target page component, determining whether a code processing result corresponding to the target page component is effective or invalid includes, in response to detecting a setting operation for the fourth page component, determining that each code processing result is invalid. It can be understood that there is a corresponding relationship between the fourth page component and each code processing result.

[0144] Exemplarily, the fourth page component includes icons such as "discard all" and "reject all". Fig. 9 As shown, the fourth page component is the "Discard All" icon.

[0145] In one embodiment, after determining that the code processing result is effective, it also includes saving the target code file in response to the target code file being a newly added code file, updating the target code file based on the code adjustment result in response to the code processing result including the code adjustment result, and repairing the target code file according to the code repair strategy in response to the code processing result including the code repair strategy. Thus, after determining that the code processing result is effective, the newly added code file can be saved, and / or the code file to be processed can be updated in consideration of the code adjustment result to update the code file, and / or the code file to be processed can be repaired in consideration of the code repair strategy to repair the code file.

[0146] In some examples, based on the code adjustment results, the target code file is updated, including storing the newly added code to the target code file in response to the code adjustment results including the newly added code, deleting the deleted code from the target code file in response to the code adjustment results including the deleted code, replacing the pre-modification code in the target code file with the modified code in response to the code adjustment results including the pre-modification code and the modified code, and deleting the target code file in response to the code adjustment results indicating deletion of the target code file.

[0147] In one embodiment, after determining that the code processing result is invalid, the method further includes deleting the target code file in response to the target code file being a newly added code file, and maintaining the target code file unchanged in response to the target code file being an original code file. Thus, after determining that the code processing result is invalid, the newly added code file can be deleted, and / or the original code file can be maintained unchanged.

[0148] The code processing method based on the large model proposed in the present disclosure displays the target page component on the interactive interface, wherein there is a corresponding relationship between the target page component and the code processing result, and in response to detecting the setting operation for the target page component, determines whether the code processing result corresponding to the target page component is effective or invalid. Thus, the effectiveness or invalidity of the code processing result can be determined based on the setting operation of the user for the target page component, that is, whether the code processing result is effective can be determined by taking into account user feedback, and the personalized setting of whether the code processing result is effective can be realized, which optimizes the user experience in the code processing scenario.

[0149] Figure 7 FIG. 1 is a flow chart of a code processing method based on a large model according to another embodiment of the present disclosure. Figure 7 As shown, the method includes:

[0150] S701, obtaining a first dialogue text for describing a code processing task.

[0151] S702: Use at least one of the newly added code file and the original code file as a target code file corresponding to the code processing task.

[0152] The relevant contents of steps S701-S702 can be found in the above embodiment and will not be repeated here.

[0153] S703, input the first dialogue text into the large model, and perform intent recognition on the first dialogue text through the large model to obtain the user intent.

[0154] It should be noted that the intent recognition of the first dialogue text through the large model can be implemented by any intent recognition method in the relevant technology, and no excessive restrictions are made here.

[0155] S704, splitting the original task described in the first dialogue text based on the user intention through the large model to obtain N code processing tasks, where N is a positive integer.

[0156] In one embodiment, the original task described in the first dialogue text is split based on the user intent through the big model to obtain N code processing tasks, including splitting the original task into N code processing tasks of a single task category based on the user intent through the big model.

[0157] For example, the first dialogue text is "Write a unit test code for me, and perform unit test on xx1". The big model can be used to identify the intent of the first dialogue text, and obtain the user's intention of generating unit test code and performing unit test on xx1. The big model can also be used to split the original task described in the first dialogue text based on the user's intention to obtain code processing tasks 1 and 2, where code processing task 1 is a code adjustment task for generating unit test code, and code processing task 2 is a code testing task for performing unit test on xx1.

[0158] S705, processing the i-th code processing task through the large model to obtain the code processing result and the second dialogue text corresponding to the i-th code processing task, where i is a positive integer not greater than N.

[0159] In one embodiment, the processing process of the large model for multiple code processing tasks is parallel, that is, the large model can generate the code processing results corresponding to the multiple code processing tasks and the second dialogue texts of the multiple code processing tasks in parallel.

[0160] It should be noted that the relevant contents of step S705 can refer to the relevant contents of step S103, which will not be repeated here.

[0161] S706, displaying the code processing result and the target dialogue text on the interactive interface, wherein the target dialogue text includes at least one of the first dialogue text and the second dialogue text.

[0162] The relevant contents of step S706 can be found in the above embodiment and will not be described again here.

[0163] The code processing method based on a large model proposed in the present disclosure performs intent recognition on a first dialogue text through a large model to obtain user intent, splits the original task described in the first dialogue text based on the user intent through the large model to obtain N code processing tasks, where N is a positive integer, and processes the i-th code processing task through the large model to obtain a code processing result corresponding to the i-th code processing task and a second dialogue text, where i is a positive integer not greater than N. Thus, the intent recognition of the first dialogue text can be performed through a large model to perform task splitting to obtain multiple code processing tasks, and the multiple code processing tasks can be processed through the large model, which is suitable for processing scenarios of complex code processing tasks. Users only need to perform dialogue operations, and there is no need for users to split tasks by themselves, which simplifies user operations and optimizes user experience in code processing scenarios.

[0164] Based on any of the above embodiments, Figure 8 As shown, the client can obtain the first dialogue text and the target code file, and send the first dialogue text to the server.

[0165] The server can input the first dialogue text into the big model, perform intent recognition on the first dialogue text through the big model to obtain user intent, split the original task described in the first dialogue text based on the user intent through the big model to obtain N code processing tasks, call the target tool through the big model to process the ith code processing task, obtain the code processing result and the second dialogue text corresponding to the ith code processing task, and send the code processing result and the second dialogue text output by the big model to the client.

[0166] The client may display the code processing result, the second dialog text and the target page component on the interactive interface, and in response to detecting a setting operation for the target page component, determine whether the code processing result corresponding to the target page component is effective.

[0167] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0168] According to an embodiment of the present disclosure, the present disclosure also provides a large model-based code processing device for implementing the above-mentioned large model-based code processing method.

[0169] Fig.10 It is a block diagram of a code processing device based on a large model according to an embodiment of the present disclosure.

[0170] like Fig.10 As shown, the code processing device 1000 based on the large model includes: a first acquisition module 1001, a second acquisition module 1002, a processing module 1003 and a display module 1004.

[0171] A first acquisition module 1001 is used to acquire a first dialogue text for describing a code processing task;

[0172] The second acquisition module 1002 is used to use at least one of the newly added code file and the original code file as the target code file corresponding to the code processing task;

[0173] A processing module 1003 is used to input the first dialogue text into a large model, and the large model outputs a code processing result of the target code file and a second dialogue text for the first dialogue text;

[0174] The display module 1004 is used to display the code processing result and the target dialogue text on the interactive interface, wherein the target dialogue text includes at least one of the first dialogue text and the second dialogue text.

[0175] In one embodiment of the present disclosure, the display module 1004 is further used to: in response to the target code file not being displayed on the interactive interface, display the target code file on the interactive interface; in response to the target code file being displayed on the interactive interface, continue to display the target code file on the interactive interface.

[0176] In one embodiment of the present disclosure, the display module 1004 is further used to: in response to the code processing result including a code adjustment result, display the code adjustment result in a display area of ​​the target code file on the interactive interface.

[0177] In one embodiment of the present disclosure, the display module 1004 is also used to: in response to the code processing result including a code adjustment result, determine a target display area of ​​the code adjustment result on the interactive interface based on the position of the code adjustment result in the target code file; and display the code adjustment result in the target display area.

[0178] In one embodiment of the present disclosure, the display module 1004 is further used to: in response to the number of code processing tasks being multiple, display the code processing results and target dialogue text corresponding to the same code processing task in an associated manner on the interactive interface.

[0179] In one embodiment of the present disclosure, the display module 1004 is further used to: in response to the number of code processing tasks being multiple, generate a task list based on task information of each of the multiple code processing tasks; and display the task list on the interactive interface.

[0180] In one embodiment of the present disclosure, the display module 1004 is also used to: in response to detecting a selection operation for a code processing task in the task list, obtain the code processing task selected by the selection operation; and display the code processing result and target dialogue text corresponding to the selected code processing task on the interactive interface.

[0181] In one embodiment of the present disclosure, the display module 1004 is further used to: display a target page component on the interactive interface, wherein there is a corresponding relationship between the target page component and the code processing result; in response to detecting a setting operation for the target page component, determine whether the code processing result corresponding to the target page component is effective or invalid.

[0182] In one embodiment of the present disclosure, after determining that the code processing result is effective, the processing module 1003 is further used to: in response to the target code file being a newly added code file, save the target code file; in response to the code processing result including a code adjustment result, update the target code file based on the code adjustment result; in response to the code processing result including a code repair strategy, repair the target code file according to the code repair strategy.

[0183] In one embodiment of the present disclosure, after determining that the code processing result is invalid, the processing module 1003 is also used to: in response to the target code file being a newly added code file, delete the target code file; in response to the target code file being an original code file, maintain the target code file unchanged.

[0184] In one embodiment of the present disclosure, the second acquisition module 1002 is further used to: in response to the code processing task meeting the set conditions, add a new code file and use the newly added code file as the target code file; in response to the code processing task not meeting the set conditions, determine the target code file from multiple original code files.

[0185] In one embodiment of the present disclosure, the second acquisition module 1002 is further used to: in response to the code processing task including at least one of generating a test code and adding a new code template, determine that the code processing task meets the set condition.

[0186] In one embodiment of the present disclosure, the second acquisition module 1002 is further used to: determine the search parameters of the target code file based on the first dialogue text; and determine the target code file from the plurality of original code files based on the search parameters.

[0187] In one embodiment of the present disclosure, the processing module 1003 is also used to: perform intent recognition on the first dialogue text through the large model to obtain user intent; split the original task described in the first dialogue text based on the user intent through the large model to obtain N code processing tasks, where N is a positive integer; process the i-th code processing task through the large model to obtain the code processing result and the second dialogue text corresponding to the i-th code processing task, where i is a positive integer not greater than N.

[0188] The code processing device based on the big model proposed in the present disclosure obtains a first dialogue text for describing a code processing task, takes at least one of a newly added code file and an original code file as a target code file corresponding to the code processing task, inputs the first dialogue text into the big model, and the big model outputs a code processing result of the target code file and a second dialogue text for the first dialogue text, and displays the code processing result and the target dialogue text on an interactive interface, wherein the target dialogue text includes at least one of the first dialogue text and the second dialogue text. Thus, the newly added code file and / or the original code file can be used as the code file to be processed, and the automatic determination of the code file to be processed can be realized. The user only needs to perform a dialogue operation, and there is no need for the user to manually add a code file, and there is no need for the user to specify (such as select, open) the code file to be processed on the client, which simplifies the user operation. In addition, the code processing result and the second dialogue text of the target code file can be obtained based on the first dialogue text through the big model, and the code processing task can be automatically processed, which improves the code processing efficiency, and the code processing result and the target dialogue text can be displayed on the interactive interface, which is convenient for the user to more intuitively understand the processing of the code processing task, and optimizes the user experience in the code processing scenario.

[0189] According to an embodiment of the present disclosure, the present disclosure also proposes an electronic device, a readable storage medium, and a computer program product.

[0190] Fig.11 A schematic block diagram of an example electronic device 1100 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0191] like Fig.11 As shown, the device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1102 or a computer program loaded from a storage unit 1108 into a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the device 1100 can also be stored. The computing unit 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.

[0192] A number of components in the device 1100 are connected to the I / O interface 1105, including: an input unit 1106, such as a keyboard, a mouse, etc.; an output unit 1106, such as various types of displays, speakers, etc.; a storage unit 1108, such as a disk, an optical disk, etc.; and a communication unit 1109, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1109 allows the device 1100 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0193] The computing unit 1101 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1101 performs the various methods and processes described above, such as a code processing method based on a large model. For example, in some embodiments, the code processing method based on a large model may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 1108. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1100 via the ROM 1102 and / or the communication unit 1109. When the computer program is loaded into the RAM 1103 and executed by the computing unit 1101, one or more steps of the code processing method based on the large model described above may be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured to execute the large model-based code processing method in any other appropriate manner (eg, by means of firmware).

[0194] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0195] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be presented to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0196] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0197] To propose interactions with a user account, the systems and techniques described herein may be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user account; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user account can propose input to the computer. Other types of devices may also be used to propose interactions with the user account; for example, feedback proposed to the user account may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user account may be received in any form (including acoustic input, voice input, or tactile input).

[0198] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user account computer with a graphical user account interface or a web browser through which a user account can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0199] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0200] According to an embodiment of the present disclosure, the present disclosure further provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the steps of the large model-based code processing method described in the above embodiment of the present disclosure are implemented.

[0201] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0202] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A code processing method based on a large model, comprising: Get the first dialogue text for describing the code processing task; Using at least one of the newly added code file and the original code file as the target code file corresponding to the code processing task; Inputting the first dialogue text into a large model, and having the large model output a code processing result of the target code file and a second dialogue text for the first dialogue text; The code processing result and the target dialogue text are displayed on an interactive interface, wherein the target dialogue text includes at least one of the first dialogue text and the second dialogue text.

2. The method according to claim 1, wherein: The method further comprises: In response to the object code file not being displayed on the interactive interface, displaying the object code file on the interactive interface; In response to the object code file being displayed on the interactive interface, continue to display the object code file on the interactive interface.

3. The method according to claim 2, wherein: The displaying of the code processing result on the interactive interface includes: In response to the code processing result including a code adjustment result, the code adjustment result is displayed in a display area of ​​the target code file on the interactive interface.

4. The method according to claim 1, wherein: The displaying of the code processing result on the interactive interface includes: In response to the code processing result including a code adjustment result, determining a target display area of ​​the code adjustment result on the interactive interface based on a position of the code adjustment result in the target code file; The code adjustment result is displayed in the target display area.

5. The method according to claim 1, wherein: The displaying of the code processing result and the target dialogue text on the interactive interface includes: In response to the fact that there are multiple code processing tasks, the code processing results and target dialogue text corresponding to the same code processing task are displayed in association on the interactive interface.

6. The method according to claim 1, wherein: The method further comprises: In response to the code processing tasks being multiple, generating a task list based on task information of each of the multiple code processing tasks; The task list is displayed on the interactive interface.

7. The method according to claim 6, wherein: The displaying of the code processing result and the target dialogue text on the interactive interface includes: In response to detecting a selection operation on a code processing task in the task list, acquiring the code processing task selected by the selection operation; The code processing result and target dialogue text corresponding to the selected code processing task are displayed on the interactive interface.

8. The method according to claim 1, wherein: The method further comprises: Displaying a target page component on the interactive interface, wherein there is a corresponding relationship between the target page component and the code processing result; In response to detecting a setting operation for the target page component, it is determined whether a code processing result corresponding to the target page component is effective or invalid.

9. The method according to claim 8, wherein: After determining that the code processing result is effective, the method further includes: In response to the target code file being a newly added code file, saving the target code file; In response to the code processing result including a code adjustment result, updating the target code file based on the code adjustment result; In response to the code processing result including a code repair strategy, the target code file is repaired according to the code repair strategy.

10. The method according to claim 8, wherein: After determining that the code processing result is invalid, the method further includes: In response to the target code file being a newly added code file, deleting the target code file; In response to the target code file being an original code file, the target code file is maintained unchanged.

11. The method according to any one of claims 1 to 10, wherein: The step of using at least one of the newly added code file and the original code file as the target code file corresponding to the code processing task includes: In response to the code processing task meeting the set condition, adding a code file, and using the newly added code file as the target code file; In response to the code processing task not meeting a set condition, the target code file is determined from a plurality of original code files.

12. The method according to claim 11, wherein: The method further comprises: In response to the code processing task including at least one of generating a test code and adding a new code template, it is determined that the code processing task meets the set condition.

13. The method according to claim 11, wherein: The step of determining the target code file from a plurality of original code files comprises: Determining a search parameter for the target code file based on the first conversation text; Based on the search parameter, the target code file is determined from a plurality of original code files.

14. The method according to any one of claims 1 to 10, wherein: The method further comprises: Performing intent recognition on the first conversation text by using the large model to obtain user intent; Splitting the original task described in the first dialogue text based on the user intention through the large model to obtain N code processing tasks, where N is a positive integer; The i-th code processing task is processed by the large model to obtain a code processing result and a second dialogue text corresponding to the i-th code processing task, wherein i is a positive integer not greater than N.

15. A code processing device based on a large model, comprising: A first acquisition module, used for acquiring a first dialogue text for describing a code processing task; A second acquisition module is used to use at least one of the newly added code file and the original code file as a target code file corresponding to the code processing task; A processing module, used for inputting the first dialogue text into a large model, and having the large model output a code processing result of the target code file and a second dialogue text for the first dialogue text; A display module is used to display the code processing result and the target dialogue text on an interactive interface, wherein the target dialogue text includes at least one of the first dialogue text and the second dialogue text.

16. The device according to claim 15, wherein: The display module is also used for: In response to the object code file not being displayed on the interactive interface, displaying the object code file on the interactive interface; In response to the object code file being displayed on the interactive interface, continue to display the object code file on the interactive interface.

17. The device according to claim 16, wherein: The display module is also used for: In response to the code processing result including a code adjustment result, the code adjustment result is displayed in a display area of ​​the target code file on the interactive interface.

18. The device according to claim 15, wherein: The display module is also used for: In response to the code processing result including a code adjustment result, determining a target display area of ​​the code adjustment result on the interactive interface based on a position of the code adjustment result in the target code file; The code adjustment result is displayed in the target display area.

19. The device according to claim 15, wherein: The display module is also used for: In response to the fact that there are multiple code processing tasks, the code processing results and target dialogue text corresponding to the same code processing task are displayed in association on the interactive interface.

20. The device according to claim 15, wherein: The display module is also used for: In response to the code processing tasks being multiple, generating a task list based on task information of each of the multiple code processing tasks; The task list is displayed on the interactive interface.

21. The device according to claim 20, wherein: The display module is also used for: In response to detecting a selection operation on a code processing task in the task list, acquiring the code processing task selected by the selection operation; The code processing result and target dialogue text corresponding to the selected code processing task are displayed on the interactive interface.

22. The device according to claim 15, wherein: The display module is also used for: Displaying a target page component on the interactive interface, wherein there is a corresponding relationship between the target page component and the code processing result; In response to detecting a setting operation for the target page component, it is determined whether a code processing result corresponding to the target page component is effective or invalid.

23. The device according to claim 22, wherein: After determining that the code processing result is effective, the processing module is further used to: In response to the target code file being a newly added code file, saving the target code file; In response to the code processing result including a code adjustment result, updating the target code file based on the code adjustment result; In response to the code processing result including a code repair strategy, the target code file is repaired according to the code repair strategy.

24. The device according to claim 22, wherein: After determining that the code processing result is invalid, the processing module is further used to: In response to the target code file being a newly added code file, deleting the target code file; In response to the target code file being an original code file, the target code file is maintained unchanged.

25. The device according to any one of claims 15 to 24, wherein: The second acquisition module is further used for: In response to the code processing task meeting the set condition, adding a code file, and using the newly added code file as the target code file; In response to the code processing task not meeting a set condition, the target code file is determined from a plurality of original code files.

26. The device according to claim 25, wherein The second acquisition module is further used for: In response to the code processing task including at least one of generating a test code and adding a new code template, it is determined that the code processing task meets the set condition.

27. The device according to claim 25, wherein: The second acquisition module is further used for: Determining a search parameter for the target code file based on the first conversation text; Based on the search parameter, the target code file is determined from a plurality of the original code files.

28. The device according to any one of claims 15 to 24, wherein: The processing module is further used for: Performing intent recognition on the first conversation text by using the large model to obtain user intent; Splitting the original task described in the first dialogue text based on the user intention through the large model to obtain N code processing tasks, where N is a positive integer; The i-th code processing task is processed by the large model to obtain a code processing result and a second dialogue text corresponding to the i-th code processing task, wherein i is a positive integer not greater than N.

29. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 14.

30. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-14.

31. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 14.

Citation Information

Patent Citations

  • Table data processing method based on natural language dialogue

    CN116737909A

  • Dialogue processing method, voice abstract extraction method and target dialogue model training method

    CN117332072A

  • Song recommendation method and device, electronic equipment and storage medium

    CN117725256A

  • Code updating method, code generating method, task processing method and code interpreter based on large model

    CN118519660A

  • Code generation method and apparatus, storage medium and electronic device

    WO2024174911A1