Turbine cooler control model compression method and device based on intelligent model
Optimizing the compression of the turbine cooler control model through intelligent model and knowledge distillation technology, the problem of insufficient compression rate and performance in the existing technology is solved, and efficient deployment and performance improvement on limited computing resources are achieved.
Patent Information
- Application Number
- CN202411149596.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-08-21
AI Technical Summary
The existing neural network compression method fails to perform network compression in combination with specific tasks, and it is difficult to converge to the optimal network structure state by relying on manual setting of compression, resulting in large loss of network performance after compression and difficult to deploy on an onboard embedded platform. .
Using a compression method based on the agile model, the compression ratio of the turbine cooler control model is predicted and optimized, and combined with knowledge distillation to optimize the model structure and parameters, the fine compression of the model and the fine compression of the model and Performance improvement.
Improve the precision and effect of compression operations, reduce the dependence on human experience, improve the scientificity of the model and the deployment ability on limited computing resources, overcome the problem of high redundancy of deep neural network structural parameters, and improve the The compression ratio and performance of the turbine cooler control model.
Smart Images

Figure CN118655788B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of aerospace technology, and in particular to a method and device for compressing a turbine cooler control model based on an intelligent agent model. Background Art
[0002] With the increase in combat requirements of fighter jets, the mission load of airborne electromechanical systems is constantly upgraded, and the control requirements for electromechanical actuators such as turbines and compressors are getting higher and higher. The control method based on deep neural networks has become an effective means to improve the operating performance of electromechanical actuators. When using intelligent control neural networks to implement intelligent tasks on the airborne electromechanical system side, it is generally necessary to compress the structure and parameters of the intelligent control neural network to reduce the scale of the neural network intelligent algorithm and reduce its requirements for hardware computing and storage resources so that it can be deployed on the airborne embedded control platform.
[0003] Current network compression methods are mostly based on expert experience. They manually set the compression ratio of the neural network, and then identify the neurons / convolution kernels to be pruned in the neural network according to certain criteria, and then perform corresponding pruning actions to delete redundant nodes in the original neural network.
[0004] However, current neural network compression methods fail to combine network compression with specific tasks. It is difficult to converge to the optimal network structure state by manually setting the network compression rate, and only fine-tuning the parameters of the resulting lightweight network is performed after the network structure compression is completed. This network structure compression and performance optimization method has too large granularity, and the network performance loss after compression is large, and there are deficiencies in both compression rate and performance. Summary of the invention
[0005] In view of this, the present application provides a method and device for compressing a turbine cooler control model based on an intelligent agent model, which can improve the compression rate and performance of the turbine cooler control model.
[0006] Specifically, the present application is implemented through the following technical solutions:
[0007] In a first aspect, the present application provides a method for compressing a turbine cooler control model based on an agent model, the method comprising:
[0008] Constructing an intelligent agent model, the intelligent agent model is used to calculate the compression value of each layer in the turbine cooler control model, the intelligent agent model at least includes an action network and an evaluation network;
[0009] Training the action network based on the evaluation network, wherein the training at least includes: calculating an output estimation value of the action network based on the evaluation network, and training the action network based on the output estimation value;
[0010] Predicting a compression ratio based on the trained agent model, the compression ratio including compression ratios of each layer of the turbine cooler control model;
[0011] compressing the turbo cooler control model based on the compression ratio;
[0012] The compressed turbine cooler control model is optimized based on knowledge distillation, and the compression ratio predicted by the trained agent model is returned until the size and performance of the optimized turbine cooler control model meet a preset threshold.
[0013] A second aspect of the present application provides a turbine cooler control model compression device based on an agent model, the device comprising a construction module, a training module, a prediction module, a compression module and an optimization module;
[0014] The construction module is used to construct an intelligent agent model, and the intelligent agent model is used to calculate the compression value of each layer in the turbine cooler control model, and the intelligent agent model includes at least an action network and an evaluation network;
[0015] The training module is used to train the action network based on the evaluation network, wherein the training at least includes: calculating the output estimation value of the action network based on the evaluation network, and training the action network based on the output estimation value;
[0016] The prediction module is used to predict the compression ratio based on the trained agent model, and the compression ratio includes the compression ratio of each layer of the turbine cooler control model;
[0017] The compression module is used to compress the turbine cooler control model based on the compression ratio;
[0018] The optimization module is used to optimize the compressed turbine cooler control model based on knowledge distillation, and return the compression ratio predicted by the trained intelligent model until the size and performance of the optimized turbine cooler control model meet a preset threshold.
[0019] The method and device for compressing the turbine cooler control model based on the intelligent model provided in the present application, compared with the compression ratio of the entire model obtained by artificially setting thresholds and matching methods in the prior art, on the one hand, by constructing an intelligent model to predict the compression ratio of each layer of the model, from the perspective of compression granularity, the fineness of the compression operation is greatly improved, the compression effect is improved, and from the perspective of the method of obtaining the compression ratio, the dependence on human experience is reduced, and the scientific nature of the model compression is improved; based on the structured pruning method, the turbine cooler inlet pressure turbine cooler control model is structurally compressed, so that the compressed network can be deployed on an airborne electromechanical system controller with extremely limited computing resources; based on the reinforcement learning method, the structural pruning process of the turbine cooler control model network is autonomously optimized, and the optimal network compression strategy (compression ratio of each layer of the network) can be output in real time according to the network structure state. On the other hand, the training of the intelligent agent is completed based on the value evaluation value of the output of the evaluation network. In addition to the traditional similarity between the predicted output and the sample output, the present invention also introduces the output value evaluation value to evaluate the prediction ability of the model, thereby improving the accuracy of the model prediction. On the other hand, after the model is compressed, the present invention also combines the knowledge distillation method to optimize the compressed model, integrates the knowledge distillation process into the model compression process, and based on the knowledge distillation method, performs parameter fine-tuning and optimization on the compressed turbine cooler control model network. The knowledge distillation process is integrated into the network structure autonomous compression process to achieve integrated optimization of the turbine cooler control model network structure and performance, overcoming the problem that the current deep neural network structure has high parameter redundancy and is difficult to deploy on the airborne embedded platform, thereby improving the compression rate and performance of the turbine cooler control model. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A flowchart of Embodiment 1 of a method for compressing a turbine cooler control model based on an agent model provided in the present application;
[0021] Figure 2 A schematic diagram of the structure of an action network shown as an exemplary embodiment of the present application;
[0022] Figure 3 This is a schematic diagram of the structure of an evaluation network shown in an exemplary embodiment of the present application;
[0023] Figure 4 A flowchart of Embodiment 2 of a method for compressing a turbine cooler control model based on an agent model provided in the present application;
[0024] Figure 5 This is a structural schematic diagram of Example 1 of a turbine cooler control model compression device based on an intelligent model provided in this application. DETAILED DESCRIPTION
[0025] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.
[0026] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more associated listed items.
[0027] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0028] The present application provides a method and device for compressing a turbine cooler control model based on an intelligent agent model, which can improve the compression rate and performance of the turbine cooler control model.
[0029] The method and device for compressing the turbine cooler control model based on the intelligent model provided in the present application, compared with the compression ratio of the entire model obtained by artificially setting thresholds and matching methods in the prior art, on the one hand, by constructing an intelligent model to predict the compression ratio of each layer of the model, from the perspective of compression granularity, the fineness of the compression operation is greatly improved, the compression effect is improved, and from the perspective of the method of obtaining the compression ratio, the dependence on human experience is reduced, and the scientific nature of the model compression is improved; based on the structured pruning method, the turbine cooler inlet pressure turbine cooler control model is structurally compressed, so that the compressed network can be deployed on an airborne electromechanical system controller with extremely limited computing resources; based on the reinforcement learning method, the structural pruning process of the turbine cooler control model network is autonomously optimized, and the optimal network compression strategy (compression ratio of each layer of the network) can be output in real time according to the network structure state. On the other hand, the training of the intelligent agent is completed based on the value evaluation value of the output of the evaluation network. In addition to the traditional similarity between the predicted output and the sample output, the present invention also introduces the output value evaluation value to evaluate the prediction ability of the model, thereby improving the accuracy of the model prediction. On the other hand, after the model is compressed, the present invention also combines the knowledge distillation method to optimize the compressed model, integrates the knowledge distillation process into the model compression process, and fine-tunes and optimizes the parameters of the compressed turbine cooler control model network based on the knowledge distillation method. The knowledge distillation process is integrated into the network structure autonomous compression process to achieve integrated optimization of the turbine cooler control model network structure and performance, overcoming the current problem of high parameter redundancy of deep neural network structure and difficulty in deployment on the airborne embedded platform, and improving the compression rate and performance of the turbine cooler control model. Specific embodiments are given below to introduce the technical solution of the present application in detail.
[0030] Figure 1 This is a flow chart of the first embodiment of the method for compressing the turbine cooler control model based on the intelligent model provided in this application. Figure 1 , the method provided in this embodiment may include:
[0031] S101. Construct an intelligent agent model, wherein the intelligent agent model is used to calculate the compression value of each layer in the turbine cooler control model, and the intelligent agent model at least includes an action network and an evaluation network.
[0032] It should be noted that the role of the intelligent agent model is actually to optimize the pruning process of the turbine cooler control model through reinforcement learning. Among them, the intelligent agent model includes at least an action network and an evaluation network; the action network is used to generate a pruning strategy under a specific state, that is, the compression ratio of each layer in the neural network; the evaluation network is used to evaluate the output estimated value of the current action network and guide the training of the action network. In addition, the basic network form of the action network and the evaluation network can be a fully connected neural network.
[0033] S102. Training the action network based on the evaluation network, wherein the training at least includes: calculating an output estimation value of the action network based on the evaluation network, and training the action network based on the output estimation value.
[0034] It should be noted that the input of the action network is the observed structural state, parameter quantity, calculation quantity and compression ratio of the turbine cooler control model, and the output of the action network is the compression ratio of each layer of the turbine cooler control model under the current observation state;
[0035] The input of the evaluation network is the observed structural state S of the agent model i and compression ratio a i , the output of the evaluation network is the estimated value Q(S i , a i ); wherein the estimated value is used to evaluate the value of the compression ratio of the action network output. Specifically, the estimated value mainly considers the network comprehensive compression ratio ratio_c (based on the compression ratio a i The calculated total compression ratio) and the performance loss value ratio_d after compression are calculated using the following formula:
[0036] Q(S i , a i ) = α*ratio_c – β*ratio_d;
[0037] Among them, α and β are weight coefficients. According to this formula, the greater the compression ratio, the higher the estimated value; the greater the performance loss, the lower the estimated value.
[0038] Figure 2 This is a schematic diagram of the structure of the action network shown in an exemplary embodiment of the present application. Figure 2 The action network consists of 1 input layer, 3 intermediate layers and 1 output layer. The input layer contains 8 neurons, the three intermediate layers contain 200, 300 and 200 neuron nodes respectively, and the output layer contains only 5 neurons, which are used to output the action in the structural state S i The expected compression ratio a i .
[0039] Figure 3 This is a schematic diagram of the structure of the evaluation network shown in an exemplary embodiment of the present application. Figure 3 The evaluation network consists of 1 input layer, 3 intermediate layers and 1 output layer. The input layer contains 9 neurons for inputting the current layer structure state S iand the corresponding compression ratio; the three middle layers contain 200, 300, and 200 neuron nodes respectively; the output layer contains only 1 neuron, which is used to output the state S i The estimated value of the next action a is Q(S i , a i ).
[0040] S103. Predicting a compression ratio based on the trained intelligent agent model.
[0041] Specifically, the compression ratio includes the compression ratio of each layer of the turbine cooler control model, and the action network predicts the compression ratio of each layer based on the input current network state (structural state, parameter quantity, calculation quantity and compressed ratio of the turbine cooler control model). In specific implementation, the current network state information is input into the action network, the action network processes the input information, generates the compression ratio of each layer through forward propagation, and then collects the output of the action network to obtain the compression ratio of each layer.
[0042] As an optional embodiment, the compression ratio prediction based on the trained intelligent agent model specifically includes: identifying idle resources at the embedded end to be deployed, predicting standby resources based on the tasks to be executed of the turbine cooler control model and the idle resources; calculating the model storage reserve space based on the difference between the idle resources and the standby resources, and inputting the model storage reserve space as a prompt word into the intelligent agent model, the action network predicts the compression ratio of each layer according to the current network state of the turbine cooler control model and the prompt word, and the space occupied by the turbine cooler control model deployed at the embedded end to be deployed is less than or equal to the model storage reserve space.
[0043] The method provided by the present invention uses a prompt engineering method to adjust the model according to the needs of the model utilization link in the initial stage of model compression, that is, to adjust the model size and performance of the input end according to the needs of the result end, and to advance the needs through the role of prompt words, thereby greatly improving the matching degree between the compressed model and the embedded terminal and improving the utilization rate of the model.
[0044] Optionally, when predicting the compression ratio, a layer relationship graph is constructed according to the input-output connection relationship of each layer of the turbine cooler control model, and the layer combination is determined based on the layer relationship graph. The compression ratios of each layer in the layer combination are simultaneously predicted in an associated manner, and the compression ratios of each uncombined layer are predicted independently. Ultimately, the layer compression ratios of each layer of the turbine cooler control model may be exactly the same, completely different, or partially the same and partially different.
[0045] Optionally, when predicting the compression ratio, the intelligent agent model may regard each layer as an independent layer and predict the compression ratio corresponding to each layer respectively.
[0046] The method provided by the present invention, when using an intelligent agent for compression, selects a prediction method based on a balanced demand for prediction accuracy and demand for prediction calculation amount, that is, it can not only predict the output of each layer, but also package and perform combined prediction based on the input-output relationship of the layer, thereby reducing the prediction calculation amount on the basis of ensuring prediction accuracy.
[0047] S104. Compress the turbine cooler control model based on the compression ratio.
[0048] It should be noted that the turbine cooler control model is constructed based on the optimal inlet pressure data set of the turbine cooler after offline optimization. It should also be noted that in order to ensure the performance of the turbine cooler control model, the number of neuron nodes in the network must be sufficient. Specifically, each layer in the network can be divided into a first neuron layer and a second neuron layer according to the number of neurons; wherein the number of neurons in the first neuron layer is less than the number of neurons in the second neuron layer. Generally, the number of neurons in the first neuron layer is very small, and the number of neurons in the second neuron layer is relatively large. For example, in one embodiment, the number of layers of the neural network of the uncompressed turbine cooler control model is 5, and the number of neurons in each layer of the network is 4, 200, 400, 200, and 1, respectively.
[0049] Specifically, compressing the turbine cooler control model based on the compression ratio includes:
[0050] (1) Obtain the real-time compression ratio of the action network output in the current state.
[0051] (2) Extract the convolution kernels of the network layer to be compressed, calculate the importance of each convolution kernel and sort them.
[0052] Specifically, the convolution kernels (or neuron weights) of the network layer to be compressed are extracted, and the importance of each convolution kernel is calculated and sorted based on the L1 norm.
[0053] (3) Determine the number of units to be pruned according to the compression ratio of each layer of the intelligent agent model output by the action network, and delete the convolution kernels whose importance ranking is lower than a preset value based on the importance ranking.
[0054] S105. Optimize and compress the turbine cooler control model based on knowledge distillation, and return the compression ratio predicted by the intelligent agent model after training, until the size and performance of the optimized turbine cooler control model meet a preset threshold.
[0055] It should be noted that the control model of the turbo cooler after optimization and compression based on knowledge distillation includes:
[0056] The turbine cooler control model before compression is used as a teacher model, and the turbine cooler control model after compression is used as a student model. The loss function of the student model is reconstructed according to the outputs of the teacher model and the student model, and the student model is optimized.
[0057] It should be noted that commonly used knowledge distillation algorithms include basic knowledge distillation algorithm (the key idea is to transfer knowledge by letting the student model learn the output probability distribution of the teacher model), feature map-based knowledge distillation (this method not only transfers the output probability distribution, but also transfers the feature map of the intermediate layer), layer-by-layer distillation (by transferring knowledge layer by layer, the output of each layer of the teacher model is guided to the student model layer by layer), and adaptive knowledge distillation (the adaptive knowledge distillation method adaptively adjusts the way of knowledge transfer according to the learning state of the student model). Specifically, the basic knowledge distillation algorithm is used as an example to illustrate, including:
[0058] Train the teacher model: Train a large and high-performing teacher model using standard training methods.
[0059] Calculate soft targets; use the teacher model to predict the training data and generate soft targets. The soft target is the probability distribution of the teacher model output, and the output is smoothed by a Softmax function with a high temperature parameter.
[0060] Train the student model; the student model is trained by minimizing a two-part loss function: the cross entropy loss between the student model and the soft targets output by the teacher model, and the cross entropy loss between the student model and the true labels.
[0061] In specific implementation, the real-time output speed of the teacher model is used as a soft label, and the training sample is used as a hard label to reconstruct the loss function of the compressed student model; then, the student model is optimized according to the loss function. In this way, the performance loss caused by neuron pruning in the network can be compensated, and the performance of the turbine cooler control model can be improved.
[0062] It should also be noted that when the performance and scale of the intelligent agent model meet the preset threshold, embedded-end deployment is performed; when the performance and scale of the intelligent agent model do not meet the preset threshold, the step of training the action network based on the evaluation network is returned.
[0063] The method for compressing the turbine cooler control model based on the intelligent model provided in this embodiment is compared with the compression ratio of the entire model obtained by artificially setting thresholds and matching methods in the prior art. On the one hand, by constructing an intelligent model to predict the compression ratio of each layer of the model, the fineness of the compression operation is greatly improved from the perspective of compression granularity, and the compression effect is improved. From the perspective of the method of obtaining the compression ratio, the dependence on human experience is reduced, and the scientific nature of the model compression is improved; based on the structured pruning method, the turbine cooler inlet pressure turbine cooler control model is structurally compressed, so that the compressed network can be deployed on an airborne electromechanical system controller with extremely limited computing power resources; based on the reinforcement learning method, the structural pruning process of the turbine cooler control model network is autonomously optimized, and the optimal network compression strategy (compression ratio of each layer of the network) can be output in real time according to the network structure state. On the other hand, the training of the intelligent agent is completed based on the value evaluation value of the output of the evaluation network. In addition to the traditional similarity between the predicted output and the sample output, the present invention also introduces the output value evaluation value to evaluate the prediction ability of the model, thereby improving the accuracy of the model prediction. On the other hand, after the model is compressed, the present invention also combines the knowledge distillation method to optimize the compressed model, integrates the knowledge distillation process into the model compression process, and based on the knowledge distillation method, performs parameter fine-tuning and optimization on the compressed turbine cooler control model network. The knowledge distillation process is integrated into the network structure autonomous compression process to achieve integrated optimization of the turbine cooler control model network structure and performance, overcoming the problem that the current deep neural network structure has high parameter redundancy and is difficult to deploy on the airborne embedded platform, thereby improving the compression rate and performance of the turbine cooler control model.
[0064] Figure 4 This is a flow chart of Embodiment 2 of the method for compressing a turbine cooler control model based on an intelligent agent model provided in this application. Figure 4 Based on the above embodiment, after compressing the turbine cooler control model based on the compression ratio, the method further includes:
[0065] S401, pruning the neuron nodes of each neuron layer in the turbine cooler control model according to the compression ratio predicted by the action network, and performing environmental interaction according to the pruning action.
[0066] It should be noted that the environment interaction is performed according to the pruning processing action, including:
[0067] (1) Inputting training samples into the compressed turbine cooler control model, wherein the training samples include optimal inlet pressure data of the turbine cooler under different working conditions and the corresponding optimal control parameters.
[0068] (2) Calculate the data fitting error of the turbo cooler control model after compression.
[0069] It should be noted that the data fitting error can be calculated by comparing the predicted value and the actual value of the turbine cooler control model. Commonly used error measurement methods include mean square error (MSE) and the like.
[0070] (3) Calculating a reward value according to the parameter quantity of the compressed turbine cooler control model, the total calculation quantity and the data fitting error.
[0071] (4) Updating the state of the intelligent control network pruning environment according to the reward value.
[0072] It should be noted that the network pruning environment is used to implement network pruning actions, fine-tune network parameters after pruning, and verify the classification performance of the network after each pruning. After updating the state of the intelligent control network pruning environment, the next network pruning action and action value evaluation process will be restarted, and multiple network pruning strategies and action exploration processes will be carried out.
[0073] S402: Optimize the compressed turbine cooler control model based on a deep reinforcement learning algorithm.
[0074] It should be noted that the process of optimizing the compressed turbine cooler control model based on the deep reinforcement learning algorithm can be regarded as a Markov process, which integrates the intelligent control body compression (pruning) process, parameter fine-tuning process, accuracy testing and network structure state statistics into one environment, and constructs an action value evaluation function based on network accuracy loss and network compression rate to guide network pruning.
[0075] Specifically, the compressed turbine cooler control model is optimized based on a deep reinforcement learning algorithm, including:
[0076] (1) Initializing the current state parameters of the turbine cooler control model and recording the state information of the turbine cooler control model and the environment before each pruning action.
[0077] (2) Pruning is performed according to the compression ratio to obtain new state parameters of the turbine cooler control model.
[0078] (3) Calculate the reward value of pruning under the current environmental state parameters to form sample data, where the sample data at least includes the state information of the environment before and after the change, the pruning processing action, and the reward value.
[0079] (4) Updating parameters of the action network and the evaluation network based on the training samples.
[0080] In specific implementation, the process of updating the parameters of the action network and the evaluation network based on the training samples is to create a real (online) network state and a target (target) network state for the action network and the evaluation network respectively, update the parameters of the action network and the evaluation network in the online state and the target state based on the SGD algorithm and the soft updata algorithm respectively, set the online network and target network parameter copy step, and update the action network and the evaluation network in the online state until the training is completed.
[0081] The agent-based turbine cooler control model compression method provided in this embodiment adopts a cyclic pruning strategy to further improve the compression rate of the turbine cooler control model network. In addition, a reinforcement learning method is used to autonomously optimize the compression strategy of the turbine cooler control model neural network, thereby overcoming the deficiency that manually set pruning strategies are difficult to converge to the optimal compression state of the network, thereby improving the compression rate and performance of the turbine cooler control model as a whole.
[0082] Corresponding to the aforementioned embodiment of a method for compressing a turbine cooler control model based on an intelligent agent model, the present application also provides an embodiment of a device for compressing a turbine cooler control model based on an intelligent agent model.
[0083] Figure 5 This is a schematic diagram of the structure of the first embodiment of the turbine cooler control model compression device based on the intelligent model provided in this application. Figure 5 , the device provided in this embodiment includes a construction module 510, a training module 520, a prediction module 530, a compression module 540 and an optimization module 550;
[0084] The construction module 510 is used to construct an intelligent agent model, and the intelligent agent model is used to calculate the compression value of each layer in the turbine cooler control model, and the intelligent agent model includes at least an action network and an evaluation network;
[0085] The training module 520 is used to train the action network based on the evaluation network, wherein the training at least includes: calculating the output estimation value of the action network based on the evaluation network, and training the action network based on the output estimation value;
[0086] The prediction module 530 is used to predict the compression ratio based on the trained agent model, and the compression ratio includes the compression ratio of each layer of the turbine cooler control model;
[0087] The compression module 540 is used to compress the turbine cooler control model based on the compression ratio;
[0088] The optimization module 550 is used to optimize the compressed turbine cooler control model based on knowledge distillation, and return the compression ratio predicted by the trained intelligent model until the size and performance of the optimized turbine cooler control model meet a preset threshold.
[0089] The device of this embodiment can be used to perform Figure 1 The steps, specific implementation principles and implementation processes of the method embodiment shown are similar and will not be repeated here.
[0090] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0091] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0092] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for compressing a turbine cooler control model based on an agent-based model, characterized in that: The method comprises: Constructing an intelligent agent model, the intelligent agent model is used to calculate the compression value of each layer in the turbine cooler control model, the intelligent agent model at least includes an action network and an evaluation network; Training the action network based on the evaluation network, wherein the training at least includes: calculating an output estimation value of the action network based on the evaluation network, and training the action network based on the output estimation value; Predicting a compression ratio based on the trained intelligent agent model, the compression ratio includes the compression ratio of each layer of the turbine cooler control model, wherein the idle resources of the embedded end to be deployed are identified, and the standby resources are predicted based on the tasks to be executed of the turbine cooler control model and the idle resources; the model storage reserve space is calculated based on the difference between the idle resources and the standby resources, and the model storage reserve space is used as a prompt word and input into the intelligent agent model, the action network predicts the compression ratio of each layer according to the current network state of the turbine cooler control model and the prompt word, and the space occupied by the turbine cooler control model deployed at the embedded end to be deployed is less than or equal to the model storage reserve space; compressing the turbo cooler control model based on the compression ratio; The compressed turbine cooler control model is optimized based on knowledge distillation, and the compression ratio predicted by the trained agent model is returned until the size and performance of the optimized turbine cooler control model meet a preset threshold.
2. The method according to claim 1, characterized in that The method of optimizing the compressed turbine cooler control model based on knowledge distillation comprises: The turbine cooler control model before compression is used as a teacher model, and the turbine cooler control model after compression is used as a student model. The loss function of the student model is reconstructed according to the outputs of the teacher model and the student model, and the student model is optimized.
3. The method according to claim 1, characterized in that: After compressing the turbine cooler control model based on the compression ratio, the method further includes: Pruning the neuron nodes of each neuron layer in the turbine cooler control model according to the compression ratio predicted by the action network, and performing environmental interaction according to the pruning action; The compressed turbine cooler control model is optimized based on a deep reinforcement learning algorithm.
4. The method according to claim 3, characterized in that The performing of environmental interaction according to the pruning processing action includes: Inputting the training samples into the compressed turbine cooler control model, wherein the training samples include optimal inlet pressure data of the turbine cooler under different working conditions and the corresponding optimal control parameters; Calculating a data fitting error of the compressed turbo cooler control model; Calculate the reward value according to the compressed parameter amount, the total calculation amount and the data fitting error of the turbo cooler control model; The intelligent control network pruning environment state is updated according to the reward value.
5. The method according to claim 1, characterized in that: The input of the action network is the observed structural state, parameter quantity, calculation quantity and compression ratio of the turbine cooler control model, and the output of the action network is the compression ratio of each layer of the turbine cooler control model under the current observation state; The input of the evaluation network is the observed structural state and compression ratio of the intelligent agent model, and the output of the evaluation network is an estimated value; wherein the estimated value is used to evaluate the value of the compression ratio output by the action network.
6. The method according to claim 1, characterized in that The control model for compressing the turbo cooler based on the compression ratio includes: Get the real-time compression ratio of the action network output in the current state; Extract the convolution kernels of the network layer to be compressed, calculate the importance of each convolution kernel and sort them; The number of units to be pruned is determined according to the compression ratio of each layer of the intelligent agent model output by the action network, and based on the importance ranking, the convolution kernels whose importance ranking is lower than a preset value are deleted.
7. The method according to claim 3, characterized in that The optimizing the compressed turbine cooler control model based on the deep reinforcement learning algorithm includes: Initializing the current state parameters of the turbine cooler control model, and recording the state information of the turbine cooler control model and the environment before each pruning action; Pruning is performed according to the compression ratio to obtain new state parameters of the turbine cooler control model; Calculate the reward value of pruning under the current environmental state parameters to form sample data, wherein the sample data at least includes the state information of the environment before and after the change, the pruning processing action, and the reward value; Parameters of the action network and the evaluation network are updated based on the sample data.
8. The method according to claim 2, characterized in that: The control model of the turbine cooler after the optimization compression based on knowledge distillation includes: Using the real-time output speed of the teacher model as a soft label and the training sample as a hard label, reconstructing the loss function of the compressed student model; According to the loss function, the student model is optimized.
9. The method according to claim 1, characterized in that: When the performance and scale of the agent model meet a preset threshold, deploying the model on an embedded end; When the performance and scale of the agent model do not meet a preset threshold, return to the step of training the action network based on the evaluation network.
10. A turbine cooler control model compression device based on an intelligent model, characterized in that: The device comprises a construction module, a training module, a prediction module, a compression module and an optimization module; The construction module is used to construct an intelligent agent model, and the intelligent agent model is used to calculate the compression value of each layer in the turbine cooler control model, and the intelligent agent model includes at least an action network and an evaluation network; The training module is used to train the action network based on the evaluation network, wherein the training at least includes: calculating the output estimation value of the action network based on the evaluation network, and training the action network based on the output estimation value; The prediction module is used to predict the compression ratio based on the trained intelligent agent model, and the compression ratio includes the compression ratio of each layer of the turbine cooler control model, wherein the idle resources of the embedded end to be deployed are identified, and the standby resources are predicted based on the tasks to be executed of the turbine cooler control model and the idle resources; the model storage reserve space is calculated based on the difference between the idle resources and the standby resources, and the model storage reserve space is used as a prompt word and input into the intelligent agent model, and the action network predicts the compression ratio of each layer according to the current network state of the turbine cooler control model and the prompt word, and the space occupied by the turbine cooler control model deployed at the embedded end to be deployed is less than or equal to the model storage reserve space; The compression module is used to compress the turbine cooler control model based on the compression ratio; The optimization module is used to optimize the compressed turbine cooler control model based on knowledge distillation, and return the compression ratio predicted by the trained intelligent model until the size and performance of the optimized turbine cooler control model meet a preset threshold.
