Practical training scene simulation method and device, equipment, storage medium and program product
By acquiring the fusion feature vector of task data, the simulation strategy and resource allocation for the training scenario are determined, and a highly adaptable simulation model is selected for rendering. This solves the problem of poor simulation effect in the training scenario and achieves efficient resource utilization and high-precision display.
Patent Information
- Application Number
- CN202511814962.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-03-13
AI Technical Summary
In existing technologies, the simulation effect of training scenarios is poor, and the uniformity of accuracy of a single simulation model makes it impossible to effectively achieve high-precision display or consume too many hardware resources.
By acquiring the fusion feature vector of the task data, the first simulation strategy is determined, including the simulation accuracy level and resource allocation ratio. A highly adaptable simulation model is selected for rendering, with low-precision models used for non-critical steps and high-precision models used for critical steps.
It improves the simulation effect of the training scenario without increasing resource consumption, especially in the high-precision display of key steps and reduces the resource requirements of non-critical steps.
Smart Images

Figure CN121659757A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, specifically to a method, apparatus, equipment, storage medium, and program product for simulating training scenarios. Background Technology
[0002] Practical training scenario simulation involves simulating different scenarios and / or different operational procedures. It is widely used in personnel training and technology demonstrations. In related technologies, a simulation model is typically trained to simulate the training scenario. However, in these technologies, the accuracy of a single simulation model is uniform; different steps or stages maintain the same level of precision. When the overall accuracy of the simulation model is low, it cannot effectively demonstrate the high precision of key steps or stages. Conversely, when the overall accuracy of the simulation model is high, it consumes excessive hardware resources, resulting in poor simulation effects.
[0003] It is evident that the simulation effect of practical training scenarios in the relevant technologies is poor. Summary of the Invention
[0004] This invention provides a method, apparatus, equipment, storage medium, and program product for simulating training scenarios, in order to solve the problem of poor simulation effects in related technologies.
[0005] To solve the above problems, the present invention is implemented as follows:
[0006] In a first aspect, embodiments of the present invention provide a method for simulating a training scenario, including:
[0007] Obtain the fusion feature vector corresponding to the task data, wherein the fusion feature vector is used to characterize at least one of the task type, step time sequence data and device data of the task data;
[0008] A first simulation strategy is determined based on the fused feature vector, and the first simulation strategy includes a first simulation accuracy level and a first resource allocation ratio.
[0009] Based on the first simulation accuracy level, the first simulation model corresponding to the training scenario is determined. The training scenario corresponds to multiple simulation models, and the number of parameters of different simulation models is different. The first simulation model is one of the multiple simulation models.
[0010] The training scenario is rendered based on the first resource allocation ratio and the first simulation model.
[0011] Secondly, embodiments of the present invention also provide a training scenario simulation device, comprising:
[0012] The acquisition module is used to acquire the fusion feature vector corresponding to the task data. The fusion feature vector is used to characterize at least one of the task type, step time sequence data and device data of the task data.
[0013] The first determining module is used to determine a first simulation strategy based on the fused feature vector, wherein the first simulation strategy includes a first simulation accuracy level and a first resource allocation ratio.
[0014] The second determining module is used to determine the first simulation model corresponding to the training scenario based on the first simulation accuracy level. The training scenario corresponds to multiple simulation models, and the number of parameters of different simulation models is different. The first simulation model is one of the multiple simulation models.
[0015] The rendering module is used to render the training scenario based on the first resource allocation ratio and the first simulation model.
[0016] Thirdly, embodiments of the present invention also provide an electronic device, including a transceiver and a processor.
[0017] The processor is configured to acquire a fusion feature vector corresponding to the task data, wherein the fusion feature vector is used to characterize at least one of the task type, step timing data, and device data of the task data.
[0018] The processor is further configured to determine a first simulation strategy based on the fused feature vector, the first simulation strategy including a first simulation accuracy level and a first resource allocation ratio;
[0019] The processor is further configured to determine a first simulation model corresponding to the training scenario based on the first simulation accuracy level. The training scenario corresponds to multiple simulation models, and the number of parameters of different simulation models is different. The first simulation model is one of the multiple simulation models.
[0020] The processor is also used to render the training scenario based on the first resource allocation ratio and the first simulation model.
[0021] Fourthly, embodiments of the present invention provide an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, it implements the steps of the training scenario simulation method described in the first aspect above.
[0022] Fifthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the training scenario simulation method described in the first aspect.
[0023] Sixthly, the present invention also provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the training scenario simulation method described in the first aspect.
[0024] In this embodiment of the invention, a fusion feature vector corresponding to task data is obtained. The fusion feature vector is used to characterize at least one of the task type, step timing data, and device data of the task data. A first simulation strategy is determined based on the fusion feature vector. The first simulation strategy includes a first simulation accuracy level and a first resource allocation ratio. A first simulation model corresponding to a training scenario is determined based on the first simulation accuracy level. The training scenario corresponds to multiple simulation models, and different simulation models have different parameter quantities. The first simulation model is one of the multiple simulation models. The training scenario is rendered based on the first resource allocation ratio and the first simulation model. In this way, by determining the first simulation strategy through the fusion feature vector of task data, and then determining the first simulation model corresponding to the training scenario based on the first simulation accuracy level, and rendering the training scenario based on the first resource allocation ratio and the first simulation model, the first simulation accuracy level and the first resource allocation ratio of the first simulation model are adapted to the task data. This allows for simulation using a model with a lower simulation accuracy level in non-critical steps that do not require high-precision simulation, thereby reducing resource consumption. Conversely, in critical steps that require high-precision simulation, a model with a higher simulation accuracy level is used to achieve better simulation results. Attached Figure Description
[0025] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a flowchart of a practical training scenario simulation method provided in an embodiment of the present invention;
[0027] Figure 2 This is a schematic diagram of extracting and fusing feature vectors provided in an embodiment of the present invention;
[0028] Figure 3 This is a flowchart of determining the first simulation strategy provided in an embodiment of the present invention;
[0029] Figure 4 This is a schematic diagram illustrating the execution of the first simulation strategy provided in an embodiment of the present invention;
[0030] Figure 5This is a schematic diagram of the overall process of training scenario simulation provided in the embodiments of the present invention;
[0031] Figure 6 This is a structural diagram of a training scenario simulation device provided in an embodiment of the present invention;
[0032] Figure 7 This is a structural diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0033] 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, not all, of the embodiments of the present invention. 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.
[0034] Please see Figure 1 , Figure 1 This is a flowchart of a training scenario simulation method for edge devices provided by an embodiment of the present invention, as shown below. Figure 1 As shown, it includes the following steps:
[0035] Step 101: Obtain the fusion feature vector corresponding to the task data. The fusion feature vector is used to characterize at least one of the task type, step time sequence data, and device data of the task data.
[0036] The aforementioned edge devices are used for rendering training scenarios. The edge devices are connected to cloud devices, and the cloud can send simulation models for rendering to the edge devices, which then render the training scenarios based on the simulation models.
[0037] The aforementioned task data is used for simulation rendering of training scenarios. That is, when it is necessary to render a training scenario, task data is allocated to the edge device so that the edge device can render the training scenario according to the task data.
[0038] The aforementioned fused feature vector is used to characterize at least one of the following: task type, step timing data, and device data. By using the fused feature vector, it is possible to determine the situation where the training scenario needs to be simulated.
[0039] Step 102: Determine a first simulation strategy based on the fused feature vector. The first simulation strategy includes a first simulation accuracy level and a first resource allocation ratio.
[0040] The first simulation strategy described above is for simulating the training scenario. It should be noted that when simulating and rendering the training scenario, different resource ratios and models with different simulation accuracies can be allocated during the rendering process. The device resources consumed differ depending on the resource ratio and the model's simulation accuracies. Therefore, in this invention, the simulation strategy is determined based on the fusion feature vector corresponding to the task data to achieve simulations of the training scenario with different accuracies.
[0041] Step 103: Determine the first simulation model corresponding to the training scenario based on the first simulation accuracy level. The training scenario corresponds to multiple simulation models, and the number of parameters of different simulation models is different. The first simulation model is one of the multiple simulation models.
[0042] It should be noted that models with different simulation accuracy levels can be pre-configured for the training scenario. For non-critical steps that do not require high-precision simulation, models with lower simulation accuracy levels can be used to reduce resource consumption; while for critical steps that require high-precision simulation, models with higher simulation accuracy levels can be used to achieve better simulation results.
[0043] Step 104: Render the training scenario based on the first resource allocation ratio and the first simulation model.
[0044] In this embodiment of the invention, a fusion feature vector corresponding to task data is obtained. The fusion feature vector is used to characterize at least one of the task type, step timing data, and device data of the task data. A first simulation strategy is determined based on the fusion feature vector. The first simulation strategy includes a first simulation accuracy level and a first resource allocation ratio. A first simulation model corresponding to a training scenario is determined based on the first simulation accuracy level. The training scenario corresponds to multiple simulation models, and different simulation models have different parameter quantities. The first simulation model is one of the multiple simulation models. The training scenario is rendered based on the first resource allocation ratio and the first simulation model. In this way, by determining the first simulation strategy through the fusion feature vector of task data, and then determining the first simulation model corresponding to the training scenario based on the first simulation accuracy level, and rendering the training scenario based on the first resource allocation ratio and the first simulation model, the first simulation accuracy level and the first resource allocation ratio of the first simulation model are adapted to the task data. This allows for simulation using a model with a lower simulation accuracy level in non-critical steps that do not require high-precision simulation, thereby reducing resource consumption. Conversely, in critical steps that require high-precision simulation, a model with a higher simulation accuracy level is used to achieve better simulation results.
[0045] For example, using "simulation accuracy level A1" and "processor resource allocation ratio A2" as core instructions, the real-time adaptation of the training scenario is completed in two steps: the first step is model loading, which calls the pre-generated model with the corresponding accuracy according to A1—if A1=0, then the basic model M is loaded. b (Only core calculations are retained, such as circuit continuity simulation in electrical engineering training), A1=1 to load intermediate model M m (Retain key details, such as reaction rate simulation in chemical engineering training), A1=2 to load advanced model M h (A complete physics engine, such as organ deformation simulation in surgical training), the model loading process is accelerated by high-speed caching at the edge to ensure a startup latency of <30ms; the second step is computing power scheduling, which divides GPU core computing power by A2 through the Linux cgroups interface, and coordinates CPU resource allocation (such as using 20% of CPU cores for user interaction data processing), and finally generates a virtual training scene at 60fps - this frame rate can meet the visual smoothness requirements of VR / AR immersive interaction, and avoid the energy waste of the device caused by excessively high frame rates, especially suitable for the battery life constraints of mobile edge devices such as VR all-in-one machines.
[0046] Furthermore, two types of core metrics can be continuously collected at 500ms sampling intervals. One type is training effect metrics, including simulation accuracy (such as trajectory deviation in industrial welding and depth error in medical suturing, quantified by comparison with preset accuracy thresholds) and operation latency (the time difference from user gesture input (such as VR controller triggering an action) to screen feedback, accurately recorded by an edge timer); the other type is equipment status metrics, including real-time power consumption (collected by a current sensor, in W), core temperature (CPU / GPU temperature, in °C), and CPU / GPU load (percentage). The simultaneous collection of these two types of metrics can verify the improvement effect of the optimization strategy on the "accuracy-latency" training effect, and also monitor the equipment operating status in real time, fundamentally avoiding the risk of "high-precision simulation causing equipment overheating and shutdown," ensuring the continuous and stable training process.
[0047] Furthermore, all monitoring data must be correlated with the fused feature vector F of the current scene and the simulation strategy (A1, A2) to form a structured JSON log (example: {"F": [0.6,0.3,...,0.8], "A1": 1, "A2": 0.6, "Welding Deviation": 0.3mm, "Operation Delay": 45ms, "Real-time Power Consumption": 12W, "GPU Temperature": 58℃}), and stored in an edge-end circular buffer. The buffer capacity is set to 100,000 records; when the data reaches the limit, the oldest log is automatically overwritten, avoiding storage overflow while retaining recent key data. Simultaneously, retrieval by timestamp (e.g., "2025-08-20 14:30-15:00") and task type (e.g., "Industrial Welding" "Surgical Suturing") is supported, facilitating subsequent analysis of the effectiveness of optimization strategies in different scenarios. For example, comparing the accuracy-energy balance between "basic practice" and "assessment verification" scenarios provides a directional basis for model iteration.
[0048] In one embodiment, obtaining the fused feature vector corresponding to the task data includes:
[0049] Obtain the task data, which includes at least one of task type, step sequence data, and device data;
[0050] Extract the first feature vector corresponding to the task type, the second feature vector corresponding to the step time sequence data, and / or the third feature vector corresponding to the device data;
[0051] The first feature vector, the second feature vector, and / or the third feature vector are fused using a self-attention mechanism network model to obtain the fused feature vector.
[0052] In this embodiment of the invention, task data is acquired, which includes at least one of task type, step timing data, and device data; a first feature vector corresponding to the task type, a second feature vector corresponding to the step timing data, and / or a third feature vector corresponding to the device data are extracted; the first feature vector, the second feature vector, and / or the third feature vector are fused based on a self-attention mechanism network model to obtain a fused feature vector.
[0053] The task data mentioned above was collected from multiple sources to comprehensively cover the three core dimensions of "training task - equipment status - environmental interference" (i.e., task type, step time sequence data and equipment data). The integrity and real-time performance of the data are ensured by multimodal sensors and protocol interfaces. Lightweight preprocessing is then used to eliminate data noise and format differences, providing high-quality input for the subsequent extraction of feature vectors.
[0054] In terms of data acquisition and hardware adaptation, a sensor cluster + standardized interface design can be adopted to address the specific characteristics of simulation training scenarios. Specifically, data from the training scenarios is captured using a 6-axis inertial sensor to track user interaction trajectories (such as the 3D coordinates (x, y, z) and rotation angles (α, β, γ) of a Virtual Reality (VR) controller). Simultaneously, metadata from the training is parsed via the task control interface (such as the sequence of steps for "surgical suturing" and a precision threshold of 0.3 mm). The sampling frequency is set to 50 Hz to ensure the continuity of the trajectory data. Device status data is obtained through the Linux / proc system interface, including processor load and memory usage. Combined with current and temperature / humidity sensors, real-time power consumption, core temperature, and remaining battery power are recorded. The sampling frequency is 20 Hz to balance data real-time performance and device energy consumption. Environmental interference data is collected via the Simple Network Management Protocol (SNMP) of the edge gateway, including network latency and packet loss rate. A Dynamic Host Configuration Protocol (DHCP) server is used to count the number of concurrent training devices and high-performance tasks within the local area network. The sampling frequency is 10 Hz to accurately reflect the impact of environmental interference on the training.
[0055] Furthermore, the raw data undergoes lightweight preprocessing after acquisition. Specifically, firstly, outliers are filtered using the 3σ principle to remove data exceeding the physical logic range (such as false alarms from sensors like VR controller coordinates x>10m or processor load>100%). Secondly, for 1-2 frames of missing data caused by sensor interruptions, linear interpolation is used to fill in the gaps, ensuring the continuity of the time-series data. Then, all data is normalized to the [0,1] interval (e.g., normalizing the temperature range of 25-65℃ to (T-25) / 40) to eliminate the impact of dimensional differences such as "temperature ℃" and "power consumption W" on subsequent feature fusion. Finally, the data is integrated into a structured matrix in the format of "100 sampling points × 30 features" and stored in the edge Redis cache (read / write latency <1ms) for quick access by the feature extraction module. The entire preprocessing process is completed on the edge embedded processor, with a single frame time of <5ms, far below the real-time requirements of the training scenario, and will not add any additional latency.
[0056] In some implementations, such as Figure 2 As shown, different encoding methods can be designed for different task data to obtain the first feature vector, the second feature vector, and / or the third feature vector.
[0057] Specifically, for task types, the first feature vector can be generated by combining the task type and the operation speed of the steps. Specifically, a base priority p is preset for different training scenarios' task types (e.g., priority p=0.9 for "surgical suturing," priority p=0.3 for "basic practice"), and then adjusted by the operation speed v (e.g., gesture movement speed v, in m / s) to obtain the first feature vector. For example, when v>1m / s, the real-time requirement increases by 20%, and finally, a 32-dimensional first feature vector R is output through softmax normalization, which can be expressed by the following formula:
[0058] R=softmax(W p ⋅p+W v ⋅v);
[0059] W in the formula p and W v The weight matrix is 32×1, used to balance the impact of task type priority and operation speed on real-time performance. The higher the value of R, the stronger the real-time requirement of the corresponding dimension.
[0060] For the step-time data, a second feature vector is extracted from the operation step time sequence and interaction data. Specifically, the temporal features of the step sequence (such as "clamping, moving, and stitching") are extracted, and the step dependencies are encoded through a bidirectional Long Short-Term Memory (LSTM) network (e.g., including 2 hidden layers, 128 neurons per layer). Simultaneously, the trajectory velocity variance (reflecting operational stability) in the user interaction data is used as an auxiliary feature, ultimately outputting a 32-dimensional second feature vector C. The formula for the hidden layer output of the LSTM is:
[0061] h t =BiLSTM(x t ,h (t-1) );
[0062] In the formula x t h represents the step features at time t (a 10-dimensional vector). (t-1) The hidden layer state at time t-1 (128 dimensions), h t The hidden layer output at time t is captured by concatenating the forward and directional LSTMs (taking the first 32 dimensions) to capture the bidirectional dependencies between steps (such as "stitching" depending on the accuracy of "clamping").
[0063] Furthermore, for device data, a 20-dimensional vector constructed from device parameters such as processor load, power consumption, and temperature can be concatenated with a 20-dimensional vector Env constructed from environmental data such as concurrency and network latency to form a 40-dimensional vector DE. This 40-dimensional vector DE is then input into a 3-layer Multi-Layer Perceptron (MLP) network to be compressed into a 64-dimensional third feature vector E, which can be expressed by the following formula.
[0064] E=MLP(DE)=σ3(W3⋅σ2 (W2⋅σ1 (W1⋅DE+b1)+b2)+b3);
[0065] Where σ1 and σ2 are the Rectified Linear Unit (ReLU) activation functions, σ3 is the LeakyReLU activation function, W1, W2, and W3 are weight matrices, and b1, b2, and b3 are bias terms used to capture composite state characteristics such as "high concurrency + high load".
[0066] Furthermore, by fusing 3D features through an 8-head self-attention mechanism, the first feature vector R (32-dimensional), the second feature vector C (32-dimensional), and the third feature vector E (64-dimensional) are concatenated into a 128-dimensional fused feature vector F. The multi-head attention output is calculated as follows:
[0067] F=Concat(Head1,…,Head8)⋅W0;
[0068] Each attention head i =Attention(XW q i XW k i XW v i ), W q W k W v W0 is the projection matrix (128×16), and W0 is the output matrix (128×128), ultimately generating a 128-dimensional fused feature vector F, realizing the dynamic association between "task-real-time-device". In this way, compared with traditional fixed-dimensional features (such as only using device load), through three-dimensional feature space and dynamic attention weights, it can accurately capture the feature differences of complex scenarios such as "high-complexity tasks + low-power devices + high-concurrency environments", improving the feature recognition accuracy by 40%; and all calculations are completed at the edge (single frame processing time <10ms), avoiding cloud transmission delays and laying the foundation for real-time decision-making.
[0069] In one embodiment, determining the first simulation strategy based on the fused feature vector includes:
[0070] The fused feature vector is processed based on the Deep Q-Network (DQN) model to obtain the expected cumulative reward value in multiple dimensions;
[0071] The first reward value is calculated based on the initial simulation accuracy and initial energy consumption value;
[0072] Calculate the loss value corresponding to each dimension. The loss value is calculated using the first reward value and the first difference. The first difference is the maximum value among multiple differences. The multiple differences are the differences between the expected cumulative reward value of each dimension and the expected cumulative reward value of the adjacent dimension.
[0073] The first simulation strategy is determined based on a preset mapping relationship and a first dimension, where the first dimension is the dimension with the smallest loss value among the multiple dimensions. The preset mapping relationship includes multiple simulation strategies, the dimension corresponding to each simulation strategy, and the simulation accuracy level and resource allocation ratio corresponding to each simulation strategy.
[0074] In this embodiment of the invention, the fused feature vector is processed by the DQN model to obtain the expected cumulative reward value of multiple dimensions, and then the loss value of each dimension is calculated to determine the first dimension. Then, the first simulation strategy is determined according to the preset mapping relationship and the first dimension.
[0075] Specifically, such as Figure 3 As shown, the expected cumulative reward value (i.e., Q value) is calculated through the DQN network, and then the greedy policy is optimized through the loss value, thereby obtaining and outputting the first simulation policy, so that the edge device can perform training scene rendering.
[0076] Specifically, a reinforcement learning environment will be constructed, and the state space of the environment will be directly mapped to a fusion feature vector F (128 dimensions). This vector integrates all dynamic information of task complexity, real-time requirements, and device and environment states, without the need to introduce additional external state variables. The action space focuses on two core decision dimensions: model accuracy level A1 (for example, three simulation accuracy levels can be set, where 0 = basic, 1 = intermediate, and 2 = advanced) and processor resource allocation ratio A2 (with a value range of 0.3 to 0.9, a step size of 0.1, covering a reasonable allocation range of processor cores for edge devices).
[0077] Furthermore, the first reward value can be calculated using the following formula:
[0078] K=α⋅Acc-β⋅Lat-γ⋅Eng;
[0079] In the formula, Acc is the initial simulation accuracy (calculated as 1 minus the ratio of error to the task threshold, such as Acc=0.6 when the welding error threshold is 0.5mm and the actual error is 0.2mm); Lat is the operation delay (normalized as the ratio of the delay value to 100ms, such as Lat=0.5 when the delay is 50ms); Eng is the initial energy consumption value (normalized as the ratio of power consumption to 20W, such as Eng=0.5 when the power consumption is 10W); the weights α, β, and γ are dynamically adjusted by the first feature vector R in 2.1—where β=max(R)×0.8, ensuring that delay is reduced first in high real-time scenarios, and α and γ are allocated according to α+γ=1-β to balance accuracy and energy consumption requirements.
[0080] Furthermore, the DQN network employs a 3-layer fully connected structure. The input layer receives a 128-dimensional fused feature vector F. After processing by the first layer (128 to 256 dimensions, σ1 with ReLU activation) and the second layer (256 to 128 dimensions, σ2 with ReLU activation), the output layer (128 to 30 dimensions, σ3 with ReLU activation) outputs the Q-values (expected cumulative rewards) for 30 actions. The network's forward propagation formula is:
[0081] Q(F,A)= σ3(W3⋅σ2 (W2⋅σ1 (W1⋅F+b1)+b2)+b3);
[0082] In the formula, W1, W2, and W3 are the weight matrices of each layer, b1, b2, and b3 are the bias terms, and A is the dimension index (0~29, corresponding to 30 action combinations).
[0083] In some implementations, edge devices store data in real time.<F,A,R,F^'> The empirical samples are in the form of a buffer of 100,000 samples (F^' represents the next state feature after performing action A). 32 samples are randomly sampled every 100ms, and the loss function is minimized using gradient descent. The loss value can be calculated using the following formula:
[0084] ;
[0085] In the formula γ RL =0.9 is used as the discount factor to balance immediate rewards and long-term benefits. Dimension selection adopts an ε-greedy strategy, with ε decreasing linearly from 0.9 to 0.1, balancing the exploration of new dimensions with the utilization of known optimal dimensions.
[0086] Furthermore, the aforementioned preset mapping relationship can preset 30 fixed "action-simulation strategy" mapping relationships (i.e., the strategy candidate library shown in Table 1 below). Each dimension index uniquely corresponds to a set of (A1, A2) strategies, thereby obtaining the simulation progress strategy corresponding to each dimension.
[0087] Table 1: Strategy Candidate Library
[0088]
[0089] By using the aforementioned preset mapping table to determine the first simulation strategy corresponding to the task data, compared to traditional fixed rules (such as "frequency reduction when temperature > 65℃") or single-objective optimization, the dynamic reward function and deep reinforcement learning can generate the globally optimal strategy in complex scenarios (such as choosing medium precision + 0.6 processor allocation when "high complexity + low power"), improving decision accuracy by 50%. Moreover, all calculations in the decision-making process are completed locally at the edge, with a single step time of <20ms, without cloud involvement, ensuring real-time response of key training steps.
[0090] In one embodiment, rendering the training scenario based on the first resource allocation ratio and the first simulation model includes:
[0091] Given a currently rendered second simulation model, obtain the second simulation accuracy level of the second simulation model;
[0092] If the first simulation accuracy level and the second simulation accuracy level do not match, the training scenario is rendered in a first time period based on the first resource allocation ratio, the first simulation model and the second simulation model, and in a second time period based on the first resource allocation ratio and the first simulation model. The first time period is before the second time period.
[0093] It should be noted that, as Figure 4 As shown, given the existence of a second simulation model being rendered, it's necessary to first determine the current simulation accuracy level to ascertain whether the simulation model needs to be replaced. Understandably, if the second and first simulation accuracy levels are the same, no replacement is needed; however, if the first and second simulation accuracy levels do not match, the simulation model needs to be replaced to meet the requirements of the current task data.
[0094] In this embodiment of the invention, the training scenario is rendered based on the first resource allocation ratio, the first simulation model, and the second simulation model during a first time period, and the training scenario is rendered based on the first resource allocation ratio and the first simulation model during a second time period. The first time period precedes the second time period. Thus, by combining the first and second simulation models in the first time period and using the first simulation model in the second time period, a smooth switching between simulation models of different simulation accuracy levels is achieved, resulting in a seamless switching experience for the user.
[0095] In one embodiment, rendering the training scenario based on the first resource allocation ratio, the first simulation model, and the second simulation model within a first time period includes:
[0096] During the first time period, a first result is output based on the first simulation model, and a second result is output based on the second simulation model;
[0097] Interpolation is performed based on the first result and the second result to obtain the interpolation result;
[0098] The interpolation result is rendered based on the first resource allocation ratio.
[0099] In this embodiment of the invention, during the first time period, a first result is output based on the first simulation model, and a second result is output based on the second simulation model; interpolation processing is performed based on the first result and the second result to obtain an interpolation result; the interpolation result is rendered based on the first resource allocation ratio. Thus, by interpolating the first result and the second result, the interpolation result can be integrated with the outputs of the first simulation model and the second simulation model.
[0100] For example, simulation models with three accuracy levels can be set up, with the highest accuracy level M... h (Using a welding simulation model with a complete physics engine, with a parameter size of 80MB) as a baseline, train two levels of student models: intermediate model M. m Simplify non-critical features (e.g., halve the number of welding spark particles), parameter size 40MB; base model M b Only core calculations are retained (e.g., spark simulation is ignored), with a parameter size of 20MB and a parameter size ratio of 4:2:1 for the three-level model to ensure storage and loading efficiency on edge devices. When the simulation accuracy level of the strategy is inconsistent with the current model, a smooth switching mechanism is activated: the first 5 frames use interpolation of the old and new model outputs, and the output of the t-th frame is:
[0101] ;
[0102] in the formula For the interpolation result, y new The first result output by the first simulation model, y old The second result is the output of the second copy model, and w(t) is the interpolation weight to avoid user discomfort caused by screen jumps. At the same time, by preloading model slices (caching the intermediate layer parameters of the target model in advance), the switching delay is controlled within 50ms, so as to achieve seamless switching for users.
[0103] In some implementations, the specific resource allocation for rendering can be further adjusted during the rendering process. For example, during the general rendering steps, the current processor resource allocation ratio directly corresponds to the computing power division (e.g., A). 2 =0.7, indicating that 70% of the processor cores are used for simulation calculations and 30% for VR rendering. For critical steps such as "surgical suturing" and "welding arc initiation", a priority mechanism is triggered—temporarily increasing A2 to 0.8 for 2 seconds to prioritize the high-precision requirements of simulation calculations.
[0104] Furthermore, LSTM energy consumption prediction can also be introduced simultaneously, specifically expressed by the following formula:
[0105] ;
[0106] In the formula E t Given the third eigenvector (64-dimensional) at time t, output the predicted power consumption after 5 seconds. Among them, if If the value exceeds the equipment safety threshold, then while keeping the model accuracy level A1 unchanged, A2 will be reduced to 0.5~0.6, and the performance and equipment safety will be balanced by fine-tuning the computing power allocation.
[0107] In this way, the contradiction between "high energy consumption" and "poor experience" of a single model is resolved by smoothly switching between multiple simulation models with different simulation accuracy levels, and the device's battery life is extended by 25%; GPU utilization is improved by 30% through dynamic resource scheduling, avoiding the problems of "wasting computing power in basic steps" and "insufficient computing power in complex steps"; and the operation is completed locally at the edge, ensuring that the strategy takes effect in real time.
[0108] In one embodiment, after the first resource allocation ratio and the first simulation model render the training scenario, the method further includes:
[0109] Collect simulation parameters and / or equipment parameters of the training scenario;
[0110] When the number of collected simulation parameters and / or device parameters reaches a set threshold, the parameters of the self-attention mechanism network model and / or DQN model are adjusted based on the collected simulation parameters and / or device parameters.
[0111] In this embodiment of the invention, simulation parameters and / or device parameters of the training scenario are collected. When the number of collected simulation parameters and / or device parameters reaches a set threshold, the parameters of the self-attention mechanism network model and / or DQN model are adjusted based on the collected simulation parameters and / or device parameters. Thus, by collecting simulation parameters and / or device parameters of the training scenario, the self-attention mechanism network model and / or DQN model can be continuously adjusted, thereby continuously optimizing the accuracy of the predicted simulation strategy.
[0112] For example, such as Figure 3 As shown, the edge device optimizes its local model parameters based on the currently stored monitoring logs (approximately 100,000 logs) to adapt to the characteristics of a single device. For example, for the scene-adaptive feature parsing module, the projection matrix W of the self-attention network is fine-tuned. q W k W v For example, if an edge device is used for "surgical suturing" training for a long time, the correlation weight between "suturing step features" and "low latency requirements" can be strengthened through log data to improve the feature recognition accuracy in this scenario. As for the output layer weight W3 and reward function weights α, β, and γ of the DQN network, if the log shows that the device is prone to exceeding the latency limit in "high concurrency scenarios", the dynamic adjustment coefficient of β (latency weight) can be appropriately increased to ensure that latency is reduced first.
[0113] It should be noted that the entire adjustment process is completed locally on the edge device. After the edge device collects feedback data (i.e., simulation parameters and / or device parameters), the reward value K is calculated, experience samples are generated, and stored in a buffer for random sampling training to update the parameters of the self-attention mechanism network model and / or DQN model. The iteration step count can be set to 1000 times, the time taken is less than 10 minutes, it does not rely on cloud resources, and it will not affect the next day's training.
[0114] In one embodiment, after the first resource allocation ratio and the first simulation model render the training scenario, the method further includes:
[0115] Collect simulation parameters and / or equipment parameters of the training scenario;
[0116] Send the simulation parameters and / or the device parameters to the cloud device;
[0117] The cloud device receives updated parameters, which are obtained by adjusting the parameters of the cloud device's self-attention mechanism network model and / or DQN model based on simulation parameters collected from multiple edge devices and / or the device parameters.
[0118] The self-attention mechanism network model and / or DQN model of the edge device are updated based on the updated parameters.
[0119] It should be noted that, in addition to updating the self-attention mechanism network model and / or DQN model locally on edge devices, the self-attention mechanism network model and / or DQN model can also be updated via cloud devices.
[0120] Specifically, in this embodiment of the invention, simulation parameters and / or device parameters of the training scenario are collected; the simulation parameters and / or device parameters are sent to the cloud device; updated parameters are received from the cloud device, which are obtained by adjusting the parameters of the cloud device's self-attention mechanism network model and / or DQN model based on the simulation parameters and / or device parameters collected from multiple edge devices; and the self-attention mechanism network model and / or DQN model of the edge device are updated based on the updated parameters. In this way, the cloud device obtains updated parameters through simulation parameters and / or device parameters sent from different edge devices, resulting in higher accuracy after the edge devices update their self-attention mechanism network model and / or DQN model based on the updated parameters.
[0121] The process of generating and updating parameters for cloud devices consists of three steps: The first step is data upload from edge devices. Each edge terminal uploads anonymized logs via a protocol every day in the early morning (e.g., 2:00-2:30 AM, during periods of low network load). During the anonymization process, user privacy information (such as student names and operation record IDs) is removed, retaining only the scene's fusion vector features F, simulation strategies, and monitoring indicators. The log size for a single device is less than 50MB to avoid consuming excessive network bandwidth.
[0122] The second step is model aggregation. After receiving anonymized logs from more than 100 edge devices, the cloud-based federated learning center updates the global model using a federated averaging algorithm. For the scene feature parsing module, feature data of complex scenarios such as "high concurrency + low power" and "new training tasks (such as chemical distillation)" are supplemented by multi-device logs to optimize the self-attention weights and improve the feature capture capability of complex scenarios. For the DQN decision network, the dynamic adjustment logic of the reward function weights α, β, and γ is corrected based on multi-device logs. For example, the parameters of the energy consumption prediction model are optimized by combining the differences in energy consumption thresholds of edge devices in different regions (such as the winter temperature threshold for devices in the north can be relaxed to 65℃, while it is 60℃ in the south), so as to avoid policy deviation caused by a "one-size-fits-all" threshold setting.
[0123] The third step is parameter distribution. The cloud distributes the optimized global model parameters (compressed to 5MB, with only the changed parameters transmitted through incremental update technology) to each edge terminal. The terminal completes the loading before the next training session (update time <30 seconds), ensuring that all devices can share the optimization experience across multiple scenarios.
[0124] Through this iterative model, the scenario adaptability of the solution is continuously improved: for new training scenarios (such as "underground mine operation simulation"), there is no need to manually retrain the model, and accurate optimization can be achieved through only 1-2 days of federated learning; the generalization of the model is improved by 40% compared with the initial state. For example, when an edge device switches from the "industrial welding" scenario to the "electrical wiring" scenario, the decision accuracy drops by only 5% (compared to more than 25% for traditional fixed models), which greatly reduces the cost of manual adaptation, while ensuring the consistency of training results for different scenarios and different devices.
[0125] In some implementations, such as Figure 5 As shown, task data is collected through a multi-source data acquisition module, fused feature vectors are extracted through a feature parsing module, a first simulation strategy is determined through a multi-objective reinforcement learning decision module, the first simulation strategy is executed through a model and resource dynamic optimization module, the execution effect is detected through a monitoring module, and then updated through an update module. This realizes an optimized loop for training scenario simulation, thereby achieving better training scenario rendering effects.
[0126] Please see Figure 6 , Figure 6 This is a structural diagram of a training scenario simulation device provided in an embodiment of the present invention, as shown below. Figure 6 As shown, the training scenario simulation device 600 includes:
[0127] The acquisition module 601 is used to acquire the fusion feature vector corresponding to the task data, wherein the fusion feature vector is used to characterize at least one of the task type, step time sequence data and device data of the task data;
[0128] The first determining module 602 is used to determine a first simulation strategy based on the fused feature vector, wherein the first simulation strategy includes a first simulation accuracy level and a first resource allocation ratio.
[0129] The second determining module 603 is used to determine the first simulation model corresponding to the training scenario based on the first simulation accuracy level. The training scenario corresponds to multiple simulation models, and the number of parameters of different simulation models is different. The first simulation model is one of the multiple simulation models.
[0130] The rendering module 604 is used to render the training scenario based on the first resource allocation ratio and the first simulation model.
[0131] In one embodiment, the acquisition module 601 includes:
[0132] The first acquisition submodule is used to acquire the task data, which includes at least one of task type, step timing data and device data.
[0133] An extraction submodule is used to extract a first feature vector corresponding to the task type, a second feature vector corresponding to the step time sequence data, and / or a third feature vector corresponding to the device data;
[0134] The fusion submodule is used to fuse the first feature vector, the second feature vector, and / or the third feature vector based on a self-attention mechanism network model to obtain the fused feature vector.
[0135] In one embodiment, the first determining module 602 includes:
[0136] The processing submodule is used to process the fused feature vector based on the Deep Q-Network (DQN) model to obtain the expected cumulative reward value in multiple dimensions.
[0137] The first calculation submodule is used to calculate the first reward value based on the initial simulation accuracy and the initial energy consumption value;
[0138] The second calculation submodule is used to calculate the loss value corresponding to each dimension. The loss value is calculated by the first reward value and the first difference. The first difference is the maximum value among multiple differences. The multiple differences are the differences between the expected cumulative reward value of each dimension and the expected cumulative reward value of the adjacent dimension.
[0139] The determination submodule is used to determine the first simulation strategy based on a preset mapping relationship and a first dimension, wherein the first dimension is the dimension with the smallest loss value among the multiple dimensions, and the preset mapping relationship includes multiple simulation strategies, the dimension corresponding to each simulation strategy, and the simulation accuracy level and resource allocation ratio corresponding to each simulation strategy.
[0140] In one embodiment, the rendering module 604 includes:
[0141] The second acquisition submodule is used to acquire the second simulation accuracy level of the second simulation model when a second simulation model is currently being rendered.
[0142] The rendering submodule is used to render the training scenario in a first time period based on the first resource allocation ratio, the first simulation model, and the second simulation model when the first simulation accuracy level and the second simulation accuracy level do not match, and to render the training scenario in a second time period based on the first resource allocation ratio and the first simulation model, wherein the first time period is before the second time period.
[0143] In one embodiment, the rendering submodule includes:
[0144] The output unit is configured to output a first result based on the first simulation model and a second result based on the second simulation model during the first time period.
[0145] An interpolation unit is used to perform interpolation processing based on the first result and the second result to obtain an interpolation result;
[0146] A rendering unit is used to render the interpolation result based on the first resource allocation ratio.
[0147] In one embodiment, the training scenario simulation device 600 further includes:
[0148] The first acquisition module is used to acquire simulation parameters and / or equipment parameters of the training scenario;
[0149] The adjustment module is used to adjust the parameters of the self-attention mechanism network model and / or DQN model based on the collected simulation parameters and / or device parameters when the number of collected simulation parameters and / or device parameters reaches a set threshold.
[0150] In one embodiment, the training scenario simulation device 600 further includes:
[0151] The second acquisition module is used to acquire simulation parameters and / or equipment parameters of the training scenario;
[0152] The sending module is used to send the simulation parameters and / or the device parameters to the cloud device;
[0153] The receiving module is used to receive the updated parameters sent by the cloud device. The updated parameters are obtained by the cloud device adjusting the parameters of the self-attention mechanism network model and / or DQN model based on the simulation parameters collected by multiple edge devices and / or the device parameters.
[0154] An update module is used to update the self-attention mechanism network model and / or DQN model of the edge device based on the update parameters.
[0155] The training scenario simulation device provided in this embodiment of the invention can realize each process of each embodiment of the above-mentioned training scenario simulation method. The technical features are one-to-one and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0156] It should be noted that the training scenario simulation device in the embodiments of the present invention can be a device, or it can be a component, integrated circuit, or chip in an electronic device.
[0157] This invention also provides an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the above-described functionality. Figure 1 The various processes of the simulation method embodiment for the training scenario shown are all able to achieve the same technical effect, and will not be described again here to avoid repetition.
[0158] For details, see Figure 7 As shown, this embodiment of the invention also provides an electronic device, including a bus 701, a transceiver 702, an antenna 703, a bus interface 704, a processor 705, and a memory 706.
[0159] The processor 705 is used to obtain a fusion feature vector corresponding to the task data. The fusion feature vector is used to characterize at least one of the task type, step timing data and device data of the task data.
[0160] The processor 705 is further configured to determine a first simulation strategy based on the fused feature vector, the first simulation strategy including a first simulation accuracy level and a first resource allocation ratio;
[0161] The processor 705 is further configured to determine a first simulation model corresponding to the training scenario based on the first simulation accuracy level. The training scenario corresponds to multiple simulation models, and the number of parameters of different simulation models is different. The first simulation model is one of the multiple simulation models.
[0162] The processor 705 is also used to render the training scenario based on the first resource allocation ratio and the first simulation model.
[0163] In one embodiment, obtaining the fused feature vector corresponding to the task data includes:
[0164] Obtain the task data, which includes at least one of task type, step sequence data, and device data;
[0165] Extract the first feature vector corresponding to the task type, the second feature vector corresponding to the step time sequence data, and / or the third feature vector corresponding to the device data;
[0166] The first feature vector, the second feature vector, and / or the third feature vector are fused using a self-attention mechanism network model to obtain the fused feature vector.
[0167] In one embodiment, determining the first simulation strategy based on the fused feature vector includes:
[0168] The fused feature vector is processed based on the Deep Q-Network (DQN) model to obtain the expected cumulative reward value in multiple dimensions.
[0169] The first reward value is calculated based on the initial simulation accuracy and initial energy consumption value;
[0170] Calculate the loss value corresponding to each dimension. The loss value is calculated using the first reward value and the first difference. The first difference is the maximum value among multiple differences. The multiple differences are the differences between the expected cumulative reward value of each dimension and the expected cumulative reward value of the adjacent dimension.
[0171] The first simulation strategy is determined based on a preset mapping relationship and a first dimension, where the first dimension is the dimension with the smallest loss value among the multiple dimensions. The preset mapping relationship includes multiple simulation strategies, the dimension corresponding to each simulation strategy, and the simulation accuracy level and resource allocation ratio corresponding to each simulation strategy.
[0172] In one embodiment, rendering the training scenario based on the first resource allocation ratio and the first simulation model includes:
[0173] Given a currently rendered second simulation model, obtain the second simulation accuracy level of the second simulation model;
[0174] If the first simulation accuracy level and the second simulation accuracy level do not match, the training scenario is rendered in a first time period based on the first resource allocation ratio, the first simulation model and the second simulation model, and in a second time period based on the first resource allocation ratio and the first simulation model. The first time period is before the second time period.
[0175] In one embodiment, rendering the training scenario based on the first resource allocation ratio, the first simulation model, and the second simulation model within a first time period includes:
[0176] During the first time period, a first result is output based on the first simulation model, and a second result is output based on the second simulation model;
[0177] Interpolation is performed based on the first result and the second result to obtain the interpolation result;
[0178] The interpolation result is rendered based on the first resource allocation ratio.
[0179] In one embodiment, the processor 705 is further configured to collect simulation parameters and / or device parameters of the training scenario;
[0180] The processor 705 is further configured to adjust the parameters of the self-attention mechanism network model and / or DQN model based on the acquired simulation parameters and / or device parameters when the number of acquired simulation parameters and / or device parameters reaches a set threshold.
[0181] In one embodiment, the processor 705 is further configured to collect simulation parameters and / or device parameters of the training scenario;
[0182] The transceiver 702 is used to send the simulation parameters and / or the device parameters to the cloud device;
[0183] The transceiver 702 is also used to receive updated parameters sent by the cloud device. The updated parameters are obtained by the cloud device adjusting the parameters of the self-attention mechanism network model and / or DQN model of the cloud device based on simulation parameters collected by multiple edge devices and / or the device parameters.
[0184] The processor 705 is also configured to update the self-attention mechanism network model and / or DQN model of the edge device based on the update parameters.
[0185] exist Figure 7 In this document, a bus architecture (represented by bus 701) is used. Bus 701 can include any number of interconnected buses and bridges, linking various circuits including one or more processors represented by processor 705 and memory represented by memory 706. Bus 701 can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 704 provides an interface between bus 701 and transceiver 702. Transceiver 702 can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 705 is transmitted over a wireless medium via antenna 703, which further receives data and transmits data to processor 705.
[0186] Processor 705 manages bus 701 and general processing, and also provides various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. Memory 706 can be used to store data used by processor 705 during operation.
[0187] Optionally, the processor 705 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a graphics processing unit (GPU).
[0188] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the above-described functions. Figure 1 The various processes corresponding to the simulation method embodiments in the practical training scenarios achieve the same technical effect, and will not be described again here to avoid repetition. The computer-readable storage medium mentioned includes, for example, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0189] The present invention also provides a computer program product, including computer instructions that, when executed by a processor, implement the above-described... Figure 1 The various processes of the simulation method implementation examples corresponding to the training scenarios can achieve the same technical effect, and will not be described again here to avoid repetition.
[0190] In the embodiments of this invention, the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices. Additionally, the use of "and / or" in this application indicates at least one of the connected objects, such as A and / or B and / or C, representing eight possibilities: A alone, B alone, C alone, both A and B present, both B and C present, both A and C present, and A, B, and C present.
[0191] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0192] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or second terminal device, etc.) to execute the methods of the various embodiments of this application.
[0193] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A simulation method for practical training scenarios, applied to edge devices, characterized in that, include: Obtain the fusion feature vector corresponding to the task data, wherein the fusion feature vector is used to characterize at least one of the task type, step time sequence data and device data of the task data; A first simulation strategy is determined based on the fused feature vector, and the first simulation strategy includes a first simulation accuracy level and a first resource allocation ratio. Based on the first simulation accuracy level, the first simulation model corresponding to the training scenario is determined. The training scenario corresponds to multiple simulation models, and the number of parameters of different simulation models is different. The first simulation model is one of the multiple simulation models. The training scenario is rendered based on the first resource allocation ratio and the first simulation model.
2. The method as described in claim 1, characterized in that, The process of obtaining the fused feature vector corresponding to the task data includes: Obtain the task data, which includes at least one of task type, step sequence data, and device data; Extract the first feature vector corresponding to the task type, the second feature vector corresponding to the step time sequence data, and / or the third feature vector corresponding to the device data; The first feature vector, the second feature vector, and / or the third feature vector are fused using a self-attention mechanism network model to obtain the fused feature vector.
3. The method as described in claim 1, characterized in that, The determination of the first simulation strategy based on the fused feature vector includes: The fused feature vector is processed based on the Deep Q-Network (DQN) model to obtain the expected cumulative reward value in multiple dimensions. The first reward value is calculated based on the initial simulation accuracy and initial energy consumption value; Calculate the loss value corresponding to each dimension. The loss value is calculated using the first reward value and the first difference. The first difference is the maximum value among multiple differences. The multiple differences are the differences between the expected cumulative reward value of each dimension and the expected cumulative reward value of the adjacent dimension. The first simulation strategy is determined based on a preset mapping relationship and a first dimension, where the first dimension is the dimension with the smallest loss value among the multiple dimensions. The preset mapping relationship includes multiple simulation strategies, the dimension corresponding to each simulation strategy, and the simulation accuracy level and resource allocation ratio corresponding to each simulation strategy.
4. The method as described in claim 1, characterized in that, The rendering of the training scenario based on the first resource allocation ratio and the first simulation model includes: Given a currently rendered second simulation model, obtain the second simulation accuracy level of the second simulation model; If the first simulation accuracy level and the second simulation accuracy level do not match, the training scenario is rendered in a first time period based on the first resource allocation ratio, the first simulation model and the second simulation model, and in a second time period based on the first resource allocation ratio and the first simulation model. The first time period is before the second time period.
5. The method as described in claim 4, characterized in that, The rendering of the training scenario based on the first resource allocation ratio, the first simulation model, and the second simulation model in the first time period includes: During the first time period, a first result is output based on the first simulation model, and a second result is output based on the second simulation model; Interpolation is performed based on the first result and the second result to obtain the interpolation result; The interpolation result is rendered based on the first resource allocation ratio.
6. The method according to any one of claims 1 to 5, characterized in that, After the first resource allocation ratio and the first simulation model render the training scenario, the method further includes: Collect simulation parameters and / or equipment parameters of the training scenario; When the number of collected simulation parameters and / or device parameters reaches a set threshold, the parameters of the self-attention mechanism network model and / or DQN model are adjusted based on the collected simulation parameters and / or device parameters.
7. The method according to any one of claims 1 to 5, characterized in that, After the first resource allocation ratio and the first simulation model render the training scenario, the method further includes: Collect simulation parameters and / or equipment parameters of the training scenario; Send the simulation parameters and / or the device parameters to the cloud device; The cloud device receives updated parameters, which are obtained by adjusting the parameters of the cloud device's self-attention mechanism network model and / or DQN model based on simulation parameters collected from multiple edge devices and / or the device parameters. The self-attention mechanism network model and / or DQN model of the edge device are updated based on the updated parameters.
8. A training scenario simulation device, characterized in that, include: The acquisition module is used to acquire the fusion feature vector corresponding to the task data. The fusion feature vector is used to characterize at least one of the task type, step time sequence data and device data of the task data. The first determining module is used to determine a first simulation strategy based on the fused feature vector, wherein the first simulation strategy includes a first simulation accuracy level and a first resource allocation ratio. The second determining module is used to determine the first simulation model corresponding to the training scenario based on the first simulation accuracy level. The training scenario corresponds to multiple simulation models, and the number of parameters of different simulation models is different. The first simulation model is one of the multiple simulation models. The rendering module is used to render the training scenario based on the first resource allocation ratio and the first simulation model.
9. An electronic device, characterized in that, Including transceivers and processors, The processor is configured to acquire a fusion feature vector corresponding to the task data, wherein the fusion feature vector is used to characterize at least one of the task type, step timing data, and device data of the task data. The processor is further configured to determine a first simulation strategy based on the fused feature vector, the first simulation strategy including a first simulation accuracy level and a first resource allocation ratio; The processor is further configured to determine a first simulation model corresponding to the training scenario based on the first simulation accuracy level. The training scenario corresponds to multiple simulation models, and the number of parameters of different simulation models is different. The first simulation model is one of the multiple simulation models. The processor is also used to render the training scenario based on the first resource allocation ratio and the first simulation model.
10. An electronic device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the training scenario simulation method as described in any one of claims 1 to 7.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the training scenario simulation method as described in any one of claims 1 to 7.
12. A computer program product, characterized in that, It includes computer instructions, which, when executed by a processor, implement the steps of the training scenario simulation method as described in any one of claims 1 to 7.