AIGC code generation method and device and electronic equipment

By obtaining and filling context parameters and integrating the AIGC module during system development, the problem of AIGC code being unable to adapt to specific context environments is solved, achieving high applicability of AIGC code in system development and improving system performance.

CN119336304APending Publication Date: 2025-01-21中国邮政储蓄银行股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411454888.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the prior art, AIGC code cannot adapt to a specific context in system research and development, resulting in low applicability in system research and development.

Method used

Obtain the code generated by AIGC, fill in the context parameters, form an AIGC module, integrate it into the system, and conduct a trial run until the module passes, determine it as the optimal module, and solidify it as a system asset for generating the corresponding AIGC code.

Benefits of technology

It achieves the high applicability of AIGC code in system development, ensuring that the code can be seamlessly integrated into the system, adapt to specific contexts, and improve system efficiency and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336304A_ABST
    Figure CN119336304A_ABST
Patent Text Reader

Abstract

The invention provides an AIGC code generation method and device and electronic equipment. The method comprises the following steps: an obtaining step: obtaining a code generated by AIGC to obtain a first AIGC code; a filling step: filling context parameters of the first AIGC code to form a first AIGC module; an integration step: integrating the first AIGC module into the system to obtain a second AIGC module; a trial operation step: performing trial operation on the second AIGC module, and if the second AIGC module does not pass the trial operation, sequentially repeating the steps until the second AIGC module passes the trial operation; if the second AIGC module passes the pilot run, determining that the second AIGC module is an optimal module; solidifying the optimal module into assets of the system; and under the condition that a code generation request is received, generating a corresponding AIGC code by using the optimal module. According to the method, the problem of low applicability of the AIGC code in system research and development is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to artificial intelligence technology, and more specifically, to a method, device and electronic device for generating an AIGC code. Background Art

[0002] With the rapid development of artificial intelligence technology, generative artificial intelligence (AIGC) and its related capabilities are springing up like mushrooms after a rain. Most AIGC services have good code generation and error correction capabilities. They have simple code work that general programmers can complete and can be directly used in some simple system applications and code scenarios.

[0003] At present, for complex scenarios or general scenarios such as context, AIGC code does not have the ability to replace program development work. The inventors found that in the entire system development, AIGC code cannot adapt to specific context environments and is not very applicable in system development.

[0004] Therefore, there is an urgent need for a method for generating an AIGC code with high applicability in system development. Summary of the invention

[0005] The main purpose of the present application is to provide a method, device and electronic device for generating an AIGC code, so as to at least solve the problem in the prior art that the AIGC code cannot adapt to a specific context environment and has low applicability in system development during the entire system development.

[0006] To achieve the above-mentioned purpose, according to one aspect of the present application, a method for generating an AIGC code is provided, comprising: an acquisition step of acquiring a code generated by AIGC to obtain a first AIGC code; a filling step of filling a context parameter of the first AIGC code to form a first AIGC module; an integration step of integrating the first AIGC module into a system to obtain a second AIGC module; a trial operation step of performing a trial operation on the second AIGC module to determine whether the second AIGC module can pass the trial operation; if the second AIGC module fails the trial operation, the acquisition step, the filling step, the integration step and the trial operation step are repeated at least once in sequence until the second AIGC module passes the trial operation; if the second AIGC module passes the trial operation, the second AIGC module is determined to be an optimal module, and the optimal module is solidified as an asset of the system; when a code generation request is received, the corresponding AIGC code is generated using the optimal module, so that the AIGC code is directly run in the system.

[0007] Optionally, obtaining the code generated by AIGC to obtain the first AIGC code includes: obtaining the information generated by the AIGC; removing non-code parts of the information generated by the AIGC to obtain a filtered AIGC code; converting the HTML language text of the filtered AIGC code into a code that can be directly compiled and executed to obtain the first AIGC code.

[0008] Optionally, obtaining the information generated by the AIGC includes: constructing a first request package according to a preset code generation template, the first request package including all context information and parameters required to generate the code; sending the first request package to an AIGC server, the AIGC server generating information including the code according to the content of the first request package.

[0009] Optionally, filling the context parameters of the first AIGC code to form a first AIGC module includes: adding or modifying the context parameters in the first AIGC code to obtain an adjusted AIGC code, the context parameters including input parameters and output parameters of the first AIGC code, and information on interaction between the first AIGC code and other components in the system; packaging the adjusted AIGC code using a JAVA method to obtain a second AIGC code; and encapsulating the second AIGC code into the first AIGC module, the first AIGC module including context information that enables the second AIGC code to run effectively in the system.

[0010] Optionally, integrating the first AIGC module into the system includes one of the following: the first AIGC module and an existing module of the system directly call each other; the first AIGC module directly replaces the existing module of the system; the first AIGC module is integrated with the existing module of the system.

[0011] Optionally, the second AIGC module is tested to determine whether the second AIGC module can pass the test run, including: running the second AIGC module in the system and recording an output result; comparing the output result with a preset output result; if the output result is inconsistent with the preset output result, determining that the second AIGC module has not passed the test run; if the output result is consistent with the preset output result, determining that the second AIGC module has passed the test run.

[0012] Optionally, before obtaining the code generated by AIGC, the method includes: pre-embedding an AIGC module in the system, initializing information of the AIGC module, wherein the information of the AIGC module includes a name, input parameters, and output parameters of the AIGC module; automatically generating an initial AIGC module in a graphical form according to the information of the AIGC module, integrating the first AIGC module into the system, and obtaining a second AIGC module, including: integrating the first AIGC module into the initial AIGC module, and obtaining the second AIGC module.

[0013] Optionally, the method further comprises: performing batch processing on all the optimal modules every preset time period to verify the accuracy of all the optimal modules.

[0014] According to another aspect of the present application, there is provided a device for generating an AIGC code, comprising:

[0015] An acquisition unit, configured to acquire a code generated by the AIGC to obtain a first AIGC code;

[0016] A filling unit, configured to fill in the context parameter of the first AIGC code to form a first AIGC module;

[0017] An integration unit, configured to integrate the first AIGC module into a system to obtain a second AIGC module;

[0018] a trial operation unit, configured to perform a trial operation on the second AIGC module to determine whether the second AIGC module can pass the trial operation;

[0019] a repeating unit, configured to, if the second AIGC module fails the trial operation, repeatedly execute the acquiring unit, the filling unit, the integrating unit, and the trial operation unit in sequence at least once until the second AIGC module passes the trial operation;

[0020] a determining unit, configured to determine that the second AIGC module is an optimal module if the second AIGC module passes the trial operation, and solidify the optimal module as an asset of the system;

[0021] A generating unit is used to generate the corresponding AIGC code by using the optimal module when receiving a code generation request, so that the AIGC code can be directly run in the system.

[0022] According to another aspect of the present application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for generating a method for executing any one of the AIGC codes.

