IEC 61499 intelligent model segmentation training method based on dcu state enhancement

CN121413650BActive Publication Date: 2026-10-09KUNMING UNIV OF SCI & TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511359703.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-23
Publication Date
2026-10-09
Estimated Expiration
2045-09-23

AI Technical Summary

Technical Problem

[0006]本发明的目的在于提供一种基于DCU状态增强的IEC61499的智能模型分割训练方法,旨在解决了现有技术在动态环境下资源分配失衡、模型分割效率低及固定注意力机制计算冗余的技术问题

Benefits of technology

1、本发明通过应用强化学习训练智能体时引入多头状态衍生线性化注意力机制,对智能体的状态表征进行增强,然后将智能体作用于DCU平台上组件的训练,通过训练时对组件进行分割,提升了组件的训练效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121413650B_ABST
    Figure CN121413650B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of IEC61499 intelligent model segmentation training methods based on DCU state enhancement, belong to computer distributed technical field.The method includes: constructing intelligent model state enhancement module, transplanting intelligent model to DCU acceleration card, adjusting attention head number by state vector complexity, parallel computing, fusion and optimization multi-head attention matrix, based on Euclidean distance sampling best historical state, obtain enhanced state sequence in combination with current state, provide optimized state representation for segmentation learning;With enhanced state sequence as starting input, construct and train reinforcement learning intelligent agent, so that it learns to identify the optimal segmentation strategy of intelligent model;Deploy the trained intelligent agent, according to the calculation load and communication cost between acceleration card, the intelligent model is intelligently split, and distributed parallel training is realized.The present application solves the technical problems of resource allocation imbalance, low model segmentation efficiency and fixed attention mechanism calculation redundancy in the prior art in dynamic environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an intelligent model segmentation training method based on DCU state enhancement of IEC61499, belonging to the field of computer distributed technology. Background Technology

[0002] With the rapid development of the Industrial Internet, the demand for distributed intelligent models is increasing, especially in complex application scenarios such as industrial automation and intelligent manufacturing. Model design based on the IEC 61499 standard has gradually attracted widespread attention. The IEC 61499 standard, by defining the functional block model of a distributed control system, realizes the modularity and distributed control of the system, and can provide good architectural support for large-scale industrial systems. However, existing distributed control methods often suffer from low adaptability and uneven resource allocation in complex computing tasks and resource management, making it difficult to meet the requirements of efficiency and flexibility in dynamic industrial environments.

[0003] The accelerated pace of domestic production has provided new opportunities for the deployment of distributed intelligent models. Traditional deep learning training largely relies on imported GPUs, which presents challenges related to supply chain security and cost in critical industrial scenarios. Domestically produced DCUs, as a new generation of high-performance accelerated computing hardware, can reduce reliance on foreign GPUs while maintaining high computing power, thus enhancing the system's autonomy and controllability. They are deeply optimized for domestic compilation toolchains and deep learning frameworks, supporting high-concurrency task scheduling and large-scale distributed training, with lower latency and better energy efficiency. This provides a solid hardware foundation for deploying efficient and stable distributed deep learning models in scenarios such as industrial control and intelligent manufacturing, and also lays a good operating environment for subsequent algorithm optimization and state enhancement technologies.

[0004] To address these issues, researchers have attempted to combine deep learning with distributed computing, with reinforcement learning already applied to model segmentation and resource scheduling for adaptive decision-making in dynamic environments. However, existing methods generally rely on fixed hardware resource allocation strategies, failing to adequately handle the frequent changes in computing resources and network bandwidth, resulting in inefficient selection of model segmentation points and allocation of computing resources. Especially in training environments based on Sugon DCU accelerator cards, insufficient state representation makes it difficult for reinforcement learning models to obtain complete and effective state information in complex dynamic environments, thus affecting the generation of optimal policies. Therefore, existing technologies urgently need a new training optimization method to enhance state representation capabilities and fully leverage the advantages of DCU hardware acceleration.

