A safety training simulation rehearsal method and device based on digital twinning and a medium

By generating a task instruction mapping table and a role responsibility matrix, calculating collaboration conflict scores and resource usage frequency, and dynamically adjusting task priorities, the problems of inconsistent task execution and resource scheduling conflicts under the participation of multiple roles are solved, thereby improving the stability and efficiency of safety training simulation and rehearsal.

CN122134277APending Publication Date: 2026-06-02HUANENG (DALIAN) THERMAL POWER CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUANENG (DALIAN) THERMAL POWER CO LTD
Filing Date
2026-02-10
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In digital twin security training simulations involving multiple roles, differences in role responsibilities and overlapping task processes lead to inconsistent task execution, imbalanced collaboration rhythms, difficulty in maintaining synchronization, and frequent resource scheduling conflicts, affecting the stability and efficiency of simulation training.

Method used

By acquiring role task data and simulation operation logs, a task instruction mapping table and a role responsibility matrix are generated. Instruction response time and resource usage frequency are calculated, collaborative conflict scoring and task scheduling data are constructed, and the role simulation status and task priority are dynamically adjusted to achieve state consistency and reasonable resource allocation.

Benefits of technology

Under complex collaborative conditions, the simulation and rehearsal process for safety training was kept stable and orderly, improving the controllability and safety of the training and solving the problems of inconsistent role execution states and unbalanced resource usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122134277A_ABST
    Figure CN122134277A_ABST
Patent Text Reader

Abstract

This invention discloses a method, device, and medium for security training simulation and rehearsal based on digital twins, relating to the field of digital twin simulation technology. The method includes: acquiring role task data and simulation operation log data, wherein the role task data includes role number, scope of responsibility, and instruction permissions, and the simulation operation log data includes operation time, trigger instruction, and resource number; generating a task instruction mapping table and a role responsibility matrix based on the role task data and simulation operation log data, and calculating instruction response time values ​​and resource usage frequency values ​​using the simulation operation log data; generating a collaborative conflict score based on the task instruction mapping table, role responsibility matrix, and instruction response time values, and constructing task scheduling data using the collaborative conflict score and resource usage frequency values; this invention effectively ensures the stable operation and orderly progress of security training simulation and rehearsal under complex collaborative conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital twin simulation technology, specifically to a method for safety training simulation and rehearsal based on digital twins. Background Technology

[0002] In the fields of safety production, emergency response, and high-risk operation training, simulation training based on real work processes is gradually developing towards high realism and multi-role collaboration. By introducing digital twin technology to map the real work environment, operation objects, and personnel behavior, the training process can restore the collaborative operation relationship under complex working conditions without introducing actual risks. This allows trainees to conduct repeated drills under conditions of multi-role participation and overlapping task processes. This type of simulation pre-drill has a clear application foundation in improving the controllability, repeatability, and safety of training, and is gradually becoming an important technical means in complex safety training scenarios.

[0003] Currently, in the process of safety training simulation and rehearsal based on digital twins, when the number of participating roles increases and there are significant differences in the scope of responsibilities and command permissions of each role, task execution often presents a state of parallel progress and phased overlap. It is difficult for different roles to keep their response rhythm, operation sequence and time consumption to task commands synchronized, which can easily lead to the accumulation of state deviations during the simulation process, resulting in problems such as inconsistent role execution states and unbalanced collaboration rhythms. This makes it difficult for the overall simulation training to stably reflect the operating state under real collaborative operation conditions.

[0004] Secondly, in the simulation pre-run process involving multiple roles, due to the complex relationships between task instructions such as resource sharing, execution order constraints, and overlapping responsibilities, scheduling conflicts are likely to occur when different roles use simulation resources and execute task nodes. If there is a lack of unified characterization of conflict risks and dynamic scheduling basis, it is difficult to reasonably adjust task priorities and role execution order during simulation operation, which leads to rigid task division, unbalanced resource consumption, and affects the overall collaborative efficiency of safety training simulation under high concurrency operation conditions. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a method, equipment, and medium for security training simulation and pre-play based on digital twins.

[0006] A security training simulation and rehearsal method based on digital twins, the method comprising: S11: Obtain role task data and simulation operation log data. The role task data includes role number, scope of responsibility, and instruction permissions. The simulation operation log data includes operation time, trigger instruction, and resource number. S12: Generate a task instruction mapping table and a role responsibility matrix based on role task data and simulation operation log data, and calculate instruction response time value and resource usage frequency value through simulation operation log data; S13: Based on the task instruction mapping table, role responsibility matrix and instruction response time value, generate a collaborative conflict score, and construct task scheduling data by combining the collaborative conflict score with the resource usage frequency value; S14: Based on the task scheduling data and the role responsibility matrix, calculate the state offset value and conflict level score. If the state offset value is greater than the predetermined synchronization tolerance threshold and the conflict level score exceeds the preset intervention threshold, then update the role simulation state in the digital twin model and reorder the task priorities.