[0023] By applying the technical solution of the present application, first, a first AIGC code is obtained and context parameters of the first AIGC code are filled to form a first AIGC module; then, the first AIGC module is integrated into a system to obtain a second AIGC module; thereafter, a trial run is performed on the second AIGC module to determine whether the second AIGC module can pass the trial run; if the second AIGC module fails the trial run, the obtaining step, the filling step, the integration step, and the trial run step are sequentially repeated at least once until the second AIGC module passes the trial run; if the second AIGC module passes the trial run, the second AIGC module is determined to be an optimal module, and the optimal module is solidified as an asset of the system; finally, when a code generation request is received, the corresponding AIGC code is generated using the optimal module, and the AIGC code is directly run in the system. In this solution, the code generated by AIGC is contextually processed and then integrated into the system. That is, the solution can integrate the AIGC code into the system and make it a part of the system, and can be customized according to the specific requirements of the system. This means that these codes will be adjusted and optimized according to the specific needs of the system when or after they are generated to ensure that they work seamlessly with the existing codes in the system, thereby solving the problem that the AIGC code in the existing technology cannot adapt to the specific context environment and is not highly applicable in the entire system development. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0025] Figure 1 A hardware structure block diagram of a mobile terminal for executing a method for generating an AIGC code provided in an embodiment of the present application is shown;

[0026] Figure 2 A schematic diagram of a flow chart of a method for generating an AIGC code provided according to an embodiment of the present application is shown;

[0027] Figure 3A schematic diagram of an implementation flow of a method for generating an AIGC code provided according to an embodiment of the present application is shown;

[0028] Figure 4 A schematic diagram of an AIGC code generation device provided according to an embodiment of the present application is shown.

[0029] The reference numerals are as follows:

[0030] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION

[0031] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0032] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] During the research and development process, the inventors discovered that in the prior art, for complex scenarios or general scenarios such as contexts, the AIGC code has limitations in terms of usage environment, interaction with other modules, etc., and cannot ensure seamless integration into the existing system. The AIGC code cannot be well integrated into the existing system, resulting in the low applicability of the AIGC code in system development.

[0035] In order to solve the problem in the above-mentioned existing solutions that the AIGC code cannot adapt to a specific context environment and has low applicability in system development, an embodiment of the present application provides a method for generating an AIGC code.

[0036] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0037] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for generating an AIGC code according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0038] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the display method of device information in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0039] In this embodiment, a method for generating an AIGC code running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.

[0040] Figure 2 FIG. 1 is a flow chart of a method for generating an AIGC code according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0041] Step S201, an acquisition step, acquiring a code generated by AIGC to obtain a first AIGC code;

[0042] Specifically, the code generated by AIGC can be obtained from the AIGC server for subsequent use. The system needs to rely on the code generated by the AIGC server to implement a certain function or service. The obtained code is generated by AIGC and usually contains some intelligent algorithms or rules that can help the system better perform specific tasks or handle specific situations.

[0043] Step S202, a filling step, filling the context parameters of the first AIGC code to form a first AIGC module;

[0044] Specifically, the filling step refers to adjusting the first AIGC code to adapt to specific application scenarios or requirements, and filling the context parameters of the first AIGC code, that is, replacing specific variables or parameters in the code with actually required values ​​or information to ensure that the code can correctly perform the required functions during actual operation. Filling in the context parameters is to personalize the code generated by AIGC to make it more in line with the actual situation and meet specific needs.

[0045] Step S203, an integration step, integrating the first AIGC module into the system to obtain a second AIGC module;

[0046] Specifically, the integration step refers to integrating the first AIGC module after filling the context parameters into the system to ensure that it coordinates and cooperates with other components and functions of the system to realize the overall function of the system. The integration process involves operations such as modifying the system configuration file, adjusting the interface or data transmission method, etc., to ensure that the second AIGC module can run correctly and interact effectively with other parts of the system. The purpose of the integration step is to seamlessly connect the code generated by AIGC with the existing system, realize the intelligence and automation of the system, and improve the efficiency and performance of the system. By integrating the second AIGC module, the system can handle various situations and needs more intelligently, provide more personalized and customized services, and thus enhance the user experience.

[0047] Step S204, a trial operation step, performing a trial operation on the second AIGC module to determine whether the second AIGC module can pass the trial operation;

[0048] Specifically, the trial operation step is to actually test and run the second AIGC module integrated into the system to verify whether the function and performance of the module meet expectations and determine whether it can pass the trial operation. The trial operation can ensure that the second AIGC module can run stably and reliably in the system. The trial operation step can help developers discover and solve problems in a timely manner and ensure the stability and reliability of the system.

[0049] Step S205, if the second AIGC module fails the trial operation, the acquisition step, the filling step, the integration step and the trial operation step are sequentially repeated at least once until the second AIGC module passes the trial operation;

[0050] Specifically, if the second AIGC module fails to pass the trial run, that is, problems occur in the actual test or the expected effect is not achieved, it is necessary to repeat the acquisition step, filling step, integration step and trial run step in sequence. This means that it is necessary to re-acquire the code generated by AIGC, fill the context parameters of the code, integrate it into the system, and conduct a trial run again to discover and solve the problem until the second AIGC module can pass the trial run. This cyclic process can help developers continuously optimize and adjust the code generated by AIGC to ensure that it can run correctly in the system and achieve the expected effect. Such an iterative process can gradually improve and improve the system and improve the stability and performance of the system.

[0051] Step S206: if the second AIGC module passes the trial operation, the second AIGC module is determined to be the optimal module, and the optimal module is solidified as an asset of the system;

[0052] Specifically, when the second AIGC module passes the trial run and achieves the expected effect, it can be determined that the module is the optimal module, which means that after at least one acquisition, filling, integration and trial run, the AIGC module in the system has achieved the expected effect, can operate stably and reliably, and can effectively realize the functional requirements of the system.

[0053] Specifically, the verified optimal AIGC module is solidified as the system's asset, that is, the module is fixed in the system as a component of the system and will not be changed. By solidifying the optimal module, it can be ensured that the system can stably and reliably perform the required functions in actual operation, and it also facilitates the maintenance and management of the system.

[0054] Step S207, when a code generation request is received, the corresponding AIGC code is generated using the optimal module, so that the AIGC code runs directly in the system.

[0055] Specifically, the system uses the code generated by the optimal AIGC module to generate the code, which is no longer limited to general code generation and copying. The system can dynamically generate code that meets the requirements through the optimal module, getting rid of the difficulty of static reuse of general AIGC code and the problem that static reuse cannot be standardized. This realizes the intelligence and automation of the system. Through this step, the system can respond to different scenarios and requirements more flexibly, improving the efficiency and performance of the system.

