A simulation efficiency analysis method and device based on simulation event execution status

By analyzing the execution of simulation events, the problem of excessive granularity and limited improvement measures of the existing simulation system operation efficiency analysis methods is solved, and the accurate positioning and optimization of the operation efficiency of the simulation system is achieved, and the efficiency and development efficiency of the simulation system are improved. .

CN118332282BActive Publication Date: 2024-11-08BEIJING HUARU TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410440648.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-12
Publication Date
2024-11-08
Estimated Expiration
2044-04-12

Smart Images

  • Figure CN118332282B_ABST
    Figure CN118332282B_ABST
Patent Text Reader

Abstract

The present invention discloses a simulation efficiency analysis method and device based on the execution of simulation events, the method comprising: collecting operation data of a parallel simulation operation process to obtain simulation operation data information; the simulation operation data information comprises the event operation time executed by each thread running in parallel, the event operation time of the same entity executed by the same thread in each sampling cycle, the operation time of the same type of entity executed by the same thread in each sampling cycle, and the execution time of the same event type of the same thread in each sampling cycle; analyzing the simulation operation data information to obtain a comprehensive data analysis result; optimizing and verifying the comprehensive data analysis result to obtain a simulation efficiency analysis result. The method of the present invention can obtain the execution of simulation events during the simulation operation process, and provide a reliable basis for optimizing simulation efficiency and improving the design and implementation of simulation models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of modeling and simulation, and in particular to a simulation efficiency analysis method and device based on the execution status of simulation events. Background Art

[0002] As the third method of understanding the world, modeling and simulation have been widely used in many fields of production and life, and are constantly extending and deepening. Concepts such as digital twins and metaverse that have emerged in recent years are essentially the comprehensive and in-depth application of modeling and simulation technology. A model is an abstraction of the object of study for a specific purpose, and is a mathematical or physical description of a system, entity, phenomenon or process at different levels. After the model is built, all models are integrated and dynamically operated to achieve the simulation operation of the research object.

[0003] During the operation of the simulation system, different models need to interact with each other in a unified space-time environment. When the scale of the running model is large, the operation efficiency of the simulation system will become prominent, directly affecting the availability of the simulation system. Therefore, the measurement of simulation efficiency and the analysis and location of the main factors affecting the operation time of the simulation system have become important requirements for determining simulation availability, improving simulation systems, and improving simulation efficiency.

[0004] Since there is no effective means to obtain the actual number of times and time spent on the interface functions of the simulation model during the entire simulation process, the current measurement of the simulation system's operating efficiency is mainly at the system level, by collecting the simulation system's running start time and simulation running end time, calculating the total running time of the simulation system, and comparing the running time of different simulation systems to measure and compare the efficiency of the simulation system. This method of measuring simulation efficiency at the system level has the following problems:

[0005] First, the granularity of the measurement method is relatively coarse. The measurement of the efficiency of the simulation system remains at the system level, and it is impossible to conduct in-depth analysis and accurate location of the causes of low system efficiency at the model level that constitutes the simulation system.

[0006] Second, the measures for improvement are limited. For the efficiency measurement on the system side, the method of upgrading the simulation system operating environment or reducing the scale of the simulation model is basically used to improve the operating efficiency of the simulation system, and the measures for improving the simulation efficiency are limited.

[0007] Third, it is not conducive to the development of large-scale simulation systems. In large-scale simulation systems, models are often developed separately by organizations from different professional fields and then integrated and operated. During the system development, testing and operation process, coarse-grained simulation efficiency measurement methods cannot directly locate the operating efficiency of specific models, which greatly affects the efficiency of simulation system development and may even lead to the failure of simulation system development. Summary of the invention

[0008] The technical problem to be solved by the present invention is to provide a simulation efficiency analysis method and device based on the execution status of simulation events. In view of the problems existing in the current simulation system operation efficiency analysis method, such as coarse measurement granularity, inaccurate problem location, and limited improvement measures, an analysis method and technology that deeply studies the impact on the simulation system operation efficiency is provided.

[0009] The method of the present invention collects, counts and analyzes the operation status of each entity model involved in the simulation operation through in-depth research on the operation mechanism and engineering implementation of the simulation application system, and realizes accurate positioning of the main factors affecting the operation efficiency of the simulation system, so as to provide targeted methods and measures to enhance and improve the simulation system. The method of the present invention mainly analyzes the mechanism and implementation mechanism of the discrete event simulation application system, collects and analyzes the data of all simulation events in the simulation operation process, and based on the time series data of each simulation event in the simulation process, performs statistics and calculations from different dimensions to realize the quantitative measurement of the operation time of each entity involved in the simulation operation, thereby achieving the purpose of accurately positioning the factors affecting the efficiency of the simulation system.

[0010] In order to solve the above technical problems, a first aspect of an embodiment of the present invention discloses a simulation efficiency analysis method based on the execution status of simulation events, the method comprising:

[0011] S1, collect operation data of the parallel simulation operation process to obtain simulation operation data information;

[0012] The simulation operation data information includes the event execution time of each thread running in parallel, the event execution time of the same entity executed by the same thread in each sampling period, the execution time of the same type of entity executed by the same thread in each sampling period, and the execution time of the same event type of the same thread in each sampling period;

[0013] S2, analyzing the simulation operation data information to obtain a comprehensive data analysis result;

