Simulation system control method, device, system and equipment and storage medium
By controlling the target simulation components to run the original model and simulation models at the same time in the simulation system, and using the time-consuming model output data as output, the problem of data output delay of simulation components is solved, and the efficiency and accuracy of the simulation system are improved.
Patent Information
- Application Number
- CN202411354649.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-02-07
AI Technical Summary
In existing simulation systems, simulation components may have data output delays, resulting in low simulation efficiency.
When the simulation system performs simulation tasks, the target simulation component controls the original model and the simulation model at the same time, and uses the short-running model output data as the output data of the target simulation component.
By reducing the delay in the output data of simulation components, the simulation efficiency and accuracy of the simulation system are improved.
Smart Images

Figure CN119397884A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a control method, device, system, equipment and storage medium of a simulation system. Background Art
[0002] In the process of product equipment production and design, in order to timely advance the product equipment manufacturing progress and understand the product equipment performance, multi-field simulation technology (such as mechanical, electronic and other structural simulation or control simulation, etc.) has become one of the key technologies to improve product equipment design efficiency and quality.
[0003] The simulation system of a product device usually contains multiple simulation components that are mapped one-to-one with each structure of the product device. Each simulation component is used to map the node tasks of the structure, thereby achieving the complete performance of the product device. However, when the simulation system executes the simulation tasks of the product device, the simulation component may have data output delays, resulting in low simulation efficiency of the simulation system. Summary of the invention
[0004] The present invention provides a control method, device, system, equipment and storage medium of a simulation system to solve the problem that simulation components in the existing simulation system may have data output delay, resulting in low simulation efficiency of the simulation system.
[0005] In a first aspect, an embodiment of the present application provides a control method for a simulation system, comprising:
[0006] When the simulation system executes a simulation task, a target simulation component in the simulation system is controlled to simultaneously run the original model and the simulation model for simulation, the simulation system includes multiple simulation components, the target simulation component belongs to the multiple simulation components, and the simulation model in the target simulation component has the same function as the original model;
[0007] The output data of the model with shorter running time among the original model and the simulation model is used as the simulation data output by the target simulation component.
[0008] Optionally, the output data of the model with shorter running time among the original model and the simulation model is used as the simulation data output by the target simulation component, including:
[0009] When the simulation model outputs data before the original model, the output data of the simulation model is output as the simulation data of the target simulation component;
[0010] When the original model outputs data before the simulation model, or when the original model and the simulation model output data at the same time, the output data of the original model is used as the simulation data output by the target simulation component.
[0011] Optionally, after using the output data of the model with the shortest running time among the original model and the simulation model as the simulation data output by the target simulation component, the method further comprises:
[0012] After receiving the output data of the original model and the output data of the simulation model, performing consistency check on the output data of the original model and the output data of the simulation model;
[0013] If the output data of the original model is inconsistent with the output data of the simulation model, when the simulation data output by the target simulation component is the output data of the simulation model, the output data of the original model is output as the simulation data of the target simulation component, and when there is a simulation component after the target simulation component, the simulation component after the target simulation component is controlled to be re-simulated to obtain the output result of the simulation system.
[0014] Optionally, before the simulation system executes the simulation task, the method further includes:
[0015] Acquire a simulation model of a first simulation component among the multiple simulation components, where the simulation model is trained based on historical operation data of an original model in the first simulation component;
[0016] The simulation model is loaded into the first simulation component, and a target simulation component including the original model and the simulation model is updated.
[0017] Optionally, the historical operation data of the original model includes historical input data, historical output data, and historical operation time of running the historical input data to obtain historical output data of the original model. The simulation model is trained in the following manner:
[0018] Determine multiple training samples based on multiple historical operation data of the original model, where the training samples include historical input data, historical output data corresponding to the historical input data, and historical operation time consumption;
[0019] Inputting historical input data in the training sample into the preset model for operation to obtain simulation output data, wherein the model parameter amount of the preset model is smaller than the model parameter amount of the original model;
[0020] Determine whether the preset model meets the convergence condition according to the simulation output data, the historical output data corresponding to the historical input data, and the historical running time, wherein the convergence condition at least includes that the operation time of the preset model is less than the historical running time;
[0021] When the preset model does not meet the convergence condition, the preset model is continuously iteratively trained based on the training samples until the preset model meets the convergence condition, and the converged preset model is output as the simulation model.
[0022] Optionally, before obtaining the simulation model of the first simulation component, the method further includes:
[0023] The simulation component whose running time is greater than or equal to the calibrated running time among the multiple simulation components is used as the first simulation component; or
[0024] All simulation components in the simulation system are taken as first simulation components.
[0025] In a second aspect, an embodiment of the present application provides a simulation system, including a plurality of simulation components, at least one of the plurality of simulation components being loaded with an original model and a simulation model having the same function as the original model;
[0026] When the simulation system executes a simulation task, at least one simulation component is used to simultaneously run the original model and the simulation model for simulation, and to use the output data of the model with the shorter running time among the original model and the simulation model as the simulation data output by the simulation component.
[0027] In a third aspect, the embodiments of the present application provide a control system, a control device and a simulation system, wherein the simulation system includes a plurality of simulation components, at least one simulation component is a target simulation component, and the target simulation component is loaded with an original model and a simulation model with the same function as the original model;
[0028] The control device is used to control the target simulation component in the simulation system to run the original model and the simulation model simultaneously for simulation when the simulation system executes the simulation task, and use the output data of the model with the shortest running time among the original model and the simulation model as the simulation data output by the target simulation component.
[0029] In a fourth aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the control method of the above-mentioned simulation system when executing the computer program.
[0030] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the control method of the above-mentioned simulation system are implemented.
[0031] In a scheme provided by the control method, device, system, equipment and storage medium of the above-mentioned simulation system, when the simulation system performs a simulation task, the target simulation component in the simulation system is controlled to run the original model and the simulation model at the same time for simulation, the simulation system includes multiple simulation components, the target simulation component belongs to multiple simulation components, and the simulation model in the target simulation component has the same function as the original model; the output data of the model with the shortest running time in the original model and the simulation model is used as the simulation data output by the target simulation component. In this embodiment, by constructing a simulation model with the same function as the original model, the simulation model can simulate the original model, and when performing simulation, the target simulation component runs the original model and the simulation model at the same time, and uses the output data of the model with the shortest running time as the output of the target simulation component. On the basis of ensuring the accuracy of the output data of the overall system, the delay of the output data of the simulation component can be effectively reduced, thereby improving the simulation efficiency of the simulation system. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0033] Figure 1 It is a structural diagram of a conventional simulation system;
[0034] Figure 2 is a structural schematic diagram of a control system in one embodiment of the present invention;
[0035] Figure 3 is a structural schematic diagram of a simulation system in one embodiment of the present invention;
[0036] Figure 4 is a flow chart of a control method of a simulation system in one embodiment of the present invention;
[0037] Figure 5 yes Figure 4 A schematic diagram of an implementation process of step S10;
[0038] Figure 6 is another schematic flow chart of a control method of a simulation system according to an embodiment of the present invention;
[0039] Figure 7 is another flow chart of a control method of a simulation system in one embodiment of the present invention;
[0040] Figure 8 yes Figure 2 A structural schematic diagram of the control device;
[0041] Fig. 9 It is a schematic diagram of the structure of an electronic device in one embodiment of the present invention. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or their collections. It should also be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0044] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0045] References to "one embodiment" or "some embodiments" etc. described in the present specification mean that one or more embodiments of the present invention include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0046] It should be understood that the order of execution of the steps in the following embodiments does not imply a precedence of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0047] In order to illustrate the technical solution of the present invention, specific embodiments are provided below for illustration.
[0048] The simulation system of a product equipment usually includes multiple simulation components that are mapped one-to-one to each structure of the product equipment. Each simulation component is used to simulate the node tasks of the structure it maps, thereby realizing a series of simulation tasks through a simulation module to test the complete performance of the product equipment. However, when the simulation system executes simulation tasks, the simulation component may have data output delays and it is difficult to accurately simulate the operation of the corresponding structure, resulting in low simulation accuracy and efficiency of the simulation system. Moreover, due to the output delay of the simulation component, it is easy to cause large differences in the simulation time steps between different simulation components connected to the same simulation component, that is, the time from different simulation components outputting simulation data to the same simulation component is inconsistent, which affects the data synchronization and exchange of each simulation component in the simulation system and reduces the simulation accuracy of the simulation system.
[0049] like Figure 1 As shown, a conventional simulation system includes simulation component A, simulation component B and simulation component C. After receiving their own input data, simulation component A and simulation component B perform simulation, obtain various simulation data and output them, wherein the simulation data output by simulation component A and simulation component B need to be input to simulation component C, so that simulation component C can perform node simulation according to the simulation data output by simulation component A and simulation component B. However, during the actual operation of the simulation system, there may be a delay in simulation component A and / or simulation component B. For example, it takes 1 second for simulation component B to run and output simulation data, while there is a delay in simulation component A to run and output simulation data, and the operation time may take 10 seconds, resulting in the inability of simulation component A and simulation component B to synchronously input the output data to simulation component C. The simulation time step of the two is quite different, which affects data synchronization and exchange, and reduces the simulation accuracy of the simulation system.
[0050] In view of the above problems, the control method of the simulation system provided by the embodiment of the present invention can be applied in Figure 2 In the control system shown in FIG. 1 , the control system includes a simulation system and a control device. The simulation system includes a plurality of simulation components, and the output data of the simulation component is the input data of the next simulation component connected to the simulation component. The control device communicates with each simulation component of the simulation system through a bus or a network.
[0051] Specifically, at least one simulation component in the simulation system is a target simulation component, and the target simulation component includes an original model and a simulation model of the original model. The original model of the simulation component is a simulation model of the actual structure in the product equipment. The simulation model of the original model is a model obtained by simulating the original model. The simulation model has the same function as the original model, and the model parameter amount of the simulation model is less than the model parameter amount of the original model. When the simulation system performs a simulation task, if the target simulation component receives input data from the outside or other simulation components, the control device controls the target simulation component in the simulation system to run the original model and the simulation model simultaneously, so that the original model and the simulation model are simulated according to the input data respectively, and the output data of the model with the shortest running time in the original model and the simulation model is used as the simulation data output by the target simulation component.
[0052] In one embodiment, a simulation system is provided, the simulation system comprising a plurality of simulation components, at least one of the plurality of simulation components being loaded with an original model and a simulation model having the same function as the original model, the model parameter amount of the simulation model being less than the model parameter amount of the original model. When the simulation system performs a simulation task, at least one simulation component is used to simultaneously run the original model and the simulation model for simulation, and is used to use the output data of the model that takes the shortest time to run between the original model and the simulation model as the simulation data output by the simulation component.
[0053] like Figure 3 As shown, the simulation system in this embodiment may include simulation component A, simulation component B and simulation component C. Simulation component A and simulation component B are respectively connected to simulation component C, and the simulation data output by simulation component A and simulation component B are used together as input data of simulation component C. Among them, simulation component A is a target simulation component including an original model and a simulation model of the original model; simulation component B and simulation component C both include the original model. Among them, the original model of simulation component A can be a model SimA that simulates the structure of a camera, and the simulation model of simulation component A can be a model f(x) obtained by simulating model SimA. When the simulation system performs a simulation task, if simulation component A receives input data from the outside or other simulation components, simulation component A runs model SimA and model f(x) at the same time, so that model SimA and model f(x) respectively simulate the camera function according to the input data, and the running time of model SimA and model f(x) is judged. If model f(x) outputs data before model SimA, model f(x) is the target model with short running time, and the data output by model f(x) is used as the simulation data output by simulation component A, and the simulation data of simulation component A is used as the input data of simulation component C. The delay of simulation component A output can be reduced or even eliminated, and the difference in simulation time steps between simulation component A and simulation component B can be reduced.
[0054] In the above embodiment, by constructing a simulation model with the same function as the original model and a smaller number of parameters, the simulation model can simulate the original model and has a faster running speed. When executing the simulation task, the target simulation component runs the original model and the simulation model at the same time, and uses the model output data with less time consumption as the output of the target simulation component. On the basis of ensuring the accuracy of the overall system output data, the delay of the simulation component output data can be effectively reduced, thereby improving the simulation efficiency and simulation accuracy of the simulation system. In addition, due to the reduction in the delay of the simulation component output data, the difference in simulation time steps between different simulation components is reduced, further improving the simulation accuracy of the simulation system.
[0055] In the simulation system, each simulation component can be implemented by different terminal devices or servers, and the control device can also be implemented by an independent electronic control unit or terminal device or server. In other examples, the control system can be a terminal device or a server, that is, the control device and each simulation component in the simulation system can be implemented by each functional module on the same terminal device or the same server. Among them, the terminal device includes but is not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The server can be implemented by an independent server or a server cluster consisting of multiple servers.
[0056] In one embodiment, if Figure 4 As shown, a control method for a simulation system is provided, and the method is applied in Figure 1 The control system in is taken as an example to illustrate, including the following steps:
[0057] S10: When the simulation system executes the simulation task, the target simulation component is controlled to run the original model and the simulation model simultaneously for simulation.
[0058] It can be understood that the original model and the simulation model of the target simulation component have the same input data, which can be the output data of the upper-level simulation component of the target simulation component connected to the target simulation component, or the system input data (i.e., the input data of the simulation system) manually input by the user or input by an external device.
[0059] For example, the simulation system includes multiple simulation components, at least one simulation component in the simulation system is a target simulation component, and the target simulation component includes an original model and a simulation model of the original model. The simulation model has the same function as the original model, and the model parameter amount of the simulation model is less than the model parameter amount of the original model, so that the simulation model can simulate the original model and has a faster running speed.
[0060] It is understandable that, among the multiple simulation components, other simulation components (which may be referred to as ordinary simulation components) except the target simulation component include at least the original model. When the simulation system performs a simulation task, the other simulation components only run the original model. As an example, the other simulation components may include the original model, and may also include the simulation model, but for the other simulation components, even if the simulation model is included, the simulation system may only run the original model when performing a simulation task.
[0061] It can be understood that if all the simulation components among the multiple simulation components are target simulation components, the number of other simulation components is 0.
[0062] The target simulation component can be a first-level simulation node, an intermediate simulation node, or a last-level simulation node among multiple simulation components. If the target simulation component is a last-level simulation node, the output data of the target simulation component is the output result of the simulation system when the simulation system executes the simulation task.
[0063] If the target simulation component is a first-level simulation node or an intermediate simulation node, the simulation data output by the target simulation component is the input data of the next-level simulation component connected to the target simulation component. It can be understood that when the target simulation component is a first-level simulation node, its input data is the system input data manually input by the user or input by an external device; if the target simulation component is an intermediate simulation node, its input data is the simulation data output by the previous simulation node.
[0064] It is understandable that the simulation model loaded in the simulation system including the original model and the original model is the target simulation model. The other simulation components in the simulation system except the target simulation model are ordinary simulation models, and the ordinary simulation model at least includes the original model. The ordinary simulation model may include the original model, and may also include the simulation model, but the ordinary simulation model only runs the original model when the simulation system performs the simulation task.
[0065] S20: Using the output data of the model with the shorter running time between the original model and the simulation model as the simulation data output by the target simulation component.
[0066] When the simulation system performs a simulation task, if the target simulation component receives input data from the outside or other simulation components, the target simulation component is controlled to run the original model and the simulation model simultaneously, so that the original model and the simulation model can be simulated according to the input data respectively, and the output data of the model with the shorter running time among the original model and the simulation model is output as the simulation data of the target simulation component. Wherein, in the case that the simulation model outputs data before the original model, the output data of the simulation model is output as the simulation data of the target simulation component; in the case that the original model outputs data before the simulation model, or the original model and the simulation model output data at the same time, the output data of the original model is output as the simulation data output by the target simulation component.
[0067] When the simulation system executes a simulation task, each simulation component receives input data from the outside or the previous simulation component, and performs simulation according to the received input data until each simulation component completes the simulation, and finally one or more simulation components output the simulation data of the simulation task. When the simulation component only includes the original model, the simulation component is controlled to run the original model to execute the input data, and the output data of the original model is input as the simulation data of the simulation component to the next simulation component (if any) for node simulation, until all simulation components complete the node simulation, the simulation system completes the execution of the simulation task, and the final template simulation data is output. When the simulation component includes an original model and a simulation model of the original model, the simulation component (i.e., the target simulation component) is controlled to simultaneously run the original model and the simulation model to simulate according to the input data respectively, and the output data of the model with the shortest running time among the original model and the simulation model is used as the simulation data output by the target simulation component; wherein, if there is a next simulation component after the target simulation component, the simulation data output by the target simulation component is input to the next simulation component for node simulation until all simulation components complete the node simulation and the simulation system completes the execution of the simulation task; if there is no next simulation component after the target simulation component, i.e., the target simulation component is the last simulation component of the simulation system (i.e., the last level simulation node), the simulation data output by the target simulation component is directly used as the output result of the simulation system. wherein, since the model parameter amount of the simulation model is less than the model parameter amount of the original model, the simulation model can simulate the original model and has a faster running speed, the simulation data of the target simulation component is usually the data output by the simulation model, and the function of the simulation model is the same as that of the original model, so the outputs of the two are close or even the same, that is, the accuracy of the output of the simulation component is guaranteed, and the delay of the output of the simulation component is reduced.
[0068] In this embodiment, by constructing a simulation model with the same function as the original model and a smaller number of parameters, the simulation model can simulate the original model and has a faster running speed. When executing the simulation task, the target simulation component runs the original model and the simulation model at the same time, and uses the output data of the model with the shortest running time among the original model and the simulation model as the simulation data output of the target simulation component. On the basis of ensuring the accuracy of the output data of the overall system, the delay of the output data of the simulation component can be effectively reduced, thereby improving the simulation efficiency and simulation accuracy of the simulation system. In addition, due to the reduction in the delay of the output data of the simulation component, the difference in simulation time steps between different simulation components is reduced, further improving the simulation accuracy of the simulation system.
[0069] In one embodiment, in step S10, the output data of the model with the shortest running time among the original model and the simulation model is used as the simulation data output by the target simulation component, which specifically includes the following steps:
[0070] S11: After controlling the target simulation component to run the original model and the simulation model simultaneously, waiting to receive output data of the original model and the simulation model.
[0071] S12: When the output data of the simulation model is received and the output data of the original model is not received, the output data of the simulation model is used as the simulation data output by the target simulation component.
[0072] S13: When the output data of the original model is received and the output data of the simulation model is not received, or when the output data of the original model and the output data of the simulation model are received at the same time, the output data of the original model is used as the simulation data output by the target simulation component.
[0073] Specifically, when the simulation model outputs data before the original model, the output data of the simulation model is output as the simulation data of the target simulation component; when the original model outputs data before the simulation model, or the original model and the simulation model output data at the same time, the output data of the original model is output as the simulation data of the target simulation component.
[0074] Wherein, after the control device controls the target simulation component to run the original model and the simulation model at the same time, so that the original model and the simulation model perform node simulation according to the input data respectively, the control device will wait for receiving the output data of the original model or the simulation model to the input data. When the output data of the simulation model is received, and the output data of the original model is not received, that is, the simulation model outputs data before the original model, indicating that the operation time of the simulation model is shorter, the control device uses the output data of the simulation model as the simulation data output by the target simulation component. When the output data of the original model is received, and the output data of the simulation model is not received, that is, the original model outputs data before the simulation model, indicating that the operation time of the original model is shorter, the original model is determined to be the target model with short operation time, and the output data of the original model is used as the simulation data output by the target simulation component. When the output data of the original model and the output data of the simulation model are received at the same time, it means that the operation time of the two is the same, and the output data of the original model is directly used as the simulation data output by the target simulation component to improve the accuracy of the simulation data.
[0075] In this embodiment, after controlling the target simulation component to run the original model and the simulation model at the same time, it is necessary to wait for receiving the output data of the original model or the simulation model, wherein when the output data of the simulation model is received but the output data of the original model is not received, the output data of the simulation model is used as the simulation data output by the target simulation component; when the output data of the original model is received but the output data of the simulation model is not received, or when the output data of the original model and the output data of the simulation model are received at the same time, the output data of the original model is used as the simulation data output by the target simulation component. The specific process of outputting the data output by the target model with a short running time as the simulation data of the target simulation component is refined, and the output delay of the target simulation component is reduced.
[0076] In other embodiments, after controlling the target simulation component to run the original model and the simulation model simultaneously, the control device needs to perform timing while waiting to receive the output data of the original model or the simulation model; when the timing duration is greater than the calibrated running duration of the target simulation component, it indicates that the target simulation model has timed out, and it is necessary to re-control the original model and the simulation model of the target simulation model to run simultaneously, so as to re-simulate according to the input data until the simulation task is completed. Alternatively, when the timing duration is greater than the calibrated running duration of the target simulation component, it is necessary to re-control the original model and the simulation model of the target simulation model to stop running, and generate a re-running instruction for the simulation task of the simulation system, so that the simulation system responds to the re-running instruction and re-executes the simulation task, that is, it is necessary to control each simulation model in the simulation system to re-simulate the node until the simulation task is completed. It can reduce the situation where the simulation accuracy of the simulation system is low due to the timeout of the target simulation component.
[0077] Among them, within the calibrated running time of the target simulation component, when the output data of the simulation model is received but the output data of the original model is not received, the output data of the simulation model is output as the simulation data of the target simulation component; when the output data of the original model is received but the output data of the simulation model is not received, or when the output data of the original model and the output data of the simulation model are received at the same time, the output data of the original model is output as the simulation data of the target simulation component. The running time of the target simulation component is limited, and the simulation data is output only within the running time limit, which further reduces the output delay of the target simulation component, thereby further improving the simulation accuracy and simulation efficiency of the simulation system.
[0078] In one embodiment, if Figure 6 As shown, after step S20, that is, after the output data of the model with the shortest running time among the original model and the simulation model is used as the simulation data output by the target simulation component, the method further includes the following steps:
[0079] S20: after receiving the output data of the original model and the output data of the simulation model, performing consistency check on the output data of the original model and the output data of the simulation model;
[0080] After using the output data of the model with shorter running time among the original model and the simulation model as the simulation data output by the target simulation component, it is necessary to continue waiting to receive the output data of the model that has not output data (which may be the original model or the simulation model) until the output data of the original model and the output data of the simulation model are received.
[0081] After receiving the output data of the original model and the output data of the simulation model, it is necessary to perform a consistency check on the output data of the original model and the output data of the simulation model, so as to execute control logics of different simulation systems according to the consistency check result.
[0082] S30: If the output data of the original model is consistent with the output data of the simulation model, then the output result of the simulation system is obtained after the simulation system successfully executes the simulation task.
[0083] Among them, if the output data of the original model of the target simulation component is consistent with the output data of the simulation model, when there is no next simulation component after the target simulation component, that is, the target simulation component is the last simulation component in the simulation system, it is judged that the simulation system has successfully executed the simulation task, and the simulation data output by the target simulation component is used as the output result of the simulation system; when there is a next simulation component after the target simulation component, that is, the target simulation component is not the last simulation component in the simulation system, the simulation component after the target simulation component is controlled to perform simulation according to the simulation data of the target simulation component until the simulation system successfully executes the simulation task and obtains the output result of the simulation system.
[0084] S40: If the output data of the original model is inconsistent with the output data of the simulation model, when the simulation data output by the target simulation component is the output data of the simulation model, the output data of the original model is output as the simulation data of the target simulation component, and when there is a simulation component after the target simulation component, the simulation component after the target simulation component is controlled to be re-simulated to obtain the output result of the simulation system.
[0085] If the output data of the original model of the target simulation component is inconsistent with the output data of the simulation model, when the simulation data previously output by the target simulation component is the output data of the simulation model, the control device needs to clear the simulation data of the target simulation component and the simulation data of the simulation component after the target simulation component, that is, discard the simulation data of the target simulation component and all the simulation components after it. Then, if there is no next simulation component after the target simulation component, that is, the target simulation component is the last simulation component in the simulation system, it is judged that the simulation system successfully executes the simulation task, and at this time, the output data of the original model of the target simulation component is used as the simulation data output by the target simulation component to obtain the output result of the simulation system; if there is a next simulation component after the target simulation component, that is, the target simulation component is not the last simulation component in the simulation system, the output data of the original model is used as the simulation data of the target simulation component to be input to the next simulation component, and the simulation component after the target simulation component in the simulation system is controlled to re-simulate until the simulation system successfully executes the simulation task and obtains the output result of the simulation system. When the output data of the original model of the target simulation component is inconsistent with the output data of the simulation model, only the simulation component whose simulation data may be erroneous is controlled to re-output, which can not only ensure the accuracy of the final simulation data, but also reduce the time spent on re-running the simulation components that have been simulated but whose simulation data is not erroneous, further improving the simulation efficiency of the entire simulation system.
[0086] In other embodiments, if the output data of the original model is inconsistent with the output data of the simulation model, and the simulation data output by the target simulation component is the output data of the simulation model, if there is no next simulation component after the target simulation component, that is, the target simulation component is the last simulation component in the simulation system, it is judged that the simulation system has successfully executed the simulation task. At this time, the output data of the original model of the target simulation component is used as the simulation data output by the target simulation component to obtain the output result of the simulation system; if there is a next simulation component after the target simulation component, that is, the target simulation component is not the last simulation component in the simulation system, the control device needs to control the simulation system to re-execute the simulation task, that is, based on the same system input data, control each simulation component in the simulation system to re-simulate until the simulation system successfully executes the simulation task, so as to obtain the output result of the simulation system and ensure the accuracy of the final simulation data.
[0087] In other embodiments, if the output data of the original model is consistent with the output data of the simulation model, there is no need to control the simulation module of the simulation system to re-simulate. When there is no next simulation component after the target simulation component, that is, the target simulation component is the last simulation component in the simulation system, it is judged that the simulation system has successfully executed the simulation task, and the simulation data output by the target simulation component is used as the output result of the simulation system; when there is a next simulation component after the target simulation component, that is, the target simulation component is not the last simulation component in the simulation system, the simulation component after the target simulation component is controlled to simulate according to the simulation data of the target simulation component, until the simulation system successfully executes the simulation task and obtains the output result of the simulation system.
[0088] In this embodiment, after the output data of the model with shorter running time between the original model and the simulation model is output as the simulation data of the target simulation component, after receiving the output data of the original model and the output data of the simulation model, the output data of the original model and the output data of the simulation model are checked for consistency; if the output data of the original model and the output data of the simulation model are inconsistent, when the simulation data output by the target simulation component is the output data of the simulation model, the output data of the original model is output as the simulation data of the target simulation component, and when there is a simulation component after the target simulation component, the simulation component after the target simulation component is controlled to be re-simulated to obtain the output result of the simulation system; on the one hand, the accuracy of the simulation data output by each simulation module is improved, thereby improving the simulation accuracy of the entire simulation system; on the other hand, the time spent on re-running the simulation component that has been simulated but has no errors in the simulation data can be reduced, further improving the simulation efficiency of the entire simulation system.
[0089] In one embodiment, if Figure 7 As shown, before step S10, that is, before the simulation system executes the simulation task, the method further includes the following steps:
[0090] S01: obtaining a simulation model of a first simulation component among multiple simulation components, where the simulation model is trained based on historical operation data of an original model in the first simulation component;
[0091] S02: Load the simulation model into the first simulation component, and update to obtain a target simulation component including the original model and the simulation component.
[0092] Before the simulation system performs a simulation task, the control device needs to obtain a simulation model of a first simulation component (i.e., a simulation component that needs to be updated) among multiple simulation components, wherein the simulation model is trained based on the historical operation data of the original model in the first simulation component. For example, the historical operation data of the original model includes the historical input data of the original model and the historical output data corresponding to the historical input data, i.e., the data output by the original model after simulation based on the historical input data; the preset model is trained based on the historical input data and the historical output data of the original model until the preset model converges (e.g., the data output by the preset model based on the historical input data is similar or identical to the historical output data), and a simulation model with the same function and similar performance as the original model is obtained. Among them, the model parameter amount of the preset model is less than the model parameter amount of the original model; the preset model can be a Convolutional Neural Network (CNN) model.
[0093] After obtaining the simulation model of the first simulation component, the simulation model of the original model in the first simulation component is loaded into the first simulation component, and the target simulation component including the original model and the simulation component is updated to reduce the output delay of the target simulation component when the subsequent simulation system performs simulation tasks, thereby improving the simulation accuracy and efficiency of the simulation system.
[0094] In this embodiment, before the simulation system performs a simulation task, it is necessary to obtain a simulation model of a first simulation component among multiple simulation components, and the simulation model is trained based on the historical operation data of the original model in the first simulation component, and then the simulation model is loaded into the first simulation component, and the target simulation component including the original model and the simulation component is updated. The corresponding simulation model is trained based on the historical operation data of the original model in the simulation component, so that the simulation model has the same function and similar performance as the original model, which can improve the similarity between the simulation model and the original model, thereby improving the accuracy of the simulation data output by the simulation module, and further improving the simulation accuracy of the entire simulation system.
[0095] In one embodiment, before step S01, that is, before obtaining the simulation model of the first simulation component, the method also includes the following steps: taking all the simulation components in the simulation system as the first simulation components, and updating the simulation model of the original model in each simulation component to each simulation component, the output delay of each simulation component can be effectively reduced, thereby improving the simulation efficiency of the entire simulation system.
[0096] In one embodiment, before step S01, that is, before obtaining the simulation model of the first simulation component, the method further includes: taking a simulation component whose running time is greater than or equal to the calibrated running time of the corresponding simulation component among the multiple simulation components as the first simulation component. In addition, a simulation component whose running time is greater than or equal to the calibrated running time of the corresponding simulation component among the multiple simulation components can also be taken as the first simulation component.
[0097] The calibration operation time can be calibrated based on experience, and the calibration operation time of different simulation components is different. To improve data accuracy, the calibration operation time can be the operation time of the real structure in the product equipment corresponding to the simulation component; or the calibration operation time can be the maximum operation time limited by the real structure.
[0098] Specifically, it is necessary to take the average running time (or minimum running time) of the simulation component in the simulation system during the historical simulation running process as the running time of the simulation component, and determine the running time of the real structure in the product equipment corresponding to the simulation component; take the running time of the real structure as the calibrated running time of the simulation component, and determine whether the running time of the simulation component is greater than the calibrated running time of the simulation component, or determine whether the ratio of the running time of the simulation component to the calibrated running time is greater than a preset ratio; if the running time of the simulation component is greater than or equal to the calibrated running time of the simulation component, or the ratio of the running time of the simulation component to the calibrated running time is greater than or equal to the preset ratio, then the simulation component is taken as the first simulation component.
[0099] In the present embodiment, a simulation component among multiple simulation components whose running time is greater than or equal to the calibrated running time of the corresponding simulation component is used as the first simulation component, so that the simulation model of the simulation component with high running time can be subsequently updated to this simulation component, while the simulation components with less running time delay do not need to be updated. On the basis of ensuring the simulation efficiency of the entire simulation system, the data loading amount of the simulation model can be reduced and the system overhead can be reduced.
[0100] In one embodiment, the historical operation data of the original model includes the historical input data and historical output data of the original model, and the historical operation time of running the historical input data to obtain the historical output data. Before step S01, it is necessary to train the simulation model of the original model according to the historical operation data of the original model in the first simulation component, so as to facilitate subsequent loading and updating to the simulation module. The simulation model is trained in the following manner:
[0101] S011: Determine multiple training samples based on multiple historical operation data of the original model.
[0102] When training a simulation model, it is necessary to obtain multiple historical operation data of the original model in the simulation component, and the historical operation data of the original model includes the historical input data, historical output data, and the historical operation time of running the historical input data to obtain the historical output data. Then, multiple training samples are determined based on the multiple historical operation data of the original model, wherein each training sample includes the historical input data, the historical output data corresponding to the historical input data, and the historical operation time.
[0103] S012: Train the preset model according to multiple training samples to obtain a simulation model.
[0104] After obtaining a plurality of training samples, the preset model is trained according to the plurality of training samples to obtain a simulation model, wherein the model parameter quantity of the preset model is less than the model parameter quantity of the original model. That is, according to the historical input data, historical output data, and the historical operation time of running the historical input data to obtain the historical output data of the original model, the preset model is trained to obtain a simulation model, and the time required for the simulation model to simulate according to the historical input data (i.e., the operation time) must be less than the historical operation time corresponding to the historical input data, which can improve the simulation operation speed of the simulation model.
[0105] Specifically, the historical input data in the training sample is input into the preset model for calculation to obtain simulation output data. According to the simulation output data, the historical output data corresponding to the historical input data, and the historical running time, it is determined whether the preset model meets the convergence conditions. When the preset model does not meet the convergence conditions, the preset model is continued to be iteratively trained based on the training sample until the preset model meets the convergence conditions, and the output converged preset model is the simulation model.
[0106] Among them, the convergence condition may include that the operation time of the preset model is less than the historical operation time, which can reduce the operation efficiency of the simulation model of the subsequent convergence output and reduce the output delay of the simulation component. The convergence condition may also include that the similarity between the simulation output data of the preset model and the corresponding historical output data is greater than a preset value (such as 70%). The higher the model similarity, the larger the data volume of the model parameters. On the basis of ensuring the simulation accuracy of the simulation model of the subsequent convergence output, the model parameter volume of the simulation model can be reduced, and the model training data volume can also be reduced to improve the model training efficiency.
[0107] In this embodiment, multiple training samples are determined based on multiple historical operation data of the original model, and the training samples include historical input data, historical output data corresponding to the historical input data, and historical operation time; the historical input data in the training samples are input into the preset model for calculation to obtain simulation output data; based on the simulation output data, the historical output data corresponding to the historical input data, and the historical operation time, it is determined whether the preset model meets the convergence condition, and the convergence condition at least includes that the operation time of the preset model is less than the historical operation time; when the preset model does not meet the convergence condition, the preset model continues to be iteratively trained based on the training samples until the preset model meets the convergence condition, and the converged preset model is output as the simulation model. The training process of the simulation model is clarified, and on the basis of ensuring the simulation accuracy of the simulation model outputted by the subsequent convergence, the amount of model parameters of the simulation model is reduced, and the amount of model training data can also be reduced to improve the model training efficiency.
[0108] In other embodiments, the convergence condition may also include: the similarity between the simulation output data of the preset model and the corresponding historical output data is greater than a preset value (such as 70%); the operation time of the preset model is less than the historical operation time, and is close to the operation time of the real structure corresponding to the simulation component where the original model is located, that is, the difference between the operation time of the preset model and the operation time of the corresponding real structure is less than the preset difference. This makes the operation time of the simulation model in the simulation component close to the operation time of the real structure, further reducing the output delay of the simulation component.
[0109] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0110] In one embodiment, a control device is provided, which corresponds one-to-one to the control method of the simulation system in the above embodiment, such as Figure 8 As shown, the control device includes a control module 801 and an output module 802. Each functional module is described in detail as follows:
[0111] A control module 801 is used to control a target simulation component in the simulation system to simultaneously run the original model and the simulation model for simulation when the simulation system executes a simulation task, the simulation system includes multiple simulation components, the target simulation component belongs to the multiple simulation components, and the simulation model in the target simulation component has the same function as the original model;
[0112] The output module 802 is used to use the output data of the model with the shortest running time among the original model and the simulation model as the simulation data output by the target simulation component.
[0113] Optionally, the control module 801 is specifically used for:
[0114] In the case where the simulation model outputs data before the original model, the output data of the simulation model is used as the simulation data output by the target simulation component;
[0115] When the original model outputs data before the simulation model, or when the original model and the simulation model output data at the same time, the output data of the original model is used as the simulation data output by the target simulation component.
[0116] Optionally, the control device further includes a verification module 803 and a generation module 804. After the output data of the model with the shortest running time in the original model and the simulation model are used as the simulation data output by the target simulation component, the method further includes:
[0117] A verification module 803 is used to perform consistency verification on the output data of the original model and the output data of the simulation model after receiving the output data of the original model and the output data of the simulation model;
[0118] Generate module 804, which is used to output the output data of the original model as the simulation data of the target simulation component if the output data of the original model is inconsistent with the output data of the simulation model, and if a simulation component exists after the target simulation component, control the simulation component after the target simulation component to re-simulate, so as to obtain the output result of the simulation system.
[0119] Optionally, the control device further includes an updating module 805. Before the simulation system executes the simulation task, the updating module 804 is used to:
[0120] Acquire a simulation model of a first simulation component among the multiple simulation components, where the simulation model is trained based on historical operation data of an original model in the first simulation component;
[0121] The simulation model is loaded into the first simulation component, and a target simulation component including the original model and the simulation component is updated.
[0122] Optionally, before acquiring the simulation model of the first simulation component, the updating module 804 is further used to:
[0123] The simulation component whose running time is greater than or equal to the calibrated running time among the multiple simulation components is used as the first simulation component; or,
[0124] All simulation components in the simulation system are taken as first simulation components.
[0125] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0126] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0127] The present application also provides an electronic device, such as Fig. 9 As shown, the electronic device 2 includes: at least one processor 20, a memory 21, and a computer program 22 stored in the memory 21 and executable on the at least one processor 20, wherein the processor 20 implements the steps in any of the above-mentioned method embodiments when executing the computer program 22, or implements the functions of each module / unit in the above-mentioned device embodiments when executing the computer program 22.
[0128] Exemplarily, the computer program 22 may be divided into one or more modules / units, which are stored in the memory 21 and executed by the processor 20 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 22 in the electronic device 2.
[0129] Those skilled in the art will understand that Fig. 9 These are merely examples of the electronic device and do not constitute a limitation of the electronic device. The electronic device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.
[0130] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0131] The memory may be an internal storage unit of the computer device, such as a hard disk or memory of the computer device. The memory may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device. Furthermore, the memory may also include both an internal storage unit of the computer device and an external storage device.
[0132] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it can implement the steps in the above-mentioned method embodiments, or implement the functions of each module / unit in the above-mentioned device embodiments.
[0133] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments, or implement the functions of the modules / units in the above-mentioned device embodiments.
[0134] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0135] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0136] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0137] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0138] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0139] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A control method for a simulation system, characterized in that: include: When the simulation system executes a simulation task, controlling a target simulation component in the simulation system to simultaneously run an original model and a simulation model for simulation, the simulation system comprising a plurality of simulation components, the target simulation component belonging to the plurality of simulation components, and the simulation model in the target simulation component having the same function as the original model; The output data of the model with the shortest running time among the original model and the simulation model are used as the simulation data output by the target simulation component.
2. The control method of the simulation system according to claim 1, characterized in that: The method of using the output data of the original model and the model with the shortest running time among the simulation models as the simulation data output by the target simulation component comprises: In the case where the simulation model outputs data before the original model, using the output data of the simulation model as the simulation data output by the target simulation component; When the original model outputs data before the simulation model, or when the original model and the simulation model output data simultaneously, the output data of the original model is used as the simulation data output by the target simulation component.
3. The control method of the simulation system according to claim 1, characterized in that: After using the output data of the original model and the model with the shortest running time among the simulation models as the simulation data output by the target simulation component, the method further comprises: After receiving the output data of the original model and the output data of the simulation model, performing consistency check on the output data of the original model and the output data of the simulation model; If the output data of the original model is inconsistent with the output data of the simulation model, when the simulation data output by the target simulation component is the output data of the simulation model, the output data of the original model is output as the simulation data of the target simulation component, and when the simulation component exists after the target simulation component, the simulation component after the target simulation component is controlled to be re-simulated to obtain the output result of the simulation system.
4. The control method of the simulation system according to any one of claims 1 to 3, characterized in that: Before the simulation system executes the simulation task, the method further comprises: Acquire the simulation model of a first simulation component among the plurality of simulation components, wherein the simulation model is trained according to the historical operation data of the original model in the first simulation component; The simulation model is loaded into the first simulation component to obtain the target simulation component including the original model and the simulation model.
5. The control method of the simulation system according to claim 4, characterized in that: The historical operation data of the original model includes the historical input data and historical output data of the original model, and the historical operation time consumed by running the historical input data to obtain the historical output data. The simulation model is trained in the following manner: Determine a plurality of training samples according to the plurality of historical operation data of the original model, wherein the training samples include the historical input data, the historical output data corresponding to the historical input data, and the historical operation time consumption; Inputting the historical input data in the training sample into a preset model for operation to obtain simulation output data, wherein the model parameter amount of the preset model is less than the model parameter amount of the original model; Determining whether the preset model satisfies a convergence condition according to the simulation output data, the historical output data corresponding to the historical input data, and the historical running time; When the preset model does not meet the convergence condition, the preset model continues to be iteratively trained based on the training samples until the preset model meets the convergence condition, and the converged preset model is output as the simulation model.
6. The control method of the simulation system according to claim 4, characterized in that: Before obtaining the simulation model of the first simulation component, the method further includes: The simulation component whose running time is greater than or equal to the calibrated running time among the multiple simulation components is used as the first simulation component; or All the simulation components in the simulation system are used as the first simulation components.
7. A simulation system, characterized in that: It comprises a plurality of simulation components, at least one of which is loaded with an original model and a simulation model having the same function as the original model; When the simulation system performs a simulation task, at least one of the simulation components is used to simultaneously run the original model and the simulation model for simulation, and to use the output data of the original model and the simulation model that takes a short time to run as the simulation data output by the at least one simulation component.
8. A control system, characterized in that: A control device and a simulation system, wherein the simulation system comprises a plurality of simulation components, at least one of which is a target simulation component, and the target simulation component is loaded with an original model and a simulation model having the same function as the original model; The control device is used to control the target simulation component in the simulation system to run the original model and the simulation model simultaneously for simulation when the simulation system performs a simulation task, and use the output data of the model with the shorter running time between the original model and the simulation model as the simulation data output by the target simulation component.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the control method of the simulation system according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the control method of the simulation system as claimed in any one of claims 1 to 6 are implemented.