[0005] To address the shortcomings of existing technologies, this invention proposes a state-enhanced reinforcement learning training optimization scheme compliant with the IEC 61499 standard. This scheme incorporates a multi-head attention dynamic adjustment mechanism based on state vector complexity, a deformable state sampling method based on geometric distance, a Nyström matrix approximation optimization strategy, and a dynamic derived state generation technique. These innovations enable the rational allocation and efficient utilization of computing resources during distributed training. Through these innovative technologies, this invention effectively solves problems such as uneven resource allocation, low computational efficiency, and insufficient utilization of state information, providing a more efficient and intelligent distributed computing solution for complex application scenarios such as large-scale crowd counting components. Summary of the Invention

[0006] The purpose of this invention is to provide an intelligent model segmentation training method based on DCU state enhancement IEC61499, which aims to solve the technical problems of resource allocation imbalance, low model segmentation efficiency and computational redundancy of fixed attention mechanism in the existing technology under dynamic environment.

[0007] To achieve the above objectives, the technical solution of this invention is: an intelligent model segmentation training method based on DCU state enhancement IEC61499. This method achieves dynamic coupling of hardware resources and task requirements in distributed computing by adaptively adjusting the number of attention heads, dynamic state sampling and reinforcement learning collaborative optimization, thereby improving the real-time response capability and computational efficiency of intelligent models in scenarios such as industrial internet and autonomous driving.

[0008] Step 1: Dynamically adjust the number of attention heads by adjusting the state vector complexity, and generate a multi-head attention matrix by obtaining the multi-head attention score through parallel computing. Then, use the Nyström matrix approximation method to linearize and optimize the multi-head attention matrix. In the state history space, select the historical state that is closest to the current state based on Euclidean distance for sampling, and calculate the enhanced state sequence by combining the attention enhancement mechanism. Step 2: Construct a reinforcement learning agent. Using the enhanced state sequence as the starting input for reinforcement learning, the agent learns the optimal segmentation strategy of the intelligent model that is adapted to distributed parallel training through iterative optimization, thus completing the training of the reinforcement learning agent. Step 3: Deploy the trained reinforcement learning agent and use the learned optimal segmentation strategy to intelligently split the intelligent model.

[0009] Optionally, Step 1 includes: Define device set Includes DCU accelerator card device set With general computing node set Each DCU device With computing resources Memory bandwidth is The video memory capacity is Intelligent Model Defined as a six-tuple ,in, , For input / output interfaces compliant with IEC 61499 standard, For component model parameters, store model content configuration information. This is the component state space, which encompasses the component's runtime state. For delay constraints, For DCU adaptation parameters, the resource-aware component mapping table is as follows: The component mapping table represents the components Bind to DCU device and corresponding computing resources Memory bandwidth superior; Define state vector ,in, For feature dimension, w The state vector, defined as a time step, includes the device's real-time memory bandwidth. Calculate resource utilization rate and component input feature entropy Introducing a DCU memory bandwidth adjustment factor, the state vector complexity is defined as follows: :

[0010] in, Represents the length of the vector. For input dimensions, For smoothing parameters, The number of adjustment heads is obtained based on the state vector complexity to determine the average memory bandwidth. The calculation formula is:

[0011] In the formula, Based on the number of attention heads, To maximize the number of heads that can receive attention, This indicates rounding down. Calculate the resource sensitivity coefficient for the DCU. , The current real-time available computing resources for the DCU; For the input feature matrix ,in, It is the sequence length. It is a feature dimension, which undergoes a linear transformation to generate a query matrix Q, a key matrix K, and a value matrix V:

[0012] in, This is the weight matrix. For the key vector dimension, the multi-head attention mechanism uses... The attention score is calculated in parallel branches:

[0013] in, Representing the The output of each attention head, The function converts the dot product result into a probability weight matrix. Dimensional normalization is used to avoid numerical instability. for The split submatrix will The individual outputs are merged into a single output. :

[0014] in, The function concatenates the outputs of all attention heads together. To output the weight matrix; Based on the number of DCU devices Determine the number of reference points , The reference point matrix for the basic reference factor and hardware weights. , The formula is defined as:

[0015] In the formula, The segment length is... Original features Average computing resources for the DCU cluster; The attention matrix is ​​approximated using the Nyström low-rank approximation. Approximating a linearized attention matrix :