[0014] S3, optimizing and verifying the comprehensive data analysis results to obtain simulation efficiency analysis results.

[0015] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the collecting operation data of the parallel simulation operation process to obtain simulation operation data information includes:

[0016] S11, analyzing the parallel simulation running process to obtain the running interface information of the parallel simulation running process; the running interface information includes each thread unique identifier, each entity unique identifier, component unique identifier, event interface name and model element type name;

[0017] S12, configuring the collection environment to obtain collection environment data information; the collection environment data information includes a storage structure of the collection data, database startup parameter information and access parameter information;

[0018] S13, collecting operation data of the parallel simulation operation process according to the operation interface information of the parallel simulation operation process and the collection environment data information, to obtain simulation operation data information.

[0019] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the analyzing the simulation operation data information to obtain the comprehensive data analysis result includes:

[0020] S21, performing thread operation analysis on the simulation operation data information to obtain thread operation information;

[0021] S22, performing entity operation analysis on the simulation operation data information to obtain entity operation information;

[0022] S23, performing type operation analysis on the simulation operation data information to obtain type operation information;

[0023] S24, performing event operation analysis on the simulation operation data information to obtain event operation information;

[0024] S25, comprehensively analyzing the thread running information, the entity running information, the type running information and the event running information to obtain a comprehensive data analysis result.

[0025] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the performing thread operation analysis on the simulation operation data information to obtain thread operation information includes:

[0026] S211, analyzing the event running time executed by each thread running in parallel to obtain event running time information;

[0027] S212, analyzing the entities executed by the threads running in parallel to obtain entity related information;

[0028] S213, analyzing the operation efficiency of each thread running in parallel to obtain operation efficiency information;

[0029] S214, counting all entities running in a single thread to obtain entity list information;

[0030] S215: Integrate the event running time information, the entity related information, the running efficiency information and the entity list information to obtain thread running information.

[0031] As an optional implementation manner, in the first aspect of the embodiment of the present invention, performing entity operation analysis on the simulation operation data information to obtain entity operation information includes:

[0032] S221, merging the event running time of the same entity executed by the same thread in each sampling period to obtain a first event running time;

[0033] S222: Compare the running time of the first event with a preset first threshold, sort the entities exceeding the preset first threshold, and obtain entity running information.

[0034] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the performing type operation analysis on the simulation operation data information to obtain type operation information includes:

[0035] S231, merging the running time of the same type of entity executed by the same thread in each sampling period to obtain the second event running time;

[0036] S232: Compare the second event running time with a preset second threshold, sort the entity types exceeding the preset second threshold, and obtain type running information.

[0037] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the performing event operation analysis on the simulation operation data information to obtain event operation information includes:

[0038] S241, merging the execution time of the same event type of the same thread in each sampling period to obtain the third event running time;

[0039] S242: Compare the third event running time with a preset third threshold, sort the event interfaces that exceed the preset third threshold, and obtain event running information.

[0040] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the optimizing and verifying the comprehensive data analysis result to obtain the simulation efficiency analysis result includes:

[0041] S31, adjusting the threads of entity running in the simulation system according to the comprehensive analysis result of the data to obtain an optimized simulation system;

[0042] S32, collecting operation data of the optimized simulation system to obtain optimized simulation operation data information;

[0043] S33, analyzing the optimization simulation operation data information to obtain simulation efficiency analysis results.

[0044] A second aspect of an embodiment of the present invention discloses a simulation efficiency analysis device based on the execution status of simulation events, the device comprising:

[0045] The data acquisition module is used to collect operation data of the parallel simulation operation process to obtain simulation operation data information;

[0046] The simulation operation data information includes the event execution time of each thread running in parallel, the event execution time of the same entity executed by the same thread in each sampling period, the execution time of the same type of entity executed by the same thread in each sampling period, and the execution time of the same event type of the same thread in each sampling period;

[0047] A data analysis module is used to analyze the simulation operation data information to obtain a comprehensive data analysis result;

[0048] The simulation efficiency analysis module is used to optimize and verify the comprehensive data analysis results to obtain simulation efficiency analysis results.

[0049] As an optional implementation manner, in the second aspect of the embodiment of the present invention, the collecting operation data of the parallel simulation operation process to obtain simulation operation data information includes:

[0050] S11, analyzing the parallel simulation running process to obtain the running interface information of the parallel simulation running process; the running interface information includes each thread unique identifier, each entity unique identifier, component unique identifier, event interface name and model element type name;

[0051] S12, configuring the collection environment to obtain collection environment data information; the collection environment data information includes a storage structure of the collection data, database startup parameter information and access parameter information;

[0052] S13, collecting operation data of the parallel simulation operation process according to the operation interface information of the parallel simulation operation process and the collection environment data information, to obtain simulation operation data information.

[0053] As an optional implementation manner, in the second aspect of the embodiment of the present invention, the analyzing the simulation operation data information to obtain the comprehensive data analysis result includes:

[0054] S21, performing thread operation analysis on the simulation operation data information to obtain thread operation information;

[0055] S22, performing entity operation analysis on the simulation operation data information to obtain entity operation information;

[0056] S23, performing type operation analysis on the simulation operation data information to obtain type operation information;

[0057] S24, performing event operation analysis on the simulation operation data information to obtain event operation information;