[0056] In the above embodiment, first, the first AIGC code is obtained and the context parameters of the first AIGC code are filled to form a first AIGC module; then, the first AIGC module is integrated into the system to obtain a second AIGC module; thereafter, the second AIGC module is trial-run to determine whether the second AIGC module can pass the trial run; if the second AIGC module fails the trial run, the acquisition step, the filling step, the integration step and the trial run step are sequentially repeated at least once until the second AIGC module passes the trial run; if the second AIGC module passes the trial run, the second AIGC module is determined to be the optimal module, and the optimal module is solidified as an asset of the system; finally, when a code generation request is received, the corresponding AIGC code is generated using the optimal module, so that the AIGC code runs directly in the system. In this solution, the code generated by AIGC is contextually processed and then integrated into the system. That is, the solution can integrate the AIGC code into the system and make it a part of the system, and can be customized according to the specific requirements of the system. This means that these codes will be adjusted and optimized according to the specific needs of the system when or after they are generated to ensure that they work seamlessly with the existing codes in the system, thereby solving the problem that the AIGC code in the existing technology cannot adapt to the specific context environment and is not highly applicable in the entire system development.

[0057] In a specific embodiment of the present application, obtaining the code generated by AIGC to obtain the first AIGC code includes: obtaining the information generated by the above AIGC; removing the non-code part of the information generated by the above AIGC to obtain the filtered AIGC code; converting the HTML language text of the above filtered AIGC code into a code that can be directly compiled and executed to obtain the above first AIGC code.

[0058] Specifically, the AIGC-generated code is obtained from the AIGC server, and the link between the source service and the configured AIGC default source is initiated. Usually, the AIGC server returns not only the code itself, but also some additional text descriptions, comments, HTML tags or other non-code elements, which are not directly helpful for the execution of the code and sometimes even interfere with subsequent processing. All non-code elements including but not limited to HTML tags, comments, blank characters, etc. are removed to ensure that the remaining part is purely executable code, thereby improving the usability and accuracy of the code.

[0059] Specifically, the AIGC service usually returns the code in HTML format because the code needs to be displayed on the web page. However, it is not feasible to compile and execute the code directly in HTML format, so the HTML format code needs to be converted into plain text code so that it can be directly processed by the compiler or interpreter of the programming language. For example, if the target is to use JAVA language, the converted code should be in a JAVA-readable format and does not contain any HTML tags or other non-JAVA elements.

[0060] Specifically, after the above processing, what is finally obtained is the first AIGC code that can be directly used for system development, ensuring that the code obtained from the AIGC service can be seamlessly integrated into the system development process without additional modification or manual intervention.

[0061] In another embodiment of the present application, obtaining the information generated by the AIGC includes: constructing a first request package according to a preset code generation template, wherein the first request package includes all context information and parameters required to generate the code; and sending the first request package to an AIGC server, wherein the AIGC server generates information including the code according to the content of the first request package. By using a preset code generation template to construct the first request package, this method can ensure that the information received by the AIGC server is accurate and complete, and includes all context information and parameters required to generate the code.

[0062] Specifically, the first request package is constructed based on a preset code generation template. This template is actually a framework that guides the AIGC server to generate a specific type of code. The code generation template facilitates AIGC to return code instead of other information or redundant information. The template is closely related to the AIGC source, and each AIGC corresponds to a different template. The template contains all the context information and parameters required to generate the code. The context information includes but is not limited to the problem that the code should solve, the required programming language, the functional requirements of the code, etc. The parameters specifically refer to the format and type of input and output data, or the name of a specific function or class that needs to be used in the code. According to the generated code template of the AIGC module, a complete request package is assembled to obtain the first request package, and the constructed first request package is sent to the AIGC server, that is, a request is sent to the AIGC server through the network interface, and the request contains all the information of the above-mentioned constructed first request package.

[0063] Specifically, after receiving the first request packet, the AIGC server will parse the content and generate corresponding code based on the provided context information and parameters. This process utilizes the AI ​​model of the AIGC server. The model analyzes and generates the code snippet that best meets the requirements based on the input information. The generated code is finally encapsulated by the AIGC server in the response information and returned to the requester.

[0064] In one embodiment of the present application, filling the context parameters of the first AIGC code to form a first AIGC module includes: adding or modifying the context parameters in the first AIGC code to obtain an adjusted AIGC code, wherein the context parameters include input parameters and output parameters of the first AIGC code, and information on interaction between the first AIGC code and other components in the system; packaging the adjusted AIGC code using a JAVA method to obtain a second AIGC code; and encapsulating the second AIGC code into the first AIGC module, wherein the first AIGC module includes context information that enables the second AIGC code to run effectively in the system.

[0065] Specifically, the context parameters in the first AIGC code are adjusted. The context parameters include input parameters, output parameters and information about the code's interaction with other system components. Some parameters need to be added, modified or deleted. For example, the input parameters need to be adjusted to match the data format of other modules in the system, and the output parameters need to be adjusted to ensure that they can be correctly received and processed.

[0066] Specifically, after completing the parameter adjustment, the adjusted AIGC code is packaged into a JAVA method. This is because the code returned by AIGC is currently more of a method fragment, so packaging it into a JAVA method is the best way to handle the AIGC code. This method packaging involves converting the code fragment into the format of a JAVA method, including the method declaration, parameter list, return type, etc., to comply with the JAVA programming specification. By standardizing the adjusted AIGC code into the JAVA method format, the AIGC code follows a consistent programming style and specification, ensuring the standardization of the code.

[0067] Specifically, the second AIGC code is encapsulated into the first AIGC module, that is, the code is packaged into a reusable and configurable unit, which has a clear interface definition and can be called or used by other modules in the system. The first AIGC module contains all the context information that enables the second AIGC code to run effectively in the system, including but not limited to the environment configuration of the code, dependent libraries, input and output interface definitions, etc. This information is crucial to ensure the correctness of the code and the consistency of the system. In this way, the first AIGC module has no essential difference from the existing modules of the system. The module supports combination, assembly, etc., so that the first AIGC module can run according to the expected function.

[0068] More specifically, the AIGC module can be directly exposed to the outside, which means that the AIGC module can be configured to be open to external systems or services. In other words, it is not limited to use within the current system, but can also be called by other systems or services through the network. This openness allows the AIGC module to be shared and used by multiple different applications or systems, enhancing the module's reusability and system connectivity. If it is exposed to the outside, it can make remote HTTP calls, that is, the AIGC code can be called remotely. Through the HTTP protocol, the AIGC module can receive requests from remote systems, parse request parameters, execute corresponding code logic, and then return the processing results to the requester in the form of HTTP responses. This method allows the module to exist in the form of a service without having to care about the specific implementation details of the client, which improves the scalability and flexibility of the system. Remotely calling AIGC code means that users can call the AIGC module through HTTP requests from anywhere with a network connection without deploying and running AIGC code on the local system. This remote calling mechanism is suitable for cloud computing environments, which can make full use of the powerful computing power and resources of cloud servers, while reducing the demand for computing resources in local systems, allowing AIGC services to be more widely used and accessed.