[0016] in, This is the DCU device association matrix, where the diagonal elements represent the memory bandwidth percentage of each device, and the off-diagonal elements represent the communication latency weights between devices. For reference point matrix , The simplified matrix, As a memory bandwidth penalty factor, based on the DCU cluster topology, the computational complexity is reduced to... , The sequence length; The linearized attention matrix This process is used for historical state sampling and filtering based on Euclidean distance, including: based on a preset base threshold. Introduce DCU hardware parameters to calculate the current state. With historical status European distance The expression is:

[0017] in, This represents the current remaining video memory capacity of the DCU. The maximum video memory capacity of the DCU is used to filter the state of video memory-sensitive scenes by weighted distance based on video memory capacity. Calculate the dynamic threshold based on distance and memory bandwidth attenuation factor. The expression is:

[0018] European distance With dynamic threshold If a comparison is made, Then the historical state Each determined valid historical state is considered a valid historical state. to Combining to form state pairs The enhanced state sequence is calculated using a linear attention mechanism. .

[0019] Optionally, Step 2 includes: Construct a reinforcement learning environment and define the state space. Includes device computing resources Network bandwidth Component load With real-time latency; Define the action space A = ,in, This is a model partitioning strategy based on DCU core count calculation. Total number of strategies; Design a comprehensive reward function Used to indicate time status and actions The corresponding reward is expressed as:

[0020] in, Rewards for training efficiency Incentives for resource utilization Penalty for communication overhead, These are the weighting coefficients, and ; The Deep Q-Network architecture (DQN) is used, with the network input being an enhanced state sequence. The output is the Q-value of each segmentation strategy, and the loss function is defined as:

[0021] in, For loss function, For network parameters, For instant rewards, Represents the mathematical expectation. As a discount factor, This is used to balance the weights of current and future rewards. Representing state Take action below The value estimate, Indicates the execution of an action The next state after transitioning to Indicates the next state The actions taken by China The target network parameters are used to stabilize the training process through experience replay and target network update mechanisms. A greedy strategy is employed to balance exploration and exploitation, and the probability of taking random exploration actions is also considered. The value decreases as the training progresses; Through multiple rounds of interaction and reward feedback, the agent learns the optimal model segmentation strategy adapted to distributed parallel training based on enhanced state information.

[0022] Optionally, Step 3 includes: Deploy the trained reinforcement learning agent; the agent receives the current system state. Through the enhanced state sequence The optimal segmentation strategy is selected based on the trained agent, expressed as:

[0023] in, For optimal action, The parameter that makes the function take the maximum value, These are the parameters of the trained network. Based on agent decision-making, define the segmentation granularity parameter. , These are segmentation based on corresponding levels, component segmentation, and parameter segmentation, with the following segmentation strategies: Contains a set of split points and device allocation mapping ,in, For the first One dividing point, The total number of dividing points. To divide the points Distributed to equipment Mapping functions to ensure load balancing:

[0024] in, The weights of segmented block j are calculated. To be allocated to equipment The set of all split points, As a load balancing factor, Total number of DCU devices; A distributed training coordinator is established to manage data flow and gradient synchronization among DCU devices. An asynchronous parameter update mechanism is adopted, and a communication scheduling strategy is defined as follows:

[0025] in, To synchronize time, To calculate the cost, For minimum bandwidth, To maximize the synchronization interval, a reinforcement learning agent continuously monitors the training status and dynamically adjusts the segmentation strategy to adapt to load changes, thereby achieving adaptive distributed parallel training optimization.

[0026] The beneficial effects of this invention are: 1. This invention introduces a multi-head state-derived linearized attention mechanism when training an agent using reinforcement learning to enhance the agent's state representation. Then, the agent is applied to the training of components on the DCU platform. By segmenting the components during training, the training efficiency of the components is improved.

[0027] 2. This invention enables components to handle complex and crowded scenarios more effectively by adjusting attention allocation, while adopting a linear attention mechanism to reduce computational load.