[0058] S25, comprehensively analyzing the thread running information, the entity running information, the type running information and the event running information to obtain a comprehensive data analysis result.

[0059] As an optional implementation manner, in the second aspect of the embodiment of the present invention, the performing thread operation analysis on the simulation operation data information to obtain thread operation information includes:

[0060] S211, analyzing the event running time executed by each thread running in parallel to obtain event running time information;

[0061] S212, analyzing the entities executed by the threads running in parallel to obtain entity related information;

[0062] S213, analyzing the operation efficiency of each thread running in parallel to obtain operation efficiency information;

[0063] S214, counting all entities running in a single thread to obtain entity list information;

[0064] S215: Integrate the event running time information, the entity related information, the running efficiency information and the entity list information to obtain thread running information.

[0065] As an optional implementation manner, in the second aspect of the embodiment of the present invention, performing entity operation analysis on the simulation operation data information to obtain entity operation information includes:

[0066] S221, merging the event running time of the same entity executed by the same thread in each sampling period to obtain a first event running time;

[0067] S222: Compare the running time of the first event with a preset first threshold, sort the entities exceeding the preset first threshold, and obtain entity running information.

[0068] As an optional implementation manner, in the second aspect of the embodiment of the present invention, the performing type operation analysis on the simulation operation data information to obtain type operation information includes:

[0069] S231, merging the running time of the same type of entity executed by the same thread in each sampling period to obtain the second event running time;

[0070] S232: Compare the second event running time with a preset second threshold, sort the entity types exceeding the preset second threshold, and obtain type running information.

[0071] As an optional implementation manner, in the second aspect of the embodiment of the present invention, the performing event operation analysis on the simulation operation data information to obtain event operation information includes:

[0072] S241, merging the execution time of the same event type of the same thread in each sampling period to obtain the third event running time;

[0073] S242: Compare the third event running time with a preset third threshold, sort the event interfaces that exceed the preset third threshold, and obtain event running information.

[0074] As an optional implementation manner, in the second aspect of the embodiment of the present invention, the optimizing and verifying the comprehensive data analysis result to obtain the simulation efficiency analysis result includes:

[0075] S31, adjusting the threads of entity running in the simulation system according to the comprehensive analysis result of the data to obtain an optimized simulation system;

[0076] S32, collecting operation data of the optimized simulation system to obtain optimized simulation operation data information;

[0077] S33, analyzing the optimization simulation operation data information to obtain simulation efficiency analysis results.

[0078] The third aspect of the present invention discloses another simulation efficiency analysis device based on the execution status of simulation events, the device comprising:

[0079] A memory storing executable program code;

[0080] a processor coupled to the memory;

[0081] The processor calls the executable program code stored in the memory to execute part or all of the steps in the simulation efficiency analysis method based on the execution status of simulation events disclosed in the first aspect of the embodiment of the present invention.

[0082] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0083] The present invention proposes a simulation efficiency analysis based on the execution status of simulation events, which can go deep into the simulation system to find the simulation operation status. The present invention provides a method that can obtain the execution status of simulation events during the simulation operation process, which provides an implementation basis for analyzing the operation efficiency of the simulation system through the execution status of simulation events. A method for analyzing the simulation execution status from different dimensions based on simulation event data is proposed. By analyzing the operation status of the simulation entity model, the simulation component model, and the parallel simulation thread, a reliable basis can be provided for optimizing the simulation efficiency and improving the design and implementation of the simulation model. The present invention proposes the design and implementation of a simulation efficiency analysis system, which can provide a basis for the implementation of this patent. The method and technical implementation of the present invention can provide technical means to support the positioning of simulation runtime efficiency problems during the design, development, operation and maintenance of large-scale simulation systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0085] Figure 1 It is a flow chart of a simulation efficiency analysis method based on simulation event execution conditions disclosed in an embodiment of the present invention;

[0086] Figure 2 It is a flow chart of another simulation efficiency analysis method based on simulation event execution status disclosed in an embodiment of the present invention;

[0087] Figure 3 It is a schematic diagram of the parallel discrete system simulation operation disclosed in an embodiment of the present invention;

[0088] Figure 4 It is the simulation efficiency analysis system structure disclosed in the embodiment of the present invention;

[0089] Figure 5 It is a schematic diagram of realizing the simulation efficiency analysis technology disclosed in the embodiment of the present invention;

[0090] Figure 6 It is a functional schematic diagram of a simulation efficiency analysis software platform disclosed in an embodiment of the present invention;

[0091] Figure 7 It is a structural schematic diagram of a simulation efficiency analysis device based on simulation event execution status disclosed in an embodiment of the present invention;

[0092] Figure 8It is a structural schematic diagram of another simulation efficiency analysis device based on simulation event execution status disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0093] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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.

[0094] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. 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 may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or equipment.

[0095] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0096] The present invention discloses a simulation efficiency analysis method and device based on the execution of simulation events, the method comprising: collecting operation data of a parallel simulation operation process to obtain simulation operation data information; the simulation operation data information comprises the event operation time executed by each thread running in parallel, the event operation time of the same entity executed by the same thread in each sampling period, the operation time of the same type of entity executed by the same thread in each sampling period, and the execution time of the same event type of the same thread in each sampling period; analyzing the simulation operation data information to obtain a comprehensive data analysis result; optimizing and verifying the comprehensive data analysis result to obtain a simulation efficiency analysis result. The method of the present invention can obtain the execution of simulation events during the simulation operation process, and provide a reliable basis for optimizing simulation efficiency and improving the design and implementation of simulation models. The following are detailed descriptions respectively.