[0007] Furthermore, the steps for generating the task instruction mapping table and role responsibility matrix are as follows: S121, Based on the role number and responsibility scope fields in the role task data, count the operable task instruction fields corresponding to all roles and generate a set of role task instructions; S122, construct instruction attribution mapping pairs between instructions and roles by using the instruction content and operation frequency fields in the role task instruction set, and generate a task instruction mapping table; S123, based on the responsibility scope field and instruction permission field in the role task data, extract the responsibility and permission metadata set for each role.

[0008] Furthermore, the execution logic of step S122 is as follows: S122.1, Based on the task classification field in the role task instruction set, extract tasks according to task stages to generate a staged task instruction subset; S122.2, construct a mapping pair between the instruction number and role number fields in the phased task instruction subset to generate a phase-role instruction mapping structure; S122.3 Based on the stage-role instruction mapping structure and the temporal order in the role execution log data, redundant instruction items are removed to generate a standardized task instruction mapping.

[0009] Furthermore, the steps for calculating the instruction response time value and resource usage frequency value are as follows: S124, Based on the operation time field and trigger instruction field in the simulation operation log data, calculate the time difference between adjacent instruction pairs and obtain the delay time data; S125: Calculate the average delay time value under the role dimension by using the time difference sequence of different role commands in the delay time data, and generate the command response time value; S126. Based on the resource number field in the simulation operation log data, count the number of times each type of resource is called by different roles and generate a resource call frequency statistics table. S127. Based on the number of times each type of resource is called in the resource call frequency statistics table, and combined with the instruction quantity standardization coefficient, generate the resource occupancy frequency value.

[0010] Furthermore, the execution logic of step S126 is as follows: S126.1 Extract all resource number fields and their corresponding operation time intervals from the simulation operation log data to construct a resource operation time set; S126.2, Calculate the resource access density per unit time based on the number of calls for each resource number in the resource operation time set; S126.3, by matching and updating the resource access density data per unit time with the resource call frequency statistics table, an enhanced resource call frequency statistics table is generated.

[0011] Furthermore, the steps for constructing task scheduling data are as follows: S131, based on the joint structure of the task instruction mapping table, the role responsibility matrix and the instruction response time value, construct a multi-dimensional task cross-graph of the role execution process; S132, calculate the role cross-conflict value by using the time weight and instruction concurrency on each path in the multi-task cross-graph; S133, perform node fusion processing based on role cross-conflict value and resource occupation frequency value to generate role-resource conflict matching matrix; S134, based on the role-resource conflict matching matrix, extracts the task node weights under the conflict level dimension to construct task scheduling data.

[0012] Furthermore, the steps for calculating the state offset value and conflict level score are as follows: S141, Calculate the actual task delay based on the task node time weight in the task scheduling data and the role synchronization constraint value in the role responsibility matrix; S142, Generate a character state offset difference sequence based on the difference between the actual task delay and the theoretical cooperative step difference value; S143, generate the state offset value by the average offset and the maximum offset value of each character node in the character state offset difference sequence; S144, combining task scheduling data and resource usage frequency values, generates a conflict level score based on the conflict overlap rate in the role-resource path.

[0013] Furthermore, the steps for updating the role simulation states and reordering task priorities in the digital twin model are as follows: S145, by comparing the state offset value with the conflict level score with the preset synchronization tolerance threshold and intervention threshold, the set of role numbers that meet the update conditions is identified; S146, Extract the current simulation status information and task execution progress record corresponding to the role number set, and generate a simulation status update request table; S147, Synchronize the role status change data in the simulation status update request table to the digital twin model, and construct the digital twin status update list; S148, based on the update priority factor of each role in the digital twin state update list, adjust the sorting order of their pending tasks and reorder the task priorities.

[0014] An electronic device, comprising: Memory, used to store computer software programs; A processor is used to read and execute the computer software program, thereby implementing the digital twin-based security training simulation and rehearsal method as described in any one of claims 1 to 8.

[0015] A non-transitory computer-readable storage medium storing a computer software program, which, when executed by a processor, implements the security training simulation and rehearsal method based on digital twins as described in any one of claims 1 to 8.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: In the fields of safety production, emergency response, and high-risk operation training, simulation training based on real work processes is gradually developing towards high realism and multi-role collaboration. By introducing digital twin technology to map the real work environment, operation objects, and personnel behavior, the training process can restore the collaborative operation relationship under complex working conditions without introducing actual risks. This allows trainees to conduct repeated drills under conditions of multi-role participation and overlapping task processes. This type of simulation pre-drill has a clear application foundation in improving the controllability, repeatability, and safety of training, and is gradually becoming an important technical means in complex safety training scenarios.