[0028] 3. This invention maintains the original interface and structure of the IEC61499 standard components, and uses an agent enhanced by state linearization to perform segmented training on the model, reducing training time and realizing computational load balancing and training acceleration in a distributed environment. It provides an efficient and scalable component training solution for demanding scenarios such as large-scale crowd counting. Attached Figure Description

[0029] Figure 1 This is a flowchart of the steps of the present invention; Figure 2 This is a schematic diagram of the overall framework of an embodiment of the present invention; Figure 3 This is a schematic diagram of the dynamic state enhancement based on the linearized attention mechanism of the present invention. Detailed Implementation

[0030] To better understand this technical solution, the present invention will be described in further detail below with reference to the accompanying drawings.

[0031] Example 1: As Figure 1 As shown, the intelligent model segmentation training method based on DCU state enhancement for IEC61499 includes the following steps: Step 1: The number of attention heads is dynamically adjusted by the complexity of the state vector. The multi-head attention matrix is ​​generated by obtaining the multi-head attention score through parallel computing. Then, the multi-head attention matrix is ​​linearized and optimized by the Nyström matrix approximation method. In the state history space, the historical state closest to the current state is selected for sampling based on Euclidean distance. The enhanced state sequence is calculated by combining the attention enhancement mechanism, thereby providing an optimized state representation for subsequent segmentation learning.

[0032] Optionally, define a set of devices. Includes DCU accelerator card device set With general computing node set Each DCU device With computing resources Memory bandwidth is The video memory capacity is ; intelligent model Defined as a six-tuple ,in, , For input / output interfaces compliant with IEC 61499 standard, For component model parameters, store model content configuration information. This is the component state space, which encompasses the component's runtime state. For delay constraints, For DCU adaptation parameters, the resource-aware component mapping table is as follows: The component mapping table represents the components Bind to DCU device and corresponding computing resources Memory bandwidth superior; Optionally, in this embodiment, the DCU can be a Sugon DCU accelerator card. Furthermore, the intelligent model in this embodiment can be a large-scale crowd counting intelligent model, such as... Figure 2 The diagram shows the overall framework for training a large-scale intelligent model for crowd counting based on the Sugon DCU accelerator card in this embodiment.

[0033] Optionally, define a state vector. ,in, For feature dimension, w The state vector, defined as a time step, includes the device's real-time memory bandwidth. Calculate resource utilization rate and component input feature entropy Introducing a DCU memory bandwidth adjustment factor, the state vector complexity is defined as follows: :

[0034] in, Represents the length of the vector. For input dimensions, For smoothing parameters, To achieve average memory bandwidth, memory bandwidth normalization is used to achieve a unified measurement of complexity across devices. In this embodiment, we can take... ; The number of heads to be adjusted is obtained based on the state vector complexity. The calculation formula is:

[0035] In the formula, Based on the number of attention heads, To maximize the number of heads that can receive attention, This indicates rounding down. Calculate the resource sensitivity coefficient for the DCU. , This refers to the current real-time available computing resources for the DCU.

[0036] Optionally, for the input feature matrix ,in, It is the sequence length. It is a feature dimension, which undergoes a linear transformation to generate a query matrix Q, a key matrix K, and a value matrix V:

[0037] in, This is the weight matrix. The dimension of the key vector; Multi-head attention mechanism through The attention score is calculated in parallel branches:

[0038] in, Representing the The output of each attention head, The function converts the dot product result into a probability weight matrix. Dimensional normalization is used to avoid numerical instability. for The split submatrix; Will The individual outputs are merged into a single output. :

[0039] in, The function concatenates the outputs of all attention heads together. The output weight matrix is ​​the parameter matrix for concatenating the outputs of multiple attention heads and then performing a linear transformation. It is understandable that this embodiment captures multi-dimensional feature associations through multi-head parallel computing, and generates model segmentation decision vectors after linear transformation and fusion, thereby improving the segmentation accuracy in complex scenarios.

[0040] Optionally, based on the number of DCU devices Determine the number of reference points , The reference point matrix for the basic reference factor and hardware weights. , The formula is defined as:

[0041] In the formula, The segment length is... Original features Average computing resources for the DCU cluster; The attention matrix is ​​approximated using the Nyström low-rank approximation. Approximating a linearized attention matrix :