[0097] Explanation of the design terms of the present invention:

[0098] (1) Discrete Event System Simulation

[0099] A discrete event system refers to a system whose state changes instantaneously at discrete random time points. The state changes of such systems are driven by random events, and the state variables of the system change discretely. Therefore, it is difficult to describe the dynamic process of the system using mathematical analytical expressions (such as differential equations, difference equations, etc.). The research and analysis of discrete event systems mainly focus on the statistics of system behaviors. In combination with practical applications, the simulation system of the present invention mainly refers to the simulation of discrete events. The simulation of discrete event systems mainly promotes the simulation process through event scheduling.

[0100] (2) Simulation entity

[0101] An identifiable simulation object that exists in a certain state and has independent behavior capabilities or can independently complete a task. It can be either a behavior subject or a behavior object. Simulation entities are the main components of a simulation system.

[0102] (3) Simulation Components

[0103] The components that make up the simulation entity may include physical components, motion components, action components, decision components, etc. Corresponding to the software program, the simulation component is a relatively independent and reusable software module that encapsulates the component design and implementation and can provide an interface to the outside.

[0104] (4) Simulation events

[0105] At a certain moment, the result of the change of the state of a simulation entity or the instantaneous behavior that causes the change of the state of a simulation entity is called an event.

[0106] (5)Simulation running thread

[0107] A concept in the field of computer science, which refers to the basic unit of scheduling and execution of a computer processor. In the simulation calculation process, threads are usually used to run the event functions of the simulation entity.

[0108] Embodiment 1

[0109] See also Figure 1 , Figure 1 1 is a flow chart of a simulation efficiency analysis method based on simulation event execution conditions disclosed in an embodiment of the present invention. Figure 1 The simulation efficiency analysis method based on the simulation event execution status described is applied to analyze the operation efficiency of the simulation system, and the embodiment of the present invention does not limit it. Figure 1 As shown, the simulation efficiency analysis method based on the simulation event execution status may include the following operations:

[0110] S1, collect operation data of the parallel simulation operation process to obtain simulation operation data information;

[0111] The simulation operation data information includes the event execution time of each thread running in parallel, the event execution time of the same entity executed by the same thread in each sampling period, the execution time of the same type of entity executed by the same thread in each sampling period, and the execution time of the same event type of the same thread in each sampling period;

[0112] S2, analyzing the simulation operation data information to obtain a comprehensive data analysis result;

[0113] S3, optimizing and verifying the comprehensive data analysis results to obtain simulation efficiency analysis results.

[0114] Optionally, collecting operation data of the parallel simulation operation process to obtain simulation operation data information includes:

[0115] S11, analyzing the parallel simulation running process to obtain the running interface information of the parallel simulation running process; the running interface information includes each thread unique identifier, each entity unique identifier, component unique identifier, event interface name and model element type name;

[0116] S12, configuring the collection environment to obtain collection environment data information; the collection environment data information includes a storage structure of the collection data, database startup parameter information and access parameter information;

[0117] S13, collecting operation data of the parallel simulation operation process according to the operation interface information of the parallel simulation operation process and the collection environment data information, to obtain simulation operation data information.

[0118] Optionally, analyzing the simulation operation data information to obtain a comprehensive data analysis result includes:

[0119] S21, performing thread operation analysis on the simulation operation data information to obtain thread operation information;

[0120] S22, performing entity operation analysis on the simulation operation data information to obtain entity operation information;

[0121] S23, performing type operation analysis on the simulation operation data information to obtain type operation information;

[0122] S24, performing event operation analysis on the simulation operation data information to obtain event operation information;

[0123] S25, comprehensively analyzing the thread running information, the entity running information, the type running information and the event running information to obtain a comprehensive data analysis result.

[0124] Optionally, performing thread operation analysis on the simulation operation data information to obtain thread operation information includes:

[0125] S211, analyzing the event running time executed by each thread running in parallel to obtain event running time information;

[0126] S212, analyzing the entities executed by the threads running in parallel to obtain entity related information;

[0127] Entity-related information includes entity name, unique identifier, event execution time, and thread identifier;

[0128] S213, analyzing the operation efficiency of each thread running in parallel to obtain operation efficiency information;

[0129] S214, counting all entities running in a single thread to obtain entity list information;

[0130] S215: Integrate the event running time information, the entity related information, the running efficiency information and the entity list information to obtain thread running information.

[0131] Optionally, performing entity operation analysis on the simulation operation data information to obtain entity operation information includes:

[0132] S221, merging the event running time of the same entity executed by the same thread in each sampling period to obtain a first event running time;

[0133] S222: Compare the running time of the first event with a preset first threshold, sort the entities exceeding the preset first threshold, and obtain entity running information.

[0134] Optionally, performing type operation analysis on the simulation operation data information to obtain type operation information includes:

[0135] S231, merging the running time of the same type of entity executed by the same thread in each sampling period to obtain the second event running time;

[0136] S232: Compare the second event running time with a preset second threshold, sort the entity types exceeding the preset second threshold, and obtain type running information.