[0017] Currently, in the process of safety training simulation and rehearsal based on digital twins, when the number of participating roles increases and there are significant differences in the scope of responsibilities and command permissions of each role, task execution often presents a state of parallel progress and phased overlap. It is difficult for different roles to keep their response rhythm, operation sequence and time consumption to task commands synchronized, which can easily lead to the accumulation of state deviations during the simulation process, resulting in problems such as inconsistent role execution states and unbalanced collaboration rhythms. This makes it difficult for the overall simulation training to stably reflect the operating state under real collaborative operation conditions.

[0018] Secondly, in the simulation pre-run process involving multiple roles, due to the complex relationships between task instructions such as resource sharing, execution order constraints, and overlapping responsibilities, scheduling conflicts are likely to occur when different roles use simulation resources and execute task nodes. If there is a lack of unified characterization of conflict risks and dynamic scheduling basis, it is difficult to reasonably adjust task priorities and role execution order during simulation operation, which leads to rigid task division, unbalanced resource consumption, and affects the overall collaborative efficiency of safety training simulation under high concurrency operation conditions.

[0019] In summary, in a safety simulation training scenario where roles have significantly different responsibilities and task processes are highly overlapping, this invention, through unified characterization and dynamic linkage control of the parallel operation status of multiple roles, task conflict risks, and scheduling relationships, ensures that the simulation status of each role remains consistent and promotes the sustainable adjustment of task division under collaborative constraints. This, in turn, guarantees the stable operation and orderly progress of the safety training simulation pre-training process under complex collaborative conditions. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0021] Figure 1 The flowchart shows a security training simulation pre-play method based on digital twin provided in Embodiment 1 of the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] Example 1 Please see Figure 1 As shown in the figure, this embodiment discloses a security training simulation and rehearsal method based on digital twins, the method including: S11: Obtain role task data and simulation operation log data. The role task data includes role number, scope of responsibility, and instruction permissions. The simulation operation log data includes operation time, trigger instruction, and resource number. In a specific embodiment, when acquiring role task data, multi-role task description information is read from the role configuration file or role management module of the safety training simulation scenario. The role task data includes at least a role number, scope of responsibility, and instruction permissions. The role number is used to identify the unique identity of different participating roles in the simulation, avoiding role confusion during parallel operation of multiple roles. The scope of responsibility describes the task stage or operation boundary assigned to the role in the simulation task process, such as limiting the role to participate only in the preparation stage, coordination stage, or disposal stage. Instruction permissions limit the types of instructions that the role can trigger during the simulation, constraining the role's operation behavior to not exceed its scope of responsibility, thereby providing basic data support for the subsequent construction of the role responsibility matrix.

[0024] In one specific embodiment, when acquiring simulation operation log data, all role operations during the simulation training process are recorded in real time or summarized offline. The simulation operation log data includes at least the operation time, trigger command, and resource number. The operation time is used to record the specific time when the command is triggered, and a unified time base is used for recording to ensure the consistency of subsequent command response time calculations. The trigger command is used to record the simulation command identifier actually executed by the role at that time point, which is consistent with the command permission. The resource number is used to record the simulation resource identifier called during the execution of the command, such as simulation equipment, virtual terminal, or shared operation unit, for subsequent analysis of resource usage frequency and resource conflict.

[0025] In one specific embodiment, the role task data and simulation operation log data are associated and bound through role numbers, so that each simulation operation log data can be traced back to the corresponding role task configuration, thereby ensuring a consistent data correspondence between role responsibility constraints, instruction permission boundaries and actual operation behavior.

[0026] It should be noted that the simulation operation log data can come from a single or multiple safety training simulation processes, and cumulative collection is allowed across training scenarios, so as to perform statistical analysis and stability assessment on the characteristics of multi-role parallel operation in subsequent steps.

[0027] S12: Generate a task instruction mapping table and a role responsibility matrix based on role task data and simulation operation log data, and calculate instruction response time value and resource usage frequency value through simulation operation log data; Specifically, the steps for generating the task instruction mapping table and role responsibility matrix are as follows: S121, Based on the role number and responsibility scope fields in the role task data, count the operable task instruction fields corresponding to all roles and generate a set of role task instructions; In one specific embodiment, the role number, scope of responsibility field, and instruction permission field of each record in the role task data are read. All task instructions that conform to the scope of responsibility are summarized to construct a complete set of task instructions that the role has the authority to execute in the simulation. This process is classified and aggregated by role, extracting the task stage and instruction items within the scope of operation for each type of role, and finally generating a set of role task instructions grouped by role number. Each set contains several clearly defined task instructions.

