Information generation method and device, electronic equipment and computer readable storage medium
By splitting large tasks into small tasks and processing using task processing models, the processing capabilities of each model are fully utilized, solving the problem of the decline in performance of large models in complex tasks and improving the accuracy of test information generation.
Patent Information
- Application Number
- CN202510108203.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-16
AI Technical Summary
When large models deal with complex tasks, due to limited processing capabilities, the quality and scale of the output answers are limited, especially when facing complex tasks.
The large generation task is split into multiple small generation subtasks, and each generation subtask is processed separately using the task processing model, reducing the task size required to be processed by each model, thereby fully leveraging the model's processing capabilities.
By splitting the task into small generation subtasks, the accuracy of the generated target test information is improved, and the output results are inaccurate due to exceeding the upper limit of the model processing capacity.
Smart Images

Figure CN120010953A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of artificial intelligence technology, and specifically to an information generation method, device, electronic device, and computer-readable storage medium. Background Art
[0002] In recent years, large models (LLM) have emerged in the field of AI and shined in all walks of life. Since the emergence of large models, practitioners have applied them in the field of programming. For example, large models are used to assist in generating unit test information (use case code) for existing components (codes), thereby improving the efficiency of writing unit test cases and ensuring code quality.
[0003] However, there is an upper limit to the processing power of large models. The input and output that can be received at one time are limited, and the attention in a round of conversation is also limited, resulting in the quality and scale of the output answers being limited. Especially when faced with complex tasks, the performance of large models deteriorates significantly. Summary of the invention
[0004] The embodiments of the present application provide an information generation method, device, electronic device and computer-readable storage medium, which can improve the accuracy of test information generation.
[0005] In a first aspect, an embodiment of the present application provides an information generation method, the method comprising:
[0006] In response to a test information generation request for a target component, determining a generation task corresponding to the test information generation request;
[0007] Splitting the generation task into at least one generation subtask, and determining a task processing model corresponding to each of the generation subtasks;
[0008] Each of the task processing models is called to process each of the generated subtasks to obtain target test information.
[0009] In a second aspect, an embodiment of the present application further provides an information generating device, the device comprising:
[0010] A response module, configured to respond to a test information generation request for a target component and determine a generation task corresponding to the test information generation request;
[0011] A splitting module, used to split the generation task into at least one generation subtask, and determine the task processing model corresponding to each generation subtask;
[0012] The calling module is used to call each of the task processing models to process each of the generated subtasks to obtain target test information.
[0013] Optionally, in some embodiments of the present application, splitting the generation task into at least one generation subtask includes:
[0014] Splitting the generation task into at least one generation subtask based on the task splitting reference information;
[0015] The task splitting reference information includes at least one of the task size, task type, or processing task feature information of each of the task processing models.
[0016] Optionally, in some embodiments of the present application, the task processing model includes an agent, and each of the agents processes a corresponding generation subtask respectively;
[0017] The generation subtask includes at least one of generating annotations and collecting contexts, judging testability, generating component optimization suggestions, generating test case sets, or generating use case components and merging use case components.
[0018] Optionally, in some embodiments of the present application, calling each of the task processing models to process each of the generated subtasks to obtain target test information includes:
[0019] Determining processing timing information of each of the generated subtasks;
[0020] The task processing models are called in sequence according to the processing timing information to process the generated subtasks to obtain target test information.
[0021] Optionally, in some embodiments of the present application, calling each of the task processing models in sequence according to the processing timing information to process each of the generated subtasks to obtain target test information includes:
[0022] Calling each of the task processing models in sequence according to the processing timing information, and, for any task processing model, using the task processing model and the previous processing result to process the current generation subtask to obtain a model processing result, and using the model processing result of the last generation subtask as the target test information;
[0023] The previous processing result includes a result obtained in response to a user adjusting a model processing result of a previous task processing model.
[0024] Optionally, in some embodiments of the present application, calling each of the task processing models in sequence according to the processing timing information includes:
[0025] Obtain the model processing result of the task processing model corresponding to the current generation subtask;
[0026] If the model processing result meets the preset conditions, determining the next task processing model to be called based on the model processing result;
[0027] If the model processing result does not meet the preset condition, determining the next task processing model to be called based on the processing timing information;
[0028] Call the next task processing model to be called.
[0029] Optionally, in some embodiments of the present application, calling each of the task processing models to process each of the generated subtasks to obtain target test information includes:
[0030] Calling each of the task processing models through a target plug-in tool to process each of the generated subtasks to obtain target test information;
[0031] Wherein, when processing the generation subtask, the target plug-in tool may call the first target interface in the target plug-in tool to configure the target component;
[0032] After calling each of the task processing models to process each of the generated subtasks and obtaining target test information, the method further includes:
[0033] The target test information is saved in a target test directory through a second target interface of the target plug-in tool.
[0034] In a third aspect, an embodiment of the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and which implements the steps in the above-mentioned information generation method when the computer program is executed by the processor.
[0035] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned information generation method are implemented.
[0036] In a fifth aspect, the embodiments of the present application further provide a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in various optional implementations described in the embodiments of the present application.
[0037] The embodiment of the present application responds to a test information generation request for a target component, determines a generation task corresponding to the test information generation request, splits the generation task into at least one generation subtask, and determines the task processing models corresponding to each generation subtask, calls each task processing model to process each generation subtask, and obtains target test information.
[0038] Among them, by splitting a large generation task into multiple small generation sub-tasks, and using the task processing model to process each generation sub-task respectively, the size of the task that each model needs to process is reduced, which helps to give full play to the processing capacity of the model and also helps to avoid exceeding the upper limit of the model's processing capacity and causing inaccurate output results. The embodiment of the present application improves the accuracy of the generated target test information. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0040] Figure 1 It is a schematic diagram of a scenario in which a terminal device according to an embodiment of the present application executes the information generating method;
[0041] Figure 2 It is a flowchart of the information generation method provided in the embodiment of the present application;
[0042] Figure 3 It is a structural schematic diagram of an information generating device provided in an embodiment of the present application;
[0043] Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in this application to clearly and completely describe the technical solutions in this application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0045] The embodiment of the present application provides an information generation method, device, electronic device and computer-readable storage medium. Specifically, the embodiment of the present application provides an information generation device suitable for electronic equipment, which is used to split the generation task of generating target test information into multiple generation subtasks, and process each generation subtask through a task processing model respectively, so as to improve the accuracy of the generated target test information. Specifically, the electronic device includes a terminal device or a server, and the terminal device includes but is not limited to devices such as mobile phones, tablet computers, laptops or desktop computers. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Delivery Network), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms, etc. The server can be directly or indirectly connected via wired or wireless communication.
[0046] See also Figure 1 , Figure 1 : is a schematic diagram of a scenario in which a terminal device according to an embodiment of the present application executes the information generation method, wherein the specific execution process of the terminal device executing the information generation method is as follows:
[0047] The terminal device 10 responds to a test information generation request for a target component, determines a generation task corresponding to the test information generation request, splits the generation task into at least one generation subtask, determines a task processing model corresponding to each generation subtask, calls each task processing model to process each generation subtask, obtains target test information, and outputs the target test information.
[0048] In summary, the embodiments of the present application reduce the size of tasks that need to be processed by each model by splitting a large generation task into multiple small generation sub-tasks and using a task processing model to process each generation sub-task respectively, which helps to fully utilize the processing capabilities of the model and also helps to avoid exceeding the upper limit of the model's processing capabilities and causing inaccurate output results. The embodiments of the present application improve the accuracy of the generated target test information.
[0049] It should be noted that the order of description of the following embodiments is not intended to limit the priority order of the embodiments.
[0050] See also Figure 2 , Figure 2A flowchart of an information generation method provided in an embodiment of the present application. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown in the flowchart. Specifically, the process of the information generation method specifically includes:
[0051] 101. In response to a test information generation request for a target component, determine a generation task corresponding to the test information generation request.
[0052] The target component refers to the code in programming. For the target component to be tested, the target component is usually a piece of code, such as a function or a method.
[0053] The test information generation request is a request to generate target test information of a target component, and the request may be triggered by a user operation or automatically triggered by a device or program.
[0054] It should be noted that the generation task is a task for generating target test information for the target component, including the actions required to be performed in the process of generating target test information, such as generating code comments, obtaining context, judging testability, and generating test cases and case code.
[0055] 102. Split the generation task into at least one generation subtask, and determine a task processing model corresponding to each generation subtask.
[0056] It should be noted that in the traditional solution, the target component is directly input into the large model, and the test information of the target component (such as the use case code corresponding to the test case) is output through the large model. However, due to the upper limit of the processing capacity of the large model and the large number of test information generation tasks, the quality of the output results of the large model is poor and the accuracy cannot meet the requirements.
[0057] Therefore, in an embodiment of the present application, splitting a generation task with a large amount of generating target test information into multiple generation subtasks with smaller task amounts helps to accurately process each generation subtask with a smaller task amount.
[0058] The task processing model is for generating subtasks. For example, each task processing model processes one generating subtask. By splitting the generating subtasks with smaller task amounts, the demand for models with larger task amounts is reduced. This also helps to give full play to the processing capabilities of the task processing model and improve the accuracy of the processing results of the task processing model.
[0059] In an embodiment of the present application, the task processing model includes a large model based on artificial intelligence, a deep learning model or a machine learning model, etc.
[0060] 103. Call each of the task processing models to process each of the generated subtasks to obtain target test information.
[0061] By processing the generated subtasks by each task processing model, target test information for the target component is obtained. The target test information includes the use case code, which is the code for the test case. It can be understood that the test case is a set of input data, execution conditions and expected results, which is used to verify whether a specific function of the software works as expected. The use case code is an automated script or code that implements the test case.
[0062] In summary, the embodiments of the present application reduce the size of tasks that need to be processed by each model by splitting a large generation task into multiple small generation sub-tasks and using a task processing model to process each generation sub-task respectively, which helps to fully utilize the processing capabilities of the model and also helps to avoid exceeding the upper limit of the model's processing capabilities and causing inaccurate output results. The embodiments of the present application improve the accuracy of the generated target test information.
[0063] Among them, in order to ensure that the capacity of the task processing model can be fully utilized, avoid wasting model resources due to too small a task volume, and avoid exceeding the upper limit of the model's processing capacity, it is necessary to control the splitting of the generated subtasks to avoid splitting the generated subtasks too large or too small. In the embodiments of the present application, in order to achieve the above-mentioned purpose or effect, the splitting of the generated tasks can be controlled based on the size of the task volume and the task type, that is, optionally, in some embodiments of the present application, the step of "splitting the generated task into at least one generated subtask" includes:
[0064] Splitting the generation task into at least one generation subtask based on the task splitting reference information;
[0065] The task splitting reference information includes at least one of the task size, task type, or processing task feature information of each of the task processing models.
[0066] Among them, the task splitting reference information is the information used as a reference or basis for splitting the generated tasks, corresponding to the capability range of the task processing model. For example, the task size reflects the size of the generated subtasks, taking into account the input size, output size, and difficulty of the task to be solved of the task processing model.
[0067] Among them, the task type refers to the type of task. For example, the task types include judgment type, generation type, merging and induction type or collection type. Different task types can use corresponding task processing models to utilize the characteristics of the task processing model that is more focused in a single field to process the generated sub-tasks and improve the quality of the output results of the task processing model.
[0068] The processing task characteristic information refers to the characteristic information of the tasks that the model is suitable for processing, that is, the characteristics of the tasks that the model is good at processing. For example, the processing task characteristic information includes batch processing, efficient and complex calculations, feasibility judgment, and merge processing, etc. Therefore, the generation subtasks for batch processing can be processed by the task processing model that is good at batch processing; the generation subtasks for efficient and complex calculations can be processed by the task processing model that is good at processing efficient and complex calculations.
[0069] Optionally, in the embodiment of the present application, the task processing model can select an agent, and use multiple agents to process the generation subtasks separately. In the embodiment of the present application, for the generation task of target test information, its corresponding generation subtask includes at least one of generating annotations and collecting context, judging testability, generating component optimization suggestions, generating test case sets, or generating case components and merging case components.
[0070] Among them, the generation subtask of generating comments and collecting context specifically includes: generating comments for the target component and collecting the context of the target component, which can improve the subsequent intelligent agent's understanding of the code.
[0071] Among them, the generation subtask of judging testability specifically includes: judging whether the code under test is testable. Specifically, in the embodiment of the present application, judging testability refers to judging the testability of the target component from aspects such as the controllability and observability of the target component. Controllability refers to the characteristic of easily controlling the target component, and observability refers to the characteristic of conveniently viewing the status of the target component and checking the output results of the target component.
[0072] The generation subtask of generating component optimization suggestions specifically includes: optimizing the code that is not testable, and specifically, providing optimization suggestions based on the generation standard of the target component.
[0073] The generation subtask of generating a test case set specifically includes: generating a test case set of a target component, including generating test cases of the target component from different scenarios, and combining various test cases to obtain a test case set.
[0074] The generation subtask of generating a use case component and merging the use case components specifically includes: generating a use case component (ie, a use case code) of each test case, and merging each use case component to obtain a use case file.
[0075] For example, in order to generate the target test information of the target component, it needs to include five processing subtasks in sequence: generating comments and collecting context, judging testability, generating component optimization suggestions, generating test case sets, or generating use case components and merging use case components. Accordingly, five agents can be selected to handle these five processing subtasks respectively. For example, agent A handles the generation subtask of generating comments and collecting context, agent B handles the generation subtask of judging testability, agent C handles the generation subtask of generating component optimization suggestions, agent D handles the generation subtask of generating test case sets, and agent E handles the generation subtask of generating use case components and merging use case components.
[0076] Among them, in some scenarios, the generation task may also include other subtasks in addition to the above five processing subtasks. For example, before calling the intelligent agent to generate annotations for the target component, it is also necessary to execute a generation subtask to determine whether the target component already has annotations.
[0077] Optionally, in order to ensure the effectiveness of processing each generated subtask, it is also necessary to consider the processing sequence between each generated subtask, and control the orderly processing of each generated subtask through the processing sequence, that is, optionally, in some embodiments of the present application, the step of "calling each of the task processing models to process each of the generated subtasks to obtain target test information" includes:
[0078] Determining processing timing information of each of the generated subtasks;
[0079] The task processing models are called in sequence according to the processing timing information to process the generated subtasks to obtain target test information.
[0080] Among them, the processing timing information is also the processing order information of each generation subtask, such as executing generation subtask A first, and then executing generation subtask B. It also corresponds to the processing dependency relationship between each generation subtask. For example, if the current generation subtask needs to wait for the execution result of another generation subtask before it can be executed, it is necessary to execute the other generation subtask first and then execute the current generation subtask.
[0081] Among them, the processing timing information between each generation subtask can be analyzed through a machine learning model, or by identifying the task type of each generation subtask and analyzing the processing timing information between each generation subtask based on the task type, or by determining the processing timing information between the current generation subtasks based on a pre-set processing order of each generation subtask.
[0082] Among them, in order to optimize the processing of subsequent generated subtasks and improve the accuracy of the target test information finally output, the result output by the task processing model can also be adjusted based on the user's operation, so that the next task processing model outputs a new model processing result based on a more accurate model processing result, that is, optionally, in some embodiments of the present application, the step of "calling each of the task processing models in sequence according to the processing timing information to process each of the generated subtasks to obtain the target test information" includes:
[0083] Calling each of the task processing models in sequence according to the processing timing information, and, for any task processing model, using the task processing model and the previous processing result to process the current generation subtask to obtain a model processing result, and using the model processing result of the last generation subtask as the target test information;
[0084] The previous processing result includes a result obtained in response to a user adjusting a model processing result of a previous task processing model.
[0085] It can be understood that the previous processing result is obtained after the user adjusts the model processing result of the previous task processing model, that is, the user's adjusted optimization result of the model processing result of the previous task processing model is used as the input of the next task processing model to optimize the output result of the next task processing model, thereby improving the accuracy of the final target test information.
[0086] Among them, the next task processing model determined based on the processing timing information may include multiple ones. For example, for the task processing model for judging testability, the corresponding next task processing model may include a task processing model for generating component optimization suggestions, or a task processing model for generating a test case set. Different model processing results of the task processing model for judging testability require calling different next task processing models. Therefore, on the basis of processing timing information, the call to the next task processing model can also be controlled in combination with the model processing results of the task processing model, that is, optionally, in some embodiments of the present application, the step of "calling each of the task processing models in sequence according to the processing timing information" includes:
[0087] Obtain the model processing result of the task processing model corresponding to the current generation subtask;
[0088] If the model processing result meets the preset conditions, determining the next task processing model to be called based on the model processing result;
[0089] If the model processing result does not meet the preset condition, determining the next task processing model to be called based on the processing timing information;
[0090] Call the next task processing model to be called.
[0091] For example, if the judgment result is testable, the task processing model for generating a test case set is called; if the judgment result is not testable, the task processing model for generating component optimization suggestions is called.
[0092] Among them, in the embodiment of the present application, each task processing model or intelligent agent can perform corresponding tasks under the guidance of the prompt project to improve the quality of the processing results of the task processing model or intelligent agent through the prompt project.
[0093] Optionally, in an embodiment of the present application, the task processing model can be called based on the IDEA plug-in tool to process the generated subtasks, so as to better perceive the project engineering structure of the target component and implement the operations on the target component involved in the execution of the information generation method. That is, optionally, in some embodiments of the present application, the step of "calling each of the task processing models to process each of the generated subtasks to obtain the target test information" includes:
[0094] Calling each of the task processing models through a target plug-in tool to process each of the generated subtasks to obtain target test information;
[0095] Wherein, when processing the generation subtask, the target plug-in tool may call the first target interface in the target plug-in tool to configure the target component;
[0096] After calling each of the task processing models to process each of the generated subtasks and obtaining target test information, the method further includes:
[0097] The target test information is saved in a target test directory through a second target interface of the target plug-in tool.
[0098] Wherein, the target plug-in tool includes an IDEA plug-in tool. Wherein, by utilizing the first target interface of the IDEA plug-in tool, operations on the target component can be implemented. For example, the functions of the first target interface include inserting the generated comments into the target component, obtaining the context of the target component based on the characteristics of the IDEA plug-in tool that can easily perceive the project engineering structure, etc. Wherein, comments are texts used to explain the function, logic or structure of the code, which will not be executed by the compiler or interpreter. The main purpose of comments is to improve the readability and maintainability of the code, making it easier for other developers (or you in the future) to understand the intent and working principle of the code. Wherein, the context is information related to the target component that can reflect or affect the target component, including the environment or state when the code is executed, such as the value of variables, function call stack, global state, configuration information, etc.
[0099] The function of the second target interface includes storing the target test information in the target test directory.
[0100] In summary, the embodiments of the present application reduce the size of tasks that need to be processed by each model by splitting a large generation task into multiple small generation sub-tasks and using a task processing model to process each generation sub-task respectively, which helps to fully utilize the processing capabilities of the model and also helps to avoid exceeding the upper limit of the model's processing capabilities and causing inaccurate output results. The embodiments of the present application improve the accuracy of the generated target test information.
[0101] Among them, by controlling the splitting of the generated tasks based on the task splitting reference information, it is ensured that the generated sub-tasks obtained by the splitting are suitable for processing by the task processing model, which helps to improve the accuracy of the model processing results of the task processing model.
[0102] The effectiveness of processing of each generation subtask is ensured by determining the processing timing information of each generation subtask and controlling the processing of each generation subtask based on the processing timing information.
[0103] In order to better implement the information generation method of the present application, the present application also provides an information generation device based on the above information generation method. The meanings of the terms are the same as those in the above information generation method, and the specific implementation details can refer to the description in the method embodiment.
[0104] See also Figure 3 , Figure 3 : is a schematic diagram of the structure of the information generating device provided in the embodiment of the present application, and the information generating device can be specifically as follows:
[0105] A response module 201, configured to respond to a test information generation request for a target component and determine a generation task corresponding to the test information generation request;
[0106] A splitting module 202 is used to split the generation task into at least one generation subtask and determine the task processing model corresponding to each generation subtask;
[0107] The calling module 203 is used to call each of the task processing models to process each of the generated subtasks to obtain target test information.
[0108] Optionally, in some embodiments of the present application, splitting the generation task into at least one generation subtask includes:
[0109] Splitting the generation task into at least one generation subtask based on the task splitting reference information;
[0110] The task splitting reference information includes at least one of the task size, task type, or processing task feature information of each of the task processing models.
[0111] Optionally, in some embodiments of the present application, the task processing model includes an agent, and each of the agents processes a corresponding generation subtask respectively;
[0112] The generation subtask includes at least one of generating annotations and collecting contexts, judging testability, generating component optimization suggestions, generating test case sets, or generating use case components and merging use case components.
[0113] Optionally, in some embodiments of the present application, calling each of the task processing models to process each of the generated subtasks to obtain target test information includes:
[0114] Determining processing timing information of each of the generated subtasks;
[0115] The task processing models are called in sequence according to the processing timing information to process the generated subtasks to obtain target test information.
[0116] Optionally, in some embodiments of the present application, calling each of the task processing models in sequence according to the processing timing information to process each of the generated subtasks to obtain target test information includes:
[0117] Calling each of the task processing models in sequence according to the processing timing information, and, for any task processing model, using the task processing model and the previous processing result to process the current generation subtask to obtain a model processing result, and using the model processing result of the last generation subtask as the target test information;
[0118] The previous processing result includes a result obtained in response to a user adjusting a model processing result of a previous task processing model.
[0119] Optionally, in some embodiments of the present application, calling each of the task processing models in sequence according to the processing timing information includes:
[0120] Obtain the model processing result of the task processing model corresponding to the current generation subtask;
[0121] If the model processing result meets the preset conditions, determining the next task processing model to be called based on the model processing result;
[0122] If the model processing result does not meet the preset condition, determining the next task processing model to be called based on the processing timing information;
[0123] Call the next task processing model to be called.
[0124] Optionally, in some embodiments of the present application, calling each of the task processing models to process each of the generated subtasks to obtain target test information includes:
[0125] Calling each of the task processing models through a target plug-in tool to process each of the generated subtasks to obtain target test information;
[0126] Wherein, when processing the generation subtask, the target plug-in tool may call the first target interface in the target plug-in tool to configure the target component;
[0127] After calling each of the task processing models to process each of the generated subtasks and obtaining target test information, the method further includes:
[0128] The target test information is saved in a target test directory through a second target interface of the target plug-in tool.
[0129] In the embodiment of the present application, the response module 201 responds to the test information generation request for the target component, determines the generation task corresponding to the test information generation request, the splitting module 202 splits the generation task into at least one generation subtask, and determines the task processing model corresponding to each of the generation subtasks, and the calling module 203 calls each of the task processing models to process each of the generation subtasks to obtain the target test information.
[0130] Among them, the embodiment of the present application reduces the size of tasks that each model needs to process by splitting a large generation task into multiple small generation sub-tasks, and using a task processing model to process each generation sub-task respectively, which helps to give full play to the processing capabilities of the model and also helps to avoid exceeding the upper limit of the model's processing capabilities and causing inaccurate output results. The embodiment of the present application improves the accuracy of the generated target test information.
[0131] In addition, the present application also provides an electronic device, such as Figure 4 As shown, it shows a schematic diagram of the structure of the electronic device involved in this application, specifically:
[0132] The electronic device may include components such as a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will appreciate that Figure 4 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0133] The processor 301 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it executes various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 301.
[0134] The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and data processing by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
[0135] The electronic device also includes a power supply 303 for supplying power to various components. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 303 can also include any components such as one or more DC or AC power supplies, recharging systems, power supply device debugging circuits, power converters or inverters, and power status indicators.
[0136] The electronic device may further include an input unit 304, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0137] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 301 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 302 according to the following instructions, and the processor 301 will run the application programs stored in the memory 302, thereby implementing the steps in any one of the information generation methods provided in the embodiments of the present application.
[0138] The embodiment of the present application responds to a test information generation request for a target component, determines a generation task corresponding to the test information generation request, splits the generation task into at least one generation subtask, and determines the task processing models corresponding to each generation subtask, calls each task processing model to process each generation subtask, and obtains target test information.
[0139] Among them, the embodiment of the present application reduces the size of tasks that each model needs to process by splitting a large generation task into multiple small generation sub-tasks, and using a task processing model to process each generation sub-task respectively, which helps to give full play to the processing capabilities of the model and also helps to avoid exceeding the upper limit of the model's processing capabilities and causing inaccurate output results. The embodiment of the present application improves the accuracy of the generated target test information.
[0140] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0141] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0142] To this end, the present application provides a computer-readable storage medium, on which a computer program is stored. The computer program can be loaded by a processor to execute the steps in any information generation method provided in the present application.
[0143] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0144] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0145] Since the instructions stored in the computer-readable storage medium can execute the steps in any information generation method provided in the present application, the beneficial effects that can be achieved by any information generation method provided in the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0146] The above is a detailed introduction to an information generation method, device, electronic device and computer-readable storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for generating information, characterized in that: The method comprises: In response to a test information generation request for a target component, determining a generation task corresponding to the test information generation request; Splitting the generation task into at least one generation subtask, and determining a task processing model corresponding to each of the generation subtasks; Each of the task processing models is called to process each of the generated subtasks to obtain target test information.
2. The information generation method according to claim 1, characterized in that: The step of splitting the generation task into at least one generation subtask comprises: Splitting the generation task into at least one generation subtask based on the task splitting reference information; The task splitting reference information includes at least one of the task size, task type, or processing task feature information of each of the task processing models.
3. The information generation method according to claim 1, characterized in that: The task processing model includes agents, each of which processes a corresponding generation subtask; The generation subtask includes at least one of generating annotations and collecting contexts, judging testability, generating component optimization suggestions, generating test case sets, or generating use case components and merging use case components.
4. The information generation method according to claim 1, characterized in that: The calling of each of the task processing models to process each of the generated subtasks to obtain target test information includes: Determining processing timing information of each of the generated subtasks; The task processing models are called in sequence according to the processing timing information to process the generated subtasks to obtain target test information.
5. The information generation method according to claim 4, characterized in that: The step of sequentially calling each of the task processing models according to the processing timing information to process each of the generated subtasks to obtain target test information includes: Calling each of the task processing models in sequence according to the processing timing information, and, for any task processing model, using the task processing model and the previous processing result to process the current generation subtask to obtain a model processing result, and using the model processing result of the last generation subtask as the target test information; The previous processing result includes a result obtained in response to a user adjusting a model processing result of a previous task processing model.
6. The information generating method according to claim 5, characterized in that: The calling each of the task processing models in sequence according to the processing timing information includes: Obtain the model processing result of the task processing model corresponding to the current generation subtask; If the model processing result meets the preset conditions, determining the next task processing model to be called based on the model processing result; If the model processing result does not meet the preset condition, determining the next task processing model to be called based on the processing timing information; Call the next task processing model to be called.
7. The information generating method according to claim 1, characterized in that: The calling of each of the task processing models to process each of the generated subtasks to obtain target test information includes: Calling each of the task processing models through a target plug-in tool to process each of the generated subtasks to obtain target test information; Wherein, when processing the generation subtask, the target plug-in tool may call the first target interface in the target plug-in tool to configure the target component; After calling each of the task processing models to process each of the generated subtasks and obtaining target test information, the method further includes: The target test information is saved in a target test directory through a second target interface of the target plug-in tool.
8. An information generating device, characterized in that: The device comprises: A response module, configured to respond to a test information generation request for a target component and determine a generation task corresponding to the test information generation request; A splitting module, used to split the generation task into at least one generation subtask, and determine the task processing model corresponding to each generation subtask; The calling module is used to call each of the task processing models to process each of the generated subtasks to obtain target test information.
9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the information generating method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the information generating method according to any one of claims 1 to 7 are implemented.