Parameter optimization method and device based on grid search, equipment and medium
By constructing a parameter search space and transforming task results into vectors to calculate deviations, the problem of relying on manual experience for parameter tuning in multi-model collaboration is solved, realizing intelligent and efficient parameter optimization, and improving the automation level and reliability of output results for complex tasks in refining and chemical enterprises.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- RICHFIT INFORMATION TECH
- Filing Date
- 2025-12-24
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, multi-model collaborative systems rely on human experience for parameter optimization in complex tasks in refining and chemical enterprises, resulting in low efficiency, unstable results, and a lack of automated parameter joint optimization mechanisms.
By constructing a parameter search space, selecting candidate configuration parameters to run the task process, converting the task results into vectors and calculating the deviation, a closed-loop optimization mechanism based on vectorized quality feedback is established to automatically search for the optimal parameter configuration.
It achieves intelligent, efficient, and standardized configuration of multi-model parameters, improving the automation level of complex task processing and the reliability of output results.
Smart Images

Figure CN121858795A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a parameter optimization method, apparatus, device and medium based on grid search. Background Technology
[0002] With the rapid development of large-scale model technology, single models have reached their limits when handling complex tasks, making the collaborative use of multiple heterogeneous large models the mainstream approach. In the production and operation of refining and chemical enterprises, such multi-model collaborative systems are widely used for complex tasks such as generating monthly technical reports and analyzing unit data. The generation effect of each model is significantly affected by its own series of adjustable parameters (such as temperature and repetition penalty coefficient). Finding a set of optimal parameter configurations for multiple collaborative models is crucial for ensuring the accuracy and reliability of the final output and improving enterprise decision-making efficiency.
[0003] In related technologies, due to the heterogeneity and mutual coupling of parameter spaces of different models, parameter optimization based on grid search highly relies on expert experience for manual trial and error. The process is cumbersome, time-consuming and difficult to reproduce. Especially in the context of complex report structures, large amounts of data and high accuracy requirements of refining and chemical enterprises, traditional methods lack a systematic and automated parameter joint optimization mechanism, resulting in unstable system output quality and low debugging efficiency, which seriously restricts the processing efficiency of related businesses. Summary of the Invention
[0004] This application provides a parameter optimization method, apparatus, device, and medium based on grid search, to solve the problems of low efficiency and unstable quality of parameter optimization based on grid search in related technologies when handling complex enterprise tasks.
[0005] Firstly, this application provides a parameter optimization method based on grid search, the method comprising the following steps:
[0006] Determine the configuration parameters of each model in the multi-model collaboration task to be processed, and construct the parameter search space corresponding to the configuration parameters. The parameter search space includes multiple sets of candidate configuration parameters.
[0007] Select a set of candidate configuration parameters from the parameter search space, run the preset multi-model collaboration task process, and obtain the corresponding task results;
[0008] The task results and preset standard results are converted into vectors, and the quality indicators of candidate configuration parameters are determined based on the deviation between the converted vectors.
[0009] With the goal of minimizing the quality metric, a parameter search is performed in the parameter search space, and the target parameter configuration is determined based on the search results.
[0010] In one embodiment of this disclosure, determining the configuration parameters of each model in a multi-model collaboration task to be processed and constructing a parameter search space corresponding to the configuration parameters includes: determining the configuration parameters corresponding to each model, wherein the configuration parameters include the number of models participating in the collaboration, the type of parameters to be optimized for each model, and the value range of each type of parameter; constructing a parameter space based on the number of models, the parameter type and the value range, and determining the parameter space as the parameter search space.
[0011] In one embodiment of this disclosure, the task result includes an overall task result and at least one sub-task result, and the standard result includes an overall standard result and sub-standard results corresponding to the sub-task results. The task result and the preset standard result are converted into vectors, and a quality index for the candidate configuration parameters is determined based on the deviation between the converted vectors. This includes: converting the overall task result and the overall standard result into first-type vectors, and converting the sub-task results and their corresponding sub-standard results into second-type vectors respectively; determining the deviation between the first-type vectors as a first deviation, and determining the deviation between the second-type vectors as a second deviation; and determining the quality index based on the first deviation and the second deviation.
[0012] In one embodiment of this disclosure, the overall task result and the overall standard result are converted into a first type of vector, and the sub-task result and the corresponding sub-standard result are converted into a second type of vector, respectively. This includes: inputting the overall task result and the overall standard result into a first vectorization model and outputting the corresponding first type of vector; inputting the sub-task result and the corresponding sub-standard result into a second vectorization model and outputting the corresponding second type of vector.
[0013] In one embodiment of this disclosure, the deviation between first-type vectors is determined as the first deviation, and the deviation between second-type vectors is determined as the second deviation. This includes: constructing a first vector sequence and a second vector sequence from the first-type vectors corresponding to the overall task result and the first-type vectors corresponding to the overall standard result, respectively; calculating the vector quantile values of the first and second vector sequences, and determining the corresponding vector quantile values as the first deviation; constructing a third vector sequence and a fourth vector sequence from the second-type vectors corresponding to the results of each sub-task and the second-type vectors corresponding to the corresponding sub-standard results, respectively; calculating the vector quantile values of the third and fourth vector sequences, and determining the corresponding vector quantile values as the second deviation; wherein the vector quantile values are calculated based on the component differences of vectors at corresponding positions in the two vector sequences and the sequence distribution statistics.
[0014] In one embodiment of this disclosure, the multi-model collaboration task to be processed is a structured document automatic generation task, and the multi-model collaboration task process is a structured document automatic generation task process; the structured document automatic generation task process includes: obtaining the structure of at least one table and filling in the corresponding table data; converting the filled table into a specified markup language format fragment; arranging the markup language format fragments into complete document content based on a preset document template, and using the document content as the task result.
[0015] In one embodiment of this disclosure, parameter search in the parameter search space is implemented based on grid search, with the goal of minimizing the quality index. The parameter search in the parameter search space includes: discretizing the parameter search space into a multi-dimensional grid composed of grid points, wherein each grid point corresponds to a set of candidate configuration parameters; sequentially executing a preset multi-model collaboration task process for the candidate configuration parameters corresponding to each grid point until the step of determining the quality index; and determining the candidate configuration parameter corresponding to the grid point with the smallest quality index as the target parameter configuration based on the quality index corresponding to each grid point.
[0016] Secondly, embodiments of this disclosure provide a parameter optimization apparatus based on grid search, the grid search-based parameter optimization apparatus comprising:
[0017] The determination module is used to determine the configuration parameters of each model in the multi-model collaboration task to be processed, and to construct the parameter search space corresponding to the configuration parameters. The parameter search space includes multiple sets of candidate configuration parameters.
[0018] The prediction module is used to select a set of candidate configuration parameters from the parameter search space, run a preset multi-model collaborative task process, and obtain the corresponding task results.
[0019] The conversion module is used to convert the task results and the preset standard results into vectors, and to determine the quality indicators of the candidate configuration parameters based on the deviation between the converted vectors.
[0020] The processing module is used to perform parameter search in the parameter search space with the goal of minimizing the quality index, and determine the target parameter configuration based on the search results.
[0021] Optionally, the module is specifically used to determine the configuration parameters corresponding to each model. The configuration parameters include the number of models participating in the collaboration, the types of parameters to be optimized for each model, and the value range of each type of parameter. Based on the number of models, parameter types, and value ranges, a parameter space is constructed, and the parameter space is determined as the parameter search space.
[0022] Optionally, the conversion module is specifically used to: if the task result includes the overall task result and at least one sub-task result, and the standard result includes the overall standard result and the sub-standard result corresponding to the sub-task result, then convert the overall task result and the overall standard result into a first type vector, convert the sub-task result and the corresponding sub-standard result into a second type vector respectively, determine the deviation between the first type vectors as the first deviation, determine the deviation between the second type vectors as the second deviation, and determine the quality index based on the first deviation and the second deviation.
[0023] Optionally, the conversion module is specifically used to input the overall task result and the overall standard result into the first vectorization model and output the corresponding first-class vector; and to input the sub-task result and the corresponding sub-standard result into the second vectorization model and output the corresponding second-class vector.
[0024] Optionally, the conversion module is specifically used to construct a first vector sequence and a second vector sequence from the first type vector corresponding to the overall task result and the first type vector corresponding to the overall standard result, respectively; calculate the vector quantile values of the first vector sequence and the second vector sequence, and determine the corresponding vector quantile values as the first deviation; construct a third vector sequence and a fourth vector sequence from the second type vector corresponding to the results of each sub-task and the second type vector corresponding to the corresponding sub-standard result, respectively; calculate the vector quantile values of the third vector sequence and the fourth vector sequence, and determine the corresponding vector quantile values as the second deviation, wherein the vector quantile values are calculated based on the component differences of the vectors at corresponding positions in the two vector sequences and the sequence distribution statistics.
[0025] Optionally, the prediction module is specifically used to, if the multi-model collaboration task is a structured document automatic generation task, and the multi-model collaboration task process is a structured document automatic generation task process, the structured document automatic generation task process includes: obtaining the structure of at least one table and filling in the corresponding table data; converting the filled table into a specified markup language format fragment; arranging the markup language format fragments based on a preset document template, combining them into complete document content, and using the document content as the task result.
[0026] Optionally, the processing module is specifically used to: if the parameter search in the parameter search space is based on grid search, discretize the parameter search space into a multi-dimensional grid composed of grid points, wherein each grid point corresponds to a set of candidate configuration parameters; sequentially execute a preset multi-model collaboration task process for the candidate configuration parameters corresponding to each grid point up to the step of determining the quality index; and determine the candidate configuration parameter corresponding to the grid point with the smallest quality index as the target parameter configuration based on the quality index corresponding to each grid point.
[0027] Thirdly, embodiments of this application provide a control device, including: a memory and a processor;
[0028] The memory stores instructions that the computer executes;
[0029] The processor executes computer execution instructions stored in memory, causing the processor to perform a grid search-based parameter optimization method for implementing the first aspect of this disclosure.
[0030] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the grid-search-based parameter optimization method as described in the first aspect of this disclosure.
[0031] Fifthly, embodiments of this disclosure also provide a computer program product comprising computer execution instructions, which, when executed by a processor, are used to implement the grid search-based parameter optimization method as described in the first aspect of this disclosure.
[0032] The parameter optimization method, apparatus, device, and medium based on grid search provided in this disclosure construct a parameter search space, select candidate configuration parameters from the search space to run a task process and obtain output results, convert the output and standard results into vectors, calculate the deviation to quantitatively evaluate parameter quality, and finally automatically search for the optimal parameter configuration with the goal of minimizing the deviation. This solves the problems of low efficiency, inconsistent results, and difficulty in obtaining the global optimum caused by relying on manual experience for parameter tuning in traditional multi-model collaboration. Furthermore, by establishing a closed-loop optimization mechanism based on vectorized quality feedback, it achieves intelligent, efficient, and standardized multi-model parameter configuration, significantly improving the automation level of complex task processing and the reliability of output results. Attached Figure Description
[0033] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0034] Figure 1 This diagram illustrates an application scenario of the parameter optimization method, apparatus, device, and medium based on grid search provided in this disclosure.
[0035] Figure 2 A flowchart illustrating a parameter optimization method based on grid search provided in one embodiment of this disclosure;
[0036] Figure 3 A flowchart illustrating a parameter optimization method based on grid search, provided in yet another embodiment of this disclosure;
[0037] Figure 4 A schematic diagram of the structure of a parameter optimization device based on grid search provided in yet another embodiment of this disclosure;
[0038] Figure 5 This is a schematic diagram of the structure of a control device provided in yet another embodiment of this disclosure.
[0039] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation
[0040] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0041] With the development of large-scale model technology, refining and chemical enterprises are using multi-model collaboration to improve the efficiency and effectiveness of handling complex tasks, such as intelligent content generation and data analysis. This multi-model collaboration approach is crucial for enhancing overall system performance. However, due to the heterogeneous and coupled parameter spaces of different models, the number of parameter combinations increases exponentially with the number of models. This makes it difficult to thoroughly explore and evaluate these combinations through manual experience-based debugging, resulting in inefficient and uncontrollable results in finding the globally optimal parameter configuration. This has become a core bottleneck restricting the practical application of the technology.
[0042] Related technologies, such as collaboration between multiple models, mainly rely on manual parameter tuning by experts or automated methods applicable to a single model. However, manual parameter tuning is time-consuming, labor-intensive, and difficult to reproduce; while conventional automated optimization methods, when faced with multi-model collaboration, lack a unified and quantifiable evaluation standard for the overall output effect of the system, and cannot effectively guide the joint parameter search across models, resulting in a blind optimization process and high computational costs, failing to fundamentally solve the above problems.
[0043] The parameter optimization method, apparatus, device, and medium based on grid search provided in this application construct a parameter search space and run a task flow to obtain the output. The output and standard results are then converted into vectors, and their deviation is calculated. This deviation serves as a unified quality index to drive automatic parameter search. Thus, the collaborative effects of multiple models, which are difficult to compare directly, are transformed into a computable vector space optimization problem. This establishes a process for optimizing parameter configuration from the final output quality, effectively overcoming the core obstacles of manual debugging and the lack of unified evaluation criteria.
[0044] Figure 1 The following is a schematic diagram illustrating the application scenarios of the grid search-based parameter optimization method, apparatus, device, and medium provided in this application: Figure 1 As shown, in the budget processing, server 100 will obtain data processed by multiple big data models 110, combine them, and output the parameter optimization result 120 of the complex task, thereby completing the processing of the complex task.
[0045] It should be noted that, Figure 1 The scenario shown includes a server, a big data model, and parameter optimization results, which are only illustrated with one or a specific number of examples. However, this disclosure is not limited to this. In other words, the number of servers, big data models, and parameter optimization results can be arbitrary.
[0046] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0047] Figure 2 This is a flowchart illustrating the parameter optimization method based on grid search provided in an embodiment of this application. The following is a summary of the process. Figure 2 The main process of the parameter optimization method based on grid search is explained below:
[0048] Step S201: Determine the configuration parameters of each model in the multi-model collaboration task to be processed, and construct the parameter search space corresponding to the configuration parameters.
[0049] The parameter search space includes multiple sets of candidate configuration parameters.
[0050] Specifically, in this embodiment of the parameter optimization method based on grid search, the executing entity is a server deployed in an enterprise data center. This server is equipped with a dedicated processor and serves as the core unit for parameter optimization control. It is responsible for the fully automated management of the parameter optimization process in multi-model collaborative tasks. For ease of explanation, it will be referred to as the server below.
[0051] When the server initiates the optimization process, it first needs to identify and parse the multi-model collaboration task to be processed. Depending on the specific task to be processed, there can be various tasks requiring multi-model writing, such as generating complex tables, writing monthly technical reports, and data analysis of complex equipment or processes.
[0052] Taking the automatic generation of internal enterprise technical monthly reports as an example, this task typically involves multiple large language models collaborating sequentially to complete steps such as data extraction, content formatting, and document synthesis. In such tasks, the server identifies all model instances and their roles participating in the process by parsing predefined task orchestration scripts.
[0053] For example, the process might include a model responsible for querying and understanding data from a relational database, a model responsible for converting data objects into tables in a specific markup language (such as Markdown), and a model responsible for integrating multiple tables and adding chapter structures.
[0054] Subsequently, the server obtains a list of adjustable configuration parameters exposed to external use by calling the application programming interfaces (APIs) of each model or reading its configuration files. These parameters are the key knobs that affect the model's generation behavior.
[0055] Common configuration parameters typically include the "temperature" parameter, which controls the randomness of the output and is usually continuously adjustable between 0.0 and 2.0 (here, temperature refers to the parameter that adjusts the randomness or determinism of the model's output results, not the general concept of ambient temperature); the "top_p" parameter, which controls the diversity and quality of the output tokens and has a value range of 0.0 to 1.0; and the "repetition penalty" parameter, which affects the avoidance of repetition in the output.
[0056] For each identified parameter, the server needs to determine its reasonable search boundaries: the minimum and maximum values allowed by the technology, and can choose to set the discretization sampling step size (for example, the temperature parameter can be planned to be tested at values of 0.1, 0.5, 1.0, and 1.5).
[0057] Finally, the server combines all these parameters of the models and their respective value ranges to form a multidimensional parameter search space.
[0058] In the parameter search space, each coordinate point in this space uniquely corresponds to a complete set of candidate configuration parameter schemes, that is, a specific combination of candidate configuration parameters. This combination points to the specific value of each parameter to be optimized in each model in the subsequent task process.
[0059] Step S202: Select a set of candidate configuration parameters from the parameter search space, run the preset multi-model collaboration task process, and obtain the corresponding task results.
[0060] Specifically, after obtaining the parameter search space, the server selects any set of candidate configuration parameters, loads them, and drives the execution of a pre-arranged multi-model collaborative task process.
[0061] Taking the automatic generation of monthly reports as an example, this process is a directed acyclic graph defined in advance through a workflow orchestration framework.
[0062] After the process starts, the server first parses out the specific structure definition of several tables to be generated based on the monthly report template, including the table header name, column data type, etc.
[0063] Next, the server calls the first large language model (which is used to handle data querying and population) and passes the portion of the current candidate parameters assigned to this model, such as {temperature: 0.7, top_p: 0.9}, as the call parameters.
[0064] Based on the instructions, the model will generate corresponding query statements or directly output structured data to populate multiple tables.
[0065] Then, the process moves to the next node, where the server calls the second large language model (which is used to perform format conversion) and passes in the parameters configured for it. The task of this model is to convert each filled data table into source code snippets in the specified markup language format, strictly following the specifications.
[0066] Finally, the process reaches its final node, where the server calls the third large language model (which is responsible for document assembly and formatting). With the same parameter configuration, this model is responsible for integrating all the independent table fragments into a complete and uniformly formatted document according to the chapter order, heading level, and layout format required by the template.
[0067] The final output document of this process is the task result obtained in this step, which is the specific content produced by the collaboration of multiple models under the specific candidate configuration parameter combination in the current test.
[0068] In practical applications, the number, types, and functions of models involved vary depending on the task and configuration. For example, three or more models can jointly undertake data query and preprocessing tasks, and there is no limit to this.
[0069] Step S203: Convert the task results and the preset standard results into vectors, and determine the quality index of the candidate configuration parameters based on the deviation between the converted vectors.
[0070] Specifically, in order to objectively and quantitatively evaluate the task results, the server introduces a semantic-based vector processing method.
[0071] Specifically, the server has one or a set of standard results pre-set for various tasks to be processed. The standard results are usually derived from historically accumulated, manually verified high-quality output samples, and have been processed into a format corresponding to the task results (such as Markdown text).
[0072] By evaluating both results, the quality of the candidate configuration parameters can be determined. The core of this evaluation lies in digitizing the semantic and structural differences between texts.
[0073] The server uses a pre-trained open-source semantic representation model to convert the task results to be evaluated and the corresponding standard result text into high-dimensional real vectors (e.g., 512-dimensional or 768-dimensional vectors).
[0074] This process, also known as embedding or encoding, maps discrete text sequences to a continuous vector space, where semantically similar texts are represented by vectors that are close to each other in the space.
[0075] After obtaining the two vectors, the server needs to calculate the deviation between them.
[0076] The deviation here is a scalar value used to quantify the degree of difference between the two documents.
[0077] For example, you can calculate the cosine similarity between two vectors and then subtract that similarity from 1 to get a difference score; or you can directly calculate the Euclidean distance between the two vectors.
[0078] This calculated deviation value is defined as the quality metric corresponding to the current set of candidate configuration parameters.
[0079] The smaller the value of this indicator, the closer the result generated under this parameter configuration is to the ideal standard, meaning the parameter configuration is better; conversely, the larger the value, the worse the result. Through this step, the abstract output quality is transformed into a specific, comparable value, i.e., a quality indicator, thus providing a clear optimization target for automated parameter optimization.
[0080] Step S204: With the goal of minimizing the quality index, perform a parameter search in the parameter search space, and determine the target parameter configuration based on the search results.
[0081] Specifically, based on the aforementioned steps, the server needs to be able to automatically find the candidate configuration parameter combination that minimizes the quality index obtained in step three, and use it as the final target parameter configuration.
[0082] The server performs a systematic parameter search on the constructed parameter search space.
[0083] A basic implementation strategy is grid search: the server divides the search space into each dimension (i.e., each parameter) according to its preset discrete value points, thereby discretizing the continuous or multi-valued space into a multi-dimensional grid. In this case, each intersection point in the grid represents a unique set of candidate parameter combinations.
[0084] The server then initiates an automated loop that iterates through every point in the grid. For each set of parameters encountered, the server automatically executes a complete process once:
[0085] This means taking the input as input, re-executing the complete task flow in step two to obtain new output, and then comparing the new output with the standard result in step three to calculate the quality index.
[0086] After traversing all grid points or reaching the preset maximum number of evaluations, the server summarizes and compares the quality index values corresponding to all combinations of evaluated parameters.
[0087] Ultimately, it selects the parameter combination that minimizes the quality index value and formally determines it as the target parameter configuration for this optimization task.
[0088] In some embodiments, to improve search efficiency, heuristic strategies can be introduced on top of basic grid search, such as first performing coarse-grained grid search to locate potential regions, and then performing fine-grained search in those regions, or using random sampling in conjunction with local optimization algorithms.
[0089] Once the target configuration is determined, it can be solidified and applied to the production environment, enabling the multi-model collaborative system to output results that meet quality requirements stably and efficiently.
[0090] The grid search-based parameter optimization method provided in this application constructs a parameter search space, selects candidate configuration parameters from the search space to run the task process and obtain output results, converts the output and standard results into vectors, calculates the deviation to quantitatively evaluate parameter quality, and finally automatically searches for the optimal parameter configuration with the goal of minimizing this deviation. This solves the problems of low efficiency, inconsistent results, and difficulty in obtaining the global optimum caused by relying on manual experience for parameter tuning in traditional multi-model collaboration. Furthermore, by establishing a closed-loop optimization mechanism based on vectorized quality feedback, it achieves intelligent, efficient, and standardized multi-model parameter configuration, significantly improving the automation level of complex task processing and the reliability of output results.
[0091] Figure 3 This is a flowchart illustrating a parameter optimization method based on grid search provided in another embodiment of the present disclosure. Figure 2 Based on the illustrated embodiment, the following is combined with Figure 3The implementation process of the grid search-based parameter optimization method is explained in detail, including the following steps:
[0092] S301. Determine the configuration parameters corresponding to each model.
[0093] The configuration parameters include the number of models participating in the collaboration, the categories of parameters to be optimized for each model, and the value range of each category of parameters.
[0094] Specifically, when constructing the parameter search space, the server first needs to accurately define the objects to be optimized.
[0095] Specifically, the number of models participating in the collaboration refers to the total number of large language model instances whose parameters will be included in the optimization scope during this task process. For example, in a report generation process, there may be N independent models responsible for querying and filling data in different tables, and one model responsible for final document layout, for a total of N+1.
[0096] The categories of parameters to be optimized for each model refer to the parameters selected from the numerous adjustable parameters of each model that may have a significant impact on the output quality of the current task. Examples include parameters such as temperature and repetition penalty mentioned in the previous embodiments.
[0097] In practical applications, the server obtains this information through the model's API documentation or configuration interface.
[0098] The range of values includes the technically permissible boundaries (such as a minimum temperature of 0 and a maximum temperature of 2) as well as the effective search boundaries set based on experience.
[0099] For example, for temperature parameters, practical experience shows that in serious report generation tasks, values higher than 1.5 may lead to overly arbitrary outputs. Therefore, the search upper limit can be set to 1.2 to reduce the search space and improve efficiency.
[0100] In some embodiments, the boundary minimum of a parameter class (P) can be set to 0. This characterizes a real-world scenario where a particular large model may not expose a certain type of parameter to the user (e.g., a model does not provide a frequency penalty parameter), or the model does not need to adjust such parameters in this task. In this case, the parameter's value is considered a fixed default value or "missing" in the parameter search space and does not participate in the optimization search. This enhances the method's versatility and adaptability to heterogeneous model environments.
[0101] In some embodiments, the parameter search space can be represented by S=(L, P, V), where the L dimension indexes a specific model-parameter pair (e.g., L=1 corresponds to "temperature parameters of model A", L=2 corresponds to "top-p parameters of model A", L=3 corresponds to "temperature parameters of model B", etc.); P defines the parameter type semantics corresponding to the index, and V is its value range. This facilitates the unified iterative processing of all parameters to be optimized within the program.
[0102] S302. Select a set of candidate configuration parameters from the parameter search space, run the preset multi-model collaboration task process, and obtain the corresponding task results.
[0103] Specifically, the server selects a set of specific parameter value combinations, i.e., candidate configuration parameters, from the parameter search space constructed in the previous step, according to a specific strategy (such as grid order). Subsequently, the server initiates a predefined, repeatable multi-model collaboration process to obtain the corresponding task results.
[0104] Furthermore, taking the multi-model collaboration task to be processed as a structured document automatic generation task, and the multi-model collaboration task process as a structured document automatic generation task process as an example, the specific task process includes:
[0105] Step A1: Obtain the structure of at least one table and fill in the corresponding table data.
[0106] Specifically, in the automatic generation of structured documents (such as complex report generation tasks), the server will parse out the predefined structure of multiple tables to be generated based on the document template to be processed, including the table header name, column data type and description.
[0107] Then, for each table, the server calls a large language model with text understanding and data query capabilities (e.g., a Text-to-SQL model or information extraction model finely tuned from open-source models such as LLaMA and ChatGLM).
[0108] During the actual call, the server will pass in the parameters allocated to the model from the current candidate configuration parameters (such as temperature and repetition penalty). The model will then generate the corresponding database query statement based on natural language prompts (which describe the data content and conditions to be queried) or directly extract and calculate data from the provided context, and populate it according to the table structure.
[0109] Data population for each table is accomplished by a separate model instance or call, ensuring clear boundaries of responsibility and potential parallelization.
[0110] In some embodiments, when obtaining the table structure, the server does not hardcode the structure. Instead, it guides the large language model to understand and output the specified table structure through carefully designed prompts. The prompts explicitly describe the required header names, column data types, units, and possible calculation relationships, ensuring that the table framework generated by the model conforms to business specifications.
[0111] In some embodiments, before the model responsible for data population runs, its prompts are injected with specific database schema information (such as relevant table names, field names and their meanings) and the explicit business logic to be queried (such as calculating the average energy consumption of a device in the past month), thereby guiding the model to generate accurate data query instructions or directly perform data reasoning and population.
[0112] Step A2: Convert the filled table into a specified markup language format fragment.
[0113] Specifically, after obtaining the table with populated data, the server needs to convert it into a format that facilitates subsequent typesetting and display. Typically, the server can choose Markdown as the specified markup language.
[0114] In the next step, the server calls another large language model specifically responsible for format conversion, and passes in the corresponding parameter configuration. The prompts in this model contain detailed Markdown table syntax rules (e.g., using the pipe symbol "|" to separate columns, and using the hyphen "-" to separate table headers and content) as well as specific formatting requirements (such as alignment).
[0115] The model will accurately convert each structured data table into a standard Markdown source code snippet.
[0116] It's worth noting here that converting tables to Markdown and piecing together Markdown fragments into a complete document are typically handled by different large models. This separation of responsibilities allows for the optimization of prompts and selection of the most suitable model for format conversion and document structure arrangement, respectively. For example, a model better at strictly adhering to formatting instructions might be chosen for table conversion, while a model better at understanding the overall document structure might be used for piecing together.
[0117] Step A3: Based on the preset document template, combine the markup language format fragments into complete document content, and use the document content as the task result.
[0118] Specifically, after all tables are converted into Markdown fragments, the server calls a document formatting model to organize the content and obtain the final complete document as the task result.
[0119] Specifically, the prompts in this model define a complete document template, including static text such as titles, chapter divisions, chapter titles, introductions, and conclusions, as well as the position and order in which each Markdown table fragment should be inserted.
[0120] Based on this template, the model will intelligently combine and splice all Markdown fragments, static text, and formatting instructions to generate a final document with a uniform format and complete structure (e.g., a complete Markdown-formatted technical monthly report). This document is the result of this task.
[0121] S303. Convert the overall task result and the overall standard result into first-class vectors, and convert the sub-task results and the corresponding sub-standard results into second-class vectors respectively.
[0122] Specifically, for quantitative evaluation, the text results need to be converted into machine-computable vectors. In this embodiment, the specific conversion process adopts a multi-granularity conversion approach based on the granularity of the task results, and the conversion paths of two different granularities are explained accordingly.
[0123] Furthermore, in this embodiment, the task result includes the overall task result and at least one subtask result, and the standard result includes the overall standard result and the sub-standard result corresponding to the subtask result. In this case, the specific steps of vector transformation include:
[0124] Step B1: Input the overall task result and the overall standard result into the first vectorization model, and output the corresponding first-class vector.
[0125] Specifically, the overall task result is the task result output by S302, such as the final generated complete document, while the overall standard result is the ideal task result that is prepared in advance by a person and is in the correct format, such as the ideal document (which has been converted to the same format).
[0126] Servers typically use a pre-trained text embedding model as the first vectorization model (e.g., open-source models like BGE-large and SimCSE) to take the entire document as input. This model encodes the semantic and structural information of the entire document into a fixed-dimensional high-dimensional vector (e.g., a 768-dimensional vector), which serves as the first-class vector.
[0127] This vector represents the overall semantic features of the task (such as a document).
[0128] In some implementations, converting the corpus into word vectors is not simply a matter of inputting an entire text segment into the embedding model. The server first segments the text into words, then the model converts each word into an initial vector, and finally generates a final vector representation that takes into account the context through a model structure (such as a Transformer encoder). For long texts (such as entire documents), pooling operations or generating vector sequences by paragraph / sentence can be used.
[0129] Step B2: Input the subtask results and the corresponding sub-standard results into the second vectorization model, and output the corresponding second-class vector.
[0130] Specifically, subtask results refer to the parts obtained by decomposing the intermediate task results obtained in the process based on task characteristics, such as the Markdown fragments generated for each table obtained in the process; substandard results are the parts with corresponding granularity obtained from parsing the overall standard results, such as the standard Markdown fragments of the corresponding tables parsed from the standard document.
[0131] The server uses another vectorization model as a second vectorization model (which may be the same as or different from the first model. Considering the differences in handling text length and semantic focus, it is generally recommended to use a different model), and converts each table fragment and its standard fragment into vectors, resulting in multiple pairs of second-class vectors.
[0132] At this point, each second-class vector represents the local semantic and structural features of the task.
[0133] In some embodiments, it should be further explained that the standard results (including overall standard results and sub-standard results) are not abstract concepts, but rather derived from historically accumulated, manually verified, and standardized documents (such as accurate monthly technical report documents). The server uses format conversion tools (such as a self-developed tool based on the open-source library pandoc) to batch convert these documents into a unified markup language format (such as Markdown). For the overall document, the conversion yields a complete standard document; simultaneously, the server automatically extracts the standard fragments corresponding to each independent table from the complete standard document by parsing Markdown syntax (such as recognizing the pipe boundaries of tables), thereby constructing a hierarchical standard corpus. This ensures the objectivity and accessibility of the evaluation benchmark.
[0134] S304. The deviation between the first type of vectors is determined as the first deviation, and the deviation between the second type of vectors is determined as the second deviation.
[0135] Specifically, depending on the granularity, the server will calculate the corresponding deviation value.
[0136] The calculation of bias needs to be based on a vector sequence because a single vector may not be able to fully capture the internal structure of the vector sequence.
[0137] Furthermore, the specific deviation calculation method includes the following steps:
[0138] Step C1: Construct the first vector sequence and the second vector sequence by taking the first type of vector corresponding to the overall task result and the first type of vector corresponding to the overall standard result, respectively.
[0139] Specifically, the first type of vector obtained directly is a single high-dimensional vector.
[0140] To perform a more refined comparison, the server can use a sliding window or segmentation by sentence or paragraph to re-input the overall task results into the vectorization model, obtaining a vector sequence (for example, in complex document processing, each paragraph corresponds to a vector). The overall standard results are also processed in the same way.
[0141] Thus, we can obtain the first vector sequence representing the overall task result and the second vector sequence representing the overall standard result.
[0142] Step C2: Calculate the vector quantile values of the first vector sequence and the second vector sequence, and determine the corresponding vector quantile values as the first deviation.
[0143] The vector quantile value is calculated based on the component differences of the vectors at corresponding positions in the two vector sequences and the sequence distribution statistics.
[0144] Specifically, vector quantile is a specific dissimilarity parameter. Its core idea is to compare the vectors at corresponding positions in two vector sequences, taking into account not only the differences between the corresponding vectors, but also the distribution of each vector in its sequence.
[0145] For example, the formula for calculating vector quantiles can be expressed as:
[0146] ,
[0147] Where i is the dimension of the traversal vector, ranging from 1 to D, such as 768 (D being the upper limit of the dimension); j is the position of the traversal vector in the sequence, ranging from 1 to L, where L is the sequence length; k is the summation over all positions j in the sequence in this formula, that is, k is the total length L; x ij and y ij These are the values of the i-th dimension of the j-th position vector in the first sequence and the second sequence, respectively; and These are the average values of all dimensions of the j-th position vector in the first and second sequences, respectively.
[0148] In this formula, the numerator calculates the sum of squares of the differences in each dimension of the corresponding position vector (which is essentially an enhanced Euclidean distance squared), and the denominator is the product of the standard deviations of each dimension of the respective position vector (to measure the dispersion of the distribution within the vector), which plays a normalization role. This makes the comparison unaffected by the scale or absolute value of the vector itself, and focuses more on the differences in the shape of the distribution. Thus, it provides a quantitative means to evaluate the similarity between the generated text and the standard text in the deep semantic distribution.
[0149] Finally, the scalar value h is obtained by summing over all positions j, which is the first deviation (used for comparison of the overall task results at the granularity level). The smaller this value, the closer the two task results (i.e., the body task result and the overall standard result) are in terms of serialization semantics and distribution.
[0150] Step C3: Construct the second-class vector corresponding to the results of each subtask and the second-class vector corresponding to the results of the corresponding sub-standards into a third vector sequence and a fourth vector sequence, respectively.
[0151] Specifically, for each overall task result and its corresponding overall standard result, its sub-task results and their corresponding self-standard results can also be converted in the same way as in step C1.
[0152] For example, for each complex table, the generated Markdown fragments and standard fragments are also converted into vector sequences in a similar way (such as by row splitting), which serve as the third vector sequence (generated table) and the fourth vector sequence (standard table), respectively.
[0153] Step C4: Calculate the vector quantile values of the third and fourth vector sequences, and determine the corresponding vector quantile values as the second deviation.
[0154] Specifically, for the third and fourth vector sequences, the same vector quantile formula as in step C2 can be used to calculate the deviation value, which is a finer-grained value, namely the second deviation.
[0155] For example, if there are N tables, then N second deviation values need to be obtained.
[0156] S305. Determine the quality indicators based on the first and second deviations.
[0157] Specifically, the server needs to combine the overall deviation and multiple local deviations into a final quality evaluation score.
[0158] In practice, a direct method is to use weighted summation.
[0159] For example, the formula for calculating the final quality index can be expressed as:
[0160] Q = w1 * first deviation + w2 * (average of all second deviations).
[0161] At this point, the weights w1 and w2 can be set according to business needs (such as whether to value overall consistency or the accuracy of each table more).
[0162] Another approach is to screen in stages: first, require all second deviations to be below a certain threshold to ensure the table is basically correct, and then select the candidate parameter with the smallest first deviation.
[0163] In this embodiment, the first deviation and the second deviation (or a combination of the two, such as a weighted sum) can be used as the evaluation criteria to make a comprehensive comparison during the search process (i.e., through screening, or by first summing the results globally and then screening).
[0164] The specific combination method can also be other existing common methods of integrating local and overall evaluation indicators, and there are no restrictions here.
[0165] S306. Discretize the parameter search space into a multidimensional grid composed of grid points.
[0166] Each grid point corresponds to a set of candidate configuration parameters, and parameter search is performed in the parameter search space based on grid search.
[0167] Specifically, to achieve automated search, the server needs to transform the continuous parameter space into a traversable discrete set. For each configuration parameter, it is discretized according to its value range and a preset step size.
[0168] For example, the temperature parameter range is [0, 1.2] with a step size of 0.3, so the values are {0, 0.3, 0.6, 0.9, 1.2}; the Top-p parameter range is [0.5, 1.0] with a step size of 0.1, so the values are {0.5, 0.6, 0.7, 0.8, 0.9, 1.0}. All discrete parameter values are combined using a Cartesian product, forming a grid in multidimensional space. Each grid point represents a specific set of parameter values (candidate configuration parameters).
[0169] In some embodiments, grid search can be performed in an automated pipeline called Workflow W. This workflow consists of multiple nodes connected by data flow. Core nodes include: a parameter injection node, multiple model call nodes (corresponding to data filling, format conversion, and document concatenation), vectorization calculation nodes (corresponding to T1 and T2), and bias calculation and comparison nodes. The server schedules the entire process through a workflow engine (such as one built on the open-source frameworks Airflow or Perfect), making the process from parameter value retrieval to obtaining quality metrics fully automated.
[0170] S307. For each grid point, sequentially execute the preset multi-model collaboration task process until the quality index is determined for the candidate configuration parameters.
[0171] Specifically, in the grid search, the server will automatically and cyclically execute the following complete sub-processes according to the order (or random order) of the grid points: First, load the parameter configuration of the current grid point; then, execute the task process as in step S302 to generate the task results; subsequently, execute the actions as in steps S303 to S305 to calculate the final quality index corresponding to the set of parameters.
[0172] In some embodiments, since the above process is a computationally intensive loop, the server can employ parallel computing techniques to simultaneously evaluate parameters at multiple grid points to improve efficiency.
[0173] In some embodiments, when there are many parameter combinations, that is, a large number of grid points, the server may also adopt a phased search or prior knowledge-guided strategy in practical applications.
[0174] For example, a coarse-grained global search is first performed on the same type of key parameters (such as temperature) for all models to determine a roughly optimal range; then, within this range, a fine-grained search is performed in combination with other parameters.
[0175] S308. Based on the quality index corresponding to each grid point, the candidate configuration parameter corresponding to the grid point with the smallest quality index is determined as the target parameter configuration.
[0176] Specifically, after all the preset grid points have been evaluated, the server will collect all data pairs (parameter combinations, quality indicators).
[0177] By making simple numerical comparisons, the parameter combination(s) that minimizes the quality index Q value can be selected as the target parameter configuration for this optimization task and then output and saved.
[0178] This set of parameters is the optimal configuration that makes the output of the multi-model collaborative system closest to the preset standard in the current task, and can be used in subsequent actual production tasks.
[0179] The parameter optimization method based on grid search provided in this disclosure constructs a parameter search space and automatically runs a multi-model collaborative task process based on candidate parameters to obtain output. The output and standard results are then converted into vectors, and their deviation is calculated to quantitatively evaluate parameter quality. Finally, grid search is used to determine the optimal parameter configuration. This solves the problems of low efficiency and difficulty in obtaining stable and high-quality results caused by manual parameter tuning in traditional multi-model collaboration. By establishing a closed-loop optimization mechanism based on vectorized quality feedback, intelligent and automated parameter configuration is achieved, significantly improving the efficiency of complex task processing and the reliability of output results.
[0180] Figure 4 This is a schematic diagram of a parameter optimization device based on grid search provided in one embodiment of the present disclosure. Figure 4 As shown, the grid search-based parameter optimization device 400 includes:
[0181] The determination module 410 is used to determine the configuration parameters of each model in the multi-model collaboration task to be processed, and to construct the parameter search space corresponding to the configuration parameters. The parameter search space includes multiple sets of candidate configuration parameters.
[0182] The prediction module 420 is used to select a set of candidate configuration parameters from the parameter search space, run a preset multi-model collaborative task process, and obtain the corresponding task results.
[0183] The conversion module 430 is used to convert the task results and the preset standard results into vectors, and to determine the quality index of the candidate configuration parameters based on the deviation between the converted vectors.
[0184] The processing module 440 is used to perform parameter search in the parameter search space with the goal of minimizing the quality index, and determine the target parameter configuration based on the search results.
[0185] Optionally, module 410 is specifically used to determine the configuration parameters corresponding to each model. The configuration parameters include the number of models participating in the collaboration, the types of parameters to be optimized for each model, and the value range of each type of parameter. Based on the number of models, parameter types, and value ranges, a parameter space is constructed, and the parameter space is determined as the parameter search space.
[0186] Optionally, the conversion module 430 is specifically used to: if the task result includes the overall task result and at least one sub-task result, and the standard result includes the overall standard result and the sub-standard result corresponding to the sub-task result, then convert the overall task result and the overall standard result into a first type vector, convert the sub-task result and the corresponding sub-standard result into a second type vector respectively, determine the deviation between the first type vectors as the first deviation, determine the deviation between the second type vectors as the second deviation, and determine the quality index based on the first deviation and the second deviation.
[0187] Optionally, the conversion module 430 is specifically used to input the overall task result and the overall standard result into the first vectorization model and output the corresponding first type vector; and to input the sub-task result and the corresponding sub-standard result into the second vectorization model and output the corresponding second type vector.
[0188] Optionally, the conversion module 430 is specifically used to construct a first vector sequence and a second vector sequence from the first type vector corresponding to the overall task result and the first type vector corresponding to the overall standard result, respectively; calculate the vector quantile values of the first vector sequence and the second vector sequence, and determine the corresponding vector quantile values as the first deviation; construct a third vector sequence and a fourth vector sequence from the second type vector corresponding to the results of each sub-task and the second type vector corresponding to the corresponding sub-standard result, respectively; calculate the vector quantile values of the third vector sequence and the fourth vector sequence, and determine the corresponding vector quantile values as the second deviation, wherein the vector quantile values are calculated based on the component differences of the vectors at corresponding positions in the two vector sequences and the sequence distribution statistics.
[0189] Optionally, the prediction module 420 is specifically used to, if the multi-model collaboration task is a structured document automatic generation task and the multi-model collaboration task process is a structured document automatic generation task process, the structured document automatic generation task process includes: obtaining the structure of at least one table and filling in the corresponding table data; converting the filled table into a specified markup language format fragment; arranging the markup language format fragments into complete document content based on a preset document template, and using the document content as the task result.
[0190] Optionally, the processing module 440 is specifically used to: if the parameter search in the parameter search space is based on grid search, discretize the parameter search space into a multi-dimensional grid composed of grid points, wherein each grid point corresponds to a set of candidate configuration parameters; sequentially execute a preset multi-model collaboration task process for the candidate configuration parameters corresponding to each grid point up to the step of determining the quality index; and determine the candidate configuration parameter corresponding to the grid point with the smallest quality index as the target parameter configuration based on the quality index corresponding to each grid point.
[0191] In this embodiment, the grid search-based parameter optimization device, through the combination of various modules, solves the problems of low efficiency and unstable quality of grid search-based parameter optimization in related technologies when handling complex enterprise tasks.
[0192] Figure 5 This is a schematic diagram of the structure of a control device provided in one embodiment of the present disclosure, as shown below. Figure 5 As shown, the control device 500 includes a memory 510 and a processor 520.
[0193] The memory 510 stores a computer program that can be executed by at least one processor 520. This computer program is executed by at least one processor 520 to enable the control device to implement the grid search-based parameter optimization method provided in any of the above embodiments.
[0194] The memory 510 and the processor 520 can be connected via a bus 530.
[0195] The relevant explanations can be understood by referring to the corresponding descriptions and effects in the method embodiments, and will not be repeated here.
[0196] One embodiment of this disclosure provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the grid search-based parameter optimization method provided in any of the above embodiments.
[0197] The computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0198] One embodiment of this disclosure provides a computer program product comprising computer-executable instructions that, when executed by a processor, are used to implement the grid-search-based parameter optimization method provided in any of the above embodiments.
[0199] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0200] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0201] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0202] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A parameter optimization method based on grid search, characterized in that, include: Determine the configuration parameters of each model in the multi-model collaboration task to be processed, and construct the parameter search space corresponding to the configuration parameters, wherein the parameter search space includes multiple sets of candidate configuration parameters; Select a set of candidate configuration parameters from the parameter search space, run the preset multi-model collaboration task process, and obtain the corresponding task results; The task results and preset standard results are converted into vectors, and the quality index of the candidate configuration parameters is determined based on the deviation between the converted vectors. With the goal of minimizing the quality index, a parameter search is performed in the parameter search space, and the target parameter configuration is determined based on the search results.
2. The method according to claim 1, characterized in that, Determine the configuration parameters of each model in the multi-model collaboration task to be processed, and construct the parameter search space corresponding to the configuration parameters, including: Determine the configuration parameters for each model, including the number of models participating in the collaboration, the categories of parameters to be optimized for each model, and the value range of each category of parameters; Based on the number of models, parameter categories, and value ranges, a parameter space is constructed, and the parameter space is determined as the parameter search space.
3. The method according to claim 1, characterized in that, The task results include overall task results and at least one sub-task results, and the standard results include overall standard results and sub-standard results corresponding to the sub-task results; The step of converting the task results and preset standard results into vectors, and determining the quality index of the candidate configuration parameters based on the deviation between the converted vectors, includes: The overall task result and the overall standard result are transformed into first-class vectors, and the sub-task results and the corresponding sub-standard results are transformed into second-class vectors respectively. The deviation between the first type of vectors is defined as the first deviation, and the deviation between the second type of vectors is defined as the second deviation; The quality index is determined based on the first deviation and the second deviation.
4. The method according to claim 3, characterized in that, The step of converting the overall task result and the overall standard result into a first-class vector, and converting the sub-task result and the corresponding sub-standard result into a second-class vector, includes: The overall task result and the overall standard result are input into the first vectorization model, and the corresponding first type vector is output. The subtask results and the corresponding sub-standard results are input into the second vectorization model, and the corresponding second type vector is output.
5. The method according to claim 3, characterized in that, The step of determining the deviation between the first type of vectors as the first deviation and the deviation between the second type of vectors as the second deviation includes: The first type vector corresponding to the overall task result and the first type vector corresponding to the overall standard result are respectively constructed into a first vector sequence and a second vector sequence; Calculate the vector quantile values of the first vector sequence and the second vector sequence, and determine the corresponding vector quantile values as the first deviation; The second-class vectors corresponding to the results of each subtask and the second-class vectors corresponding to the corresponding sub-standard results are respectively constructed into a third vector sequence and a fourth vector sequence; Calculate the vector quantile values of the third vector sequence and the fourth vector sequence, and determine the corresponding vector quantile values as the second deviation.
6. The method according to any one of claims 1 to 5, characterized in that, The multi-model collaboration task to be processed is a structured document automatic generation task, and the multi-model collaboration task process is the structured document automatic generation task process. The automated structured document generation task process includes: Obtain the structure of at least one table and populate the corresponding table with data; Convert the filled table into a specified markup language format fragment; Based on a preset document template, the markup language format fragments are combined into complete document content, and the document content is used as the task result.
7. The method according to any one of claims 1 to 5, characterized in that, The parameter search in the parameter search space is implemented based on grid search. The step of performing a parameter search in the parameter search space with the goal of minimizing the quality index includes: The parameter search space is discretized into a multidimensional grid composed of grid points, where each grid point corresponds to a set of candidate configuration parameters; For each grid point, the preset multi-model collaboration task process is executed sequentially until the quality index is determined. Based on the quality index corresponding to each grid point, the candidate configuration parameter corresponding to the grid point with the smallest quality index is determined as the target parameter configuration.
8. A parameter optimization device based on grid search, characterized in that, The grid search-based parameter optimization device includes: The determination module is used to determine the configuration parameters of each model in the multi-model collaboration task to be processed, and to construct the parameter search space corresponding to the configuration parameters, wherein the parameter search space includes multiple sets of candidate configuration parameters; The prediction module is used to select a set of candidate configuration parameters from the parameter search space, run a preset multi-model collaborative task process, and obtain the corresponding task results. The conversion module is used to convert the task results and preset standard results into vectors, and determine the quality index of the candidate configuration parameters based on the deviation between the converted vectors. The processing module is used to perform a parameter search in the parameter search space with the goal of minimizing the quality index, and to determine the target parameter configuration based on the search results.
9. A control device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 7.