[0137] Optionally, performing event operation analysis on the simulation operation data information to obtain event operation information includes:

[0138] S241, merging the execution time of the same event type of the same thread in each sampling period to obtain the third event running time;

[0139] S242: Compare the third event running time with a preset third threshold, sort the event interfaces that exceed the preset third threshold, and obtain event running information.

[0140] Optionally, the optimizing and verifying the comprehensive data analysis results to obtain simulation efficiency analysis results includes:

[0141] S31, adjusting the threads of entity running in the simulation system according to the comprehensive analysis result of the data to obtain an optimized simulation system;

[0142] S32, collecting operation data of the optimized simulation system to obtain optimized simulation operation data information;

[0143] S33, analyzing the optimization simulation operation data information to obtain simulation efficiency analysis results.

[0144] It can be seen that the present invention proposes a simulation efficiency analysis based on the execution status of simulation events, which can go deep into the simulation system to find the simulation operation status. The present invention provides a method that can obtain the execution status of simulation events during the simulation operation process, which provides an implementation basis for analyzing the operation efficiency of the simulation system through the execution status of simulation events. A method for analyzing the simulation execution status from different dimensions based on simulation event data is proposed. By analyzing the operation status of the simulation entity model, the simulation component model, and the parallel simulation thread, a reliable basis can be provided for optimizing the simulation efficiency and improving the design and implementation of the simulation model. The present invention proposes the design and implementation of a simulation efficiency analysis system, which can provide a basis for the implementation of this patent. The method and technical implementation of the present invention can provide technical means to support the positioning of simulation runtime efficiency problems during the design, development, operation and maintenance of large-scale simulation systems.

[0145] Embodiment 2

[0146] See also Figure 2 , Figure 2 is a flow chart of another simulation efficiency analysis method based on simulation event execution status disclosed in an embodiment of the present invention. Figure 2 The simulation efficiency analysis method based on the simulation event execution status described is applied to analyze the operation efficiency of the simulation system, and the embodiment of the present invention does not limit it. Figure 2 As shown, the simulation efficiency analysis method based on the simulation event execution status may include the following operations:

[0147] 1. Customized collection service. Connect to the operation processing interface of the simulation platform and customize the data collection service for obtaining the unique identifiers of each thread, each entity, component, event interface name, model type name, and event execution overhead during the parallel simulation process.

[0148] 2. Configure the acquisition environment. Configure the acquisition service running parameters and build the acquisition data storage structure for typical simulation efficiency analysis based on the customized acquisition service, and configure the database startup and access parameters.

[0149] 3. Collect and store simulation operation data. Start the simulation. During the simulation operation, the customized collection service collects the event execution data of all entities during the simulation operation and stores it in the customized data structure.

[0150] 4. Determine the analysis indicators. Clarify the specific analysis requirements and analysis ideas, determine the processing flow of the simulation operation data, and the visualization method of the processing results.

[0151] 5. Analyze simulation operation data. This step is divided into thread operation analysis, entity operation analysis, type operation analysis, event operation analysis and comprehensive analysis.

[0152] 1) Thread operation analysis. The collected simulation event operation data is used as the analysis object, and the event operation time and entity related information executed by each thread running in parallel are analyzed. The operation speed is calculated in real time by thread in each sampling period, the overall operation efficiency is monitored in real time, and the list of all entities running in a single thread is counted. The specific calculation content is as follows:

[0153] a. The number of all entities running in a single thread

[0154] k=∑o i (where i=1, 2, 3, ...; oi is the entity running in a single thread; k is the total number of entities running in a single thread).

[0155] b. Each sampling period runs a single thread at a double speed

[0156] R=△t / t (where R is the running speed multiple of a single thread, △t is the difference between the simulation timestamps of the last and first simulation events executed by the thread within a sampling period, and t is the actual physical time taken by the thread to execute all simulation events within a sampling period).

[0157] c. The total time taken to execute simulation events on each thread in each sampling cycle

[0158] The total time taken by a single thread to execute a single entity: T object =∑Tj (where j = 1, 2, 3 ... n; T object The total time it takes to execute a single entity simulation event for this thread; T j The time taken for the jth simulation event to be executed for this entity).

[0159] Total execution time of a single thread: T thread =∑T object (k)(where k = 1, 2, 3 ...; T thread The total time it takes to execute simulation events for this thread; T object The total execution time of the kth entity in this thread).

[0160] d. Total time consumed after the simulation system is completed

[0161] Overall running time: T = Max{T thread (n)} (where n = 1, 2, 3...; T is the overall running time of the engine; T thread The total time taken to execute simulation events for the nth thread).

[0162] 2) Entity operation analysis. Based on the running status of entity events in each thread, the event running time of the same entity executed by the same thread is merged in each sampling period, and the running time threshold is selected to sort the entities that exceed the threshold. The threshold can be set according to the average running time of all entity objects in the simulation system, or it can be customized by the analyst based on the system construction requirements. The calculation content is as follows:

[0163] The total time taken by each entity to execute simulation events in each sampling period and the total time taken by the entity to run are calculated as follows:

[0164] The total execution time of a single entity object and a single thread: T object =∑T j (where j = 1, 2, 3, ..., T object : The total time taken to execute a single entity simulation event for this thread; T j The time taken for the jth simulation event to be executed for this entity).