[0028] S122, construct instruction attribution mapping pairs between instructions and roles by using the instruction content and operation frequency fields in the role task instruction set, and generate a task instruction mapping table; In one specific embodiment, each instruction in the role task instruction set is traversed, and the number of times it appears in historical simulation training tasks is counted, i.e., the corresponding operation frequency field. Each instruction is combined with the role number that owns the instruction to form an instruction affiliation mapping pair. When an instruction corresponds to multiple roles, it is preferentially assigned to the role with the higher operation frequency field value. If the frequencies are the same, the assignment is based on the priority of the role number (e.g., the smaller the number, the higher the priority), and finally a task instruction mapping table covering all task instructions is formed.

[0029] Specifically, the execution logic of step S122 is as follows: S122.1, Based on the task classification field in the role task instruction set, extract tasks according to task stages to generate a staged task instruction subset; In one specific embodiment, each task instruction is grouped according to the stage marker of its task classification field (e.g., "preparation stage", "operation stage", "completion stage"), generating multiple staged task instruction subsets divided by stage. Each subset contains all the instruction entries that can be operated by all roles within that stage, preparing for the subsequent generation of a mapping structure with more time-structured characteristics.

[0030] S122.2, construct a mapping pair between the instruction number and role number fields in the phased task instruction subset to generate a phase-role instruction mapping structure; In a specific embodiment, the instruction number is read from each subset of staged task instructions and combined with the corresponding role number field in the original role task instruction set to form a key-value mapping relationship, namely "stage label → (instruction number, role number)", to construct a stage-role instruction mapping structure with temporal segmentation characteristics, which is used to reflect the task collaboration and interleaving relationship between roles in different stages.

[0031] S122.3 Based on the stage-role instruction mapping structure and the temporal order in the role execution log data, redundant instruction items are removed to generate a standardized task instruction mapping.

[0032] In one specific embodiment, the instruction execution time records in the role execution log data are read, the instruction list is sorted according to its timestamp order, and cross-compared with the stage-role instruction mapping structure. Instructions that appear too infrequently in the log or have been repeatedly covered by the stage are filtered out to avoid duplicate allocation or execution, and finally a standardized task instruction mapping with a clear structure and unique content is formed.

[0033] S123, based on the responsibility scope field and instruction permission field in the role task data, extract the responsibility and permission metadata set for each role.

[0034] In one specific implementation, the responsibility scope field and instruction permission field corresponding to each record are extracted from the role task data, and the two are jointly modeled: when the responsibility scope of a role covers multiple operation links and the corresponding permissions include cross-stage instruction sets, it is regarded as a "multi-segment responsibility role," and resource conflicts and concurrent coordination should be given priority in subsequent task coordination. Finally, the responsibility and permission metadata set corresponding to each role is output to generate the role responsibility matrix.

[0035] Specifically, the steps for calculating instruction response time and resource usage frequency are as follows: S124, Based on the operation time field and trigger instruction field in the simulation operation log data, calculate the time difference between adjacent instruction pairs and obtain the delay time data; In one specific embodiment, records are read one by one from the simulation operation log data. The logs are arranged in chronological order according to the operation time field. Within the log range corresponding to the same role number, the time difference between any two adjacent trigger instruction fields is calculated. This time difference represents the interval from the triggering of the latter instruction to its completion relative to the former instruction, and this interval is recorded as a delay time data.

[0036] It should be noted that if two adjacent log records have the same trigger command field, then the pair of records will not be included in the calculation, in order to avoid duplicate commands interfering with the delay time.

[0037] S125: Calculate the average delay time value under the role dimension by using the time difference sequence of different role commands in the delay time data, and generate the command response time value; In one specific embodiment, the acquired delay time data is grouped according to role number, and the average of all time differences corresponding to that role is performed within each group. This averaging process uses an arithmetic mean, which involves summing all delay time values ​​under the same role and dividing by the number of delay time entries corresponding to that role, thereby obtaining the instruction response time value of that role during the simulation training process.

[0038] It should be noted that this averaging method is used to reflect the overall responsiveness of a character to instructions in a parallel operation environment, and its calculation rules are based on the statistical results of multiple rounds of simulation training.

[0039] S126. Based on the resource number field in the simulation operation log data, count the number of times each type of resource is called by different roles and generate a resource call frequency statistics table.

[0040] In one specific embodiment, the simulation operation log data is traversed, and the resource number field and corresponding role number in each log entry are read. Using resources as the statistical object, the number of times each type of resource is called by different roles throughout the entire simulation cycle is accumulated. Using "resource number - number of calls" as the basic structure, the statistical results are written into a resource call frequency statistics table. This table describes the usage intensity of various resources during multi-role collaborative operations.

[0041] Specifically, the execution logic of step S126 is as follows: S126.1 Extract all resource number fields and their corresponding operation time intervals from the simulation operation log data to construct a resource operation time set; In one specific embodiment, when reading simulation operation log data, the resource number field and its associated operation time field corresponding to each record are extracted synchronously, and multiple operations on the same resource within a continuous time period are merged into a complete operation time interval. Taking a resource as a unit, all corresponding operation time intervals are summarized to form a resource operation time set reflecting resource time occupancy.