[0069] In another embodiment of the present application, the first AIGC module is integrated into the system, including one of the following: the first AIGC module and the existing module of the system are directly called each other; the first AIGC module directly replaces the existing module of the system; the first AIGC module is integrated with the existing module of the system.

[0070] Specifically, the first AIGC module directly calls the existing modules of the system, that is, the AIGC module can be directly called to perform specific tasks like other ordinary modules in the system, and can also call other existing modules in the system. In this integration method, the AIGC module is tightly embedded in the existing workflow of the system and collaborates with other modules to complete complex tasks. For example, an AIGC module may be responsible for optimizing the execution of certain algorithms. It can call the system module to obtain data during the execution process. At the same time, the system module can also call the AIGC module to optimize the data processing process. This integration method emphasizes the collaborative work between modules.

[0071] Specifically, the first AIGC module directly replaces the existing modules in the system. In this case, the AIGC module completely replaces an existing module in the system. Usually, this replacement is because the module generated by AIGC has higher efficiency, better performance, stronger robustness or more advanced functions. This integration method focuses on performance and function optimization. For example, if the system originally used a less efficient sorting algorithm module, AIGC generates a more efficient new sorting algorithm module after analysis, then this new module can directly replace the old module, thereby improving the overall performance of the system. This method requires that the AIGC module and the existing module are fully compatible in interface and function, and can be directly replaced.

[0072] Specifically, the integration of the first AIGC module with the existing modules of the system refers to combining some functions or codes of the AIGC module with the existing modules of the system to enhance or supplement the functions of the existing modules. This approach may involve modifying the code of the existing module, adding code snippets generated by the AIGC module, or merging some functions of the two modules to form a new module. This integration method focuses more on the expansion and enhancement of functions. For example, there is a data processing module in the system. If the code generated by AIGC has special advantages in data cleaning or preprocessing, then this part of the code can be integrated into the data processing module to improve the efficiency and quality of data processing.

[0073] In one embodiment of the present application, the second AIGC module is tested to determine whether the second AIGC module can pass the test run, including: running the second AIGC module in the system and recording the output result; comparing the output result with a preset output result; if the output result is inconsistent with the preset output result, determining that the second AIGC module has not passed the test run; if the output result is consistent with the preset output result, determining that the second AIGC module has passed the test run.

[0074] Specifically, the second AIGC module is actually run in the system to verify whether the module can work properly in the system environment. Working properly in the system means that the module can correctly interact with other components in the system, process expected inputs and generate output results. During the trial run, the system will record the output results of the second AIGC module for subsequent comparison and evaluation.

[0075] More specifically, a test run can be initiated manually and the availability of the AIGC module can be verified manually, which can immediately verify the functionality and correctness of the AIGC module, provide instant feedback, and help R&D personnel quickly adjust and optimize the code generated by AIGC. Batch test runs can also be performed within a certain period to verify whether the newly added AIGC module can operate normally, so that the reliability and efficiency of the AIGC module can be continuously monitored. Even during the operation of the system, potential problems or performance degradation of the module can be discovered in time to ensure continuous optimization and improvement of the system.

[0076] Specifically, the system compares the actual output results obtained from the trial run with the preset ideal output results. The preset output results are usually determined in the design or requirements stage and are used to measure whether the AIGC module can meet the established business logic or technical requirements. If the actual output results are inconsistent with the preset output results, that is, the module fails to run as expected or produces incorrect output, then it can be determined that the module has not passed the trial run and different codes need to be obtained from other AIGC sources. If the actual output results are consistent with the preset output results, that is, the module can run correctly and produce the expected output, then it can be determined that the module has passed the trial run and can be confirmed as a code asset that can be used for system integration.

[0077] More specifically, the results of the trial run can determine whether the AIGC module is abnormal. The system can choose to return the running results of each module or the running results of the entire process. Through the trial run, the behavior of the AIGC module in the actual system environment can be directly observed to determine whether its logic is correct, whether the interface call meets expectations, and whether there are conflicts or incompatibilities with other parts of the system. If the process is interrupted or an error occurs, the system can record and feedback which module or step has a problem, thereby quickly locating the abnormality of the AIGC module and reducing debugging time and cost.

[0078] In another embodiment of the present application, before obtaining the code generated by AIGC, it includes: pre-embedding an AIGC module in the above-mentioned system, initializing information of the above-mentioned AIGC module, wherein the information of the above-mentioned AIGC module includes the name, input parameters and output parameters of the above-mentioned AIGC module; automatically generating an initial AIGC module in a graphical form according to the information of the above-mentioned AIGC module, integrating the above-mentioned first AIGC module into the system, and obtaining a second AIGC module, including: integrating the above-mentioned first AIGC module into the above-mentioned initial AIGC module, and obtaining the above-mentioned second AIGC module.

[0079] Specifically, during the system design phase, developers will pre-place or mark some points in the system, which will be used for the integration of AIGC code in the future. These pre-embedded points are like "sockets" in the system, waiting to be filled by the code "plugs" generated by AIGC. After the AIGC module is pre-embedded, each module needs to be initialized, and its name, input parameters, and output parameters are set. The name is used to identify the module, and the input parameters and output parameters define the rules for the module to interact with other system components, that is, what type of input the module receives and what type of output it will provide after processing. Based on the initialized parameters, the system can generate an initial AIGC module graph, which represents a template or framework, which will be filled with actual AIGC code in subsequent steps, thus becoming a module with actual functions.

[0080] Specifically, first, the system will call the code generated by the first AIGC module, that is, the AIGC service generates code suitable for the embedded module, which contains preliminary functional implementation but has not yet been fully integrated with the system. Next, the first AIGC module is integrated into the existing initial AIGC module graph in the system. This process involves adjusting and optimizing the code to ensure that it can be seamlessly connected with other modules in the system. After this step, the code generated by AIGC is transformed from an isolated, immature code fragment into a fully functional component in the system that can be called by other modules.

[0081] In order to ensure continuous optimization of the AIGC module, in one embodiment of the present application, the method further includes: batch processing all the above optimal modules after every preset time period to verify the accuracy of all the above optimal modules.

[0082] Specifically, the preset time period refers to the time period set by the system for regular module accuracy verification, for example, it can be one day, one week or one month. For unavailable or abnormal AIGC modules, the system will re-acquire the AIGC source from the AIGC server to obtain more accurate AIGC code, and support the selection of multiple AIGC sources to obtain the optimal solution for the required AIGC module and code, which matches the application code and the AIGC source. This matching method will improve the accuracy of the use of AIGC generated code. For AIGC modules that have been reviewed, batch processing will not perform server trial calculations, that is, the module has been solidified and the code in the module will not be changed. Through this periodic verification, module failure or performance degradation caused by changes in the system environment, such as updates to dependent library versions, changes in operating platforms, and adjustments to data formats, can be discovered in a timely manner.