[0165] The total execution time of all events of a single entity object: T ao =∑T object (n)(where n=1, 2, 3…, T object (n): the execution time of the entity in the nth thread; T ao The total time it takes to execute simulation events in all threads for this entity).

[0166] The overall running time of a single entity object is: Tso = Max{T object(n)} (where n = 1, 2, 3..., Tso: the running time of the entity object after the simulation system is completed; T object (n) is the time taken for the simulation event of the entity object to be executed in the nth thread).

[0167] 3) Type operation analysis. It mainly analyzes the operation of different types of models, combines the running time of the same type of entity executed by the same thread in each sampling period, selects the long running time threshold, and sorts the model types that exceed the threshold. The threshold can generally be set by the analyst according to the actual application requirements of the system, or it can be set according to the average running time of all entity types in the simulation system. The calculation content is as follows:

[0168] The total execution time of a single type in a single thread: T type =∑T j (where j = 1, 2, 3 ... n, T type : The total time taken to execute a single type of simulation event for this thread; T j The time taken for the jth simulation event to be executed for this type);

[0169] Total execution time of a single type: T at =∑T type (n)(where n=1, 2, 3…, T at The total execution time of this type of entity during the simulation system operation; T type (n) is the time when this type of entity is executed in the nth thread);

[0170] The overall running time of a single metatype is: Tst = Max{T type (n)} (where n = 1, 2, 3..., Tst: the overall running time of a single metatype; T type The execution time of this type in the nth thread).

[0171] 4) Event operation analysis. This is mainly done by simulating the event interface call and execution status of the system, combining the execution time of the same event type in the same thread in each sampling period, selecting the event operation threshold, and sorting the event interfaces that exceed the threshold. The threshold can generally be set by analysts based on scenarios and system requirements, or based on the average of the running time of all types of events. The calculation content is as follows:

[0172] The total execution time of a single event in a single thread: T event =∑T j (where j = 1, 2, 3, ..., T event : The total time taken to execute a single type of simulation event for this thread; T j The time taken for the jth simulation event to be executed for this type of event);

[0173] Total execution time of a single event: T ae =∑T event (n)(where n=1, 2, 3…, T ae The total execution time of this type of event; T event The total execution time of the nth thread for this type of event);

[0174] The overall running time of a single type of event: Tse = Max{T event (n)} (where n = 1, 2, 3..., Tse is the overall running time of a single type of event; T event This is the time taken for this type of event to be executed in the nth thread).

[0175] 5) Comprehensive analysis. Comprehensively analyze the running data in each thread of discrete event simulation, the simulation entities and their simulation components, model types and their calling interfaces, and locate the main entities, components, model types and interfaces that affect the simulation efficiency.

[0176] 6. Optimization verification. According to the comprehensive analysis results of the simulation operation data, manually configure and adjust the threads of entity operation in the simulation system, run the simulation and collect the operation data of each thread entity and its events, and compare the simulation operation efficiency before and after the adjustment of the simulation entity operation thread configuration. According to the optimization verification results, put forward application or development improvement suggestions for the entity model and its component model.

[0177] The specific optimization verification method is:

[0178] According to the comprehensive analysis results of the simulation operation data, manually configure and adjust the threads of entity operation in the simulation system, run the simulation and collect the operation data of each thread entity and its events to obtain optimized data information;

[0179] Get the pre-optimization data information before the simulation entity running thread configuration is adjusted;

[0180] Normalizing the data information before optimization to obtain normalized data information before optimization;

[0181] The normalization function is Among them, x max is the maximum value of data information, x min is the minimum value of data information, data information is x(t), and x'(t) is the normalized data information;

[0182] The data information before normalization optimization is decomposed by EMD into IMFs with different time scales, simple components and relatively stable. All the maximum and minimum points of x'(t) are determined, and the corresponding upper envelope e is obtained by polynomial interpolation. max (t) and the lower envelope e min(t), and the mean m(t)=(e min (t)+e max (t)) / 2, extract the detail h(t) according to x'(t) and the mean m(t), let h(t) = x'(t)-m(t), if h(t) conforms to IMF, it is the first modal component IMF1 (denoted as c1(t)); otherwise let h(t) = x'(t), continue to decompose, and finally decompose into Among them, r(t) is the remainder; IMF component c i (t), i = 1, 2, ..., N, which is the characteristic parameter information before optimization, and N is the number of IMF components.

[0183] The optimized data information is normalized to obtain normalized optimized data information; according to the above steps, feature extraction is performed on the normalized optimized data information to obtain optimized feature parameter information;

[0184] The hidden Markov model is used to calculate the feature parameter information before and after optimization to obtain a matching score, and the optimization verification result is determined according to the matching score.

[0185] In the real world, there are always different relatively independent events happening at the same time, that is, events are executed in parallel. In a simulation system based on discrete events, each entity model has relative independence, and the entity's activity events can be executed in parallel. The system focuses on describing the interaction between the entities that make up the system, so it is basically implemented using the Parallel Distributed Event Simulation (PDES) technology.