[0042] S126.2, Calculate the resource access density per unit time based on the number of calls for each resource number in the resource operation time set; In one specific embodiment, for each type of resource in the resource operation time set, the number of times that resource is called within all its operation time intervals is counted, and the ratio of this number of calls to the total duration of the corresponding operation time interval is calculated. This ratio is used to represent the frequency of resource access within a unit of time, and the calculation result is used as the access density of that resource per unit of time.

[0043] It should be noted that the calculation rule for access density per unit time is used to reflect whether there is a risk of concentrated resource occupation during the simulation training process, and its calculation method is based on the simulation running load experience.

[0044] S126.3, by matching and updating the resource access density data per unit time with the resource call frequency statistics table, an enhanced resource call frequency statistics table is generated.

[0045] In one specific embodiment, the access density per unit time for each type of resource is correlated and matched with the original resource call frequency statistics table, and an access density weight is introduced to correct the original call count. For resources with higher access density values, their call frequency weight is correspondingly amplified in the statistics table to highlight the scheduling risk of high-time-occupancy resources, ultimately forming an enhanced resource call frequency statistics table that includes both call count and time density information.

[0046] S127. Based on the number of times each type of resource is called in the resource call frequency statistics table, and combined with the instruction quantity standardization coefficient, generate the resource occupancy frequency value.

[0047] In one specific embodiment, the number of times each type of resource is invoked is read from the enhanced resource call frequency statistics table, and then standardized by combining this with the total number of instructions within the corresponding task phase. This standardization process, by dividing the number of resource calls by the total number of instructions within that phase, makes resource usage comparable across different task scales, thereby generating a resource usage frequency value with a unified dimension.

[0048] It should be noted that the instruction quantity standardization coefficient is set to avoid bias in the resource consumption assessment results of high instruction density scenarios, and its value is set based on the statistical results of the scale of multiple simulation tasks.

[0049] S13: Based on the task instruction mapping table, role responsibility matrix and instruction response time value, generate a collaborative conflict score, and construct task scheduling data by combining the collaborative conflict score with the resource usage frequency value; In a specific embodiment, a task instruction mapping table serves as the basis for the correspondence between roles and instructions, and a role responsibility matrix provides a structural description of the parallelizable and constrained execution relationships between roles. Simultaneously, instruction response time values ​​for each role are introduced to reflect the time consumption characteristics of roles during simulation execution. Under the common constraints of these three types of data, potential time and responsibility conflicts during multi-role parallel execution are quantitatively evaluated, generating a collaborative conflict score for subsequent scheduling decisions. Furthermore, this score is combined with resource occupancy frequency values ​​to construct task scheduling data for simulation scheduling control.

[0050] Specifically, the steps for constructing task scheduling data are as follows: S131, based on the joint structure of the task instruction mapping table, the role responsibility matrix and the instruction response time value, construct a multi-dimensional task cross-graph of the role execution process; In a specific embodiment, based on the instruction affiliation recorded in the task instruction mapping table, instructions executed by different roles within the same task phase are sequentially linked in chronological order. At the same time, according to the definition of role parallelism and constraints in the role responsibility matrix, mandatory sequential constraints are established for instruction pairs that are not allowed to be executed in parallel.

[0051] Based on this, each instruction node is associated with the instruction response time value of its corresponding role, which is used to mark the time weight of the instruction in the execution process, thereby constructing a multi-dimensional task cross-graph containing information on roles, instructions, time, and responsibility constraints.

[0052] It should be noted that the multi-task cross diagram is used to describe the intersection of multi-role tasks in the time and responsibility dimensions. Its structure is derived from the actual process setting of role collaboration in the simulation training scenario.

[0053] S132, calculate the role cross-conflict value by using the time weight and instruction concurrency on each path in the multi-task cross-graph; In a specific embodiment, the execution paths composed of different roles are traversed one by one in the multi-task cross graph, and the instruction response time value corresponding to each instruction node in the path is counted and used as the time weight of the path.

[0054] Simultaneously, the number of parallel instructions existing within the same time window is statistically analyzed to obtain the instruction concurrency level of that path. During the calculation, time weight is assigned a higher weight, and instruction concurrency level is assigned a second higher weight, with the time weight having a higher weight ratio than the concurrency level, to highlight the impact of response latency on coordination conflicts.

[0055] The weighted time weight and the degree of instruction concurrency are combined to obtain the role cross-conflict value under the corresponding path.

[0056] It should be noted that the weight ratio is set based on empirical settings for time delay sensitivity in simulation training, in order to ensure that the conflict assessment results are consistent with the actual training experience.