[0042] in, This is the DCU device association matrix, where the diagonal elements represent the memory bandwidth percentage of each device, and the off-diagonal elements represent the communication latency weights between devices. For reference point matrix , The simplified matrix, As a memory bandwidth penalty factor, based on the DCU cluster topology, the computational complexity is reduced to... , The sequence length; It is understandable that this embodiment significantly reduces memory usage and computation time in distributed training while maintaining computational accuracy by optimizing the multi-head attention matrix, thereby improving the parallel processing efficiency of the intelligent model.

[0043] Optionally, the linearized attention matrix The process for historical state sampling and filtering based on Euclidean distance includes: Based on a preset base threshold Introduce DCU hardware parameters to calculate the current state. With historical status European distance The expression is:

[0044] in, This represents the current remaining video memory capacity of the DCU. The maximum video memory capacity of the DCU is used to filter the state of video memory-sensitive scenes by weighted distance based on video memory capacity. Calculate the dynamic threshold based on distance and memory bandwidth attenuation factor. The expression is:

[0045] European distance With dynamic threshold If a comparison is made, Then the historical state Determined as a valid historical state; For each defined valid historical state to Combining to form state pairs The enhanced state sequence is calculated using a linear attention mechanism. ; It is understandable that this embodiment automatically selects the most informative historical states by dynamically adjusting the distance threshold to enhance state generation, effectively avoiding interference from invalid states in scenarios with high video memory usage.

[0046] Step 2: Construct a reinforcement learning agent. Using the enhanced state sequence as the starting input for reinforcement learning, the agent learns the optimal segmentation strategy for the distributed parallel training intelligent model through iterative optimization, thus completing the training of the reinforcement learning agent.

[0047] Optionally, a reinforcement learning environment is constructed, and a state space is defined. Includes device computing resources Network bandwidth Component load With real-time latency; Define the action space A = ,in, This is a model partitioning strategy based on DCU core count calculation. Total number of strategies; Design a comprehensive reward function Used to indicate time status and actions The corresponding reward is expressed as:

[0048] in, Rewards for training efficiency Incentives for resource utilization Penalty for communication overhead, These are the weighting coefficients, and .

[0049] The Deep Q-Network architecture (DQN) is used, with the network input being an enhanced state sequence. The output is the Q-value of each segmentation strategy, and the loss function is defined as:

[0050] in, For loss function, For network parameters, For instant rewards, Represents the mathematical expectation. As a discount factor, This is used to balance the weights of current and future rewards. Representing state Take action below The value estimate, Indicates the execution of an action The next state after transitioning to Indicates the next state The actions taken by China The target network parameters are used to stabilize the training process through experience replay and target network update mechanisms. A greedy strategy is employed to balance exploration and exploitation, and the probability of taking random exploration actions is also considered. The value decreases as the training progresses.

[0051] Through multiple rounds of interaction and reward feedback, the agent can learn the optimal model segmentation strategy adapted to distributed parallel training based on enhanced state information, thereby achieving dynamic optimization of resource utilization and training efficiency.

[0052] Step 3: Deploy the trained reinforcement learning agent and use the learned optimal segmentation strategy to intelligently split the intelligent model.

[0053] Optionally, a trained reinforcement learning agent is deployed, which receives the current system state. Through the enhanced state sequence The optimal segmentation strategy is selected based on the trained agent, expressed as:

[0054] in, For optimal action, The parameter that makes the function take the maximum value, These are the parameters of the trained network.

[0055] Based on agent decision-making, define the segmentation granularity parameter. , These are segmentation based on corresponding levels, component segmentation, and parameter segmentation, with the following segmentation strategies: Contains a set of split points and device allocation mapping ,in, For the first One dividing point, The total number of dividing points. To divide the points Distributed to equipment Mapping functions to ensure load balancing:

[0056] in, The calculated weight of segment j (in FLOPS). To be allocated to equipment The set of all split points, As a load balancing factor, This represents the total number of DCU devices.

[0057] A distributed training coordinator is established to manage data flow and gradient synchronization among DCU devices. An asynchronous parameter update mechanism is adopted, and a communication scheduling strategy is defined as follows:

[0058] in, To synchronize time, To calculate the cost, For minimum bandwidth, To maximize the synchronization interval, a reinforcement learning agent continuously monitors the training status and dynamically adjusts the segmentation strategy to adapt to load changes, thereby achieving adaptive distributed parallel training optimization.

[0059] Understandably, reinforcement learning agents achieve distributed splitting of intelligent models based on the computational load and communication costs between accelerator cards, and support distributed parallel training, thereby improving overall training efficiency and resource utilization.

[0060] To verify the effectiveness of this invention, comparative experiments were conducted with various existing methods, including traditional segmentation learning, the FedAdapt framework, state noise injection, and state smoothing methods. Table 1 shows the comparison results of each method in terms of time complexity, space complexity, and average training time.

[0061] Table 1. Comparison of segmentation learning training time under different augmentation states

[0062] As can be seen from the table, under the same complexity conditions, this invention can significantly shorten the training time. For example, while maintaining both time and space complexity at O(n), the average training time for traditional segmentation learning is 38.359 s, for the FedAdapt framework it is 29.215 s, while this invention (linear attention state enhancement) only requires 24.898 s, improving training efficiency by approximately 15% compared to the FedAdapt framework. The comprehensive experimental results demonstrate that this invention significantly improves training efficiency while ensuring convergence, exhibiting better applicability and scalability.

[0063] The specific embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.

Claims

1. A smart model segmentation training method based on DCU state enhancement IEC61499, characterized in that, The method includes the following steps: Step 1: Dynamically adjust the number of attention heads by adjusting the state vector complexity, and generate a multi-head attention matrix by obtaining the multi-head attention score through parallel computing. Then, use the Nyström matrix approximation method to linearize and optimize the multi-head attention matrix. In the state history space, select the historical state that is closest to the current state based on Euclidean distance for sampling, and calculate the enhanced state sequence by combining the attention enhancement mechanism. Step 2: Construct a reinforcement learning agent. Using the enhanced state sequence as the starting input for reinforcement learning, the agent learns the optimal segmentation strategy of the intelligent model that is adapted to distributed parallel training through iterative optimization, thus completing the training of the reinforcement learning agent. Step 3: Deploy the trained reinforcement learning agent and use the learned optimal segmentation strategy to intelligently split the intelligent model; Step 1 includes: Define device set Includes DCU accelerator card device set With general computing node set Each DCU device has computing resources of Memory bandwidth is The video memory capacity is Intelligent Model Defined as a six-tuple ,in, , For input and output interfaces that comply with the IEC 61499 standard, For component model parameters, store model content configuration information. This is the component state space, which encompasses the component's runtime state. For delay constraints, For DCU adaptation parameters, the resource-aware component mapping table is as follows: The component mapping table represents the components Bind to DCU device and corresponding computing resources Memory bandwidth superior; Define state vector ,in, The state vector contains the device's real-time memory bandwidth, where w is the feature dimension and w is the time step. Calculate resource utilization rate and component input feature entropy Introducing a DCU memory bandwidth adjustment factor, the state vector complexity is defined as follows: : ; in, Represents the length of the vector. For input dimensions, For smoothing parameters, The average memory bandwidth is given by t, which represents time. The number of adjustment heads is obtained based on the state vector complexity. The calculation formula is: ; In the formula, Based on the number of attention heads, To maximize the number of heads that can receive attention, This indicates rounding down. Calculate the resource sensitivity coefficient for the DCU. , The current real-time available computing resources for the DCU; For the input feature matrix ,in, It is the sequence length. It is a feature dimension, which undergoes a linear transformation to generate a query matrix Q, a key matrix K, and a value matrix V: ; in, This is the weight matrix. For the key vector dimension, the multi-head attention mechanism uses... The attention score is calculated in parallel branches: ; in, This represents the output of the a-th attention head. The function converts the dot product result into a probability weight matrix. Dimensional normalization is used to avoid numerical instability. for The split submatrix will The individual outputs are merged into a single output. : ; in, The function concatenates the outputs of all attention heads together. To output the weight matrix; Based on the number of DCU devices Determine the number of reference points , The reference point matrix for the basic reference factor and hardware weights. , The formula is defined as: ; In the formula, The segment length, Original features Average computing resources for the DCU cluster; The multi-head attention matrix is ​​approximated using the Nyström low-rank approximation. Approximating a linearized attention matrix : ; in, This is the DCU device association matrix, where the diagonal elements represent the memory bandwidth percentage of each device, and the off-diagonal elements represent the communication latency weights between devices. Based on the reference point matrix , The simplified matrix, As a memory bandwidth penalty factor, based on the DCU cluster topology, the computational complexity is reduced to... , The sequence length; The linearized attention matrix This process is used for historical state sampling and filtering based on Euclidean distance, including: based on a preset base threshold. Introduce DCU hardware parameters to calculate the current state. With historical status European distance The expression is: ; in, This represents the current remaining video memory capacity of the DCU. The maximum video memory capacity of the DCU is used to filter the state of video memory-sensitive scenes by weighted distance based on video memory capacity. Calculate the dynamic threshold based on distance and memory bandwidth attenuation factor. The expression is: ; European distance With dynamic threshold If a comparison is made, Then the historical state Each determined valid historical state is considered a valid historical state. , and Combining to form state pairs And the enhanced state sequence is calculated through the attention enhancement mechanism. .