[0186] The multi-core and multi-threaded parallel computing technology of modern computers provides the basis for parallel simulation. Parallel discrete event simulation fully utilizes the parallel computing capabilities of high-performance computer platforms. It processes events in the simulation process in parallel on multiple processors while ensuring the logical order of event processing. It can achieve faster event execution than the real world, greatly improving simulation efficiency. Parallel discrete event simulation divides the simulation system into multiple logical threads according to the parallel structure and executes them on multiple processors. These logical threads can correspond to the event execution of entities, and entities interact with each other through data information with timestamps. Figure 3 shown.

[0187] The operation process of the simulation system is the execution process of all submitted events of each simulation entity, and the simulation duration is the duration used to execute all simulation events. In the parallel execution process of simulation events, events that take a long time are still an important factor affecting the simulation execution time. By collecting the running time of all events during the simulation execution process and finding the entity with the longest event execution time, it is possible to find the entity that consumes the most resources during the simulation process, and also find a certain type of event that consumes the most resources, thereby locating the entities or events that affect the simulation operation efficiency, and providing targeted directions for efficiency improvement or model improvement.

[0188] The principle of the method proposed in the present invention is to provide specific tools to collect the runtime progress of all events during the operation of the simulation system, and to trace all the subjects (i.e., simulation entities) that submit execution events, and finally to obtain the resource consumption of different types of models, different types of components, and different entity objects during the simulation operation. By comparing the execution times and time consumption of simulation objects at different levels such as component models, entity models, and model instances, the models, interfaces, and entities that consume the most resources are obtained, thereby accurately locating the reasons that affect the efficiency of the simulation operation. The main system components and their interactions are as follows: Figure 4 shown.

[0189] The simulation efficiency analysis based on discrete event data can be realized according to the hierarchical, modular and standardized design ideas. Figure 5 As shown in the figure, in the specific design implementation, the analysis and application of simulation efficiency depends on data, services and tools. From bottom to top, it can be divided into data layer, service layer, tool layer and application layer.

[0190] The data layer mainly includes all source data, process data and result data used in simulation efficiency analysis, including simulation entity model data, simulation component model data, simulation scenario data, simulation operation process data, simulation analysis result data, etc.

[0191] The service layer mainly provides core services to support simulation efficiency analysis, including simulation operation services, simulation operation data collection services, simulation operation process data storage services, and simulation operation data analysis services.

[0192] The tool layer mainly includes human-computer interaction tools related to simulation efficiency analysis, including data acquisition tools, data acquisition configuration tools, database operation tools, data analysis tools, result presentation tools and simulation operation control tools.

[0193] The application layer mainly provides the ability to analyze the number and duration of simulation models, events and objects, as well as the operation status of event threads and display the results. Figure 6 It is a functional schematic diagram of the simulation efficiency analysis software platform disclosed in an embodiment of the present invention.

[0194] Embodiment 3

[0195] See also Figure 7 , Figure 7 The following is a flow chart of a simulation efficiency analysis device based on the execution status of simulation events disclosed in an embodiment of the present invention. Figure 7 The simulation efficiency analysis device based on the simulation event execution status described is applied to analyze the operation efficiency of the simulation system, and the embodiment of the present invention is not limited thereto. Figure 7 As shown, the simulation efficiency analysis device based on the simulation event execution status may include the following operations:

[0196] S301, a data collection module, used to collect operation data of the parallel simulation operation process to obtain simulation operation data information;

[0197] The simulation operation data information includes the event execution time of each thread running in parallel, the event execution time of the same entity executed by the same thread in each sampling period, the execution time of the same type of entity executed by the same thread in each sampling period, and the execution time of the same event type of the same thread in each sampling period;

[0198] S302, a data analysis module, used to analyze the simulation operation data information to obtain a comprehensive data analysis result;

[0199] S303, a simulation efficiency analysis module, is used to optimize and verify the comprehensive data analysis results to obtain simulation efficiency analysis results.

[0200] Embodiment 4

[0201] See also Figure 8 , Figure 8 It is a flow chart of another simulation efficiency analysis device based on the execution status of simulation events disclosed in an embodiment of the present invention. Figure 8 The simulation efficiency analysis device based on the simulation event execution status described is applied to analyze the operation efficiency of the simulation system, and the embodiment of the present invention is not limited thereto. Figure 8 As shown, the simulation efficiency analysis device based on the simulation event execution status may include the following operations:

[0202] A memory 401 storing executable program codes;

[0203] a processor 402 coupled to the memory 401;

[0204] The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the simulation efficiency analysis method based on the execution status of simulation events described in the first and second embodiments.

[0205] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.

[0206] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method 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 above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0207] Finally, it should be noted that the simulation efficiency analysis method and device based on the execution of simulation events disclosed in the embodiment of the present invention only discloses the preferred embodiments of the present invention, which are only used to illustrate the technical scheme of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical schemes described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical schemes from the spirit and scope of the technical schemes of the embodiments of the present invention.

Claims