[0057] S133, perform node fusion processing based on role cross-conflict value and resource occupation frequency value to generate role-resource conflict matching matrix; In one specific embodiment, the cross-conflict value of each role in the multi-task cross-graph is paired with the resource occupancy frequency value of each type of resource used by that role in the simulation task, constructing an initial conflict vector set with the mapping relationship of "(role number, resource number) → conflict score". The system aggregates the conflict scores of each role and resource combination, where the weight of the role cross-conflict value is higher than that of the resource occupancy frequency value, to emphasize the impact of cross-coordination conflicts between tasks on the overall scheduling pressure.

[0058] During the integration process, if the resource usage frequency of a certain resource is significantly higher than that of other resources (e.g., more than 1.5 times the average resource access density in the task scenario), its corresponding conflict score is non-linearly enhanced to reflect the amplification effect of high-frequency resources in conflict propagation. Finally, a role-resource conflict matching matrix is ​​generated to describe the conflict risk relationship between roles and resources. This matrix, in a two-dimensional structure, expresses the level of collaborative conflict that each role may trigger when using each type of resource, providing a scoring basis for subsequent task priority adjustments.

[0059] S134, based on the role-resource conflict matching matrix, extracts the task node weights under the conflict level dimension to construct task scheduling data.

[0060] In one specific embodiment, the conflict score values ​​of all role numbers and their corresponding resource numbers are extracted from the role-resource conflict matching matrix, and the conflict levels are divided according to the score range, for example, into three levels: low conflict, medium conflict, and high conflict. The system binds each task node to its corresponding role and resource according to the task instruction number in the task instruction mapping table, and then assigns a corresponding task weight to the task node based on the conflict score level of the combination.

[0061] In this system, high-conflict-level task nodes have higher weights than medium-conflict-level nodes, which in turn have higher weights than low-conflict-level nodes. Task node weights represent the urgency and coordination pressure of a task during scheduling and execution. The system combines task stage attributes and node weights to construct task scheduling data containing fields such as task number, execution priority, and node weight, which serves as the basis for dynamic scheduling control in subsequent simulations.

[0062] It should be noted that the criteria for classifying conflict levels are set based on empirical data on the scope of conflict impact during simulation training, in order to ensure that the task node weights have effective hierarchical capabilities in the scheduling engine.

[0063] S14: Based on the task scheduling data and the role responsibility matrix, calculate the state offset value and conflict level score. If the state offset value is greater than the predetermined synchronization tolerance threshold and the conflict level score exceeds the preset intervention threshold, then update the role simulation state in the digital twin model and reorder the task priorities.

[0064] In one specific embodiment, the task execution weights and scheduling order reflected in the task scheduling data are used as a simulation execution reference, and the role synchronization constraints defined in the role responsibility matrix are used as a collaborative execution benchmark to quantitatively evaluate the time offsets and resource conflicts generated during the parallel execution of multiple roles. By calculating the state offset value and conflict level score respectively, it is determined whether the current simulation execution state deviates from the collaborative expectation, and the state update and task priority rearrangement of the digital twin model are triggered when the intervention conditions are met.

[0065] Specifically, the steps for calculating the state offset value and conflict level score are as follows: S141, Calculate the actual task delay based on the task node time weight in the task scheduling data and the role synchronization constraint value in the role responsibility matrix; In one specific embodiment, the time weight corresponding to each task node is extracted from the task scheduling data to characterize the expected execution time of the task under the current scheduling order. Simultaneously, the allowed synchronization constraint value for the corresponding role in the parallel execution scenario is obtained from the role responsibility matrix. The time occupied by the task node during actual simulation execution is compared with its synchronization constraint. When the execution time of a task node exceeds the synchronization constraint, the excess is included in the task delay. The delays of all task nodes involving the same role are accumulated to generate the actual task delay corresponding to that role.

[0066] It should be noted that the role synchronization constraint value comes from the simulation training scenario's setting for collaborative consistency, which is used to ensure the acceptable deviation range of multi-role operations in the time dimension.

[0067] S142, Generate a character state offset difference sequence based on the difference between the actual task delay and the theoretical cooperative step difference value; In one specific embodiment, a theoretical collaborative step difference value matching its responsibilities is pre-set for each role. This theoretical collaborative step difference value characterizes the allowable range of time fluctuations for the role under ideal collaborative conditions. The actual task delay is compared role-by-role with the corresponding theoretical collaborative step difference value, and the difference between the two is calculated. The difference results for each role at different task nodes are recorded according to the task execution order, forming a role state offset difference sequence reflecting the change in role state as the task progresses.