[0083] Specifically, batch processing means that when the preset time period arrives, the system automatically starts a batch processing process to perform operation tests on all optimal AIGC modules one by one. This test includes executing all functions of the module, checking whether its output results are consistent with expectations, and monitoring its operating efficiency and resource consumption. Through batch processing, even when the system environment changes, timely adjustments can be made to avoid potential operating risks, thereby maintaining the overall stability and efficiency of the system.

[0084] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the method for generating the AIGC code of the present application will be described in detail below in combination with specific embodiments.

[0085] This embodiment relates to a specific method for generating an AIGC code, such as Figure 3 As shown, the implementation flow diagram of the AIGC code generation method includes the following steps:

[0086] Step S1: pre-embed the AIGC module.

[0087] Step S2: Obtain the AIGC server.

[0088] Step S3: Obtain the code generated by AIGC to obtain the first AIGC code.

[0089] Step S4: Fill in the context parameters of the first AIGC code to form a first AIGC module.

[0090] Step S5: Integrate the first AIGC module into the system to obtain a second AIGC module.

[0091] Step S6: Perform a trial operation on the second AIGC module.

[0092] Step S7: Determine whether the second AIGC module passes the trial operation.

[0093] Step S8: If the second AIGC module fails the trial operation, jump to step S2.

[0094] Step S9: If the second AIGC module passes the trial operation, the second AIGC module is solidified as a system asset.

[0095] Step S10: The second AIGC module generates a corresponding AIGC code and runs it directly in the system.

[0096] In the above-mentioned embodiment, the code generated by AIGC is integrated into the system after context processing, so that the AIGC code is integrated into the system and becomes a part of the system, and the AIGC module is tested, thereby achieving that the AIGC code can adapt to a specific context environment and improving the applicability of the AIGC code in system development.

[0097] The embodiment of the present application also provides a device for generating an AIGC code. It should be noted that the device for generating an AIGC code of the embodiment of the present application can be used to execute the method for generating an AIGC code provided by the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions thereof will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0098] The following introduces the AIGC code generation device provided in the embodiment of the present application.

[0099] Figure 4 Schematic diagram of a device for generating an AIGC code according to an embodiment of the present application. Figure 4 As shown, the device comprises:

[0100] An acquisition unit 10 is used to acquire a code generated by AIGC to obtain a first AIGC code;

[0101] Specifically, the code generated by AIGC can be obtained from the AIGC server for subsequent use. The system needs to rely on the code generated by the AIGC server to implement a certain function or service. The obtained code is generated by AIGC and usually contains some intelligent algorithms or rules that can help the system better perform specific tasks or handle specific situations.

[0102] A filling unit 20, configured to fill the context parameters of the first AIGC code to form a first AIGC module;

[0103] Specifically, the filling unit refers to adjusting the first AIGC code obtained from the AIGC server to adapt to specific application scenarios or requirements, and filling the context parameters of the first AIGC code, that is, replacing specific variables or parameters in the code with actually required values ​​or information to ensure that the code can correctly perform the required functions during actual operation. Filling the context parameters is to personalize the code generated by AIGC to make it more in line with the actual situation and meet specific needs.

[0104] An integration unit 30, used to integrate the first AIGC module into the system to obtain a second AIGC module;

[0105] Specifically, the integration unit integrates the first AIGC module after filling the context parameters into the system to ensure that it coordinates and cooperates with other components and functions of the system to realize the overall function of the system. The integration process involves operations such as modifying the system configuration file, adjusting the interface or data transmission method, etc., to ensure that the second AIGC module can run correctly and interact effectively with other parts of the system. The purpose of the integration unit is to seamlessly connect the code generated by AIGC with the existing system, realize the intelligence and automation of the system, and improve the efficiency and performance of the system. By integrating the second AIGC module, the system can handle various situations and needs more intelligently, provide more personalized and customized services, and thus enhance the user experience.

[0106] A trial operation unit 40, configured to perform a trial operation on the second AIGC module to determine whether the second AIGC module can pass the trial operation;

[0107] Specifically, the trial operation unit actually tests and runs the second AIGC module integrated into the system to verify whether the module's functions and performance meet expectations and determine whether it can pass the trial operation. The trial operation can ensure that the second AIGC module can run stably and reliably in the system. The trial operation unit can help developers discover and solve problems in a timely manner to ensure the stability and reliability of the system.

[0108] a repeating unit 50, configured to, if the second AIGC module fails the trial operation, repeatedly execute the acquiring unit, the filling unit, the integrating unit and the trial operation unit at least once in sequence until the second AIGC module passes the trial operation;

[0109] Specifically, if the second AIGC module fails to pass the trial run, that is, problems occur in the actual test or the expected effect is not achieved, it is necessary to repeat the acquisition unit, filling unit, integration unit and trial run unit in sequence. This means that it is necessary to re-acquire the code generated by AIGC, fill the context parameters of the code, integrate it into the system, and conduct a trial run again to find and solve the problem until the second AIGC module can pass the trial run. This cyclic process can help developers continuously optimize and adjust the code generated by AIGC to ensure that it can run correctly in the system and achieve the expected effect. Such an iterative process can gradually improve and improve the system and improve the stability and performance of the system.

[0110] A determination unit 60, configured to determine that the second AIGC module is an optimal module if the second AIGC module passes the trial operation, and solidify the optimal module as an asset of the system;

[0111] Specifically, when the second AIGC module passes the trial run and achieves the expected effect, it can be determined that the module is the optimal module, which means that after at least one acquisition, filling, integration and trial run, the AIGC module in the system has achieved the expected effect, can operate stably and reliably, and can effectively realize the functional requirements of the system.

[0112] Specifically, the verified optimal AIGC module is solidified as the system's asset, that is, the module is fixed in the system as a component of the system and will not be changed. By solidifying the optimal module, it can be ensured that the system can stably and reliably perform the required functions in actual operation, and it also facilitates the maintenance and management of the system.

[0113] The generating unit 70 is used to generate the corresponding AIGC code by using the optimal module when receiving a code generation request, so that the AIGC code can be directly run in the system.

[0114] Specifically, the system uses the code generated by the fixed optimal AIGC module. In this way, the system can dynamically generate code that meets the requirements through the optimal module, thereby realizing the intelligence and automation of the system. Through this unit, the system can respond to different scenarios and requirements more flexibly and improve the efficiency and performance of the system.

[0115] In the above embodiment, a first AIGC code is obtained and context parameters of the first AIGC code are filled to form a first AIGC module; then, the first AIGC module is integrated into the system to obtain a second AIGC module; thereafter, the second AIGC module is trial-run to determine whether the second AIGC module can pass the trial run; if the second AIGC module fails the trial run, the above acquisition step, the above filling step, the above integration step and the above trial run step are sequentially repeated at least once until the second AIGC module passes the trial run; if the second AIGC module passes the trial run, the second AIGC module is determined to be the optimal module, and the optimal module is solidified as an asset of the system; finally, when a code generation request is received, the corresponding AIGC code is generated using the optimal module, so that the AIGC code runs directly in the system. In this solution, the code generated by AIGC is contextually processed and then integrated into the system. That is, the solution can integrate the AIGC code into the system and make it a part of the system, and can be customized according to the specific requirements of the system. This means that these codes will be adjusted and optimized according to the specific needs of the system when or after they are generated to ensure that they work seamlessly with the existing codes in the system, thereby solving the problem that the AIGC code in the existing technology cannot adapt to the specific context environment and is not highly applicable in the entire system development.