1. A simulation efficiency analysis method based on simulation event execution. It is characterized in that The method comprises: S1, collect operation data of the parallel simulation operation process to obtain simulation operation data information, including: S11, analyzing the parallel simulation running process to obtain the running interface information of the parallel simulation running process; the running interface information includes each thread unique identifier, each entity unique identifier, component unique identifier, event interface name and model type name; S12, configuring the collection environment to obtain collection environment data information; the collection environment data information includes a storage structure of the collection data, database startup parameter information and access parameter information; S13, collecting operation data of the parallel simulation operation process according to the operation interface information of the parallel simulation operation process and the collection environment data information, to obtain simulation operation data information; The simulation operation data information includes the event execution time of each thread running in parallel, the event execution time of the same entity executed by the same thread in each sampling period, the execution time of the same type of entity executed by the same thread in each sampling period, and the execution time of the same event type of the same thread in each sampling period; S2, analyzing the simulation operation data information to obtain comprehensive data analysis results, including: S21, performing thread operation analysis on the simulation operation data information to obtain thread operation information, including: S211, analyzing the event running time executed by each thread running in parallel to obtain event running time information; S212, analyzing the entities executed by the threads running in parallel to obtain entity related information; S213, analyzing the operation efficiency of each thread running in parallel to obtain operation efficiency information; S214, counting all entities running in a single thread to obtain entity list information; S215, integrating the event running time information, the entity related information, the running efficiency information and the entity list information to obtain thread running information; S22, performing entity operation analysis on the simulation operation data information to obtain entity operation information, including: S221, merging the event running time of the same entity executed by the same thread in each sampling period to obtain a first event running time; S222, comparing the first event running time with a preset first threshold, sorting entities exceeding the preset first threshold, and obtaining entity running information; S23, performing type operation analysis on the simulation operation data information to obtain type operation information, including: S231, merging the running time of the same type of entity executed by the same thread in each sampling period to obtain the second event running time; S232, comparing the second event running time with a preset second threshold, sorting entity types exceeding the preset second threshold, and obtaining type running information; S24, performing event operation analysis on the simulation operation data information to obtain event operation information, including: S241, merging the execution time of the same event type of the same thread in each sampling period to obtain the third event running time; S242, comparing the third event running time with a preset third threshold, sorting the event interfaces exceeding the preset third threshold, and obtaining event running information; S25, comprehensively analyzing the thread running information, the entity running information, the type running information, and the event running information to obtain a comprehensive data analysis result; S3, optimizing and verifying the comprehensive data analysis results to obtain simulation efficiency analysis results.

2. The simulation efficiency analysis method based on the simulation event execution status according to claim 1, It is characterized in that The optimizing and verifying the comprehensive data analysis results to obtain simulation efficiency analysis results includes: S31, adjusting the threads of entity running in the simulation system according to the comprehensive analysis result of the data to obtain an optimized simulation system; S32, collecting operation data of the optimized simulation system to obtain optimized simulation operation data information; S33, analyzing the optimization simulation operation data information to obtain simulation efficiency analysis results.

3. A simulation efficiency analysis device based on the execution status of simulation events, It is characterized in that The device comprises: The data acquisition module is used to collect operation data of the parallel simulation operation process and obtain simulation operation data information, including: S11, analyzing the parallel simulation running process to obtain the running interface information of the parallel simulation running process; the running interface information includes each thread unique identifier, each entity unique identifier, component unique identifier, event interface name and model type name; S12, configuring the collection environment to obtain collection environment data information; the collection environment data information includes a storage structure of the collection data, database startup parameter information and access parameter information; S13, collecting operation data of the parallel simulation operation process according to the operation interface information of the parallel simulation operation process and the collection environment data information, to obtain simulation operation data information; The simulation operation data information includes the event execution time of each thread running in parallel, the event execution time of the same entity executed by the same thread in each sampling period, the execution time of the same type of entity executed by the same thread in each sampling period, and the execution time of the same event type of the same thread in each sampling period; The data analysis module is used to analyze the simulation operation data information to obtain comprehensive data analysis results, including: S21, performing thread operation analysis on the simulation operation data information to obtain thread operation information, including: S211, analyzing the event running time executed by each thread running in parallel to obtain event running time information; S212, analyzing the entities executed by the threads running in parallel to obtain entity related information; S213, analyzing the operation efficiency of each thread running in parallel to obtain operation efficiency information; S214, counting all entities running in a single thread to obtain entity list information; S215, integrating the event running time information, the entity related information, the running efficiency information and the entity list information to obtain thread running information; S22, performing entity operation analysis on the simulation operation data information to obtain entity operation information, including: S221, merging the event running time of the same entity executed by the same thread in each sampling period to obtain a first event running time; S222, comparing the first event running time with a preset first threshold, sorting entities exceeding the preset first threshold, and obtaining entity running information; S23, performing type operation analysis on the simulation operation data information to obtain type operation information, including: S231, merging the running time of the same type of entity executed by the same thread in each sampling period to obtain the second event running time; S232, comparing the second event running time with a preset second threshold, sorting entity types exceeding the preset second threshold, and obtaining type running information; S24, performing event operation analysis on the simulation operation data information to obtain event operation information, including: S241, merging the execution time of the same event type of the same thread in each sampling period to obtain the third event running time; S242, comparing the third event running time with a preset third threshold, sorting the event interfaces exceeding the preset third threshold, and obtaining event running information; S25, comprehensively analyzing the thread running information, the entity running information, the type running information, and the event running information to obtain a comprehensive data analysis result; The simulation efficiency analysis module is used to optimize and verify the comprehensive data analysis results to obtain simulation efficiency analysis results.

4. A simulation efficiency analysis device based on the execution of simulation events, It is characterized in that The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the simulation efficiency analysis method based on the execution status of simulation events as described in any one of claims 1-2.