[0068] S143, generate the state offset value by the average offset and the maximum offset value of each character node in the character state offset difference sequence; In one specific embodiment, statistical analysis is performed on all offset differences belonging to the same character in the character state offset difference sequence, and the mean offset and maximum offset value of that character are calculated for the entire scheduling cycle. During the calculation, the maximum offset value is assigned a higher weight than the mean offset value to highlight the impact of extreme latency on the coordinated state. The weighted mean offset value and the maximum offset value are then combined to generate a state offset value used to determine the degree of deviation in the overall execution of the character.

[0069] It should be noted that the weight ratio of the mean offset to the maximum offset is based on the empirical setting of sensitivity to sudden imbalances during simulation training.

[0070] S144, combining task scheduling data and resource usage frequency values, generates a conflict level score based on the conflict overlap rate in the role-resource path.

[0071] In a specific embodiment, based on the association between task nodes, roles, and resources in the task scheduling data, the resource occupation trajectory of a role in the execution path is constructed, and combined with the corresponding resource occupation frequency value, the overlapping occupation of the same resource by different roles within the same time window is statistically analyzed.

[0072] The overlap rate of resource usage is calculated by comparing the number of overlapping resource usages with the total number of resource usages for that role. Paths with higher overlap rates are assigned higher weights, and the overlap rates of all roles are summarized globally to generate a conflict level score that reflects the severity of resource conflicts.

[0073] Specifically, the steps for updating the simulation states of roles and reordering task priorities in the digital twin model are as follows: S145, by comparing the state offset value with the conflict level score with the preset synchronization tolerance threshold and intervention threshold, the set of role numbers that meet the update conditions is identified; In one specific embodiment, the state offset value corresponding to each role is compared with a preset synchronization tolerance threshold, and the conflict level score corresponding to the role is compared with a preset intervention threshold. When the state offset value of a role exceeds the synchronization tolerance threshold and the conflict level score exceeds the intervention threshold, the role is determined to meet the simulation state update condition, and its role number is added to the role number set.

[0074] It should be noted that the synchronization tolerance threshold and intervention threshold are set by the simulation training stability requirements to balance the intervention frequency and training continuity.

[0075] S146, Extract the current simulation status information and task execution progress record corresponding to the role number set, and generate a simulation status update request table; In one specific embodiment, the current simulation status information of the corresponding role in the digital twin model is retrieved one by one according to the set of role numbers, and the current task execution progress record of the role is extracted simultaneously. The role number, simulation status information, and task execution progress record are structured and organized to form a simulation status update request table for status update processing.

[0076] S147, Synchronize the role status change data in the simulation status update request table to the digital twin model, and construct the digital twin status update list; In one specific embodiment, based on the role status change data recorded in the simulation status update request table, the corresponding role status in the digital twin model is synchronously updated, and the role number, update time, and change content of each status change are recorded. All synchronized role status information is then aggregated to form a digital twin status update list for subsequent scheduling processing.

[0077] S148, based on the update priority factor of each role in the digital twin state update list, adjust the sorting order of their pending tasks and reorder the task priorities.

[0078] In one specific embodiment, an update priority factor is calculated for each role based on the magnitude of role state changes recorded in the digital twin state update list. Roles with larger state deviations and higher conflict level scores have their update priority factors set to higher values.

[0079] Based on the update priority factor of each role, the order of their tasks in the task scheduling data is adjusted to reorder the task execution order, thereby achieving dynamic correction of the consistency of the state of multiple roles during simulation training.

[0080] Example 2 This embodiment discloses an electronic device, including: Memory, used to store computer software programs; A processor is used to read and execute the computer software program, thereby implementing any of the digital twin-based security training simulation and rehearsal methods described above.

[0081] Since the electronic device described in this embodiment is the electronic device used to implement the security training simulation and pre-playing method based on digital twins in the embodiments of this application, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the security training simulation and pre-playing method based on digital twins described in the embodiments of this application. Therefore, how the electronic device implements the method in the embodiments of this application will not be described in detail here. Any electronic device used by those skilled in the art to implement the security training simulation and pre-playing method based on digital twins in the embodiments of this application falls within the scope of protection of this application.

[0082] Example 3 This embodiment discloses a non-transitory computer-readable storage medium storing a computer software program. When the computer software program is executed by a processor, it implements any one of the security training simulation and rehearsal methods based on digital twins.

[0083] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.

Claims

1. A method for safety training simulation and rehearsal based on digital twins, characterized in that, The method includes: S11: Obtain role task data and simulation operation log data. The role task data includes role number, scope of responsibility, and instruction permissions. The simulation operation log data includes operation time, trigger instruction, and resource number. S12: Generate a task instruction mapping table and a role responsibility matrix based on role task data and simulation operation log data, and calculate instruction response time value and resource usage frequency value through simulation operation log data; S13: Based on the task instruction mapping table, role responsibility matrix and instruction response time value, generate a collaborative conflict score, and construct task scheduling data by combining the collaborative conflict score with the resource usage frequency value; S14: Based on the task scheduling data and the role responsibility matrix, calculate the state offset value and conflict level score. If the state offset value is greater than the predetermined synchronization tolerance threshold and the conflict level score exceeds the preset intervention threshold, then update the role simulation state in the digital twin model and reorder the task priorities.

