Code processing system control method and device and computer readable storage medium
By determining the code processing field corresponding to user commands and selecting the code processing model with the highest score, the problem of inefficient code processing in the prior art is solved, and higher quality and efficient code processing is achieved.
Patent Information
- Application Number
- CN202411738710.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-04-04
AI Technical Summary
Existing code processing systems cannot automatically process by directly selecting codes. Users need to copy the code and manually select the appropriate code processing model, resulting in inefficient code processing.
By determining the code processing field corresponding to the user command, the highest-rated code processing model is selected, and the request information is sent to the target model based on the preset routing information, and the feedback information is received and output.
Improves the quality and efficiency of code processing, simplifies user operation processes, reduces model selection time, and ensures that the selected model has higher processing efficiency in specific areas.
Smart Images

Figure CN119759339A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automation technology, and in particular to a code processing system control method, device and computer-readable storage medium. Background Art
[0002] Currently, users cannot automatically process code by directly selecting code. Users are required to copy the code, open one or more code processing models, and input the copied code into the code processing model for processing. When the code processing model selected by the user processes the user's command, since each code processing model has inconsistent performance in code processing fields such as code writing, code review, code evaluation, and code retrieval, the model selected by the user is not sufficiently adapted to the user's command and cannot complete the user's command quickly and accurately, resulting in low code processing efficiency.
[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0004] The main purpose of this application is to provide a code processing system control method, device and computer-readable storage medium, aiming to solve the technical problem of how to improve the code processing efficiency of the code processing system.
[0005] To achieve the above objectives, the present application proposes a code processing system control method, the code processing system control method comprising: According to the user's command, determine the code processing field corresponding to the command and the request information corresponding to the command; Selecting a target code processing model according to the scores of each optional code processing model in the code processing field; Based on preset routing information, the request information is sent to the target code processing model, and feedback information sent by the target code processing model is received; The feedback information is output.
[0006] In one embodiment, the step of sending the request information to the target code processing model based on the preset routing information and receiving feedback information sent by the target code processing model includes: dispatching the request information to the target code processing model; By means of the target code processing model, corresponding processing logic is executed according to the request information to generate feedback information, wherein the feedback information includes directly generated code information and / or code writing auxiliary opinions; Receive feedback information sent by the target code processing model.
[0007] In one embodiment, the step of executing corresponding processing logic according to the request information through the target code processing model to generate feedback information, wherein the feedback information includes directly generated code information and / or code writing auxiliary opinions includes: If the request information is to conduct a code review, the code review is conducted through the target code processing model according to the code selected by the user; If the result of the code review is that the code is unqualified, the code is analyzed in detail to determine the goals achieved by the code; The code is rewritten based on the target by the target code processing model to provide a replacement suggestion for the code.
[0008] In one embodiment, before the step of selecting a target code processing model according to the scores of the optional code processing models in the code processing field, the step includes: Establishing a model management framework for the code processing model and defining an external calling interface of the management framework so as to call the code processing model through a unified interface; The code processing model in the management framework is adapted according to the external calling interface.
[0009] In one embodiment, the step of adapting the code processing model in the management framework according to the external call interface includes: Adapt the public cloud service, register to obtain the API permission of the public cloud service, write and integrate the interface calling code according to the external calling interface and the configuration requirements of the public cloud service; Adapting the privately deployed open source model, converting the original interface of the open source model into the external calling interface and integrating it according to the calling method of the privately deployed open source model; Adapting the private deployment business model, converting the original interface of the business model into the external call interface and integrating it according to the usage requirements of the private deployment business model; For the newly introduced code processing model, the requirements corresponding to the newly introduced code processing model are obtained, and according to the external call interface and the requirements, the original interface of the code processing model is converted into the external call interface and integrated.
[0010] In one embodiment, before the step of selecting a target code processing model according to the scores of the optional code processing models in the code processing field, the step further includes: Processing standard tasks in the code processing field through each of the code processing models; According to the processing results of the standard tasks, the processing capability of each code processing model in each code processing field is scored.
[0011] In one embodiment, the step of selecting a target code processing model according to the scores of each optional code processing model in the code processing field includes: According to the code processing field, the code processing models are sorted from high to low based on their scores, and a secondary sorting is performed according to the status of the models to determine a sorting list; In the sorted list, the model ranked first is selected as the target code processing model.
[0012] In one embodiment, after the step of sending the request information to the target code processing model based on the preset routing information and receiving the feedback information sent by the target code processing model, the method further comprises: Performing syntax checking on the generated code and checking for common errors in the code; and / or Checking the consistency between the generated coding assistance opinion and the task description; The code processing model is improved according to the inspection results of the code and / or the code writing auxiliary opinions.
[0013] In addition, to achieve the above-mentioned purpose, the present application also proposes a code processing system control device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the code processing system control method as described above.
[0014] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the code processing system control method described above are implemented.
[0015] The present application provides a code processing system control method. The present application first determines the code processing field corresponding to the user command, and more accurately matches the best performing code processing model in the field, thereby improving the quality of code processing. The user no longer needs to judge and select a suitable code processing model on his own, which simplifies the user operation process. By quickly locating and calling the most suitable code processing model, the model selection time is reduced. Since the selected model has higher processing efficiency in a specific field, the efficiency of the code processing process is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0018] Figure 1 A flowchart diagram of the first embodiment of the code processing system control method of the present application; Figure 2 A flowchart diagram of the second embodiment of the code processing system control method of the present application is provided; Figure 3 A flowchart diagram of the third embodiment of the code processing system control method of the present application; Figure 4 A flowchart diagram of the fourth embodiment of the code processing system control method of the present application is provided; Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the code processing system control method in the embodiment of the present application.
[0019] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0020] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0021] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0022] The main solutions of the embodiments of this application are: Currently, users cannot automatically process code by directly selecting code. Users are required to copy the code, open one or more code processing models, and input the copied code into the code processing model for processing. When the code processing model selected by the user processes the user's command, since each code processing model has inconsistent performance in code processing fields such as code writing, code review, code evaluation, and code retrieval, the model selected by the user is not sufficiently adapted to the user's command and cannot complete the user's command quickly and accurately, resulting in low code processing efficiency.
[0023] The present application improves the quality of code processing by determining the code processing field corresponding to the user command and more accurately matching the best performing code processing model in that field. Users no longer need to judge and select the appropriate code processing model on their own, which simplifies the user operation process. By quickly locating and calling the most suitable code processing model, the model selection time is reduced. Since the selected model has higher processing efficiency in a specific field, the efficiency of the code processing process is improved.
[0024] It should be noted that the execution subject of this embodiment may be a code processing system control device, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., and this embodiment does not specifically limit this. The following takes the code processing system control device as the execution subject as an example to illustrate this embodiment and the following embodiments.
[0025] Embodiment 1 Based on this, the present application proposes a code processing system control method of the first embodiment, please refer to Figure 1 , the code processing system control method includes: Step S10: According to the user's command, determine the code processing field corresponding to the command and the request information corresponding to the command.
[0026] Parse the user's commands into specific code processing requirements, and clarify the code processing fields and specific request information corresponding to these requirements, accurately understand the user's intentions, and provide a basis for subsequent selection of appropriate code processing models and execution of corresponding code processing tasks.
[0027] In this embodiment, a command refers to an instruction input or selected by a user through a user interface, which is used to instruct the system to perform a specific code processing task. Request information is information contained in a user command for instructing the code processing model to perform a specific task.
[0028] Code processing domain refers to the category to which code processing tasks belong, including but not limited to code writing, code review, code evaluation, code retrieval and other fields. Code writing involves the creation, modification and improvement of new code; code review is the review of code to find potential errors, improve code quality and readability; code review is a more in-depth evaluation of the code based on code review; code retrieval is to find specific code snippets or information in the code base or knowledge base.
[0029] As an optional implementation, natural language processing technology is used to parse the commands input by the user to identify the keywords and grammatical structures in the commands. Based on the parsing results and combined with preset domain mapping rules, the code processing domain to which the user command belongs is determined, and specific request information is extracted based on the grammatical structure of the user command and the specific requirements of the domain to which it belongs.
[0030] As another optional implementation, according to a preset command option selected by a user, a code processing field and corresponding request information corresponding to the command option are determined.
[0031] Step S20, selecting a target code processing model according to the scores of various optional code processing models in the code processing field.
[0032] According to the scores of various optional code processing models in specific code processing fields, select a target code processing model that best suits current user needs and task objectives. By comprehensively evaluating the capabilities of different models in specific fields, it can be ensured that the selected model can complete code processing tasks efficiently and accurately, thereby improving overall code quality and development efficiency.
[0033] In this embodiment, the optional code processing model is a model preset in the system that can perform specific code processing tasks and is applicable to different code processing fields. The score is a quantitative evaluation of the performance of the optional code processing model in a specific code processing field. The target code processing model refers to the code processing model selected based on the score that best suits the current user needs and task objectives.
[0034] Optionally, step S20 includes: Step S21, sorting the code processing models from high to low based on the scores of the code processing fields, and performing secondary sorting based on the states of the models to determine a sorting list.
[0035] In this embodiment, the state refers to the current availability, health or load of the code processing model, including maintenance state, reaching the load limit, etc. The sorted list is a list obtained by sorting the models according to the scores and states of the code processing models.
[0036] Exemplarily, the scores of each code processing model in a specific code processing field are collected, and the models are sorted from high to low according to the scores. Based on the sorting based on the scores, the status of the models is further considered, and models with similar scores but better status are sorted first to generate a final sorted list.
[0037] Step S22, selecting the model ranked first in the sorted list as the target code processing model.
[0038] In this embodiment, the model ranked first is the model with the highest score in the specific code processing field, and is in a good state and is most suitable for performing the code processing task.
[0039] Optionally, before selecting the target code processing model, the availability of the model is verified to check whether the model has been correctly configured.
[0040] Step S30: Based on preset routing information, the request information is sent to the target code processing model, and feedback information sent by the target code processing model is received.
[0041] The request information is accurately sent to the target code processing model according to the preset routing information, so that the model can process the request and return the corresponding feedback information. In a distributed system, different service models are responsible for processing different types of requests. A routing mechanism is needed to ensure that the request is correctly forwarded to the service model responsible for processing it.
[0042] In this embodiment, the preset routing information is rule information predefined in the system and used to guide how the request information is forwarded to the target code processing model. The feedback information is the result returned by the target code processing model after processing the request information.
[0043] As an optional implementation, the received request information is parsed, key information for routing is extracted, matching routing rules are searched in preset routing information based on the parsed key information, the request information is sent to the target code processing model based on the matching routing rules, the target code processing model is waited for processing, and feedback information sent by the target code processing model is received.
[0044] Step S40: output the feedback information.
[0045] The feedback information generated by the target code processing model after processing the request information is presented to the user so that the user can perform subsequent operations based on this information, helping the user to write, debug and optimize the code more effectively, thereby improving code quality and development efficiency.
[0046] In this embodiment, the feedback information includes directly generated code information and / or code writing assistance opinions. The directly generated code information is the code content directly generated by the target code processing model based on the request information. The code writing assistance opinions are the guidance opinions provided by the target code processing model when processing the request information.
[0047] As an optional implementation, the target code processing model generates corresponding code content according to the request information, verifies the generated code, and after verifying the grammatical rules, logic and functionality of the code, outputs the response content that complies with the plug-in specification to the user end for feedback.
[0048] As another optional implementation, the target code processing model analyzes the code in the request information, generates specific code writing assistance suggestions based on the analysis results, and outputs response content that complies with the plug-in specification to the user end for feedback.
[0049] As another optional implementation, the target code processing model generates corresponding code content based on the request information. While generating the code, the target code processing model provides additional opinions based on the quality, performance and other aspects of the code, integrates the directly generated code information and the code writing auxiliary opinions to form complete feedback information, and processes the feedback information into response content that complies with the plug-in specification and outputs it to the user end.
[0050] As an example of this embodiment, when a user initiates a request, the system verifies whether the user session is normal, and performs a sensitive word audit on the prompt word submitted by the user. If it contains sensitive words, a failure message is returned to prompt the user and logs it. After the audit is passed, the model list authorized to the user is obtained. If the model is not authorized, it is returned to prompt the user to apply for model permissions first. If the user performs code retrieval and requests a knowledge base, the code snippet matching the user input is queried from the knowledge base according to the user's input for subsequent prompt word assembly. If the user selects a code completion operation written in code in a section of code, the code lines before and after the code where the current user cursor is located are segmented by keywords, and the code snippet is used to retrieve the associated code block in the local vector library for subsequent prompt word assembly. After the prompt word logic processing is completed, according to the request type submitted by the user, the model with the highest matching degree of the request type, that is, the model with the highest score, is preferentially selected from the user authorized model list, and the prompt word of the model is obtained from the system configuration. The obtained prompt word content and the content submitted by the user are assembled with prompt words and sent to the model. After obtaining the content returned by the model, the content returned by the model is processed again, and the response content that meets the plug-in specification is output to the user end.
[0051] The present embodiment provides a code processing system control method. The present embodiment first determines the code processing field corresponding to the user command, and more accurately matches the best performing code processing model in the field, thereby improving the quality of code processing. The user no longer needs to judge and select a suitable code processing model on his own, which simplifies the user operation process. By quickly locating and calling the most suitable code processing model, the model selection time is reduced. Since the selected model has higher processing efficiency in a specific field, the efficiency of the code processing process is improved.
[0052] Based on the first embodiment, the second embodiment of the present application proposes a code processing system control method, referring to Figure 2 , step S30 comprises: Step S31, dispatching the request information to the target code processing model.
[0053] Step S32: executing corresponding processing logic according to the request information through the target code processing model to generate feedback information, wherein the feedback information includes directly generated code information and / or code writing auxiliary opinions.
[0054] The user's request information is effectively delivered to the target code processing model that is most suitable for processing the request, and the corresponding processing logic is executed through the model, ultimately generating the feedback information required by the user, providing the user with valuable programming support and guidance.
[0055] Optionally, step S32 includes: Step A10: If the request information is for code review, the code review is performed through the target code processing model according to the code selected by the user.
[0056] In this embodiment, the code selected by the user is a code selected by the user with a cursor.
[0057] Step A20: If the result of the code review is that the code is unqualified, the code is analyzed in detail to determine the goals achieved by the code.
[0058] Step A30, rewriting the code based on the target through the target code processing model to provide replacement suggestions for the code.
[0059] During the user's use, the code quality and consistency are improved through automation. When a code review request is received, the code is reviewed using the target code processing model. If the code does not meet the established quality standards, the code's goals and functions are further analyzed, and based on these goals, the code is automatically rewritten through the model, providing users with replacement suggestions for improved code.
[0060] Exemplarily, the code review requirements in the request information are identified, and then the target code processing model is called for automated review based on the code selected by the user. If the review result shows that the code is unqualified, the system further parses the code and extracts the structure, logic and functional information of the code to determine the specific goals implemented by the code. Based on the target information obtained by the analysis, the target code processing model rewrites the code to meet the quality standards and uses the rewritten code as a replacement suggestion.
[0061] Step S33, receiving feedback information sent by the target code processing model.
[0062] The present embodiment provides a code processing system control method. The present embodiment firstly realizes the automatic allocation and execution of code processing tasks by scheduling request information to a target code processing model, thereby avoiding manual intervention and significantly improving the efficiency of code processing. The target code processing model executes corresponding processing logic based on the request information, and can intelligently generate code information or provide auxiliary opinions for code writing, thereby ensuring the correctness of the code and improving the overall quality of the code. By instantly receiving feedback information sent by the target code processing model, users can quickly obtain the results of code processing, thereby improving the efficiency of code processing during user use.
[0063] Based on the first embodiment, the third embodiment of the present application proposes a code processing system control method, referring to Figure 3 , before step S20, including: Step S50: establishing a model management framework of the code processing model, and defining an external calling interface of the management framework, so as to call the code processing model through a unified interface.
[0064] By establishing a model management framework and defining its external calling interface, unified management and calling of code processing models can be achieved, thereby improving the efficiency of code processing.
[0065] In this embodiment, the model management framework is a framework for centrally managing multiple code processing models. The external call interface is an interface provided by the model management framework for calling, which defines the information and format required for calling the model, as well as the result and format returned after the call.
[0066] Step S60: adapting the code processing model in the management framework according to the external calling interface.
[0067] Optionally, step S60 includes: Step S61, adapting the public cloud service, registering to obtain the API permission of the public cloud service, and compiling and integrating the interface calling code according to the external calling interface and the configuration requirements of the public cloud service.
[0068] Step S62, adapting the privately deployed open source model, converting the original interface of the open source model into the external calling interface and integrating it according to the calling method of the privately deployed open source model.
[0069] Step S63, adapting the privately deployed business model, converting the original interface of the business model into the external call interface and integrating it according to the usage requirements of the privately deployed business model.
[0070] Step S64, for the newly introduced code processing model, obtain the requirements corresponding to the newly introduced code processing model, and convert the original interface of the code processing model into the external call interface and integrate it according to the external call interface and the requirements.
[0071] Exemplarily, each code processing model is analyzed to determine its input, output and internal processing logic, and the model is adapted according to the specifications of the external call interface, including writing adaptation code, adjusting model parameters, etc., to ensure that the model can correctly receive input data through the interface and return processing results, and register the adapted code processing model in the model management framework.
[0072] Step S70: Processing standard tasks in the code processing field through each of the code processing models.
[0073] In this embodiment, the standard task is a representative and universal task designed in the field of code processing to evaluate the performance of the model.
[0074] Exemplarily, based on the characteristics and needs of the target field, select representative standard tasks, prepare corresponding test data for each standard task, including normal data, abnormal data, and boundary data, etc., deploy each code processing model to the test environment, and let them execute standard tasks respectively, and record the processing process and results of each model.
[0075] Step S80, scoring the processing capability of each code processing model in each code processing field according to the processing result of the standard task.
[0076] In this embodiment, the processing capability refers to the performance and ability demonstrated by the code processing model when executing standard tasks.
[0077] Exemplarily, scoring criteria and indicators are designed according to the requirements of the target field and the purpose of evaluation, and the processing capability of each code processing model in each code processing field is scored according to the processing results of the standard tasks.
[0078] Optionally, perform an in-depth analysis of the scoring results to identify the strengths and weaknesses of the model.
[0079] The present embodiment provides a code processing system control method. The present embodiment first implements centralized management of multiple code processing models by constructing a model management framework, defines a unified external call interface, and can call any registered code processing model in a standardized manner, thereby improving the flexibility of the system. By adapting the code processing model, it is ensured that it can be called through a unified external call interface, thereby improving the compatibility and stability of the system. By executing standard tasks, the performance and capabilities of the code processing model in actual applications can be verified, the processing capabilities of the code processing model can be scored, and a quantitative evaluation of the model performance can be implemented to facilitate model selection.
[0080] Based on the first embodiment, the fourth embodiment of the present application proposes a code processing system control method, referring to Figure 4 , after step S40, further comprising: Step S90, performing syntax check on the generated code and checking common errors in the code.
[0081] Perform syntax check on the code to ensure that the generated code is correct at the syntactic level and does not contain common programming errors, thereby avoiding program failures or security risks caused by syntax errors or common logic vulnerabilities for subsequent users.
[0082] In this embodiment, syntax checking is to perform static analysis on the code to check whether it complies with the syntax rules of the programming language. Common errors refer to the types of errors that often occur during programming, including null pointer reference, array out of bounds, resource leakage, etc.
[0083] Exemplarily, a static code analysis tool is used to perform syntax checking on the generated code. According to common error types, a suitable error detection script is written or selected to perform static analysis on the code, find and mark potential errors, and provide feedback on the results of syntax checking and error detection.
[0084] Step S100, checking the consistency between the generated code writing assistance advice and the task description.
[0085] Verifying that the generated code writing assistance suggestions are consistent with the task description helps ensure that the functional implementation of the code meets the original requirements and prevents functional deviations caused by misunderstandings.
[0086] Exemplarily, the generated coding assistance opinions are compared with the task description to check whether they are consistent. If inconsistencies are found, a detailed comparative analysis is performed, and based on the analysis results, the coding assistance opinions are adjusted to ensure consistency with the task description.
[0087] Step S110: improving the code processing model according to the inspection result of the code and / or the code writing auxiliary opinion.
[0088] Make necessary improvements to the code processing model based on the inspection results to ensure that the model can understand and generate code more accurately.
[0089] In this embodiment, the improvement includes correcting errors in the model, optimizing model performance, improving code generation quality, etc.
[0090] Exemplarily, based on the inspection results of the generated code and / or the code writing auxiliary opinions, the problems and deficiencies of the code processing model are summarized, the code processing model is improved, and the improved model is verified and tested.
[0091] The present embodiment provides a code processing system control method. The present embodiment first performs syntax checking and common error checking on the generated code, so as to timely discover and correct errors and potential problems in the code, thereby improving the quality of the code. The generated code writing auxiliary opinions are checked for consistency with the task description, so as to ensure that the functional implementation of the code meets the original requirements and avoid functional deviations. According to the inspection results of the code and the writing auxiliary opinions, the code processing model is improved, so as to optimize the performance of the model and improve the accuracy and efficiency of code generation.
[0092] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the code processing system control method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0093] The present application provides a code processing system control device, which includes: at least one processor; and a memory connected to the at least one processor in communication; 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 so that the at least one processor can execute the code processing system control method in the above-mentioned embodiment 1.
[0094] Reference below Figure 5, which shows a schematic diagram of the structure of a code processing system control device suitable for implementing an embodiment of the present application. The code processing system control device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The code processing system control device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0095] like Figure 5 As shown, the code processing system control device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the code processing system control device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the code processing system control device to communicate with other devices wirelessly or by wire to exchange data. Although the code processing system control device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0096] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0097] The code processing system control device provided by the present application adopts the code processing system control method in the above embodiment, which can solve the technical problem of how to improve the code processing efficiency of the code processing system. Compared with the prior art, the beneficial effects of the code processing system control device provided by the present application are the same as the beneficial effects of the code processing system control method provided by the above embodiment, and the other technical features in the code processing system control device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0098] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0099] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0100] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the code processing system control method in the above-mentioned embodiment.
[0101] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0102] The computer-readable storage medium may be included in the code processing system control device; or may exist independently without being assembled into the code processing system control device.
[0103] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the code processing system control device, the code processing system control device can write computer program codes for performing the operations of the present application in one or more programming languages or a combination thereof. The programming languages include object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0104] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0105] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0106] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned code processing system control method, and can solve the technical problem of how to improve the code processing efficiency of the code processing system. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the code processing system control method provided in the above-mentioned embodiment, and will not be repeated here.
[0107] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A code processing system control method, characterized in that: The code processing system control method comprises: According to the user's command, determine the code processing field corresponding to the command and the request information corresponding to the command; Selecting a target code processing model according to the scores of each optional code processing model in the code processing field; Based on preset routing information, the request information is sent to the target code processing model, and feedback information sent by the target code processing model is received; The feedback information is output.
2. The code processing system control method according to claim 1, characterized in that: The step of sending the request information to the target code processing model based on the preset routing information and receiving feedback information sent by the target code processing model includes: dispatching the request information to the target code processing model; By means of the target code processing model, corresponding processing logic is executed according to the request information to generate feedback information, wherein the feedback information includes directly generated code information and / or code writing auxiliary opinions; Receive feedback information sent by the target code processing model.
3. The code processing system control method according to claim 2, characterized in that: The step of executing corresponding processing logic according to the request information through the target code processing model to generate feedback information, wherein the feedback information includes directly generated code information and / or code writing auxiliary opinions comprises: If the request information is to conduct a code review, the code review is conducted through the target code processing model according to the code selected by the user; If the result of the code review is that the code is unqualified, the code is analyzed in detail to determine the goals achieved by the code; The code is rewritten based on the target by the target code processing model to provide a replacement suggestion for the code.
4. The code processing system control method according to claim 1, characterized in that: Before the step of selecting a target code processing model according to the scores of each optional code processing model in the code processing field, the method includes: Establishing a model management framework for the code processing model and defining an external calling interface of the management framework so as to call the code processing model through a unified interface; The code processing model in the management framework is adapted according to the external calling interface.
5. The code processing system control method according to claim 4, characterized in that: The step of adapting the code processing model in the management framework according to the external call interface includes: Adapt the public cloud service, register to obtain the API permission of the public cloud service, write and integrate the interface calling code according to the external calling interface and the configuration requirements of the public cloud service; Adapting the privately deployed open source model, converting the original interface of the open source model into the external calling interface and integrating it according to the calling method of the privately deployed open source model; Adapting the private deployment business model, converting the original interface of the business model into the external call interface and integrating it according to the usage requirements of the private deployment business model; For the newly introduced code processing model, the requirements corresponding to the newly introduced code processing model are obtained, and according to the external call interface and the requirements, the original interface of the code processing model is converted into the external call interface and integrated.
6. The code processing system control method according to claim 1, characterized in that: Before the step of selecting a target code processing model according to the scores of each optional code processing model in the code processing field, the step further includes: Processing standard tasks in the code processing field through each of the code processing models; According to the processing results of the standard tasks, the processing capability of each code processing model in each code processing field is scored.
7. The code processing system control method according to claim 1, characterized in that: The step of selecting a target code processing model according to the scores of each optional code processing model in the code processing field comprises: According to the code processing field, the code processing models are sorted from high to low based on their scores, and a secondary sorting is performed according to the status of the models to determine a sorting list; In the sorted list, the model ranked first is selected as the target code processing model.
8. The code processing system control method according to claim 1, characterized in that: After the step of sending the request information to the target code processing model based on the preset routing information and receiving the feedback information sent by the target code processing model, the method further comprises: Performing syntax checking on the generated code and checking for common errors in the code; and / or Checking the consistency between the generated coding assistance opinion and the task description; The code processing model is improved according to the inspection results of the code and / or the code writing auxiliary opinions.
9. A code processing system control device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the code processing system control method according to any one of claims 1 to 8.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the code processing system control method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Large language model scheduling method and system based on dynamic balance strategy
CN118035677A
Code review method and device, electronic equipment and storage medium
CN118093407A