A method and device for implementing a simulation model
By automatically generating simulation script code and quickly executing and evaluating it, the cumbersome problem of the existing simulation model creation process is solved, and the accuracy and reliability of the simulation model is improved.
Patent Information
- Application Number
- CN202411513714.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-05-20
- Estimated Expiration
- 2044-10-28
AI Technical Summary
The creation process of existing simulation models is cumbersome, time-consuming and professional skills requirements, making it difficult to quickly generate and evaluate simulation script code.
By obtaining simulation information, the simulation instruction information is obtained, and the target simulation result information is further processed to achieve automatic generation, rapid execution and evaluation of simulation script code.
It improves the accuracy and reliability of simulation models, simplifies the simulation model creation process, and reduces the requirements for professional skills.
Smart Images

Figure CN119416499B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of simulation, and particularly to a method and device for implementing a simulation model. Background Art
[0002] In the field of simulation, scenario is an important cornerstone for constructing a virtual environment and simulating the simulation process. Scenario design often depends on training topics, and details the strategic intentions, current situations and future situation developments of simulation participants. As the specific embodiment of scenario in the field of simulation, simulation scenario further details key simulation factors such as the configuration of participating entities, simulation processes, types and quantities of simulations, simulation environment deployment, and simulation systems. These elements, after being processed in a standardized and formatted manner, are important inputs for driving the efficient operation of the simulation system.
[0003] However, when current simulation systems describe simulation elements, they adopt diverse description methods, including text language description, formal abstract expression, etc. Although these methods have their own advantages, they also expose some problems: traditional simulation model creation often involves cumbersome code writing, debugging and verification processes, which are not only time-consuming, but also require high professional skills. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method and device for implementing a simulation model, which can automatically generate simulation script code and quickly execute and evaluate the simulation model, and is beneficial to improving the accuracy and reliability of the simulation model.
[0005] To solve the above technical problem, a first aspect of an embodiment of the present invention discloses a method for implementing a simulation model, the method comprising:
[0006] S1, obtaining simulation information;
[0007] S2, processing the simulation information to obtain simulation instruction information;
[0008] S3, processing the simulation instruction information to obtain target simulation result information.
[0009] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the processing the simulation information to obtain simulation instruction information includes:
[0010] S21, processing the simulation information to obtain simulation script information;
[0011] S22, analyzing and processing the simulation script information to obtain simulation script syntax tree information;
[0012] S23, processing the simulation script syntax tree information to obtain simulation instruction information.
[0013] As an alternative implementation, in the first aspect of the embodiments of the present invention, the processing of the simulation information to obtain simulation script information includes:
[0014] S211, performing data cleaning processing on the simulation information to obtain first simulation information;
[0015] S212, performing word segmentation processing on the first simulation information to obtain second simulation information;
[0016] S213, performing data enhancement processing on the second simulation information to obtain preprocessed simulation information;
[0017] S214, processing the preprocessed simulation information to obtain simulation script information.
[0018] As an alternative implementation, in the first aspect of the embodiments of the present invention, the processing of the preprocessed simulation information to obtain simulation script information includes:
[0019] S2141, performing training processing on the simulation initial model to obtain a simulation result model;
[0020] S2142, using the simulation result model to process the preprocessed simulation information to obtain simulation script information.
[0021] As an alternative implementation, in the first aspect of the embodiments of the present invention, the performing training processing on the simulation initial model to obtain a simulation result model includes:
[0022] S21411, obtaining a simulation training sample set; the simulation training sample set includes a plurality of simulation training samples;
[0023] S21412, performing annotation processing on the simulation training sample set to obtain a simulation training annotation sample set; the simulation training annotation sample set includes a plurality of simulation training annotation samples;
[0024] S21413, presetting s = 1;
[0025] S21414, using the s-th simulation training annotation sample in the simulation training annotation sample set to train the simulation initial model to obtain training result information and a simulation training model;
[0026] S21415, processing the training result information and the label information corresponding to the training result information to obtain a loss function value;
[0027] S21416, performing calculation processing on the training result information and the label information to obtain a simulation matching degree value;
[0028] S21417. Use the first simulation calculation model to calculate and process the loss function value and the simulation matching degree value to obtain the target loss function value;
[0029] Among them, the first simulation calculation model is:
[0030] SS = δ1·(1 - PPDZ) + δ2·DYSS + ε;
[0031] δ1 + δ2 = 1;
[0032] 0 ≤ δ1, δ2 ≤ 1;
[0033] -0.1 ≤ ε ≤ 0.1;
[0034] In the formula, SS is the target loss function value, DYSS is the loss function value, PPDZ is the simulation matching degree value, δ1 and δ2 are the first weight parameter and the second weight parameter respectively, and ε is the first constant coefficient;
[0035] S21418. Determine whether the target loss function value is less than a preset loss function threshold to obtain a first judgment result;
[0036] When the first judgment result is no, judge whether s is equal to the number of the simulation training annotation samples in the simulation training annotation sample set to obtain a second judgment result;
[0037] When the second judgment result is no, increase s by 1, determine the simulation training model as the simulation initial model, and execute S21414;
[0038] When the second judgment result is yes, determine the simulation training model as the simulation result model;
[0039] When the first judgment result is yes, determine the simulation training model as the simulation result model.
[0040] As an optional implementation manner, in the first aspect of the embodiments of the present invention, the calculating and processing the training result information and the label information to obtain a simulation matching degree value includes:
[0041] Use the second simulation calculation model to calculate and process the training result information and the label information to obtain a simulation matching degree value;
[0042] Among them, the second simulation calculation model is:
[0043]
[0044] Wherein, PPDZ is the simulation matching degree value, XD is the length of the label information, XZ is the length of the training result information, and PN n is the n-gram precision, δ3 is the third weight parameter, and N is the simulation matching length value.
[0045] As an optional implementation manner, in the first aspect of the embodiments of the present invention, the analyzing and processing the simulation script information to obtain the simulation script syntax tree information includes:
[0046] S221, performing lexical analysis processing on the simulation script information to obtain simulation script lexical information;
[0047] S222, performing syntax analysis processing on the simulation script lexical information to obtain simulation script syntax information;
[0048] S223, performing semantic analysis processing on the simulation script syntax information to obtain simulation script syntax tree information.
[0049] The second aspect of the embodiments of the present invention discloses a simulation model implementation device, and the device includes:
[0050] An acquisition module, configured to acquire simulation information;
[0051] A first analysis module, configured to process the simulation information to obtain simulation instruction information;
[0052] A second analysis module, configured to process the simulation instruction information to obtain target simulation result information.
[0053] The third aspect of the embodiments of the present invention discloses another simulation model implementation device, and the device includes:
[0054] A processor;
[0055] A memory coupled to the processor and storing executable program code;
[0056] The processor calls the executable program code stored in the memory to execute some or all of the steps of the simulation model implementation method disclosed in the first aspect of the embodiments of the present invention.
[0057] The fourth aspect of the embodiments of the present invention discloses a computer-readable storage medium, and the computer-readable storage medium stores computer instructions, and when the computer instructions are called, they are used to execute some or all of the steps of the simulation model implementation method disclosed in the first aspect of the embodiments of the present invention.
[0058] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0059] In an embodiment of the present invention, simulation information is obtained; the simulation information is processed to obtain simulation instruction information; and the simulation instruction information is processed to obtain target simulation result information. Among them, the processing of the simulation information to obtain simulation instruction information includes: processing the simulation information to obtain simulation script information; analyzing and processing the simulation script information to obtain simulation script syntax tree information; and processing the simulation script syntax tree information to obtain simulation instruction information. It can be seen that this application can automatically generate simulation script code and quickly execute and evaluate a simulation model, which is beneficial to improving the accuracy and reliability of the simulation model. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.
[0061] Figure 1 It is a schematic flowchart of a method for implementing a simulation model disclosed in an embodiment of the present invention;
[0062] Figure 2 It is a schematic structural diagram of a device for implementing a simulation model disclosed in an embodiment of the present invention;
[0063] Figure 3 It is a schematic structural diagram of another device for implementing a simulation model disclosed in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0064] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0065] The terms "first", "second", etc. in the specification and claims of the present invention and the above accompanying drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product, or equipment that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or equipment.
[0066] As used herein, the term "embodiment" means that the specific features, structures, or characteristics described in connection with the embodiment may be included in at least one embodiment of the present invention. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein may be combined with other embodiments.
[0067] The present invention discloses a method and apparatus for implementing a simulation model, which can automatically generate simulation script code and quickly execute and evaluate the simulation model, facilitating the improvement of the accuracy and reliability of the simulation model. The following will be described in detail separately.
[0068] Embodiment 1
[0069] Please refer to Figure 1 , Figure 1 , which is a schematic flowchart of a method for implementing a simulation model disclosed in an embodiment of the present invention. Among them, Figure 1 The described method for implementing a simulation model is applied to a simulation model implementation device, such as a local server or a cloud server for optimizing and managing the implementation of a simulation model, etc., which is not limited in the embodiments of the present invention. As Figure 1 shown, the method for implementing a simulation model may include the following operations:
[0070] S1, obtaining simulation information;
[0071] S2, processing the simulation information to obtain simulation instruction information;
[0072] S3, processing the simulation instruction information to obtain target simulation result information.
[0073] It should be noted that the simulation information includes simulation environment information, simulation resource information, simulation task information, simulation entity information, and simulation logic information; the simulation entity information includes several simulation entities; among them, the simulation logic information is used to logically control the simulation environment information, simulation resource information, simulation task information, and simulation entity information in the simulation script information when training the model, so as to form a complete simulation execution logic.
[0074] It can be seen that implementing the method for implementing a simulation model described in the embodiments of the present invention can automatically generate simulation script code and quickly execute and evaluate the simulation model, facilitating the improvement of the accuracy and reliability of the simulation model.
[0075] In an alternative embodiment, processing the simulation information to obtain simulation instruction information includes:
[0076] S21, processing the simulation information to obtain simulation script information;
[0077] S22. Analyze and process the simulation script information to obtain the simulation script syntax tree information;
[0078] S23. Process the simulation script syntax tree information to obtain the simulation instruction information.
[0079] It should be noted that the simulation script information in the embodiments of the present invention is written in a scripting language, which can be Python, Lua, JavaScript, or a user-defined scripting language. Specifically, the embodiments of the present invention do not make any limitations;
[0080] It should be noted that analyzing and processing the simulation script information to obtain the simulation script syntax tree information is performed by an interpreter, which can be CPython (corresponding scripting language is Python), Lua interpreter (corresponding scripting language is Lua), Node.js (corresponding scripting language is JavaScript), or an interpreter corresponding to a user-defined scripting language. The embodiments of the present invention do not make specific limitations.
[0081] It should be noted that the above-mentioned analyzing and processing the simulation script information to obtain the simulation script syntax tree information and processing the simulation script syntax tree information to obtain the simulation instruction information are both performed by an interpreter. Specifically, the embodiments of the present invention do not make any limitations.
[0082] It can be seen that implementing the simulation model implementation method described in the embodiments of the present invention can automatically generate simulation script code and quickly execute and evaluate the simulation model, which is beneficial to improving the accuracy and reliability of the simulation model.
[0083] In another optional embodiment, processing the simulation information to obtain the simulation script information includes:
[0084] S211. Perform data cleaning on the simulation information to obtain the first simulation information;
[0085] S212. Perform word segmentation on the first simulation information to obtain the second simulation information;
[0086] S213. Perform data augmentation on the second simulation information to obtain the preprocessed simulation information;
[0087] S214. Process the preprocessed simulation information to obtain the simulation script information.
[0088] It should be noted that for performing data cleaning on the simulation information to obtain the first simulation information, one of Pandas or NumPy can be used for data cleaning. Specifically, the embodiments of the present invention do not make any limitations.
[0089] It should be noted that the first simulation information is segmented to obtain the second simulation information, which can be segmented by tools or libraries such as jieba, THULAC, or HanLP. Specifically, the embodiments of the present invention do not make any limitations.
[0090] It should be noted that the second simulation information is processed by data augmentation to obtain the preprocessed simulation information, which can be processed by data augmentation through tools or libraries such as nlpaug, TextAttack, or Transformers. Specifically, the embodiments of the present invention do not make any limitations.
[0091] It should be noted that through data cleaning, segmentation, and data augmentation processing, the usability of the data can be improved, which helps the text information to achieve more effective vectorization and feature extraction, and reduces the computational overhead when processing complex text information.
[0092] It can be seen that implementing the simulation model implementation method described in the embodiments of the present invention can automatically generate simulation script code, and quickly execute and evaluate the simulation model, which is beneficial to improving the accuracy and reliability of the simulation model.
[0093] In another optional embodiment, the preprocessed simulation information is processed to obtain simulation script information, including:
[0094] S2141, training the initial simulation model to obtain the simulation result model;
[0095] S2142, using the simulation result model to process the preprocessed simulation information to obtain the simulation script information.
[0096] It should be noted that the above initial simulation model is a Transformer model, and deep learning models such as CNN and RNN can also be used. Specifically, the embodiments of the present invention do not make any limitations.
[0097] It should be noted that using the simulation result model to process the preprocessed simulation information to obtain the simulation script information means taking the preprocessed simulation information as the input of the simulation result model, and using the simulation result model to calculate and output the simulation script information.
[0098] It can be seen that implementing the simulation model implementation method described in the embodiments of the present invention can automatically generate simulation script code, and quickly execute and evaluate the simulation model, which is beneficial to improving the accuracy and reliability of the simulation model.
[0099] In an optional embodiment, training the initial simulation model to obtain the simulation result model includes:
[0100] S21411. Obtain a simulation training sample set, where the simulation training sample set includes a number of simulation training samples.
[0101] S21412. Perform annotation processing on the simulation training sample set to obtain a simulation training annotated sample set, where the simulation training annotated sample set includes a number of simulation training annotated samples.
[0102] It should be noted that to perform annotation processing on the simulation training sample set to obtain a simulation training annotated sample set, annotation processing can be carried out through Label Studio, Prodigy, or Doccano. Specifically, the embodiments of the present invention do not make limitations.
[0103] S21413. Preset s = 1.
[0104] S21414. Use the s-th simulation training annotated sample in the simulation training annotated sample set to train the simulation initial model to obtain training result information and a simulation training model.
[0105] S21415. Process the training result information and the label information corresponding to the training result information to obtain a loss function value.
[0106] It should be noted that to process the training result information and the label information corresponding to the training result information to obtain a loss function value, it can be calculated using a cross-entropy loss function, or it can be calculated using other loss functions in a deep learning model. Specifically, the embodiments of the present invention do not make limitations.
[0107] It should be noted that the label information corresponding to the above training result information is the true output information corresponding to the training result information, which is used together with the training result information to measure the difference between the model training result and the true result.
[0108] It should be noted that the label information can be set by the user or obtained based on historical data. The embodiments of the present invention do not make limitations.
[0109] S21416. Perform calculation processing on the training result information and the label information to obtain a simulation matching degree value.
[0110] S21417. Use a first simulation calculation model to perform calculation processing on the loss function value and the simulation matching degree value to obtain a target loss function value.
[0111] Among them, the first simulation calculation model is:
[0112] SS = δ1·(1 - PPDZ)+δ2·DYSS + ε;
[0113] δ1 + δ2 = 1;
[0114] 0 ≤ δ1, δ2 ≤ 1;
[0115] -0.1 ≤ ε ≤ 0.1;
[0116] Wherein, SS is the target loss function value, DYSS is the loss function value, PPDZ is the simulation matching degree value, δ1 and δ2 are the first weight parameter and the second weight parameter respectively, and ε is the first constant coefficient;
[0117] It should be noted that the first weight parameter, the second weight parameter and the first constant coefficient can be set by the user or obtained according to historical data, and the embodiments of the present invention do not make any limitations.
[0118] It should be noted that by adjusting the simulation matching degree value, the loss function value and the first constant coefficient through the first weight parameter and the second weight parameter, the accuracy, flexibility and stability of the simulation optimization are improved, so that the model can better match the target, control the error, and has good adjustment performance to meet the requirements of different application scenarios.
[0119] It should be noted that the simulation matching degree value is used to reflect the n-gram matching of the vocabulary combination, and the value of the simulation matching degree value is in the range of [0, 1]. When the simulation matching value is larger, the language fluency and local expression are better.
[0120] S21418, determine whether the target loss function value is less than the preset loss function threshold to obtain a first judgment result;
[0121] When the first judgment result is negative, determine whether s is equal to the number of simulation training labeled samples in the simulation training labeled sample set to obtain a second judgment result;
[0122] When the second judgment result is negative, increase s by 1, determine the simulation training model as the simulation initial model, and execute S21414;
[0123] When the second judgment result is positive, determine the simulation training model as the simulation result model;
[0124] When the first judgment result is positive, determine the simulation training model as the simulation result model.
[0125] It should be noted that the value range of the preset loss function threshold is between [0, 0.03]. Specifically, the embodiments of the present invention do not make any limitations.
[0126] It should be noted that the number of simulation training labeled samples in the simulation training labeled sample set is more than 50,000. Specifically, the embodiments of the present invention do not make any limitations.
[0127] It can be seen that implementing the simulation model implementation method described in the embodiments of the present invention can automatically generate simulation script code, and quickly execute and evaluate the simulation model, which is beneficial to improving the accuracy and reliability of the simulation model.
[0128] In an alternative embodiment, calculating and processing the training result information and the label information to obtain a simulation matching degree value includes:
[0129] Using a second simulation calculation model to calculate and process the training result information and the label information to obtain a simulation matching degree value;
[0130] Wherein, the second simulation calculation model is:
[0131]
[0132] In the formula, PPDZ is the simulation matching degree value, XD is the length of the label information, XZ is the length of the training result information, PN n is the n-gram precision, δ3 is the third weight parameter, and N is the simulation matching length value.
[0133] It should be noted that the third weight parameter can be set by the user or obtained according to historical data, and the embodiments of the present invention do not make any limitations.
[0134] It should be noted that the value range of the simulation matching degree value is a positive integer between [1, 5]. Specifically, the embodiments of the present invention do not make any limitations.
[0135] It should be noted that the n-gram precision indicates how many n-grams (i.e., sequences composed of n consecutive words) in the training result information match the n-grams in the label information. The n-gram can be 1-gram, 2-gram, 3-gram, etc. Specifically, n represents the number of consecutive words. For example:
[0136] 1-gram: a single word;
[0137] 2-gram: two consecutive words;
[0138] 3-gram: three consecutive words.
[0139] It can be seen that implementing the simulation model implementation method described in the embodiments of the present invention can automatically generate simulation script code, and quickly execute and evaluate the simulation model, which is beneficial to improving the accuracy and reliability of the simulation model.
[0140] In an alternative embodiment, analyzing and processing the simulation script information to obtain simulation script syntax tree information includes:
[0141] S221, perform lexical analysis on the simulation script information to obtain the lexical information of the simulation script;
[0142] S222, perform syntactic analysis on the lexical information of the simulation script to obtain the syntactic information of the simulation script;
[0143] S223, perform semantic analysis on the syntactic information of the simulation script to obtain the syntax tree information of the simulation script.
[0144] It should be noted that the above lexical analysis, syntactic analysis, and semantic analysis are all processed by the interpreter. Specifically, the embodiments of the present invention do not make limitations.
[0145] It can be seen that implementing the simulation model implementation method described in the embodiments of the present invention can automatically generate simulation script code and quickly execute and evaluate the simulation model, which is beneficial to improving the accuracy and reliability of the simulation model.
[0146] In an optional embodiment, processing the simulation instruction information to obtain the target simulation result information includes:
[0147] S31, execute the simulation instruction information to obtain the simulation result information; the simulation result information includes performance data information and validity data information;
[0148] It should be noted that executing the simulation instruction information to obtain the simulation result information is to execute the simulation instruction information by using a simulation system, such as the XSimStudioV5 series of simulation platform software products. Specifically, the embodiments of the present invention do not make limitations.
[0149] S32, perform analysis and processing on the performance data information to obtain a performance score value;
[0150] S33, perform analysis and processing on the validity data information to obtain a validity score value;
[0151] S34, process the performance score value and the validity score value to obtain the target simulation result information.
[0152] It can be seen that implementing the simulation model implementation method described in the embodiments of the present invention can automatically generate simulation script code and quickly execute and evaluate the simulation model, which is beneficial to improving the accuracy and reliability of the simulation model.
[0153] In an optional embodiment, performing analysis and processing on the performance data information to obtain a performance score value includes:
[0154] S321, use the first simulation scoring model to process the performance data information to obtain a preprocessed performance score value;
[0155] Among them, the first simulation scoring model is as follows:
[0156]
[0157] In the formula, XN′ is the preprocessed value of the performance score, SJ i1 is the response time of the i1-th simulation task in the performance data information, D i1 is the input data volume of the i1-th simulation task in the performance data information, C i1 is the task complexity value of the i1-th simulation task in the performance data information, τ1 and τ2 are the first weighting coefficient and the second weighting coefficient respectively, and M1 is the number of simulation tasks;
[0158] It should be noted that the first weighting coefficient and the second weighting coefficient can be set by the user or obtained according to historical data, and the embodiments of the present invention do not make limitations.
[0159] S322. Obtain the maximum response time of the simulation task and the minimum response time of the simulation task;
[0160] S323. Use the simulation normalization calculation model to perform calculation processing on the preprocessed value of the performance score, the maximum response time of the simulation task, and the minimum response time of the simulation task to obtain the performance score value.
[0161] Among them, the simulation normalization calculation model is as follows:
[0162]
[0163] In the formula, XN is the performance score value, XN′ is the preprocessed value of the performance score, XN max is the maximum response time of the simulation task, XN min is the minimum response time of the simulation task;
[0164] It should be noted that XN′ is less than or equal to XN max and greater than or equal to XN min , and the value range of the finally obtained XN is between [0, 1].
[0165] It should be noted that the above calculation processing can also be performed using methods such as Z-score normalization and maximum absolute value normalization. Specifically, the embodiments of the present invention do not make limitations.
[0166] It can be seen that implementing the simulation model implementation method described in the embodiments of the present invention can automatically generate simulation script codes and quickly execute and evaluate the simulation model, which is beneficial to improving the accuracy and reliability of the simulation model.
[0167] In an optional embodiment, analyzing and processing the validity data information to obtain the validity score value includes:
[0168] Use the second simulation scoring model to process the effectiveness data information to obtain an effectiveness score value;
[0169] Among them, the second simulation scoring model is:
[0170]
[0171] In the formula, ZQ is the effectiveness score value, TP is the number of successfully executed simulation tasks in the effectiveness data information, and M1 is the number of simulation tasks.
[0172] It can be seen that implementing the simulation model implementation method described in the embodiments of the present invention can automatically generate simulation script code and quickly execute and evaluate the simulation model, which is beneficial to improving the accuracy and reliability of the simulation model.
[0173] In an optional embodiment, the performance score value and the effectiveness score value are processed to obtain target simulation result information, including:
[0174] S341, use the third simulation scoring model to process the performance score value and the effectiveness score value to obtain a target score value;
[0175] Among them, the third simulation scoring model is:
[0176] PF = δ4·XN + δ5·ZQ;
[0177] δ4 + δ5 = 100;
[0178] 0 ≤ δ4, δ5 ≤ 100;
[0179] In the formula, PF is the target score value, XN is the performance score value, ZQ is the effectiveness score value, and δ4 and δ5 are the fourth weight parameter and the fifth weight parameter;
[0180] It should be noted that the fourth weight parameter and the fifth weight parameter are set by the user or can be obtained according to historical data. Specifically, the embodiments of the present invention do not make any limitations.
[0181] S342, determine whether the target score value is greater than a preset first score threshold to obtain a third judgment result;
[0182] When the third judgment result is yes, determine that excellent is the target simulation result information;
[0183] When the third judgment result is no, determine whether the target score value is greater than a preset second score threshold to obtain a fourth judgment result;
[0184] When the fourth judgment result is yes, determine that medium is the target simulation result information;
[0185] When the result of the fourth judgment is negative, determine the worse one as the target simulation result information.
[0186] It should be noted that the value range of the preset first scoring threshold is between [85, 90], and the value range of the preset second scoring threshold is between [70, 75]. Specifically, the embodiments of the present invention do not make limitations.
[0187] It should be noted that when the target simulation result information is excellent, it indicates that the simulation model performs very well in terms of performance, accuracy, etc. This model can not only run quickly and efficiently, but also the simulation result is almost consistent with the expectation, and the reliability of the model is very high; when the target simulation result information is medium, it indicates that the simulation model can complete basic tasks, but there are deficiencies in performance or accuracy, and the accuracy of the simulation result also needs to be improved; when the target simulation result information is poor, it indicates that the simulation model cannot effectively meet the requirements, and there may be frequent errors or extremely low performance. The simulation model needs to be adjusted and optimized on a large scale to meet the usage standard, and such a model may not provide meaningful simulation results.
[0188] It can be seen that implementing the simulation model implementation method described in the embodiments of the present invention can automatically generate simulation script code and quickly execute and evaluate the simulation model, which is beneficial to improving the accuracy and reliability of the simulation model.
[0189] Embodiment 2
[0190] Please refer to Figure 2 , Figure 2 which is a schematic structural diagram of a simulation model implementation device disclosed in the embodiments of the present invention. Among them, Figure 2 the described simulation model implementation device is applied in a simulation model implementation optimization system, such as a local server or a cloud server for simulation model implementation, etc., and the embodiments of the present invention do not make limitations. As Figure 2 shown, the simulation model implementation device includes:
[0191] An acquisition module 201, configured to acquire simulation information;
[0192] A first analysis module 202, configured to process the simulation information to obtain simulation instruction information;
[0193] A second analysis module 203, configured to process the simulation instruction information to obtain target simulation result information.
[0194] It can be seen that implementing the simulation model implementation device described in the embodiments of the present invention can automatically generate simulation script code and quickly execute and evaluate the simulation model, which is beneficial to improving the accuracy and reliability of the simulation model.
[0195] Embodiment 3
[0196] Please refer to Figure 3 , Figure 3 which is a schematic structural diagram of another simulation model implementation device disclosed in an embodiment of the present invention. Among them, Figure 3 the described simulation model implementation device is applied in a simulation model implementation optimization system, such as a local server or a cloud server for simulation model implementation, etc., which is not limited in the embodiments of the present invention. As Figure 3 shown, the simulation model implementation device includes:
[0197] a processor 301;
[0198] a memory 302 coupled to the processor 301 and storing executable program code;
[0199] The processor 301 calls the executable program code stored in the memory 302 to execute some or all of the steps of the simulation model implementation method in Embodiment 1.
[0200] It can be seen that implementing the simulation model implementation device described in the embodiments of the present invention can automatically generate simulation script code and quickly execute and evaluate the simulation model, which is beneficial to improving the accuracy and reliability of the simulation model.
[0201] Embodiment 4
[0202] An embodiment of the present invention discloses a computer-readable storage medium. The computer-readable storage medium stores computer instructions, which are used to execute some or all of the steps of the simulation model implementation method in Embodiment 1 when called.
[0203] Embodiment 5
[0204] An embodiment of the present invention discloses a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps of the simulation model implementation method described in Embodiment 1.
[0205] The system embodiments described above are only illustrative. The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative labor.
[0206] Through the specific descriptions of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, and the storage medium includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disk memories, tape memories, or any other medium that can be used to carry or store data and is computer-readable.
[0207] Finally, it should be noted that: What is disclosed in an implementation method and device of a simulation model according to an embodiment of the present invention is only a preferred embodiment of the present invention, and is only used to illustrate the technical solution of the present invention, rather than limiting it; Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A simulation model implementation method, characterized in that: The method comprises: S1, obtain simulation information; S2, processing the simulation information to obtain simulation instruction information; S3, processing the simulation instruction information to obtain target simulation result information; The processing of the simulation instruction information to obtain target simulation result information includes: S31, executing the simulation instruction information to obtain simulation result information; the simulation result information includes performance data information and validity data information; S32, analyzing and processing the performance data information to obtain a performance score value; S33, analyzing and processing the effectiveness data information to obtain an effectiveness score value; S34, processing the performance score value and the effectiveness score value to obtain target simulation result information; The analyzing and processing the performance data information to obtain a performance score value includes: S321, using a first simulation scoring model, processing the performance data information to obtain a performance score preprocessing value; Wherein, the first simulation scoring model is: Where XN′ is the pre-processed value of the performance score, SJ i1 is the response time of the ith simulation task in the performance data information, D i1 is the input data volume of the i1th simulation task in the performance data information, C i1 is the task complexity value of the i1th simulation task in the performance data information, τ1 and τ2 are respectively the first weighting coefficient and the second weighting coefficient, and M1 is the number of simulation tasks; S322, obtaining the maximum response time and the minimum response time of the simulation task; S323, using a simulation normalization calculation model, calculating and processing the performance score preprocessing value, the maximum response time of the simulation task, and the minimum response time of the simulation task to obtain a performance score value; Wherein, the simulation normalization calculation model is: Where, XN is the performance score value, XN′ is the performance score preprocessing value, XN max is the maximum response time of the simulation task, XN min is the minimum response time of the simulation task; The processing of the simulation information to obtain simulation instruction information includes: S21, processing the simulation information to obtain simulation script information; S22, analyzing and processing the simulation script information to obtain simulation script syntax tree information; S23, processing the simulation script syntax tree information to obtain simulation instruction information; The analyzing and processing the effectiveness data information to obtain the effectiveness score value includes: Using a second simulation scoring model, the effectiveness data information is processed to obtain an effectiveness scoring value; Wherein, the second simulation scoring model is: Wherein, ZQ is the effectiveness score value, TP is the number of successful executions of simulation tasks in the effectiveness data information, and M1 is the number of simulation tasks.
2. The simulation model implementation method according to claim 1, characterized in that: The processing of the simulation information to obtain simulation script information includes: S211, performing data cleaning processing on the simulation information to obtain first simulation information; S212, performing word segmentation processing on the first simulation information to obtain second simulation information; S213, performing data enhancement processing on the second simulation information to obtain pre-processed simulation information; S214, processing the pre-processed simulation information to obtain simulation script information.
3. The simulation model implementation method according to claim 2, characterized in that: The processing of the pre-processed simulation information to obtain simulation script information includes: S2141, training the initial simulation model to obtain a simulation result model; S2142: Using the simulation result model, process the pre-processed simulation information to obtain simulation script information.
4. The method for realizing a simulation model according to claim 3, characterized in that: The training process of the initial simulation model to obtain the simulation result model includes: S21411, obtaining a simulation training sample set; the simulation training sample set includes a plurality of simulation training samples; S21412, performing labeling processing on the simulation training sample set to obtain a simulation training labeled sample set; the simulation training labeled sample set includes a plurality of simulation training labeled samples; S21413, preset s=1; S21414, using the sth simulation training labeled sample in the simulation training labeled sample set to train the simulation initial model to obtain training result information and a simulation training model; S21415, processing the training result information and the label information corresponding to the training result information to obtain a loss function value; S21416, calculating and processing the training result information and the label information to obtain a simulation matching value; S21417, using a first simulation calculation model, calculating and processing the loss function value and the simulation matching degree value to obtain a target loss function value; Wherein, the first simulation calculation model is: SS=δ1·(1-PPDZ)+δ2·DYSS+ε; δ1+δ2=1; 0≤δ1,δ2≤1; -0.1≤ε≤0.1; Wherein, SS is the target loss function value, DYSS is the loss function value, PPDZ is the simulation matching value, δ1 and δ2 are the first weight parameter and the second weight parameter respectively, and ε is the first constant coefficient; S21418, determining whether the target loss function value is less than a preset loss function threshold, and obtaining a first determination result; When the first judgment result is no, judging whether s is equal to the number of the simulation training labeled samples in the simulation training labeled sample set, and obtaining a second judgment result; When the second judgment result is no, increase s by 1, determine that the simulation training model is the simulation initial model, and execute S21414; When the second judgment result is yes, determining that the simulation training model is a simulation result model; When the first judgment result is yes, the simulation training model is determined to be the simulation result model.
5. The method for realizing the simulation model according to claim 4, characterized in that: The calculating and processing the training result information and the label information to obtain a simulation matching value includes: Using a second simulation calculation model, the training result information and the label information are calculated and processed to obtain a simulation matching value; Wherein, the second simulation calculation model is: Where PPDZ is the simulation matching value, XD is the length of the label information, XZ is the length of the training result information, PN n is the n-gram accuracy, δ3 is the third weight parameter, and N is the simulated matching length value.
6. The method for realizing a simulation model according to claim 1, characterized in that: The step of analyzing and processing the simulation script information to obtain the simulation script syntax tree information includes: S221, performing lexical analysis on the simulation script information to obtain simulation script lexical information; S222, performing grammatical analysis on the simulation script lexical information to obtain simulation script grammatical information; S223, performing semantic analysis on the simulation script syntax information to obtain simulation script syntax tree information.
7. A simulation model implementation device, characterized in that: The device comprises: processor; a memory coupled to the processor and storing executable program code; The processor calls the executable program code stored in the memory to execute the simulation model implementation method according to any one of claims 1-6.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the simulation model implementation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Concurrent processing method and system based on parametric simulation
CN110765663A
Implementation method of self-defined equipment of simulation system and simulation test method
CN117389535A
Training method of script generation model, script generation method and related device
CN118503093A