2. The method for security training simulation and rehearsal based on digital twins according to claim 1, characterized in that, The steps to generate the task instruction mapping table and role responsibility matrix are as follows: S121, Based on the role number and responsibility scope fields in the role task data, count the operable task instruction fields corresponding to all roles and generate a set of role task instructions; S122, construct instruction attribution mapping pairs between instructions and roles by using the instruction content and operation frequency fields in the role task instruction set, and generate a task instruction mapping table; S123, based on the responsibility scope field and instruction permission field in the role task data, extract the responsibility and permission metadata set for each role.

3. The method for security training simulation and rehearsal based on digital twins according to claim 2, characterized in that, The execution logic of step S122 is as follows: S122.1, Based on the task classification field in the role task instruction set, extract tasks according to task stages to generate a staged task instruction subset; S122.2, construct a mapping pair between the instruction number and role number fields in the phased task instruction subset to generate a phase-role instruction mapping structure; S122.3 Based on the stage-role instruction mapping structure and the temporal order in the role execution log data, redundant instruction items are removed to generate a standardized task instruction mapping.

4. The method for security training simulation and rehearsal based on digital twins according to claim 3, characterized in that, The steps for calculating instruction response time and resource usage frequency are as follows: S124, Based on the operation time field and trigger instruction field in the simulation operation log data, calculate the time difference between adjacent instruction pairs and obtain the delay time data; S125: Calculate the average delay time value under the role dimension by using the time difference sequence of different role commands in the delay time data, and generate the command response time value; S126. Based on the resource number field in the simulation operation log data, count the number of times each type of resource is called by different roles and generate a resource call frequency statistics table. S127. Based on the number of times each type of resource is called in the resource call frequency statistics table, and combined with the instruction quantity standardization coefficient, generate the resource occupancy frequency value.

5. A method for security training simulation and rehearsal based on digital twins according to claim 4, characterized in that, The execution logic for step S126 is as follows: S126.1 Extract all resource number fields and their corresponding operation time intervals from the simulation operation log data to construct a resource operation time set; S126.2, Calculate the resource access density per unit time based on the number of calls for each resource number in the resource operation time set; S126.3, by matching and updating the resource access density data per unit time with the resource call frequency statistics table, an enhanced resource call frequency statistics table is generated.

6. The method for security training simulation and rehearsal based on digital twins according to claim 5, characterized in that, The steps to construct task scheduling data are as follows: S131, based on the joint structure of the task instruction mapping table, the role responsibility matrix and the instruction response time value, construct a multi-dimensional task cross-graph of the role execution process; S132, calculate the role cross-conflict value by using the time weight and instruction concurrency on each path in the multi-task cross-graph; S133, perform node fusion processing based on role cross-conflict value and resource occupation frequency value to generate role-resource conflict matching matrix; S134, based on the role-resource conflict matching matrix, extracts the task node weights under the conflict level dimension to construct task scheduling data.

7. A method for security training simulation and rehearsal based on digital twins according to claim 6, characterized in that, The steps for calculating the state offset value and conflict level score are as follows: S141, Calculate the actual task delay based on the task node time weight in the task scheduling data and the role synchronization constraint value in the role responsibility matrix; S142, Generate a character state offset difference sequence based on the difference between the actual task delay and the theoretical cooperative step difference value; S143, generate the state offset value by the average offset and the maximum offset value of each character node in the character state offset difference sequence; S144, combining task scheduling data and resource usage frequency values, generates a conflict level score based on the conflict overlap rate in the role-resource path.

8. A method for security training simulation and rehearsal based on digital twins according to claim 7, characterized in that, The steps to update the role simulation state and reorder task priorities in the digital twin model are as follows: S145, by comparing the state offset value with the conflict level score with the preset synchronization tolerance threshold and intervention threshold, the set of role numbers that meet the update conditions is identified; S146, Extract the current simulation status information and task execution progress record corresponding to the role number set, and generate a simulation status update request table; S147, Synchronize the role status change data in the simulation status update request table to the digital twin model, and construct the digital twin status update list; S148, based on the update priority factor of each role in the digital twin state update list, adjust the sorting order of their pending tasks and reorder the task priorities.

9. An electronic device, characterized in that, include: Memory, used to store computer software programs; A processor is used to read and execute the computer software program, thereby implementing the digital twin-based security training simulation and rehearsal method as described in any one of claims 1 to 8.

10. A non-transitory computer-readable storage medium, characterized in that, The storage medium stores a computer software program, which, when executed by a processor, implements the security training simulation and rehearsal method based on digital twins as described in any one of claims 1 to 8.