2. The intelligent model segmentation training method based on DCU state enhancement for IEC61499 according to claim 1, characterized in that, Step 2 includes: Construct a reinforcement learning environment and define the state space. Includes device computing resources Memory bandwidth Delay constraints With real-time latency; Define the action space A = ,in, This is a model partitioning strategy based on DCU core count calculation. Total number of strategies; Design a comprehensive reward function Used to indicate time status and actions The corresponding reward is expressed as: ; in, Rewards for training efficiency Incentives for resource utilization Penalty for communication overhead, These are the weighting coefficients, and ; The Deep Q-Network architecture (DQN) is used, with the network input being an enhanced state sequence. The output is the Q-value of each segmentation strategy, and the loss function is defined as: ; in, For loss function, For network parameters, For instant rewards, Represents the mathematical expectation. As a discount factor, Used to balance the weights of current and future rewards, Q(s,f;θ) represents the value estimate of taking action f in state s. This indicates the next state transitioned to after action f is performed. Indicates the next state The actions taken by China The target network parameters are used to stabilize the training process through experience replay and target network update mechanism, and a greedy strategy is adopted to balance exploration and utilization, and the probability of taking random exploration actions decreases as the training progresses. Through multiple rounds of interaction and reward feedback, the agent learns the optimal model segmentation strategy adapted to distributed parallel training based on enhanced state information.

3. The intelligent model segmentation training method based on DCU state enhancement for IEC61499 according to claim 2, characterized in that, Step 3 includes: Deploy the trained reinforcement learning agent; the agent receives the current system state. Through the enhanced state sequence The optimal segmentation strategy is selected based on the trained agent, expressed as: ; in, For optimal action, The parameter that makes the function take the maximum value, These are the parameters of the trained network. Based on agent decision-making, define the segmentation granularity parameter. , These are segmentation based on corresponding levels, component segmentation, and parameter segmentation, with the following segmentation strategies: Contains a set of split points and device allocation mapping ,in, For the b-th dividing point, The total number of dividing points. To divide the points Distributed to equipment Mapping functions to ensure load balancing: ; in, The weights for segmenting block b are calculated. To be allocated to equipment The set of all split points, As a load balancing factor, Total number of DCU devices; A distributed training coordinator is established to manage data flow and gradient synchronization among DCU devices. An asynchronous parameter update mechanism is adopted, and a communication scheduling strategy is defined as follows: ; in, To synchronize time, To calculate the cost, For minimum bandwidth, To maximize the synchronization interval, a reinforcement learning agent continuously monitors the training status and dynamically adjusts the segmentation strategy to adapt to load changes, thereby achieving adaptive distributed parallel training optimization.

Citation Information

Patent Citations

  • Edge-side multi-modal Transform model-oriented reasoning unloading optimization method

    CN117215795A