[0116] In a specific embodiment of the present application, the acquisition unit includes:

[0117] An acquisition module, used to acquire the information generated by the above AIGC;

[0118] A filtering module, used to remove non-code parts from the information generated by the AIGC to obtain a filtered AIGC code;

[0119] The conversion module is used to convert the HTML language text of the filtered AIGC code into a code that can be directly compiled and executed to obtain the first AIGC code.

[0120] Specifically, obtain the AIGC-generated code from the AIGC server, and start the link with the source service according to the configured AIGC default source. Usually, the AIGC server returns not only the code itself, but also some additional text descriptions, comments, HTML tags or other non-code elements. These elements are not directly helpful for the execution of the code and sometimes even interfere with subsequent processing. Remove all non-code elements including but not limited to HTML tags, comments, blank characters, etc. to ensure that the remaining part is purely executable code to ensure the improvement of the usability and accuracy of the code.

[0121] Specifically, the AIGC service usually returns the code in HTML format because the code needs to be displayed on the web page. However, it is not feasible to compile and execute the code directly in HTML format, so the HTML format code needs to be converted into plain text code so that it can be directly processed by the compiler or interpreter of the programming language. For example, if the target is to use JAVA language, the converted code should be in a JAVA-readable format and does not contain any HTML tags or other non-JAVA elements.

[0122] Specifically, after the above processing, what is finally obtained is the first AIGC code that can be directly used for system development, ensuring that the code obtained from the AIGC service can be seamlessly integrated into the system development process without additional modification or manual intervention.

[0123] In one embodiment of the present application, the acquisition module includes:

[0124] A construction submodule is used to construct a first request package according to a preset code generation template, wherein the first request package includes all context information and parameters required for code generation;

[0125] The sending submodule is used to send the first request packet to the AIGC server, and the AIGC server generates information including a code according to the content of the first request packet.

[0126] Specifically, the first request package is constructed based on a preset code generation template. This template is actually a framework that guides the AIGC server to generate a specific type of code. The code generation template facilitates AIGC to return code instead of other information or redundant information. The template is closely related to the AIGC source, and each AIGC corresponds to a different template. The template contains all the context information and parameters required to generate the code. The context information includes but is not limited to the problem that the code should solve, the required programming language, the functional requirements of the code, etc. The parameters specifically refer to the format and type of input and output data, or the name of a specific function or class that needs to be used in the code. According to the generated code template of the AIGC module, a complete request package is assembled to obtain the first request package, and the constructed first request package is sent to the AIGC server, that is, a request is sent to the AIGC server through the network interface, and the request contains all the information of the above-mentioned constructed first request package.

[0127] Specifically, after receiving the first request packet, the AIGC server will parse the content and generate corresponding code based on the provided context information and parameters. This process utilizes the AI ​​model of the AIGC server. The model analyzes and generates the code snippet that best meets the requirements based on the input information. The generated code is finally encapsulated by the AIGC server in the response information and returned to the requester.

[0128] In one embodiment of the present application, the filling unit includes:

[0129] an adjustment module, configured to add or modify context parameters in the first AIGC code to obtain an adjusted AIGC code, wherein the context parameters include input parameters and output parameters of the first AIGC code, and information on interaction between the first AIGC code and other components in the system;

[0130] A packaging module, used for packaging the adjusted AIGC code using a JAVA method to obtain a second AIGC code;

[0131] The encapsulation module is used to encapsulate the second AIGC code into the first AIGC module, wherein the first AIGC module contains context information that enables the second AIGC code to run effectively in the system.

[0132] Specifically, the context parameters in the first AIGC code are adjusted. The context parameters include input parameters, output parameters and information about the code's interaction with other system components. Some parameters need to be added, modified or deleted. For example, the input parameters need to be adjusted to match the data format of other modules in the system, and the output parameters need to be adjusted to ensure that they can be correctly received and processed.

[0133] Specifically, after completing the parameter adjustment, the adjusted AIGC code is packaged into a JAVA method. This is because the code returned by AIGC is currently more of a method fragment, so packaging it into a JAVA method is the best way to handle the AIGC code. This method packaging involves converting the code fragment into the format of a JAVA method, including the method declaration, parameter list, return type, etc., to comply with the JAVA programming specification. By standardizing the adjusted AIGC code into the JAVA method format, the AIGC code follows a consistent programming style and specification, ensuring the standardization of the code.

[0134] Specifically, the second AIGC code is encapsulated into the first AIGC module, that is, the code is packaged into a reusable and configurable unit, which has a clear interface definition and can be called or used by other modules in the system. The first AIGC module contains all the context information that enables the second AIGC code to run effectively in the system, including but not limited to the environment configuration of the code, dependent libraries, input and output interface definitions, etc. This information is crucial to ensure the correctness of the code and the consistency of the system. In this way, the first AIGC module has no essential difference from the existing modules of the system. The module supports combination, assembly, etc., so that the first AIGC module can run according to the expected function.

[0135] More specifically, the AIGC module can be directly exposed to the outside, which means that the AIGC module can be configured to be open to external systems or services. In other words, it is not limited to use within the current system, but can also be called by other systems or services through the network. This openness allows the AIGC module to be shared and used by multiple different applications or systems, enhancing the module's reusability and system connectivity. If it is exposed to the outside, it can make remote HTTP calls, that is, the AIGC code can be called remotely. Through the HTTP protocol, the AIGC module can receive requests from remote systems, parse request parameters, execute corresponding code logic, and then return the processing results to the requester in the form of HTTP responses. This method allows the module to exist in the form of a service without having to care about the specific implementation details of the client, which improves the scalability and flexibility of the system. Remotely calling AIGC code means that users can call the AIGC module through HTTP requests from anywhere with a network connection without deploying and running AIGC code on the local system. This remote calling mechanism is suitable for cloud computing environments, which can make full use of the powerful computing power and resources of cloud servers, while reducing the demand for computing resources in local systems, allowing AIGC services to be more widely used and accessed.

[0136] In one embodiment of the present application, the integrated unit includes one of the following:

[0137] A calling module, used for directly calling the first AIGC module and the existing modules of the system;

[0138] A replacement module, used for the first AIGC module to directly replace the existing module of the system;

[0139] The fusion module is used to fuse the first AIGC module with the existing modules of the system.

