Evaluation function determination method and apparatus, electronic device, and storage medium
By using a multi-parameter evaluation function to filter model parameters, the problem of local optima is solved, and the selection of global optima is achieved, thereby improving the accuracy of model parameter optimization and the accuracy of subsequent applications.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WEICHAI POWER CO LTD
- Filing Date
- 2022-09-29
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies are prone to local optima during the optimization and iteration process, ignoring model parameters that meet the selection criteria, resulting in suboptimal model parameters and reducing the accuracy of the model in subsequent applications.
A multi-parameter evaluation function is adopted, which combines fitness evaluation parameters and error evaluation parameters. The objective evaluation function is determined by weighted product summation, and the globally optimal model parameters are selected.
This improves the accuracy of model parameter optimization, ensures the selection of the globally optimal solution, and thus improves the accuracy of the model in subsequent applications.
Smart Images

Figure CN115495705B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer data processing technology, and in particular to a method, apparatus, electronic device, and storage medium for determining an evaluation function. Background Technology
[0002] In the optimization and iterative process of multi-input, multi-objective neural network models (such as automatic calibration of carbon loading models) using optimization algorithms (GA, Genetic Algorithm; PSO, Particle Swarm Optimization), the calculation of the evaluation function is crucial. It affects the cumulative probability of the population, and consequently, the probability of the population being retained to the next generation. However, existing techniques typically use a single evaluation parameter as the evaluation function during optimization iterations, which can easily lead to local optima. This means that populations meeting the selection criteria are ignored, resulting in suboptimal model parameters and reduced accuracy in subsequent applications. Summary of the Invention
[0003] This invention provides a method, apparatus, electronic device, and storage medium for determining an evaluation function to solve the problem of local optima appearing during the optimization process, i.e., ignoring model parameters that meet the selection criteria, thereby selecting the global optimal solution, improving the accuracy of model parameter optimization, and thus improving the accuracy of the model in subsequent applications.
[0004] In a first aspect, embodiments of the present invention provide a method for determining an evaluation function, the method comprising:
[0005] Obtain at least one set of initial model correction parameters for the target model to be optimized, and determine the fitness values corresponding to each set of initial model correction parameters.
[0006] Based on the fitness values of each group, determine the fitness evaluation parameters and error evaluation parameters of the initial model correction parameters for each group;
[0007] Based on the fitness evaluation parameters and their evaluation weights, and the error evaluation parameters and their evaluation weights, the target evaluation functions corresponding to each group of initial model correction parameters are determined, so as to screen the initial model correction parameters and optimize the target model based on the screened target model correction parameters.
[0008] Optionally, determining the fitness values corresponding to each group of initial model correction parameters includes:
[0009] Obtain experimental data for optimizing the target model;
[0010] The initial model correction parameters and experimental data for each group are input into the target model to obtain the fitness values for each group output by the target model.
[0011] Optionally, the fitness evaluation parameters for determining the initial model correction parameters for each group based on the fitness values include:
[0012] For any set of fitness values, determine the maximum and minimum fitness values in the current set of fitness values;
[0013] The initial fitness evaluation parameters are determined based on the maximum fitness value and the minimum fitness value, corresponding to the current group's initial model correction parameters.
[0014] The initial fitness evaluation parameters are normalized to obtain the fitness evaluation parameters of the current group's initial model correction parameters.
[0015] Optionally, the step of determining the error evaluation parameters for each group of initial model correction parameters based on each group of fitness values includes:
[0016] For any set of fitness values, determine the average fitness value of each fitness value in the current set of fitness values, and determine the initial error evaluation parameters of the initial model correction parameters corresponding to the current set of fitness values based on the average fitness value;
[0017] The initial error evaluation parameters are normalized to obtain the error evaluation parameters of the current group's initial model correction parameters.
[0018] Optionally, determining the target evaluation function corresponding to each group of initial model correction parameters based on the fitness evaluation parameters and their evaluation weights, and the error evaluation parameters and their evaluation weights, includes:
[0019] For any set of initial model correction parameters, the fitness evaluation parameters and their evaluation weights of the current set of initial model correction parameters are weighted and multiplied, and the error evaluation parameters and their evaluation weights of the current set of initial model correction parameters are also weighted and multiplied.
[0020] The fitness evaluation parameters and the error evaluation parameters after weighted multiplication are summed to obtain the target evaluation function corresponding to the initial model correction parameters of the current group.
[0021] Optionally, after determining the target evaluation function corresponding to each set of initial model correction parameters, the method further includes:
[0022] Based on the objective evaluation function corresponding to each set of initial model correction parameters, determine the selection probability and cumulative probability corresponding to each set of initial model correction parameters.
[0023] Based on a preset probability threshold and the cumulative probability, the initial model correction parameters of each group are filtered to obtain at least one set of target model correction parameters.
[0024] Optionally, the target model includes a carbon load estimation model, the initial model correction parameters include correction parameters corresponding to the engine pulse spectrum data, and the fitness value includes carbon load.
[0025] Secondly, embodiments of the present invention also provide an evaluation function determination apparatus, the apparatus comprising:
[0026] The fitness value determination module is used to obtain at least one set of initial model correction parameters for the target model to be optimized, and to determine the fitness values corresponding to each set of initial model correction parameters.
[0027] The evaluation parameter determination module is used to determine the fitness evaluation parameters and error evaluation parameters of the initial model correction parameters for each group based on the fitness values of each group.
[0028] The objective evaluation function determination module is used to determine the objective evaluation function corresponding to each group of initial model correction parameters based on the fitness evaluation parameters and their evaluation weights, the error evaluation parameters and their evaluation weights, so as to screen the initial model correction parameters and optimize the objective model based on the screened objective model correction parameters.
[0029] Thirdly, embodiments of the present invention also provide an electronic device, comprising:
[0030] At least one processor; and
[0031] A memory communicatively connected to the at least one processor; wherein,
[0032] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the evaluation function determination method according to any embodiment of the present invention.
[0033] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions, which are used to cause a processor to execute the evaluation function determination method described in any embodiment of the present invention.
[0034] The technical solution of this invention specifically includes obtaining at least one set of initial model correction parameters for the target model to be optimized, and determining the fitness values corresponding to each set of initial model correction parameters; determining fitness evaluation parameters and error evaluation parameters for each set of initial model correction parameters based on the fitness values; determining the target evaluation function corresponding to each set of initial model correction parameters based on the fitness evaluation parameters and their evaluation weights, and the error evaluation parameters and their evaluation weights, to screen the initial model correction parameters, and optimizing the target model based on the screened target model correction parameters. This technical solution achieves target model optimization by using fitness evaluation parameters and error evaluation parameters together to form the target evaluation function and screening the initial model correction parameters. It solves the problem of local optima appearing during optimization, i.e., ignoring model parameters that meet the selection criteria, thereby selecting the global optimum and improving the accuracy of model parameter optimization, thus improving the accuracy of the model in subsequent applications.
[0035] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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 effort.
[0037] Figure 1 This is a flowchart of an evaluation function determination method provided in Embodiment 1 of the present invention;
[0038] Figure 2 This is a flowchart of an evaluation function determination method provided in Embodiment 2 of the present invention;
[0039] Figure 3 This is a schematic diagram of the structure of an evaluation function determination device provided in Embodiment 3 of the present invention;
[0040] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the evaluation function determination method of the present invention. Detailed Implementation
[0041] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0042] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.
[0043] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0044] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0045] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0046] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0047] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0048] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0049] Example 1
[0050] Figure 1 This invention provides a flowchart of an evaluation function determination method according to Embodiment 1. This embodiment is applicable to situations where optimization algorithms are used to optimize the model parameters of a target model. This method can be executed by an evaluation function determination device, which can be implemented in hardware and / or software. The evaluation function determination device can be configured in a smart terminal or a cloud server. Figure 1 As shown, the method includes:
[0051] S110. Obtain at least one set of initial model correction parameters for the target model to be optimized, and determine the fitness values corresponding to each set of initial model correction parameters.
[0052] The evaluation function determination method provided in this embodiment of the invention is used to determine the evaluation function used in the process of optimizing the model correction parameters of the target model using an optimization algorithm. Then, based on the determined evaluation function, each initial model correction parameter to be screened can be screened to obtain the optimal model correction parameters of the target model. Based on the optimal model correction parameters, the model parameters of the target model are corrected to obtain a target model with accurate performance.
[0053] In this embodiment of the invention, the optimization algorithm may include genetic algorithms and particle swarm optimization algorithms. Taking the optimization algorithm using a genetic algorithm as an example, in the process of optimizing the model correction parameters, at least one set of chromosomes is initialized in advance based on the initial model correction parameters of the target model. The genetic algorithm performs crossover and mutation operations on each set of chromosomes to optimize each set of chromosomes, determine the optimal chromosome, and thus determine the optimal model correction parameters.
[0054] Optionally, the method for obtaining the initial model correction parameters of the target model may include: obtaining the model parameters of the target model, initializing the correction parameters corresponding to each model parameter to obtain the initial model correction parameters of the target model, and initializing each initial model correction parameter as a set of chromosomes. In other words, each initial model correction parameter is treated as multiple individual genes in a set of chromosomes, and then multiple individuals can be optimized based on each set of chromosomes to determine the optimal individual, i.e., the target model correction parameters. Specifically, in the process of initializing the model correction parameters for each model parameter, an initialization range is pre-defined, and multiple correction parameters are randomly initialized for the same model parameter within this range. The multiple initial model correction parameters corresponding to each model parameter are then permuted and combined to obtain multiple sets of chromosomes. Then, a genetic algorithm is used to optimize each set of chromosomes to determine the target model correction parameters, and the target model is optimized based on the target model correction parameters.
[0055] In this embodiment, the fitness value can be understood as the target result output by the target model. Optionally, the method for obtaining the fitness value may include: obtaining experimental data for optimizing the target model; inputting each set of initial model correction parameters and experimental data into the target model respectively to obtain the fitness values output by the target model for each set.
[0056] It should be noted that experimental data can be understood as the input data corresponding to the output of the target model. Depending on the target model and the output, the corresponding input data will vary. Specifically, the obtained experimental data and each set of initial model correction parameters are input into the target model to obtain the fitness values corresponding to each set of initial model correction parameters output by the target model.
[0057] S120. Based on the fitness values of each group, determine the fitness evaluation parameters and error evaluation parameters of the initial model correction parameters for each group.
[0058] In this embodiment of the invention, based on obtaining the fitness values of each group of initial model correction parameters according to the above implementation method, fitness evaluation parameters and error evaluation parameters of each group of initial model correction parameters are determined based on the fitness values of each group, and evaluation functions of each group of initial model correction parameters are determined based on the fitness evaluation parameters and error evaluation parameters, and then parameter screening of each group of initial model correction parameters is performed based on the evaluation functions.
[0059] Optionally, the method for determining the fitness evaluation parameters of the initial model correction parameters for each group based on the fitness values of each group may include: for any group of fitness values, determining the maximum fitness value and the minimum fitness value in the current group of fitness values; determining the initial fitness evaluation parameters of the current group of initial model correction parameters corresponding to the current group of fitness values based on the maximum fitness value and the minimum fitness value; and normalizing the initial fitness evaluation parameters to obtain the fitness evaluation parameters of the current group of initial model correction parameters.
[0060] Specifically, for any set of fitness values, the maximum and minimum fitness values in the current set are obtained. Based on any fitness value, the maximum fitness value, and the minimum fitness value in the current set, fitness evaluation parameters for the current fitness value are determined. Based on the fitness evaluation parameters for each fitness value in the current set determined according to the above implementation method, the fitness evaluation parameters corresponding to each fitness value are summed to obtain the initial fitness evaluation parameters for the initial model correction parameters corresponding to the current set fitness values.
[0061] Optionally, the initial fitness evaluation parameters for the initial model correction parameters can be determined using a preset expression. For example, the expression may include:
[0062]
[0063] Among them, z i (x) represents the initial fitness evaluation parameter of the i-th initial model correction parameter, q represents the number of fitness values in the current group, and f k (x) represents the k-th fitness value. This represents the maximum fitness value in the current group. This represents the minimum fitness value among the current group's fitness values.
[0064] Specifically, based on the above implementation method, the initial fitness evaluation parameters for each set of initial correction parameters corresponding to each set of fitness values are determined respectively. Optionally, in order to make the subsequent optimization process corresponding to the optimal solution smoother, and thus more easily converge to the optimal solution correctly, this embodiment normalizes the initial fitness evaluation parameters corresponding to each set of initial correction parameters, thereby obtaining the fitness evaluation parameters corresponding to each set of initial model correction parameters. Specifically, the initial fitness evaluation parameters can be normalized based on a preset normalization expression. For example, the normalization expression may include:
[0065]
[0066] in, Let z represent the normalized fitness evaluation parameters for the i-th group. i z(x) represents the initial fitness evaluation parameters before normalization for the i-th group. max Let z(x) represent the maximum evaluation parameter among all fitness evaluation parameters. min This represents the minimum evaluation parameter among all fitness evaluation parameters.
[0067] Optionally, to prevent local optima from appearing during the optimization process of the initial model correction parameters, i.e., ignoring parameters that meet the screening criteria, the technical solution of this embodiment also determines the error evaluation parameters of each group of initial model correction parameters based on the fitness values of each group, and uses the error evaluation parameters as one of the parameters constituting the evaluation function, so that the obtained evaluation function can more accurately determine the global optimal solution in each group of initial correction parameters during the optimization process, thereby improving the accuracy of optimization.
[0068] Optionally, the method for determining the error evaluation parameters of the initial model correction parameters for each group based on the fitness values of each group may include: for any group of fitness values, determining the average fitness value of each fitness value in the current group of fitness values, and determining the initial error evaluation parameters of the initial model correction parameters corresponding to the current group of fitness values based on the average fitness value; normalizing the initial error evaluation parameters to obtain the error evaluation parameters of the initial model correction parameters for the current group of fitness values.
[0069] Specifically, for any set of fitness values, the average fitness value of the current set of fitness values is obtained. Based on any fitness value and the average fitness value in the current set of fitness values, the error evaluation parameters of the current fitness value are determined. Based on the error evaluation parameters of each fitness value in the current set of fitness values determined according to the above implementation method, the error evaluation parameters corresponding to each fitness value are summed, and the summed error evaluation parameters are averaged based on the number of fitness values in the current set to obtain the initial error evaluation parameters of the initial model correction parameters corresponding to the current set of fitness values.
[0070] Optionally, the initial error evaluation parameters for the initial model correction parameters can be determined using a preset expression. For example, the expression may include:
[0071]
[0072] Among them, MSE i (x) represents the initial error evaluation parameter of the i-th initial model correction parameter, q represents the number of fitness values in the current group, and f k (x) represents the k-th fitness value. This represents the average fitness value among the fitness values of the current group.
[0073] Specifically, based on the above implementation method, the initial error evaluation parameters for each set of initial correction parameters corresponding to each set of fitness values are determined. Optionally, to make the subsequent optimization process for the corresponding optimal solution smoother and thus more easily converge to the optimal solution correctly, this embodiment normalizes the initial error evaluation parameters corresponding to each set of initial correction parameters, thereby obtaining the error evaluation parameters corresponding to each set of initial model correction parameters. Specifically, the initial error evaluation parameters can be normalized based on a preset normalization expression. For example, the normalization expression may include:
[0074]
[0075] in, MSE represents the normalized fitness evaluation parameter for the i-th group. i (x) represents the initial fitness evaluation parameters before normalization for the i-th group, MSE(x) max MSE(x) represents the maximum fitness evaluation parameter. min This represents the minimum evaluation parameter among all fitness evaluation parameters.
[0076] It should be noted that the above-mentioned selection of mean square error is only an exemplary introduction for determining error evaluation parameters, and is not the entire implementation of this embodiment. This embodiment may also determine other errors as error evaluation parameters, and this embodiment does not limit them.
[0077] S130. Based on the fitness evaluation parameters and their evaluation weights, and the error evaluation parameters and their evaluation weights, determine the target evaluation functions corresponding to the initial model correction parameters of each group.
[0078] Based on the fitness evaluation parameters and error evaluation parameters of each group of initial model correction parameters determined according to the above implementation method, the objective evaluation function corresponding to each group of initial model correction parameters is determined based on the fitness evaluation parameters and their evaluation weights, and the error evaluation parameters and their evaluation weights. Then, the initial model correction parameters of each group are optimized based on the objective evaluation function to determine the optimal model correction parameters.
[0079] Optionally, determining the objective evaluation function corresponding to each group of initial model correction parameters may include: for any group of initial model correction parameters, performing weighted product processing on the fitness evaluation parameters and their evaluation weights of the current group of initial model correction parameters, and performing weighted product processing on the error evaluation parameters and their evaluation weights of the current group of initial model correction parameters; summing the weighted product fitness evaluation parameters and the weighted product error evaluation parameters to obtain the objective evaluation function corresponding to the current group of initial model correction parameters.
[0080] Specifically, the fitness evaluation weights corresponding to the pre-set fitness evaluation parameters and the error evaluation weights corresponding to the error evaluation parameters are obtained. For any set of initial model correction parameters, the fitness evaluation parameters and fitness evaluation weights of the current set of initial model correction parameters are weighted and multiplied, and the error evaluation parameters and error evaluation weights of the current set of initial model correction parameters are also weighted and multiplied. Then, the fitness evaluation parameters and error evaluation parameters after weighted multiplication are summed to obtain the objective evaluation function corresponding to the initial model correction parameters of the current set.
[0081] Optionally, a preset expression can be used to determine the target evaluation function for the initial model correction parameters. For example, the expression may include:
[0082]
[0083] Among them, eval i (x) represents the objective evaluation function for the modified parameters of the i-th initial model. Denotes the normalized fitness evaluation parameters for the i-th group. Let represent the normalized fitness evaluation parameters for the i-th group.
[0084] Optionally, based on the above implementation method, the target evaluation function corresponding to each group of initial model correction parameters is determined, and then the initial model correction parameters of each group are screened based on each target evaluation function, and the target model is optimized based on the screened target model correction parameters.
[0085] The technical solution of this invention specifically includes obtaining at least one set of initial model correction parameters for the target model to be optimized, and determining the fitness values corresponding to each set of initial model correction parameters; determining fitness evaluation parameters and error evaluation parameters for each set of initial model correction parameters based on the fitness values; determining the target evaluation function corresponding to each set of initial model correction parameters based on the fitness evaluation parameters and their evaluation weights, and the error evaluation parameters and their evaluation weights, to screen the initial model correction parameters, and optimizing the target model based on the screened target model correction parameters. This technical solution achieves target model optimization by using fitness evaluation parameters and error evaluation parameters together to form the target evaluation function and screening the initial model correction parameters. It solves the problem of local optima appearing during optimization, i.e., ignoring model parameters that meet the selection criteria, thereby selecting the global optimum and improving the accuracy of model parameter optimization, thus improving the accuracy of the model in subsequent applications.
[0086] Based on the above embodiments, this invention also provides a preferred embodiment, specifically including: if the target model is a carbon load estimation model, then the initial model correction parameters can be understood as initial correction factors used to correct the engine pulse spectrum. Here, the engine pulse spectrum is a model parameter in the carbon load estimation model, and the performance of this model parameter can evaluate the model performance of the carbon load estimation model.
[0087] Optionally, an initial engine pulse spectrum of the carbon load model is obtained, and the engine pulse spectrum is regionally calibrated to determine at least one calibration region in the pulse spectrum. The number of calibration regions matches the number of carbon load values output by the carbon load estimation model. Correction factors corresponding to each calibration region are initialized to obtain initial correction factors for each calibration region, and each initial correction factor is initialized as a set of chromosomes. In other words, each initial correction factor is treated as multiple individual genes in a set of chromosomes, allowing for optimization of multiple individuals based on each set of chromosomes to determine the optimal model correction parameters. Specifically, during the initialization of correction factors for each calibration region, an initialization range is pre-defined, and multiple correction factors are randomly initialized for the same calibration region within this range. Multiple sets of chromosomes are obtained by permuting and combining the multiple initial correction factors corresponding to each calibration region, and then a genetic algorithm is used to optimize each set of chromosomes to determine the optimal correction factor. Based on the optimal correction factor, the spectral data in the engine pulse spectrum are corrected for the carbon load parameters to obtain a high-performance carbon load estimation model.
[0088] In this embodiment, based on the target model being a carbon load estimation model, the fitness value can be understood as the carbon load value output by the carbon load estimation model. Experimental data may include, but is not limited to, engine speed, engine fuel injection quantity, engine transient excess air coefficient, exhaust gas mass flow rate, PDF temperature, and nitrogen dioxide mass flow rate, among other relevant engine characteristic data. Correspondingly, for any set of initial model correction parameters, the aforementioned engine characteristic data (experimental data) and the current set of correction factors (initial model correction parameters) are input into the carbon load estimation model (target model) to obtain a set of carbon load values corresponding to the current set of correction factors output by the carbon load estimation model, which is equivalent to obtaining a set of fitness values corresponding to the current set of initial model correction parameters.
[0089] Optionally, based on the expressions in the above embodiments, the fitness evaluation parameters and error evaluation parameters corresponding to each group of initial correction factors are determined respectively, and then the target evaluation function corresponding to each group of initial correction factors is determined respectively, so as to screen the parameters of each group of initial correction factors, and optimize the engine pulse spectrum of the carbon load estimation model based on the screened correction factors, thereby obtaining a carbon load estimation model with accurate performance.
[0090] Example 2
[0091] Figure 2 This is a flowchart of a method for determining an evaluation function according to Embodiment 2 of the present invention. Optionally, based on the above embodiments, after determining the target evaluation function corresponding to each group of initial model correction parameters, the method further includes:
[0092] Based on the objective evaluation function corresponding to the initial model correction parameters of each group, determine the selection probability and cumulative probability corresponding to the initial model correction parameters of each group;
[0093] Based on preset probability thresholds and cumulative probabilities, the initial model correction parameters are filtered to obtain at least one set of target model correction parameters. For example... Figure 2 As shown, the method includes:
[0094] S210. Obtain at least one set of initial model correction parameters for the target model to be optimized, and determine the fitness values corresponding to each set of initial model correction parameters.
[0095] S220. Based on the fitness values of each group, determine the fitness evaluation parameters and error evaluation parameters of the initial model correction parameters for each group.
[0096] S230. Based on the fitness evaluation parameters and their evaluation weights, and the error evaluation parameters and their evaluation weights, determine the target evaluation functions corresponding to the initial model correction parameters of each group.
[0097] S240. Based on the target evaluation function corresponding to each group of initial model correction parameters, determine the selection probability and cumulative probability corresponding to each group of initial model correction parameters, and filter each group of initial model correction parameters based on the preset probability threshold and cumulative probability to obtain at least one group of target model correction parameters after filtering.
[0098] In this embodiment of the invention, based on the objective evaluation function of each initial model correction parameter determined according to the above implementation method, the selection probability and cumulative probability of each initial model correction parameter are determined based on each objective evaluation function, thereby realizing the screening of initial model correction parameters.
[0099] Optionally, the selection probability of the initial model correction parameters can be determined based on a preset selection probability determination expression. For example, the expression may include:
[0100]
[0101] Where, p i eval represents the probability of selecting the correction parameters for the i-th initial model group. i (x) represents the objective evaluation function of the i-th set of initial model correction parameters, represents the number of sets of initial model correction parameters, and F represents the minimization coefficient of the objective evaluation function.
[0102] Optionally, the cumulative probability of the initial model correction parameters can be determined based on a preset cumulative probability determination expression. For example, the expression may include:
[0103]
[0104] Among them, L i p represents the cumulative probability of correcting the parameters of the i-th initial model group. i Let represent the probability of selecting the correction parameters for the i-th initial model group, and j represent the total number of parameters.
[0105] Optionally, based on the cumulative probability of each group of initial model correction parameters, a predetermined screening threshold is obtained, and the initial model correction parameters of each group are screened based on the screening threshold and the cumulative probability, and the screened model correction parameters are determined.
[0106] The technical solution of this invention introduces the error evaluation parameter of the initial model correction parameter as a sub-item in determining the evaluation function. Combined with the fitness evaluation parameter, the constructed target evaluation function can more objectively reflect the merits of the fitness values corresponding to each set of initial model correction parameters. This allows excellent populations to be selected and retained in the next generation with a more reasonable probability, improving optimization efficiency and accuracy, and reducing errors.
[0107] Example 3
[0108] Figure 3 This is a schematic diagram of an evaluation function determination device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes: a fitness value determination module 310, an evaluation parameter determination module 320, and a target evaluation function determination module 330; wherein,
[0109] The fitness value determination module 310 is used to obtain at least one set of initial model correction parameters for the target model to be optimized, and to determine the fitness values corresponding to each set of initial model correction parameters.
[0110] The evaluation parameter determination module 320 is used to determine the fitness evaluation parameters and error evaluation parameters of the initial model correction parameters of each group based on the fitness values of each group.
[0111] The target evaluation function determination module 330 is used to determine the target evaluation function corresponding to each group of initial model correction parameters based on the fitness evaluation parameters and their evaluation weights, the error evaluation parameters and their evaluation weights, so as to screen the initial model correction parameters and optimize the target model based on the screened target model correction parameters.
[0112] Based on the above embodiments, optionally, the fitness value determination module 310 includes:
[0113] An experimental data acquisition unit is used to acquire experimental data for optimizing the target model;
[0114] The fitness value acquisition unit is used to input the initial model correction parameters and the experimental data into the target model respectively, and obtain the fitness values of each group output by the target model.
[0115] Based on the above implementation method, optionally, the evaluation parameter determination module 320 includes:
[0116] The maximum and minimum fitness value acquisition unit is used to determine the maximum and minimum fitness values in the current fitness value set for any given set of fitness values.
[0117] The initial fitness evaluation parameter determination unit is used to determine the initial fitness evaluation parameters of the current group initial model correction parameters corresponding to the current group fitness value based on the maximum fitness value and the minimum fitness value;
[0118] The fitness evaluation parameter determination unit is used to normalize the initial fitness evaluation parameters to obtain the fitness evaluation parameters of the current group's initial model correction parameters.
[0119] Based on the above implementation method, optionally, the evaluation parameter determination module 320 includes:
[0120] The initial error evaluation parameter determination unit is used to determine the average fitness value of each fitness value in the current fitness value for any set of fitness values, and to determine the initial error evaluation parameters of the initial model correction parameters corresponding to the current fitness value based on the average fitness value.
[0121] The error evaluation parameter determination unit is used to normalize the initial error evaluation parameters to obtain the error evaluation parameters of the current group's initial model correction parameters.
[0122] Based on the above implementation method, optionally, the target evaluation function determination module 320 includes:
[0123] The evaluation parameter processing unit is used to perform weighted product processing on the fitness evaluation parameters and their evaluation weights of the current set of initial model correction parameters for any set of initial model correction parameters, and to perform weighted product processing on the error evaluation parameters and their evaluation weights of the current set of initial model correction parameters.
[0124] The objective evaluation function generation unit is used to sum the fitness evaluation parameters and the error evaluation parameters after weighted multiplication to obtain the objective evaluation function corresponding to the initial model correction parameters of the current group.
[0125] Optionally, based on the above embodiments, the apparatus further includes:
[0126] The probability determination module is used to determine the selection probability and cumulative probability of each set of initial model correction parameters based on the target evaluation function corresponding to each set of initial model correction parameters after determining the target evaluation function corresponding to each set of initial model correction parameters.
[0127] The target model correction parameter determination module is used to filter the initial model correction parameters based on a preset probability threshold and the cumulative probability to obtain at least one set of target model correction parameters after filtering.
[0128] Based on the above embodiments, optionally, the target model includes a carbon load estimation model, the initial model correction parameters include correction parameters corresponding to the engine pulse spectrum data, and the fitness value includes carbon load.
[0129] The evaluation function determination device provided in the embodiments of the present invention can execute the evaluation function determination method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0130] Example 4
[0131] Figure 4 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0132] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0133] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0134] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the evaluation function determination method.
[0135] In some embodiments, the evaluation function determination method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the evaluation function determination method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the evaluation function determination method by any other suitable means (e.g., by means of firmware).
[0136] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0137] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0138] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0139] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0140] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0141] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0142] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0143] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for determining an evaluation function, characterized in that, include: Obtain at least one set of initial model correction parameters for the target model to be optimized, and determine the fitness values corresponding to each set of initial model correction parameters. Based on the fitness values of each group, determine the fitness evaluation parameters and error evaluation parameters of the initial model correction parameters for each group; Based on the fitness evaluation parameters and their evaluation weights, and the error evaluation parameters and their evaluation weights, the target evaluation functions corresponding to each group of initial model correction parameters are determined, so as to screen the initial model correction parameters and optimize the target model based on the screened target model correction parameters. The target model includes a carbon load estimation model, the initial model correction parameters include correction parameters corresponding to the engine's pulse spectrum data, and the fitness value includes carbon load. The determination of the fitness values corresponding to each group of initial model correction parameters includes: Obtain experimental data for optimizing the target model, the experimental data including relevant characteristic data of the engine; The initial model correction parameters and experimental data of each group are respectively input into the target model to obtain the fitness values of each group output by the target model; The fitness evaluation parameters for determining the initial model correction parameters for each group based on the fitness values include: For any set of fitness values, determine the maximum and minimum fitness values in the current set of fitness values; Based on the maximum fitness value and the minimum fitness value, the initial fitness evaluation parameters for the current group's initial model correction parameters corresponding to the current group's fitness value are determined, wherein the initial fitness evaluation parameters for the initial model correction parameters are determined using the following expressions, including: ; in, Let represent the initial fitness evaluation parameters for the i-th initial model correction parameters, and q represent the number of fitness values in the current group. This represents the k-th fitness value. This represents the maximum fitness value in the current group. This represents the minimum fitness value in the current group. The initial fitness evaluation parameters are normalized to obtain the fitness evaluation parameters of the current group's initial model correction parameters; The error evaluation parameters for determining the initial model correction parameters for each group based on the fitness values of each group include: For any set of fitness values, determine the average fitness value of all fitness values in the current set, and based on the average fitness value, determine the initial error evaluation parameters of the initial model correction parameters corresponding to the current set of fitness values. The initial error evaluation parameters of the initial model correction parameters are determined using the following expression: ; in, Let represent the initial error evaluation parameters for the i-th initial model correction parameters, and q represent the number of fitness values for the current group. This represents the k-th fitness value. This represents the average fitness value among the fitness values of the current group; The initial error evaluation parameters are normalized to obtain the error evaluation parameters of the current group's initial model correction parameters.
2. The method according to claim 1, characterized in that, The step of determining the target evaluation function corresponding to each group of initial model correction parameters based on the fitness evaluation parameters and their evaluation weights, and the error evaluation parameters and their evaluation weights, includes: For any set of initial model correction parameters, the fitness evaluation parameters and their evaluation weights of the current set of initial model correction parameters are weighted and multiplied, and the error evaluation parameters and their evaluation weights of the current set of initial model correction parameters are also weighted and multiplied. The fitness evaluation parameters and the error evaluation parameters after weighted multiplication are summed to obtain the target evaluation function corresponding to the initial model correction parameters of the current group.
3. The method according to claim 1, characterized in that, After determining the target evaluation function corresponding to each set of initial model correction parameters, the method further includes: Based on the objective evaluation function corresponding to each set of initial model correction parameters, determine the selection probability and cumulative probability corresponding to each set of initial model correction parameters. Based on a preset probability threshold and the cumulative probability, the initial model correction parameters of each group are filtered to obtain at least one set of target model correction parameters.
4. An evaluation function determination apparatus, capable of performing the method according to any one of claims 1-3, characterized in that, include: The fitness value determination module is used to obtain at least one set of initial model correction parameters for the target model to be optimized, and to determine the fitness values corresponding to each set of initial model correction parameters. The evaluation parameter determination module is used to determine the fitness evaluation parameters and error evaluation parameters of the initial model correction parameters for each group based on the fitness values of each group. The objective evaluation function determination module is used to determine the objective evaluation function corresponding to each group of initial model correction parameters based on the fitness evaluation parameters and their evaluation weights, the error evaluation parameters and their evaluation weights, so as to screen the initial model correction parameters and optimize the objective model based on the screened objective model correction parameters. The target model includes a carbon load estimation model, the initial model correction parameters include correction parameters corresponding to the engine's pulse spectrum data, and the fitness value includes carbon load.
5. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the evaluation function determination method according to any one of claims 1-4.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the evaluation function determination method according to any one of claims 1-3.