Model optimization method and device, computer device and storage medium
By acquiring and updating experimental data of the models to be nested in the thermal-hydraulic system analysis software, optimizing the initial model and activation conditions, the problem of inconsistency between the model development evaluation method and the analysis software processing method was solved, thus improving the calculation accuracy and consistency.
Patent Information
- Application Number
- CN202310091128.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-13
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-01-13
AI Technical Summary
In existing thermal-hydraulic system analysis software, the model development and evaluation methods differ from the processing methods of the analysis software, leading to uncertainty in calculation accuracy.
By acquiring experimental data of the model to be nested, the initial model and model activation conditions in the initial analysis software are updated. Based on the analysis results and experimental results, optimization is performed to ensure that the model calling logic is consistent with the development logic and to improve the calculation accuracy.
It improves the calculation accuracy of the analysis software, reduces the impact of differences between the model calling logic and the development logic, and enhances the effectiveness of the model in the analysis software.
Smart Images

Figure CN115935715B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of nuclear power, in particular to a model optimization method and device, computer equipment and storage medium. BACKGROUND
[0002] The thermal-hydraulic system analysis software simulates the thermal-hydraulic system by using three conservation equations, and some terms in the conservation equations are calculated by the model embedded in the analysis software. However, the development and evaluation method of the model may be different from the actual processing method of the analysis software, which increases the uncertainty of the simulation effect of the analysis software.
[0003] For example, TRACE is a thermal-hydraulic system analysis software developed based on RELAP5 and TRAC for the needs of pressurized water reactors and boiling water reactors. The critical back wall heat transfer mode is divided into transition boiling heat transfer and film boiling heat transfer, and the film boiling heat transfer is further divided into anti-annular flow film boiling heat transfer, anti-bubble flow film boiling heat transfer and dispersed flow film boiling heat transfer according to the flow pattern. For the transition boiling heat transfer model, TRACE evaluates three different interpolation methods between the critical heat flux point (CHF point) and the minimum film boiling point (MFB point) based on test data, and selects one of them as the interpolation method used by TRACE. The interpolation method only uses two test point data, i.e. the CHF point and the MFB point. However, when the analysis software calculates the heat transfer at a certain state point between the two points, it does not use the data of the CHF point and the MFB point, but the data of the CHF point and the MFB point predicted based on the local data of the point.
[0004] In the above process, the processing method of the model for the CHF point and the MFB point is inconsistent with the processing method of the analysis software, which may affect the calculation accuracy of the model embedded in the analysis software. SUMMARY
[0005] Therefore, it is necessary to provide a model optimization method, device, computer equipment and storage medium capable of optimizing the model in the analysis software to improve the calculation accuracy of the analysis software.
[0006] In a first aspect, the present application provides a model optimization method, which comprises:
[0007] obtaining a to-be-embedded model and test data corresponding to the to-be-embedded model, wherein the test data comprises test conditions, data labels and test results;
[0008] updating an initial model in an initial analysis software based on the to-be-embedded model;
[0009] updating a model activation condition corresponding to the initial model in the initial analysis software based on the data marking;
[0010] obtaining an analysis result of the updated initial analysis software under the test working condition;
[0011] optimizing the to-be-nested model based on the analysis result and the test result.
[0012] In one of the embodiments, the test data corresponding to the to-be-nested model is obtained, including:
[0013] eliminating data in the initial data that meets a preset discrete degree and does not meet a smooth transition condition, and / or data with a gas rate greater than a preset heat balance value, to obtain the test data
[0014] In one of the embodiments, the to-be-nested model includes variables, a variable organization form, coefficients corresponding to the variables, and a model output result.
[0015] updating the initial model in the initial analysis software based on the to-be-nested model, including:
[0016] updating the initial model in the initial analysis software based on the variable organization form;
[0017] updating an input module of the initial analysis software based on the coefficients corresponding to the variables;
[0018] updating an output module of the initial analysis software based on the variables and the model output result.
[0019] In one of the embodiments, the to-be-nested model is optimized based on the analysis result and the test result, including:
[0020] comparing the analysis result with the test result to obtain an error result;
[0021] determining whether to optimize the to-be-nested model based on the error result.
[0022] In one of the embodiments, whether to optimize the to-be-nested model based on the error result includes:
[0023] determining a correlation between the error result and the variables of the to-be-nested model;
[0024] if the correlation does not meet a correlation condition, determining whether to optimize the to-be-nested model.
[0025] In one of the embodiments, whether to optimize the to-be-nested model based on the error result includes:
[0026] if the correlation meets the correlation condition, judging whether a change trend of the analysis result is consistent with a change trend of the test result.
[0027] If the change trends are inconsistent and / or the error result does not satisfy the preset error range, it is determined that the coefficients corresponding to the variables of the to-be-nested model need to be optimized.
[0028] In one of the embodiments, the method further comprises:
[0029] Based on the nonlinear regression method, the coefficients corresponding to the variables are fitted to obtain a fitting result.
[0030] Based on the fitting result, the coefficients corresponding to the variables of the to-be-nested model are optimized.
[0031] In a second aspect, the present application further provides a model optimization device, which comprises:
[0032] The acquisition module is configured to acquire a to-be-nested model and test data corresponding to the to-be-nested model; wherein the test data comprises test conditions, data labels, and test results.
[0033] The updating module is configured to update an initial model in an initial analysis software based on the to-be-nested model.
[0034] The adjusting module is configured to update model enabling conditions corresponding to the initial model in the initial analysis software based on the data labels.
[0035] The verifying module is configured to acquire an analysis result of the updated initial analysis software under the test conditions.
[0036] In a third aspect, the present application further provides a computer device, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0037] The acquisition module is configured to acquire a to-be-nested model and test data corresponding to the to-be-nested model; wherein the test data comprises test conditions, data labels, and test results.
[0038] The updating module is configured to update an initial model in an initial analysis software based on the to-be-nested model.
[0039] The adjusting module is configured to update model enabling conditions corresponding to the initial model in the initial analysis software based on the data labels.
[0040] The verifying module is configured to acquire an analysis result of the updated initial analysis software under the test conditions.
[0041] The verifying module is configured to acquire an analysis result of the updated initial analysis software under the test conditions.
[0042] In a fourth aspect, the present application provides a computer readable storage medium, having stored thereon a computer program, the computer program being executed by a processor to implement the following steps:
[0043] obtaining the to-be-nested model and test data corresponding to the to-be-nested model, wherein the test data comprises test conditions, data labels, and test results;
[0044] updating an initial model in the initial analysis software based on the to-be-nested model;
[0045] updating a model activation condition corresponding to the initial model in the initial analysis software based on the data labels;
[0046] obtaining an analysis result of the updated initial analysis software under the test conditions;
[0047] optimizing the to-be-nested model based on the analysis result and the test result.
[0048] In a fifth aspect, the present application provides a computer program product, comprising a computer program, the computer program being executed by a processor to implement the following steps:
[0049] obtaining the to-be-nested model and test data corresponding to the to-be-nested model, wherein the test data comprises test conditions, data labels, and test results;
[0050] updating an initial model in the initial analysis software based on the to-be-nested model;
[0051] updating a model activation condition corresponding to the initial model in the initial analysis software based on the data labels;
[0052] obtaining an analysis result of the updated initial analysis software under the test conditions;
[0053] optimizing the to-be-nested model based on the analysis result and the test result.
[0054] The model optimization method, device, computer device and storage medium have the purpose of developing model optimization based on the environment of the thermal hydraulic system analysis software itself, improving the effectiveness of the model optimization process by constructing the actual use environment of the to-be-nested model, updating the model enabling condition corresponding to the initial model in the initial analysis software based on data marking, making the corresponding model calling logic in the analysis software consistent with the development logic of the to-be-nested model, excluding the influence of the model calling logic in the analysis software on the use effect of the to-be-nested model, and effectively verifying the calculation accuracy of the to-be-nested model itself, optimizing the to-be-nested model based on the analysis result and the test result, determining the optimization direction of the to-be-nested model through the analysis result and the test result, optimizing the to-be-nested model based on the optimization direction, and then realizing the overall optimization of the analysis software to improve the calculation accuracy of the analysis software. BRIEF DESCRIPTION OF DRAWINGS
[0055] Figure 1 is a schematic diagram of the Nukiyama curve;
[0056] Figure 2 is a schematic diagram of the model optimization method in the embodiment;
[0057] Figure 3 is a schematic diagram of the process of updating the initial model in the initial analysis software in an embodiment;
[0058] Figure 4 is a schematic diagram of the process of optimizing the to-be-nested model in an embodiment;
[0059] Figure 5 is a schematic diagram of the model optimization method in another embodiment;
[0060] Figure 6 is a structural block diagram of the model optimization device in an embodiment;
[0061] Figure 7 is an internal structure diagram of the computer device in an embodiment. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0063] After a hypothetical loss of coolant accident occurs in a pressurized water reactor, the reactor core may be exposed, and the fuel cladding surface may be in a post- critical heat transfer state. Heat transfer deterioration caused by post-critical heat transfer leads to a sharp rise in fuel cladding temperature, directly affecting the safety margin of the reactor. Therefore, post-critical heat transfer has always been the focus of the nuclear industry.
[0064] As shown in Figure 1 , the critical post-heat transfer includes the transition boiling and the film boiling in the Nukiyama curve. When the wall superheat is very small, the heat transfer mode is the pre-critical single-phase convection. When the superheat increases, the critical post-heat transfer mode enters the nucleate boiling. After the heat transfer reaches a certain limit, the transition boiling is entered, a large number of bubbles are connected into a gas film on the wall, but the unstable gas film intermittently breaks into large bubbles, and the liquid intermittently contacts the wall. With the continuous increase of the superheat, the gas film starts to be continuous, and the liquid cannot contact the wall, and the heat transfer mode enters the film boiling. The thermal hydraulic system analysis software simulates the thermal hydraulic system by using three conservation equations, and some parameter terms in the conservation equations are calculated by the embedded model in the analysis software, for example, the embedded model can be the above-mentioned critical post-heat transfer model for describing the critical post-heat transfer state (mode).
[0065] However, in the actual calling process of the embedded model of the analysis software, the processing method adopted by the analysis software may be different from the development and evaluation method of the model, and this difference increases the uncertainty of the simulation effect of the analysis software, and further may affect the calculation accuracy of the model embedded in the analysis software.
[0066] In one embodiment, the embodiment provides a model optimization method, which can be applied to the scene of developing and optimizing the model, and can be applied to the scene of developing and optimizing the model by using the analysis software. Optionally, the method can be executed by a computer device, which can be a server or a terminal, and the computer device is a device for designing (modifying) the analysis software. Specifically, in one embodiment, as shown in Figure 2 , the method specifically includes the following steps:
[0067] S201, obtaining a to-be-embedded model and test data corresponding to the to-be-embedded model.
[0068] The to-be-embedded model refers to the model that needs to be embedded in the analysis software, and the to-be-embedded model is designed by the development party. It can be understood that the test data corresponding to the to-be-embedded model refers to the data used for verifying the to-be-embedded model, and the development data corresponding to the to-be-embedded model is the verification data. The development data and the test data have the same data form, and serve as the design basis of the to-be-embedded model; in the development process of the to-be-embedded model, the development party continuously adjusts (optimizes) the to-be-embedded model, so that the to-be-embedded model can more accurately simulate the test data.
[0069] The experimental data includes experimental conditions, data labels, and experimental results. Specifically, the experimental conditions are records of conditions under historical scenarios; for the optimization process of the post-critical model (the model to be nested), the experimental results are used to characterize the post-critical heat transfer state corresponding to the experimental condition (or key features that can be used to characterize the post-critical heat transfer state); data labels refer to the identifiers used to mark the experimental conditions based on the experimental results. For example, data labels can represent data corresponding to the transition boiling mode, data corresponding to the film boiling mode, data corresponding to the inlet and outlet of the flow channel, and data corresponding to the vicinity of the hot spot, etc.
[0070] S202, based on the model to be nested, update the initial model in the initial analysis software.
[0071] The initial analysis software is the analysis software before optimization. The initial model in the initial analysis software refers to the model before optimization, and this initial model can be null during the development phase.
[0072] Specifically, updating the initial model in the initial analysis software based on the model to be nested means replacing the initial model in the initial analysis software with the model to be nested designed during the development process. The purpose is to embed the model to be nested designed by the developer during the iterative design process into the actual analysis software, optimize the model based on the thermal-hydraulic system analysis software itself, and verify the actual use effect of the model to be nested in the analysis software.
[0073] S203, based on data labeling, update the model activation conditions corresponding to the initial model in the initial analysis software.
[0074] The initial model has corresponding model activation conditions, which specify the conditions under which the model is invoked. For example, in thermal-hydraulic system analysis software, the model is determined by the internal energy U of the liquid phase. f and gas phase internal energy U g In the energy conservation equation, the heat transfer per unit area (heat flux) Q from the heating element to the liquid phase is represented by the equation. wf and the heat Q transferred to the gas phase wg The calculation is based on the heat transfer coefficient and temperature difference. The heat transfer coefficient is calculated using a heat transfer model in the analysis software. In this case, the analysis software invokes the heat transfer model based on the corresponding model activation conditions. Additionally, this heat transfer model uses pressure P, void fraction α, and gas phase velocity v. g Liquid flow rate v f Vapor phase temperature T g Liquid phase temperature T f Parameters such as these.
[0075] It can be understood that for any model in the analysis software, the model is designed by real development data; however, when the model enabling condition is set to be some intermediate parameters that the model needs to use, the intermediate parameters are predicted by the analysis software calling other models or relational expressions, and there is a large error between the real development data in the model design process, which may cause the calculation result of the model to have a large error due to the error of the input data (intermediate parameters). In the above-mentioned case, the difference between the calling logic of the analysis software and the model development logic causes the inconsistency of the model, which leads to the reduction of the calculation accuracy of the analysis software after the model is embedded in the analysis software.
[0076] For the difference between the calling logic of the analysis software and the model development logic, for example, for the prediction of the critical post-heat transfer mode, there are many models, and most of the models other than radiation heat transfer are based on empirical or semi-empirical relations (i.e. designed based on test data). Among them, Nguyen et al. developed a set of film boiling heat transfer relations, that is, a K coefficient is introduced in the transition zone between nucleate boiling and film boiling, and the heat transfer coefficient h of film boiling is interpolated between the heat transfer coefficient hNB,0 of nucleate boiling and the fully developed film boiling heat transfer coefficient hFD:
[0077] h = Kh NB,0 +(1-K)h FD
[0078] Wherein, the transition zone coefficient K is obtained by fitting the test data. Due to the existence of thermal imbalance effect, the intermediate parameters such as gas phase temperature and real gas content used in the calculation process of Nguyen model are predicted by introducing other models, so there is an error between the actual value in the test data and the intermediate parameter. The analysis software uses the above-mentioned intermediate parameter as the model enabling condition of the Nguyen model, and in the analysis process, the analysis software substitutes the intermediate parameter predicted by other models into the Nguyen model (i.e. enables the Nguyen model), and due to the error between the actual value in the test data and the intermediate parameter, the calculation result of the Nguyen model may also have a large error. In addition, if the Nguyen model is used for thermal hydraulic system analysis software, the analysis software itself will also calculate the gas phase temperature and the Gr number, and these parameter values may be different from the predicted values output by the Nguyen model, thereby causing the inconsistency of the model.
[0079] For example, the transition boiling heat transfer model of TRACE, which is based on the test data to evaluate three different interpolation methods between the CHF point and the MFB point, and selects one of them as the interpolation method used by TRACE, which only uses two data points in the test data, i.e., the CHF point and the MFB point; however, when the analysis software calculates the heat transfer at a state point between the two points, it does not use the data of the CHF point and the MFB point, but calls the CHF calculation model to predict the CHF point based on the local data (current test condition) and calls the MFB calculation model to predict the MFB point data, in which case the model enabling condition of the transition boiling heat transfer model is: the CHF point data and the MFB point data are known. However, the difference between this model development and evaluation method and the actual processing method used by the analysis software increases the uncertainty of the simulation effect of the analysis software.
[0080] Therefore, in the embodiment, the data tag based on the updated to-be-nested model is used as the model enabling condition of the to-be-nested model, to replace the model enabling condition of the initial model in the initial analysis software. As in the above example, the development logic of the model is: based on any test condition, the CHF point data and the MFB point data in the development data are determined, and the CHF point data and the MFB point data in the development data are used as intermediate parameters of the model to determine the test result corresponding to the test condition; in the above example, the logic of the analysis software calling the model is: based on any test condition, the CHF point data and the MFB point data are predicted, and the predicted CHF point data and the MFB point data are used as intermediate parameters of the model to determine the test result corresponding to the test condition.
[0081] Further, after the model enabling condition is modified, the logic of the analysis software calling the model is: based on any test condition, the data tag corresponding to the test condition is determined, based on the data tag, the CHF point data and the MFB point data in the development data are determined, and the CHF point data and the MFB point data in the development data are used as intermediate parameters of the model to determine the test result corresponding to the test condition. Therefore, only the data tag needs to be used to call the corresponding model, which is calculated based on the CHF point data and the MFB point data in the development process, so that the calling logic of the model is consistent with the development logic of the model, and the error of the model input data is reduced.
[0082] S204, obtaining the analysis result of the updated initial analysis software under the test condition.
[0083] wherein after the initial analysis software is updated by the to-be-nested model, the test condition is input to the updated initial analysis software, and the analysis result calculated by the analysis software based on the to-be-nested model is obtained.
[0084] It can be understood that the analysis result is used to simulate the state of the thermal hydraulic system under the constraint of the test working condition, and can represent the use effect of the to-be-nested model when actually used in the analysis software.
[0085] S205, based on the analysis result and the test result, optimizing the to-be-nested model.
[0086] The analysis result and the test result are compared to obtain a difference value between the analysis result and the test result, which can be used to represent the calculation accuracy of the updated analysis software. Based on the calculation accuracy feedback optimization direction, the development party is prompted to optimize the to-be-nested model based on the optimization direction.
[0087] In the above model optimization method, the to-be-nested model is actually designed based on the development data. The initial model in the initial analysis software is updated based on the to-be-nested model. The purpose is to develop model optimization based on the environment of the thermal hydraulic system analysis software itself. By constructing the actual use environment of the to-be-nested model, the effectiveness of the model optimization process is improved. In addition, based on the data marking, the model enabling condition corresponding to the initial model in the initial analysis software is updated, so that the model calling logic corresponding to the analysis software is consistent with the development logic of the to-be-nested model. The influence of the model calling logic in the analysis software on the use effect of the to-be-nested model is excluded, so as to effectively verify the calculation accuracy of the to-be-nested model itself. Based on the analysis result and the test result, the to-be-nested model is optimized. The purpose is to determine the optimization direction of the to-be-nested model through the analysis result and the test result. Based on the optimization direction, the to-be-nested model is optimized, and then the overall optimization of the analysis software is realized, so as to improve the calculation accuracy of the analysis software.
[0088] In one embodiment, the test data corresponding to the to-be-nested model is obtained, including: eliminating data in the initial data that meets a preset discrete degree and does not meet a smooth transition condition, and / or data with a gas rate greater than a preset heat balance value, to obtain the test data.
[0089] Specifically, for the critical post-heat transfer model (to-be-nested model), the process of determining the test data from the initial data can specifically include the following steps:
[0090] (1) Data establishment: through the critical post-heat transfer test carried out in the historical period, or collecting the critical post-heat transfer test data, to establish the critical post-heat transfer initial database.
[0091] (2) Data screening: eliminating data that is not suitable for developing and verifying the model, including data that meets a preset discrete degree and does not meet a smooth transition condition, and / or data with a gas rate greater than a preset heat balance value.
[0092] The data that meets the preset discrete degree and does not meet the smooth transition condition is data that is significantly discrete and not smooth transition.
[0093] (3) Data marking: marking the types of the screened data, which can include transition boiling data, film boiling data, data near the inlet and outlet of the flow channel or the heat spot.
[0094] (4) Data classification: using a random method, the data is classified into development data corresponding to the model (i.e., data used in the development process of the model to be nested) and test data corresponding to the model (i.e., test data corresponding to the model to be nested) according to a certain proportion. Generally, the proportion of development data to test data is between 6:4 and 9:1.
[0095] In this embodiment, the initial data is preprocessed to eliminate data that is not suitable for the development process and the verification process, and test data of the model to be nested is obtained to ensure the effectiveness of the reference data in the model verification process.
[0096] In one embodiment, the model to be nested includes variables, a variable organization form, coefficients corresponding to the variables, and a model output result. Correspondingly, as shown in FIG. 2, the embodiment provides an optional way to update the initial model in the initial analysis software based on the model to be nested, that is, a way to refine S202. The specific implementation process can include: Figure 3
[0097] S301, updating the initial model in the initial analysis software based on the variable organization form.
[0098] The initial module is used to store a relational expression corresponding to the model to be nested, which includes variables, a variable organization form, and coefficients corresponding to the variables.
[0099] S302, updating the input module of the initial analysis software based on the coefficients corresponding to the variables.
[0100] For example, the expression of the model to be nested is as follows-Formula (1):
[0101]
[0102] In the initial analysis software, the initial input module corresponding to the initial model, the coefficients corresponding to the variables are increased, the purpose is to adjust the coefficients corresponding to the variables through the input module (interface) to facilitate subsequent modification of the model to be nested.
[0103] S303, updating the output module of the initial analysis software based on the variables and the model output result.
[0104] The Reynolds number Re, the Prandtl number Pr, the main flow gas phase viscosity m vb and the wall surface gas phase viscosity m vm are calculated in the formula (1) as shown above, h is the model output result; based on the variables and the model output result, a corresponding output interface is added in the initial output module to facilitate subsequent modification of the to-be-embedded model; K is the thermal conductivity. Further, the output interface can also add parameters related to the variables, such as the void fraction a, the gas phase flow rate v vb , the liquid phase flow rate v vm , the gas phase temperature T g , the liquid phase temperature T f , the wall surface temperature T g , and the pressure P, etc. related to the Reynolds number Re, the Prandtl number Pr, the main flow gas phase viscosity m f and the wall surface gas phase viscosity m w .
[0105] In this embodiment, the input module and the output module of the initial analysis software are modified, and the purpose is to provide input and output interfaces for the to-be-embedded model, so as to facilitate the online modification of the variables, the variable organization form, and the coefficients corresponding to the variables of the to-be-embedded model by the developer, and to simplify the adjustment process of the to-be-embedded model.
[0106] In one embodiment, the present embodiment provides an optional way of optimizing the to-be-embedded model based on the analysis result and the test result, that is, a way of refining S205. The specific implementation process can include: comparing the analysis result with the test result to obtain an error result; and determining whether to optimize the to-be-embedded model based on the error result.
[0107] Specifically, as shown in S206, based on the error result, it is determined whether to optimize the to-be-embedded model, which can specifically include the following process: Figure 4
[0108] S401, determining the correlation between the error result and the variables of the to-be-embedded model.
[0109] Wherein, the error result can be represented by the difference between the analysis result (corresponding parameter) and the test result (corresponding parameter). Optionally, the correlation analysis can adopt two ways of qualitative analysis and quantitative analysis. Specifically, the qualitative analysis can be a chart correlation analysis, and the quantitative analysis can be a Pearson correlation coefficient method or a regression analysis method. Further, the correlation analysis result can be classified according to the numerical range, for example, the classification can include strong correlation and weak correlation.
[0110] S402, if the correlation does not satisfy the correlation condition, it is determined whether to optimize the to-be-embedded model.
[0111] If the correlation does not satisfy the relevant condition, a prompt information is generated, and the prompt information is sent to a reviewer. Based on the manual review result, it is determined whether the to-be-nested model needs to be optimized. When the reviewer judges, the following two situations are mainly included:
[0112] First, if the correlation does not satisfy the relevant condition, it indicates that there is no strong correlation between the error result and the selection of the to-be-nested model, and the error is caused by random noise. In this case, the to-be-nested model does not need to be updated. Second, if the correlation does not satisfy the relevant condition, it may be caused by the insufficient development accuracy of the to-be-nested model. In this case, the to-be-nested model needs to be optimized.
[0113] Specifically, the variables of the to-be-nested model, the variable organization form, and the coefficients corresponding to the variables are optimized, that is, the steps in S301 and S302 are returned to, the variable organization form after optimization is replaced by the variable organization form before optimization, and the coefficients corresponding to the variables after optimization are input into the input interface.
[0114] In S403, if the correlation satisfies the relevant condition, it is determined whether the change trend of the analysis result is consistent with the change trend of the test result.
[0115] The change trend of the analysis result and the change trend of the test result can be used as a measure of the tendency of the test data. The test data has a tendency, which means that under the same test working condition, the change law of the analysis result is inconsistent with the change law of the test result. The change law can be represented by the change slope of the data.
[0116] In S404, if the change trend is inconsistent and / or the error result does not satisfy the preset error range, it is determined that the coefficients corresponding to the variables of the to-be-nested model need to be optimized.
[0117] If the change trend is inconsistent or the error result does not satisfy the preset error range, it is determined that the coefficients corresponding to the variables of the to-be-nested model need to be optimized.
[0118] Specifically, the coefficients corresponding to the variables of the to-be-nested model are optimized, that is, the steps in S302 are returned to, and the coefficients corresponding to the variables after optimization are input into the input interface.
[0119] Optionally, the optimization of the coefficients corresponding to the variables of the to-be-nested model includes: fitting the coefficients corresponding to the variables based on a nonlinear regression method to obtain a fitting result; determining the fitted variable coefficients based on the fitting result, and optimizing the coefficients corresponding to the variables of the to-be-nested model based on the fitted variable coefficients.
[0120] Further, if the tendency does not satisfy the tendency condition and the error result satisfies the preset error range, it is determined that the model to be embedded is verified to pass, the model precision is obtained, and the model development is completed.
[0121] For example, based on the above embodiment, the embodiment provides an optional example of a model optimization method. As shown in the figure, the specific implementation process includes: Figure 5
[0122] S501, obtaining a model to be embedded and test data corresponding to the model to be embedded.
[0123] The test data includes test conditions, data labels, and test results. Specifically, data satisfying the preset dispersion degree and not satisfying the smooth transition condition in the initial data is removed, and / or data with a gas rate greater than a preset heat balance value is removed to obtain the test data.
[0124] The model to be embedded includes variables, variable organization forms, coefficients corresponding to the variables, and model output results.
[0125] S502, updating an initial model in an initial analysis software based on the variable organization form.
[0126] S503, updating an input module of the initial analysis software based on the coefficients corresponding to the variables.
[0127] S504, updating an output module of the initial analysis software based on the variables and the model output results.
[0128] S505, updating a model enabling condition corresponding to the initial model in the initial analysis software based on the data labels.
[0129] S506, obtaining an analysis result of the updated initial analysis software under the test conditions.
[0130] S507, comparing the analysis result with the test result to obtain an error result.
[0131] S508, determining a correlation between the error result and the variables of the model to be embedded. If the correlation does not satisfy a correlation condition, S509 is executed. If the correlation satisfies the correlation condition, S510 is executed.
[0132] S509, determining whether the model to be embedded needs to be optimized.
[0133] S510, determining whether the change trend of the analysis result is consistent with the change trend of the test result. If the change trends are inconsistent, and / or the error result does not satisfy a preset error range, it is determined that the coefficients corresponding to the variables of the model to be embedded need to be optimized.
[0134] Specifically, the coefficients corresponding to the variables of the to-be-nested model are optimized, including: fitting the coefficients corresponding to the variables based on a nonlinear regression method to obtain a fitting result; and optimizing the coefficients corresponding to the variables of the to-be-nested model based on the fitting result.
[0135] The specific process of S501-S510 can be referred to the description of the method embodiments, which has similar implementation principles and technical effects, and will not be described here.
[0136] It should be understood that, although each step in the flowchart involved in the above embodiments is displayed in sequence according to the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless explicitly stated herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in the above embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or steps or stages in other steps.
[0137] Based on the same inventive concept, the embodiments of the present application also provide a model optimization device for implementing the above-mentioned model optimization method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more model optimization device embodiments provided below can be referred to the limitations of the model optimization method in the above text, and will not be described here.
[0138] In one embodiment, as shown in Figure 6 A model optimization device 1 is provided, comprising: an acquisition module 11, an update module 12, an adjustment module 13, a verification module 14 and a feedback module 15, wherein:
[0139] The acquisition module 11 is configured to acquire a to-be-nested model and test data corresponding to the to-be-nested model; wherein the test data comprises test conditions, data labels and test results;
[0140] The update module 12 is configured to update an initial model in an initial analysis software based on the to-be-nested model;
[0141] The adjustment module 13 is configured to update a model enabling condition corresponding to the initial model in the initial analysis software based on the data labels;
[0142] The verification module 14 is configured to acquire an analysis result of the updated initial analysis software under the test conditions, and the feedback module 15 is configured to optimize the to-be-nested model based on the analysis result and the test results.
[0143] In one embodiment, the obtaining module 11 is further configured to: eliminate data in the initial data that meets a preset discrete degree and does not meet a smooth transition condition, and / or data with a gas rate greater than a preset thermal equilibrium value, to obtain the test data.
[0144] In one embodiment, the to-be-nested model includes variables, a variable organization form, coefficients corresponding to the variables, and a model output result; the updating module 12 is further configured to: update the initial model in the initial analysis software based on the to-be-nested model, including:
[0145] updating the initial model in the initial analysis software based on the variable organization form;
[0146] updating an input module of the initial analysis software based on the coefficients corresponding to the variables;
[0147] updating an output module of the initial analysis software based on the variables and the model output result.
[0148] In one embodiment, the feedback module 15 includes:
[0149] a comparison sub-module configured to compare the analysis result with the test result to obtain an error result;
[0150] a feedback sub-module configured to determine whether to optimize the to-be-nested model based on the error result.
[0151] In one embodiment, the feedback sub-module includes:
[0152] a correlation sub-module configured to determine a correlation between the error result and the variables of the to-be-nested model;
[0153] a correlation optimization sub-module configured to determine whether to optimize the to-be-nested model if the correlation does not meet a correlation condition.
[0154] In one embodiment, the correlation optimization sub-module is further configured to: if the correlation meets the correlation condition, determine whether a change trend of the analysis result is consistent with a change trend of the test result;
[0155] if the change trends are not consistent and / or the error result does not meet a preset error range, determine that the coefficients corresponding to the variables of the to-be-nested model need to be optimized.
[0156] In one embodiment, the model optimization apparatus further includes a calculation module configured to: fit the coefficients corresponding to the variables based on a nonlinear regression method to obtain a fitting result;
[0157] optimize the coefficients corresponding to the variables of the to-be-nested model based on the fitting result.
[0158] The modules in the model optimization apparatus can be implemented by analysis software, hardware, or a combination thereof, in whole or in part. The modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in the computer device in the form of analysis software, so as to be invoked by the processor to perform the operations corresponding to the modules.
[0159] In an embodiment, a computer device, which can be a terminal, has an internal structure as shown in Figure 7 The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is configured to perform wired or wireless communication with an external terminal. The wireless communication can be achieved by WIFI, mobile cellular network, NFC (Near Field Communication), or other technologies. The computer program is executed by the processor to implement a model optimization method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball, or touchpad arranged on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0160] Those skilled in the art can understand that Figure 7 The structure shown in the above embodiment is only a block diagram of part of the structure related to the scheme of the present application, and does not limit the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0161] In an embodiment, a computer device includes a memory and a processor. The memory stores a computer program. The processor executes the computer program to implement the following steps:
[0162] Obtain a to-be-nested model and test data corresponding to the to-be-nested model. The test data includes test conditions, data labels, and test results.
[0163] Update an initial model in an initial analysis software based on the to-be-nested model.
[0164] Update a model enabling condition corresponding to the initial model in the initial analysis software based on the data labels.
[0165] Obtain an analysis result of the updated initial analysis software under the test conditions.
[0166] The processor executes the computer program to optimize the to-be-nested model based on the analysis result and the test result.
[0167] In one embodiment, the processor executes the computer program to obtain the test data corresponding to the to-be-nested model, and specifically implements the following steps: eliminating data in the initial data that meets a preset discrete degree and does not meet a smooth transition condition, and / or data with a gas rate greater than a preset thermal equilibrium value, to obtain the test data.
[0168] In one embodiment, the to-be-nested model includes variables, a variable organization form, coefficients corresponding to the variables, and a model output result. When the processor executes the computer program to update the initial model in the initial analysis software based on the to-be-nested model, the following steps are specifically implemented: updating the initial model in the initial analysis software based on the variable organization form; updating an input module of the initial analysis software based on the coefficients corresponding to the variables; and updating an output module of the initial analysis software based on the variables and the model output result.
[0169] In one embodiment, the processor executes the computer program to optimize the to-be-nested model based on the analysis result and the test result, and specifically implements the following steps: comparing the analysis result with the test result to obtain an error result; and determining whether to optimize the to-be-nested model based on the error result.
[0170] In one embodiment, the processor executes the computer program to determine whether to optimize the to-be-nested model based on the error result, and specifically implements the following steps: determining a correlation between the error result and the variables of the to-be-nested model; and determining whether to optimize the to-be-nested model if the correlation does not meet a correlation condition.
[0171] In one embodiment, the processor executes the computer program to determine whether to optimize the to-be-nested model based on the error result, and specifically implements the following steps: determining whether a change trend of the analysis result is consistent with a change trend of the test result if the correlation meets the correlation condition; and determining that the coefficients corresponding to the variables of the to-be-nested model need to be optimized if the change trends are not consistent and / or the error result does not meet a preset error range.
[0172] In one embodiment, the processor executes the computer program and further implements the following steps: fitting the coefficients corresponding to the variables based on a nonlinear regression method to obtain a fitting result; and optimizing the coefficients corresponding to the variables of the to-be-nested model based on the fitting result.
[0173] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. When the computer program is executed by a processor, the following steps are implemented:
[0174] Obtaining a to-be-nested model and test data corresponding to the to-be-nested model; wherein the test data comprises test conditions, data labels, and test results;
[0175] Updating an initial model in an initial analysis software based on the to-be-nested model;
[0176] Updating model enabling conditions corresponding to the initial model in the initial analysis software based on the data labels;
[0177] Obtaining analysis results of the updated initial analysis software under the test conditions;
[0178] Optimizing the to-be-nested model based on the analysis results and the test results.
[0179] In one embodiment, the computer program obtains the test data corresponding to the to-be-nested model, and the logic is executed by the processor to specifically implement the following steps: eliminating data in the initial data that meets a preset discrete degree and does not meet a smooth transition condition, and / or data with a gas rate greater than a preset thermal equilibrium value, to obtain the test data.
[0180] In one embodiment, the to-be-nested model comprises variables, a variable organization form, coefficients corresponding to the variables, and model output results. The computer program updates the initial model in the initial analysis software based on the to-be-nested model, and the logic is executed by the processor to specifically implement the following steps: updating the initial model in the initial analysis software based on the variable organization form; updating an input module of the initial analysis software based on the coefficients corresponding to the variables; and updating an output module of the initial analysis software based on the variables and the model output results.
[0181] In one embodiment, the computer program optimizes the to-be-nested model based on the analysis results and the test results, and the logic is executed by the processor to specifically implement the following steps: comparing the analysis results with the test results to obtain error results; and determining whether to optimize the to-be-nested model based on the error results.
[0182] In one embodiment, the computer program determines whether to optimize the to-be-nested model based on the error results, and the logic is executed by the processor to specifically implement the following steps: determining a correlation between the error results and variables of the to-be-nested model; and determining whether to optimize the to-be-nested model if the correlation does not meet a correlation condition.
[0183] In one embodiment, the computer program determines whether to optimize the to-be-nested model based on the error results, and the logic is executed by the processor to specifically implement the following steps: if the correlation meets the correlation condition, determining whether a change trend of the analysis results is consistent with a change trend of the test results; and if the change trends are not consistent and / or the error results do not meet a preset error range, determining that coefficients corresponding to the variables of the to-be-nested model need to be optimized.
[0184] In one embodiment, the computer program, when executed by the processor, further implements the following steps: fitting the coefficients corresponding to the variables based on a nonlinear regression method to obtain a fitting result; and optimizing the coefficients corresponding to the variables of the to-be-nested model based on the fitting result.
[0185] In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the following steps:
[0186] Obtaining the to-be-nested model and test data corresponding to the to-be-nested model; wherein the test data comprises test conditions, data labels, and test results;
[0187] Updating an initial model in an initial analysis software based on the to-be-nested model;
[0188] Updating a model enabling condition corresponding to the initial model in the initial analysis software based on the data labels;
[0189] Obtaining an analysis result of the updated initial analysis software under the test conditions;
[0190] Optimizing the to-be-nested model based on the analysis result and the test result.
[0191] In one embodiment, the computer program obtains the test data corresponding to the to-be-nested model, and the logic executed by the processor specifically implements the following steps: eliminating data in the initial data that satisfies a preset discrete degree and does not satisfy a smooth transition condition, and / or data with a gas rate greater than a preset thermal equilibrium value, to obtain the test data.
[0192] In one embodiment, the to-be-nested model comprises variables, a variable organization form, coefficients corresponding to the variables, and a model output result. The computer program updates the initial model in the initial analysis software based on the to-be-nested model, and the logic executed by the processor specifically implements the following steps: updating the initial model in the initial analysis software based on the variable organization form; updating an input module of the initial analysis software based on the coefficients corresponding to the variables; and updating an output module of the initial analysis software based on the variables and the model output result.
[0193] In one embodiment, the computer program optimizes the to-be-nested model based on the analysis result and the test result, and the logic executed by the processor specifically implements the following steps: comparing the analysis result with the test result to obtain an error result; and determining whether to optimize the to-be-nested model based on the error result.
[0194] In one embodiment, the computer program, when executed by the processor, implements the following steps based on the error result to determine whether to optimize the to-be-nested model: determining a correlation between the error result and the variable of the to-be-nested model; and determining whether to optimize the to-be-nested model if the correlation does not satisfy a correlation condition.
[0195] In one embodiment, the computer program, when executed by the processor, implements the following steps based on the error result to determine whether to optimize the to-be-nested model: if the correlation satisfies the correlation condition, determining whether a change trend of the analysis result is consistent with a change trend of the test result; and determining that the coefficients corresponding to the variable of the to-be-nested model need to be optimized if the change trends are inconsistent and / or the error result does not satisfy a preset error range.
[0196] In one embodiment, the computer program, when executed by the processor, further implements the following steps: fitting the coefficients corresponding to the variable based on a nonlinear regression method to obtain a fitting result; and optimizing the coefficients corresponding to the variable of the to-be-nested model based on the fitting result.
[0197] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.
[0198] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0199] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0200] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A model optimization method, characterized by, The method comprises: acquiring a to-be-nested model and test data corresponding to the to-be-nested model; wherein the test data comprises test conditions, data labels, and test results, the data labels are identifiers for marking the test conditions based on the test results; the to-be-nested model comprises variables, a variable organization form, coefficients corresponding to the variables, and model output results; updating an initial model in initial analysis software based on the variable organization form; updating an input module of the initial analysis software based on the coefficients corresponding to the variables; updating an output module of the initial analysis software based on the variables and the model output results; updating model enabling conditions corresponding to the initial model in the initial analysis software based on the data labels; inputting the test conditions into the updated initial analysis software to obtain analysis results calculated by the updated initial analysis software based on the to-be-nested model; comparing the analysis results with the test results to obtain error results; determining a correlation between the error results and the variables of the to-be-nested model; if the correlation does not satisfy a correlation condition and it is determined that the error is caused by insufficient development accuracy of the to-be-nested model, it is determined that the to-be-nested model needs to be optimized; or if the correlation satisfies the correlation condition, it is determined whether a change trend of the analysis results is consistent with a change trend of the test results, if the change trends are inconsistent and / or the error results do not satisfy a preset error range, it is determined that coefficients corresponding to the variables in the to-be-nested model need to be optimized.
2. The method of claim 1, wherein, The acquiring of the test data corresponding to the to-be-nested model comprises: eliminating data in initial data that satisfies a preset discrete degree and does not satisfy a smooth transition condition and / or data with a gas rate greater than a preset thermal balance value to obtain the test data.
3. The method of claim 1, wherein, The determining of the correlation between the error results and the variables of the to-be-nested model comprises: qualitative analysis or quantitative analysis is used to analyze the correlation between the error results and the variables of the to-be-nested model to determine the correlation between the error results and the variables of the to-be-nested model.
4. The method of claim 3, wherein, The method further comprises: fitting the coefficients corresponding to the variables based on a nonlinear regression method to obtain fitting results; optimizing the coefficients corresponding to the variables of the to-be-nested model based on the fitting results.
5. A model optimization apparatus characterized by comprising: The device comprises: an acquisition module configured to acquire a to-be-nested model and test data corresponding to the to-be-nested model; wherein the test data comprises test conditions, data labels, and test results, the data labels are identifiers for marking the test conditions based on the test results; the to-be-nested model comprises variables, a variable organization form, coefficients corresponding to the variables, and model output results; an updating module configured to update an initial model in initial analysis software based on the variable organization form, update an input module of the initial analysis software based on the coefficients corresponding to the variables, and update an output module of the initial analysis software based on the variables and the model output results; an adjusting module configured to update model enabling conditions corresponding to the initial model in the initial analysis software based on the data labels. A verification module configured to input the test working condition into the updated initial analysis software to obtain an analysis result calculated by the updated initial analysis software based on the to-be-nested model; A comparison submodule configured to compare the analysis result with the test result to obtain an error result; A correlation submodule configured to determine a correlation between the error result and a variable of the to-be-nested model; An optimization submodule configured to, if the correlation does not satisfy a correlation condition and it is determined that the error is caused by insufficient development accuracy of the to-be-nested model, determine that optimization of the to-be-nested model is needed; or, if the correlation satisfies the correlation condition, determine whether a change trend of the analysis result is consistent with a change trend of the test result, and if the change trends are not consistent and / or the error result does not satisfy a preset error range, determine that optimization of a coefficient corresponding to the variable in the to-be-nested model is needed. 6.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-5 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method of any one of claims 1 to 4.
7. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 4.
8. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 4.