[0140] Specifically, the first AIGC module directly calls the existing modules of the system, that is, the AIGC module can be directly called to perform specific tasks like other ordinary modules in the system, and can also call other existing modules in the system. In this integration method, the AIGC module is tightly embedded in the existing workflow of the system and collaborates with other modules to complete complex tasks. For example, an AIGC module may be responsible for optimizing the execution of certain algorithms. It can call the system module to obtain data during the execution process. At the same time, the system module can also call the AIGC module to optimize the data processing process. This integration method emphasizes the collaborative work between modules.

[0141] Specifically, the first AIGC module directly replaces the existing modules in the system. In this case, the AIGC module completely replaces an existing module in the system. Usually, this replacement is because the module generated by AIGC has higher efficiency, better performance, stronger robustness or more advanced functions. This integration method focuses on performance and function optimization. For example, if the system originally used a less efficient sorting algorithm module, AIGC generates a more efficient new sorting algorithm module after analysis, then this new module can directly replace the old module, thereby improving the overall performance of the system. This method requires that the AIGC module and the existing module are fully compatible in interface and function, and can be directly replaced.

[0142] Specifically, the integration of the first AIGC module with the existing modules of the system refers to combining some functions or codes of the AIGC module with the existing modules of the system to enhance or supplement the functions of the existing modules. This approach may involve modifying the code of the existing module, adding code snippets generated by the AIGC module, or merging some functions of the two modules to form a new module. This integration method focuses more on the expansion and enhancement of functions. For example, there is a data processing module in the system. If the code generated by AIGC has special advantages in data cleaning or preprocessing, then this part of the code can be integrated into the data processing module to improve the efficiency and quality of data processing.

[0143] In one embodiment of the present application, the above-mentioned trial operation unit includes:

[0144] An operation module, used to operate the second AIGC module in the system and record output results;

[0145] A comparison module, used for comparing the above output result with a preset output result;

[0146] A first determination module, configured to determine that the second AIGC module fails the trial operation if the output result is inconsistent with the preset output result;

[0147] The second determination module is used to determine that the second AIGC module passes the trial operation if the output result is consistent with the preset output result.

[0148] Specifically, the second AIGC module is actually run in the system to verify whether the module can work properly in the system environment. Working properly in the system means that the module can correctly interact with other components in the system, process expected inputs and generate output results. During the trial run, the system will record the output results of the second AIGC module for subsequent comparison and evaluation.

[0149] More specifically, a test run can be initiated manually and the availability of the AIGC module can be verified manually, which can immediately verify the functionality and correctness of the AIGC module, provide instant feedback, and help R&D personnel quickly adjust and optimize the code generated by AIGC. Batch test runs can also be performed within a certain period to verify whether the newly added AIGC module can operate normally, so that the reliability and efficiency of the AIGC module can be continuously monitored. Even during the operation of the system, potential problems or performance degradation of the module can be discovered in time to ensure continuous optimization and improvement of the system.

[0150] Specifically, the system compares the actual output results obtained from the trial run with the preset ideal output results. The preset output results are usually determined in the design or requirements stage and are used to measure whether the AIGC module can meet the established business logic or technical requirements. If the actual output results are inconsistent with the preset output results, that is, the module fails to run as expected or produces incorrect output, then it can be determined that the module has not passed the trial run and different codes need to be obtained from other AIGC sources. If the actual output results are consistent with the preset output results, that is, the module can run correctly and produce the expected output, then it can be determined that the module has passed the trial run and can be confirmed as a code asset that can be used for system integration.

[0151] More specifically, the results of the trial run can determine whether the AIGC module is abnormal. The system can choose to return the running results of each module or the running results of the entire process. Through the trial run, the behavior of the AIGC module in the actual system environment can be directly observed to determine whether its logic is correct, whether the interface call meets expectations, and whether there are conflicts or incompatibilities with other parts of the system. If the process is interrupted or an error occurs, the system can record and feedback which module or step has a problem, thereby quickly locating the abnormality of the AIGC module and reducing debugging time and cost.

[0152] In one embodiment of the present application, before executing the above-mentioned acquisition unit, it includes: an initialization unit, which is used to pre-embed the AIGC module in the above-mentioned system and initialize the information of the above-mentioned AIGC module, and the information of the above-mentioned AIGC module includes the name, input parameters and output parameters of the above-mentioned AIGC module; an automatic generation unit, which is used to automatically generate an initial AIGC module in a graphical form according to the information of the above-mentioned AIGC module, and the above-mentioned integration unit includes: an integration module, which is used to integrate the above-mentioned first AIGC module into the above-mentioned initial AIGC module to obtain the above-mentioned second AIGC module.

[0153] Specifically, during the system design phase, developers will pre-place or mark some points in the system, which will be used for the integration of AIGC code in the future. These pre-embedded points are like "sockets" in the system, waiting to be filled by the code "plugs" generated by AIGC. After the AIGC module is pre-embedded, each module needs to be initialized, and its name, input parameters, and output parameters are set. The name is used to identify the module, and the input parameters and output parameters define the rules for the module to interact with other system components, that is, what type of input the module receives and what type of output it will provide after processing. Based on the initialized parameters, the system can generate an initial AIGC module graph, which represents a template or framework, which will be filled with actual AIGC code in subsequent steps, thus becoming a module with actual functions.

[0154] Specifically, first, the system will call the code generated by the first AIGC module, that is, the AIGC service generates code suitable for the embedded module, which contains preliminary functional implementation but has not yet been fully integrated with the system. Next, the first AIGC module is integrated into the existing initial AIGC module graph in the system. This process involves adjusting and optimizing the code to ensure that it can be seamlessly connected with other modules in the system. After this step, the code generated by AIGC is transformed from an isolated, immature code fragment into a fully functional component in the system that can be called by other modules.

[0155] In order to ensure continuous optimization of the AIGC module, in one embodiment of the present application, the apparatus further includes: a batch processing unit, configured to batch process all of the optimal modules every preset time period to verify the accuracy of all of the optimal modules.

[0156] Specifically, the preset time period refers to the time period set by the system for regular module accuracy verification, for example, it can be one day, one week or one month. For unavailable or abnormal AIGC modules, the system will re-acquire the AIGC source from the AIGC server to obtain more accurate AIGC code, and support the selection of multiple AIGC sources to obtain the optimal solution for the required AIGC module and code, which matches the application code and the AIGC source. This matching method will improve the accuracy of the use of AIGC generated code. For AIGC modules that have been reviewed, batch processing will not perform server trial calculations, that is, the module has been solidified and the code in the module will not be changed. Through this periodic verification, module failure or performance degradation caused by changes in the system environment, such as updates to dependent library versions, changes in operating platforms, and adjustments to data formats, can be discovered in a timely manner.

[0157] Specifically, batch processing means that when the preset time period arrives, the system automatically starts a batch processing process to perform operation tests on all optimal AIGC modules one by one. This test includes executing all functions of the module, checking whether its output results are consistent with expectations, and monitoring its operating efficiency and resource consumption. Through batch processing, even when the system environment changes, timely adjustments can be made to avoid potential operating risks, thereby maintaining the overall stability and efficiency of the system.

[0158] The AIGC code generation device includes a processor and a memory. The acquisition unit, filling unit, integration unit, trial operation unit, repetition unit, determination unit, solidification unit, generation unit, etc. are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.

[0159] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0160] An embodiment of the present invention provides a device, the device comprising a processor, a memory, and a program stored in the memory and executable on the processor, and when the processor executes the program, at least the following steps are implemented:

[0161] Step S201, an acquisition step, acquiring a code generated by AIGC to obtain a first AIGC code;

[0162] Step S202, a filling step, filling the context parameters of the first AIGC code to form a first AIGC module;

[0163] Step S203, an integration step, integrating the first AIGC module into the system to obtain a second AIGC module;

[0164] Step S204, a trial operation step, performing a trial operation on the second AIGC module to determine whether the second AIGC module can pass the trial operation;

[0165] Step S205, if the second AIGC module fails the trial operation, the acquisition step, the filling step, the integration step and the trial operation step are sequentially repeated at least once until the second AIGC module passes the trial operation;

[0166] Step S206: if the second AIGC module passes the trial operation, the second AIGC module is determined to be the optimal module, and the optimal module is solidified as an asset of the system;

[0167] Step S207, when a code generation request is received, the corresponding AIGC code is generated using the optimal module, so that the AIGC code runs directly in the system.

[0168] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0169] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.

[0170] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0171] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0172] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0173] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0174] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0175] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0176] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0177] In the above embodiment, first, the first AIGC code is obtained and the context parameters of the first AIGC code are filled to form a first AIGC module; then, the first AIGC module is integrated into the system to obtain a second AIGC module; thereafter, the second AIGC module is trial-run to determine whether the second AIGC module can pass the trial run; if the second AIGC module fails the trial run, the above acquisition step, the above filling step, the above integration step and the above trial run step are repeated in sequence at least once until the second AIGC module passes the trial run, and if the second AIGC module passes the trial run, the second AIGC module is determined to be the optimal module, and the optimal module is solidified as an asset of the above system; finally, when a code generation request is received, the corresponding AIGC code is generated using the optimal module, so that the AIGC code can be directly run in the above system. In this solution, the code generated by AIGC is contextually processed and then integrated into the system. That is, the solution can integrate the AIGC code into the system and make it a part of the system, and can be customized according to the specific requirements of the system. This means that these codes will be adjusted and optimized according to the specific needs of the system when or after they are generated to ensure that they work seamlessly with the existing codes in the system, thereby solving the problem that the AIGC code in the existing technology cannot adapt to the specific context environment and is not highly applicable in the entire system development.

[0178] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for generating an AIGC code, characterized in that: include: An acquisition step of acquiring a code generated by AIGC to obtain a first AIGC code; A filling step, filling the context parameters of the first AIGC code to form a first AIGC module; an integration step of integrating the first AIGC module into a system to obtain a second AIGC module; a trial operation step of performing a trial operation on the second AIGC module to determine whether the second AIGC module can pass the trial operation; If the second AIGC module fails the trial operation, repeating the obtaining step, the filling step, the integrating step and the trial operation step at least once in sequence until the second AIGC module passes the trial operation; If the second AIGC module passes the trial operation, determining that the second AIGC module is the optimal module, and solidifying the optimal module as an asset of the system; When a code generation request is received, the optimal module is used to generate the corresponding AIGC code, so that the AIGC code runs directly in the system.

2. The generation method according to claim 1, characterized in that: Get the code generated by AIGC and get the first AIGC code, including: Obtaining information generated by the AIGC; Removing non-code parts of the information generated by the AIGC to obtain a filtered AIGC code; The HTML language text of the filtered AIGC code is converted into a code that can be directly compiled and executed to obtain the first AIGC code.

3. The generation method according to claim 2, characterized in that: Obtain information generated by the AIGC, including: Constructing a first request package according to a preset code generation template, wherein the first request package includes all context information and parameters required for code generation; The first request packet is sent to an AIGC server, and the AIGC server generates information including a code according to content of the first request packet.

4. The generation method according to claim 1, characterized in that: Filling the context parameters of the first AIGC code to form a first AIGC module, including: Adding or modifying context parameters in the first AIGC code to obtain an adjusted AIGC code, wherein the context parameters include input parameters and output parameters of the first AIGC code, and information on interaction between the first AIGC code and other components in the system; The adjusted AIGC code is packaged by a JAVA method to obtain a second AIGC code; The second AIGC code is encapsulated as the first AIGC module, wherein the first AIGC module includes context information that enables the second AIGC code to effectively run in the system.

5. The generation method according to claim 1, characterized in that: Integrating the first AIGC module into a system includes one of the following: The first AIGC module and the existing modules of the system directly call each other; The first AIGC module directly replaces the existing module of the system; The first AIGC module is integrated with the existing modules of the system.

6. The generation method according to claim 1, characterized in that: Performing a trial operation on the second AIGC module to determine whether the second AIGC module can pass the trial operation includes: Running the second AIGC module in the system and recording output results; Comparing the output result with a preset output result; If the output result is inconsistent with the preset output result, it is determined that the second AIGC module has failed the trial operation; If the output result is consistent with the preset output result, it is determined that the second AIGC module passes the trial operation.

7. The generation method according to claim 1, characterized in that: Before getting the code generated by AIGC, include: Pre-embed an AIGC module in the system and initialize information of the AIGC module, wherein the information of the AIGC module includes a name, input parameters, and output parameters of the AIGC module; According to the information of the AIGC module, an initial AIGC module in a graphical form is automatically generated, and the first AIGC module is integrated into the system to obtain a second AIGC module, including: The first AIGC module is integrated into the initial AIGC module to obtain the second AIGC module.

8. The generation method according to claim 1, characterized in that: The method further comprises: After every preset time period, batch processing is performed on all the optimal modules to verify the accuracy of all the optimal modules.

9. A device for generating an AIGC code, characterized in that: include: An acquisition unit, configured to acquire a code generated by the AIGC to obtain a first AIGC code; A filling unit, configured to fill in the context parameter of the first AIGC code to form a first AIGC module; An integration unit, configured to integrate the first AIGC module into a system to obtain a second AIGC module; a trial operation unit, configured to perform a trial operation on the second AIGC module to determine whether the second AIGC module can pass the trial operation; a repeating unit, configured to, if the second AIGC module fails the trial operation, repeatedly execute the acquiring unit, the filling unit, the integrating unit, and the trial operation unit in sequence at least once until the second AIGC module passes the trial operation; a determining unit, configured to determine that the second AIGC module is an optimal module if the second AIGC module passes the trial operation, and solidify the optimal module as an asset of the system; A generating unit is used to generate the corresponding AIGC code by using the optimal module when receiving a code generation request, so that the AIGC code can be directly run in the system.

10. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing the AIGC code generation method described in any one of claims 1 to 8.