Self-adaptive intelligent control method and system
Through deep learning methods, the control strategies of electronic control equipment are automatically learned and optimized, which solves the problem that the existing technology is difficult to adapt to complex and dynamic environments, and realizes the stable and efficient operation of the equipment under various operating conditions.
Patent Information
- Application Number
- CN202510257368.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-06-03
AI Technical Summary
The existing electronic control equipment control methods are difficult to adapt to the equipment control needs in complex and dynamic environments, resulting in limited control effects and it is difficult to ensure the stability and efficiency of the equipment under various working conditions.
Deep learning methods are used to automatically learn and optimize control strategies, and data preprocessing is performed by collecting device status data, generating data sets, and training using convolutional neural network models to generate an adaptive control model. This model can generate the optimal task allocation strategy based on the device status data collected in real time, and automatically assign tasks to the electronic control equipment and schedule execution.
It realizes automatic adjustment of control strategies according to different working conditions, external disturbances and equipment status, enhances the robustness of the system, reduces the dependence on manual intervention, and ensures the stable operation and efficiency of the equipment under various working conditions.
Smart Images

Figure CN120085550A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric control equipment control, and particularly relates to an adaptive intelligent control method, system, computer medium, and terminal device. Background Art
[0002] With the rapid development of industrial automation and intelligence, electric control equipment is widely used in fields such as industry, transportation, energy, and home automation, including motor control, frequency converters, power system management, smart home devices, etc. The core of these devices is to achieve precise and real-time control to improve efficiency, reduce energy consumption, and ensure the long-term stable operation of the equipment.
[0003] Existing electric control equipment control methods are mostly based on pre-designed rules or models, such as PID control, fuzzy control, etc. These methods usually require professionals to perform detailed modeling and parameter tuning according to the equipment characteristics and working environment. Moreover, in the face of complex working conditions such as the nonlinear behavior of the equipment, external disturbances, and dynamic load changes, the control effect is limited, and it is difficult to adapt to the ever-changing working environment.
[0004] Therefore, there is an urgent need for an adaptive intelligent control method that can automatically adjust and optimize control strategies to meet the equipment control requirements in complex and dynamic environments, thereby ensuring the stability of electric control equipment under various working conditions. Summary of the Invention
[0005] Object of the Invention: To overcome the above deficiencies, the object of the present invention is to provide an adaptive intelligent control method, system, computer medium, and terminal device that can automatically learn and optimize control strategies according to the equipment state, environmental changes, and external disturbances, thereby ensuring the stability and efficiency of the equipment under various working conditions.
[0006] In a first aspect, the present application provides an adaptive intelligent control method, and the method includes the following steps:
[0007] Perform data preprocessing on the collected equipment state data to generate a data set;
[0008] Continuously train the data set using a deep learning method to obtain a trained adaptive control model. The training process is as follows: According to the data set, perform feature extraction and pattern recognition, and use the data set to train a convolutional neural network model to generate a trained adaptive control model;
[0009] Deploy the adaptive control model to the electric control equipment control system, and then input the real-time collected equipment state data into the deployed adaptive control model;
[0010] Generate an optimal task allocation strategy based on the task allocation matching degree of each electronic control device output by the adaptive control model;
[0011] Automatically allocate tasks to the electronic control devices according to the generated task allocation strategy and schedule the electronic control devices to execute.
[0012] In an alternative scheme of the first aspect, during data preprocessing, the method includes the following steps:
[0013] Collect the device status data of each electronic control device, which at least includes power level, real-time load, work history, operating temperature, and task type, and then use the interpolation method to fill in the missing data or remove outliers from the device status data;
[0014] Normalize the device status data to the same numerical range, and then mark the task types that the electronic control devices should execute under specific states according to the historical task data and the corresponding allocation results;
[0015] Compose the processed device status data into a training data set and a test data set according to the time series.
[0016] In an alternative scheme of the first aspect, when continuously training the data set using the deep learning method, the method includes the following steps:
[0017] Use the random initialization method to initialize the convolution kernels of the convolutional neural network model, the weight matrices of the fully connected layers, and the bias parameters;
[0018] According to the input training data set, use a one-dimensional convolutional neural network to extract convolutional features from the time series;
[0019] Perform downsampling on the extracted convolutional features through the max pooling operation to reduce the dimension of the features while retaining the key information of the features;
[0020] Map the output features to the task allocation probability space.
[0021] In an alternative scheme of the first aspect, when continuously training the data set using the deep learning method, the method further includes the following steps:
[0022] Use the cross-entropy loss function to evaluate the difference between the model prediction value and the true label:
[0023]
[0024] where, is the cross-entropy loss function, N is the number of training samples in the training data set, C is the number of task types, is the true label of the i-th sample in the c-th class, The probability of the i-th sample predicted by the model for the c-th class;
[0025] Calculate the gradient of the cross-entropy loss function with respect to each parameter by the backpropagation method of the chain rule;
[0026] Use the Adam optimization algorithm to perform momentum update and parameter update of the model;
[0027] Perform training iterations for a preset number of training rounds.
[0028] In an alternative embodiment of the first aspect, when continuously training the data set using the deep learning method, the method further includes the following steps:
[0029] After the training of each training round is completed, input the test data set into the trained convolutional neural network model to perform forward propagation to calculate the prediction result;
[0030] Use the cross-entropy loss function to calculate the loss value of the convolutional neural network model on the test data set;
[0031] Calculate at least one evaluation metric such as accuracy, recall, precision, and F1-score of the convolutional neural network model;
[0032] According to the loss value and the evaluation metric, determine whether the convolutional neural network model reaches the preset performance metric. If so, stop training in advance. If not, adjust the model structure and / or adjust the hyperparameters, and after the adjustment, retrain the model and use the test data set for verification again.
[0033] In an alternative embodiment of the first aspect, when generating the optimal task allocation strategy, the method includes the following steps:
[0034] Set the task priority according to the urgency level, importance level, or contribution level to the overall goal of the task;
[0035] Set the device status score according to the power level, real-time load, work history, operating temperature, and task type of the electric control device;
[0036] Calculate the matching degree between the task and each electric control device according to the task priority and the device status score, and use the greedy algorithm to preferentially assign the task with the highest matching degree to the corresponding device.
[0037] In an alternative embodiment of the first aspect, when the electric control device executes a task, the method includes the following steps:
[0038] Update the status score of each electric control device executing the task according to the device status data of the electric control device collected in real time;
[0039] Determine whether the electronic control device executing the task has a matching degree decrease exceeding a preset matching threshold or is unable to continue executing the task due to an abnormality. If so, mark the task executed by the problematic electronic control device as an abnormal task, and then recalculate the matching degree based on the latest device status score and task priority, and reassign the abnormal task to the electronic control device with the highest current matching degree. If not, proceed to the next step;
[0040] Determine whether the electronic control device executing the task has a load exceeding a preset load threshold. If so, mark the task of the high-load electronic control device as an abnormal task, and then recalculate the matching degree based on the latest device status score and task priority, and reassign the abnormal task to the low-load electronic control device with the highest current matching degree.
[0041] In an alternative solution of the first aspect, when generating the optimal task allocation strategy, the method further includes the following steps:
[0042] Determine whether there is a collaborative operation task. If so, calculate the matching degree between the collaborative operation task and each electronic control device and arrange the matching degrees of the electronic control devices in order;
[0043] Extract the number requirement of electronic control devices for the collaborative operation task and, based on the number requirement of electronic control devices, assign the collaborative operation task to the electronic control devices with a preset order of matching degrees.
[0044] In an alternative solution of the first aspect, when the electronic control device is executing a task, the method further includes the following steps:
[0045] Input the real-time collected device status data into the deployed adaptive control model, and then according to the abnormal probability of the electronic control device executing the task output by the adaptive control model;
[0046] Determine whether the electronic control device executing the task has an abnormal probability greater than a first preset abnormal threshold. If so, stop the first abnormal electronic control device and mark the task executed by the first abnormal electronic control device as an abnormal task, and then randomly assign the abnormal task to the electronic control device with an abnormal probability lower than a second preset abnormal threshold. If not, proceed to the next step;
[0047] Determine whether the electronic control device executing the task has an abnormal probability greater than a third preset abnormal threshold. If so, restart the second abnormal electronic control device and mark the task executed by the second abnormal electronic control device as a temporary task, and then randomly assign the temporary task to the electronic control device with an abnormal probability lower than the second preset abnormal threshold. After the second abnormal electronic control device is restarted, reassign the temporary task to the restarted second abnormal electronic control device.
[0048] In a second aspect, the present application provides an adaptive intelligent control system, including:
[0049] A data processing module, configured to perform data preprocessing on the collected device status data to generate a data set;
[0050] A deep learning module, configured to continuously train the data set by using a deep learning method to obtain a trained adaptive control model, and the training process is as follows: performing feature extraction and pattern recognition according to the data set, and using the data set to train a convolutional neural network model to generate a trained adaptive control model;
[0051] A model deployment module, configured to deploy the adaptive control model to an electric control device control system;
[0052] A policy allocation module, configured to input the real-time collected device status data into the deployed adaptive control model, and generate an optimal task allocation policy according to the task allocation probability of each electric control device output by the adaptive control model;
[0053] A policy execution module, configured to automatically allocate tasks to the electric control devices according to the generated task allocation policy and schedule the electric control devices to execute.
[0054] In a third aspect, the present application provides a computer medium, on which a computer program is stored, and the computer program is executed by a processor to implement the adaptive intelligent control method described above.
[0055] In a fourth aspect, the present application provides a terminal device, including the above computer medium and a processor.
[0056] The above technical solution of the present invention has the following advantages compared with the prior art:
[0057] 1. It can automatically adjust the control strategy according to different working conditions, external disturbances and device states, thereby effectively coping with external disturbances, enhancing the robustness of the system, reducing the dependence on manual intervention, and ensuring the stable operation of the system under various working conditions.
[0058] 2. It can set task priorities according to the urgency level, importance level or contribution level to the overall goal of the task, ensuring that high-priority tasks can obtain resources first, avoiding task delays or failures caused by improper resource allocation, and improving the response speed of the system and the completion quality of important tasks.
[0059] 3. It can dynamically adjust the task allocation policy according to the real-time status data of the device. When it is detected that the device status changes or the task matching degree decreases, the system can re-allocate tasks in time to ensure the continuous execution of tasks, thereby enhancing the robustness of the system in the face of environmental changes and device performance fluctuations, and ensuring the stable operation of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention or in the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on the provided drawings.
[0061] Figure 1 It is a flowchart of the adaptive intelligent control method provided by the embodiments of the present invention.
[0062] Figure 2 It is a flowchart of the data preprocessing method provided by the embodiments of the present invention.
[0063] Figure 3 It is a flowchart of the forward propagation method for model training provided by the embodiments of the present invention.
[0064] Figure 4 It is a flowchart of the model training optimization method provided by the embodiments of the present invention.
[0065] Figure 5 It is a flowchart of the model training verification method provided by the embodiments of the present invention.
[0066] Figure 6 It is a flowchart of the task allocation method provided by the embodiments of the present invention.
[0067] Figure 7 It is a flowchart of the collaborative task allocation method provided by the embodiments of the present invention.
[0068] Figure 8 It is a flowchart of the first abnormal repair method for the electric control device provided by the embodiments of the present invention.
[0069] Figure 9 It is a flowchart of the second abnormal repair method for the electric control device provided by the embodiments of the present invention.
[0070] Figure 10 It is a schematic connection diagram of the adaptive intelligent control system provided by the embodiments of the present invention.
[0071] Figure 11 It is a schematic module connection diagram of the adaptive intelligent control system provided by the embodiments of the present invention.
[0072] Description of the reference numerals in the specification drawings:
[0073] 1. Adaptive intelligent control system; 2. Electric control device; 100. Data processing module; 101. Deep learning module; 102. Model deployment module; 103. Policy allocation module; 104. Policy execution module. Detailed implementation manners
[0074] Embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are intended to explain the present invention, and should not be construed as limiting the present invention.
[0075] Referring to Figure 1 as shown, in some embodiments, the involved adaptive intelligent control method includes the following steps:
[0076] S1: According to the collected device status data, perform data preprocessing to generate a data set.
[0077] Referring to Figure 2 as shown, specifically, in step S1, during data preprocessing, the method includes the following steps:
[0078] S10: Collect device status data of each electric control device, which at least includes power level, real-time load, work history, operating temperature, and task type, and then use the interpolation method to fill in missing data or remove outliers for the device status data.
[0079] Among them, the device status data is the key status parameter of each electric control device, at least including: power level, which represents the remaining power of the electric control device, and the range is 0-100%; real-time load, which represents the real-time workload of the electric control device, and is the amount of tasks processed by the electric control device or the usage rate of CPU / GPU; work history, which represents the historical working hours or historical failure rate of the electric control device, usually represented by the cumulative working time (hours) or the number of failures in the past period of time; operating temperature, which represents the operating temperature of the electric control device; task type, which represents the type of task that the electric control device is currently processing, and different types of tasks can be represented by One-hot encoding.
[0080] After data collection, use the interpolation method (the interpolation method usually includes linear interpolation or spline interpolation, specifically set by the debugger according to actual needs, and refer to linear interpolation in this application) to fill in missing data, that is, for missing data points, use adjacent data points for linear interpolation; assume that at time points t i and t i+2 there is known data, and at t i+1 the data is missing, then the interpolation calculation is as follows:
[0081]
[0082] Among them, D(t i+1 ) represents the device status data at time point t i+1 , D(t i+2Indicates the time point t i+2 of the device status data, D(t i ) Indicates the time point t i of the device status data.
[0083] In some embodiments, the debugger removes the outliers in the device status data according to actual requirements. In this application, an outlier detection method based on the mean and standard deviation is used to remove the outliers in the device status data. For example: if |D(t) - μ| > σ × k, where μ is the mean of the device status data, σ is the standard deviation, and k is a constant with a value of 2 or 3.
[0084] S11: Normalize the device status data to the same numerical range, and then mark the task type that the electrical control device should execute in a specific state according to the historical task data and the corresponding allocation results.
[0085] Among them, after the missing data filling or outlier removal of the device status data is completed, the minimum-maximum normalization is used to normalize the device status data to the same numerical range, specifically as follows:
[0086]
[0087] Among them, D(t) is the device status data after missing data filling or outlier removal, D max is the maximum value of the device status data, D min is the minimum value of the device status data, D norm (t) is the normalized device status data.
[0088] Among them, when marking the electrical control device, for the device status data at each time point, find the corresponding historical task allocation record and mark the task type that the device should execute in this state; the annotation of the specific task type can use binary classification or multi-classification labels. Binary classification is the classification label of completed task or uncompleted task, and multi-classification label is the classification label of different task types, which is specifically set by the debugger according to actual requirements.
[0089] S12: Compose the processed device status data into a training data set and a test data set according to the time series.
[0090] Among them, select an appropriate time window size and combine the device status data at consecutive time points into samples. For example: when the selected window size is n, each sample contains the device status data at n consecutive time points:
[0091] X i = [D(t i ), D(t i+1 ), …, D(t i+n )], where Xi is the i-th sample, containing the device status data of consecutive n time points; and then for each sample X i , the corresponding label is the task type at the end t i+n of the time window.
[0092] S2: Continuously train the data set using deep learning methods to obtain a trained adaptive control model. The training process is as follows: According to the data set, perform feature extraction and pattern recognition, and use the data set to train a convolutional neural network model to generate a trained adaptive control model.
[0093] Refer to Figure 3 as shown. Specifically, in step S2, during feature extraction and pattern recognition, the method includes the following steps:
[0094] S20: Initialize the convolution kernels, weight matrices, and bias parameters of the fully connected layers of the convolutional neural network model using a random initialization method.
[0095] Among them, the random initialization method includes but is not limited to Gaussian random initialization, Xavier initialization, or He initialization method. Gaussian random initialization randomly samples from a Gaussian distribution with a mean of 0 and a standard deviation of σ; Xavier initialization is for networks with the activation function tanh and samples from a uniform distribution, where n is the number of neurons in the input layer; He initialization is for the ReLU activation function and samples from a Gaussian distribution. The specific initialization method is selected by the debugger according to actual needs. In this application, refer to the existing He initialization method.
[0096] S21: According to the input training data set, use a one-dimensional convolutional neural network to extract convolutional features from the time series.
[0097] Among them, during the convolution layer operation, the specific one-dimensional convolution operation is that the convolution kernel K slides on the input sequence, and the convolution result is calculated for each position: where z i is the output at position i after the one-dimensional convolution operation, K j is the j-th element of the convolution kernel, k is the convolution kernel size, b is the bias number, and x i+j-1 is the (i + j - 1)-th input data; then, use the activation function ReLU to perform non-linear activation processing on the convolution output.
[0098] S22: Perform downsampling on the extracted convolutional features through max pooling operations to reduce the dimension of the features while retaining the key feature information.
[0099] Among them, in the pooling layer operation, max pooling is a downsampling operation used to reduce the size of the feature map while retaining key information. Specifically: p i = max(a i , a i+1 , …, a i+m-1 ), where p i is the output after pooling, a i is the output after non-linearly activating the convolutional output, and m is the size of the pooling window.
[0100] S23: Map the output features to the task assignment probability space.
[0101] Among them, in the fully connected layer operation, map the pooled p i to the probability space of task assignment, and then use the Softmax function to convert it into probabilities.
[0102] Thus, through the forward propagation of the combination of the initialization of the convolutional neural network, convolutional operations, max pooling, and the fully connected layer and Softmax mapping, useful features can be extracted from the time series data and these features can be mapped to the probability space of task assignment.
[0103] Refer to Figure 4 As shown, specifically, in step S2, when training the convolutional neural network model using the said data set, the method further includes the following steps:
[0104] S24: Adopt the cross-entropy loss function to evaluate the difference between the model prediction value and the true label:
[0105]
[0106] Among them, is the cross-entropy loss function, N is the number of training samples in the training data set, C is the number of task types, is the true label of the i-th sample in the c-th class, is the probability of the i-th sample predicted by the model in the c-th class.
[0107] S25: Calculate the gradient of the cross-entropy loss function with respect to each parameter through the backpropagation method of the chain rule.
[0108] Among them, the backpropagation step includes the following parts:
[0109] Calculate the gradient of the output layer. For the activation function Softmax of the output layer, calculate the derivative of the loss function with respect to the output:
[0110]
[0111] Calculate the gradients of the hidden layer. For the ReLU activation function, calculate the gradients of each parameter in the hidden layer through the chain rule:
[0112]
[0113] where, is the output of the hidden layer (the output of the convolutional or fully connected layer), is the derivative of the ReLU activation function.
[0114] After calculating the gradients of each layer, use them to update the model parameters.
[0115] S26: Use the Adam optimization algorithm to perform momentum update and parameter update of the model.
[0116] Among them, Adam (Adaptive Moment Estimation) is a commonly used optimization algorithm, which updates parameters through momentum and adaptive learning rate. The specific update process is as follows:
[0117] Momentum estimation: m t is the first-order momentum estimation (exponentially weighted average of gradients), v t is the second-order momentum estimation (exponentially weighted average of gradient squares); β 1 and β 2 are the decay coefficients of the first-order and second-order momenta respectively, taking 0.9 and 0.999.
[0118] Bias correction: where, is the corrected first-order momentum estimation, is the corrected second-order momentum estimation, and the corrected momentum estimation is used to update the parameters.
[0119] Parameter update: where θ t is the updated parameter, α is the learning rate, and ∈ is a constant taking 1e-8.
[0120] S27: Repeat steps S24 - S26 until the training iteration of the preset number of training rounds is completed.
[0121] Repeat the process from S24 to S26 until the preset number of training rounds is completed. After each iteration, it is necessary to evaluate the performance of the model on the test dataset to determine whether to adjust the hyperparameters or early stop the training.
[0122] Refer to Figure 5 As shown, specifically, the method for evaluating the model performance includes the following steps:
[0123] S200: After the training of each training round is completed, input the test data set into the trained convolutional neural network model for forward propagation calculation to obtain the prediction result.
[0124] S201: Use the cross-entropy loss function to calculate the loss value of the convolutional neural network model on the test data set.
[0125] S202: Calculate at least one evaluation metric such as accuracy, recall, precision, and F1-score of the convolutional neural network model.
[0126] Among them, the calculation process of accuracy is: Among them is the number of correctly predicted samples; the calculation process of recall is: Among them, TP is the number of true positives, and FN is the number of false negatives; the calculation process of precision is: Among them, FP is the number of false positives; the calculation process of F1-score is:
[0127] S203: According to the loss value and the evaluation metrics, determine whether the convolutional neural network model reaches the preset performance metrics. If so, execute step S2030: Stop training in advance. If not, execute step S2031: Adjust the model structure and / or adjust the hyperparameters, and after the adjustment, retrain the model and use the test data set for verification again.
[0128] Among them, the condition for stopping training in advance is: If the loss value on the test data set or a certain evaluation metric (such as at least one of accuracy, precision, recall, F1-score) reaches the preset threshold, stop training in advance; Exemplarily, if the set goal is that the accuracy reaches 95%, if the accuracy on the current test data set has reached or exceeded 95%, terminate the training.
[0129] Among them, when adjusting the model structure, it is possible to consider adjusting the number of convolutional layers or fully connected layers to improve the performance of the model, or adjusting the size of the convolutional kernel to capture features of different scales; when adjusting the hyperparameters, it is possible to consider modifying the learning rate of the optimization algorithm to accelerate or slow down the training process, or changing the number of samples for each parameter update; further, it is also possible to consider increasing the diversity of the data set to improve the generalization ability of the model; selecting the features most relevant to the task and removing irrelevant or redundant features, etc.
[0130] S3: Deploy the adaptive control model to the electronic control device control system, and then input the real-time collected device status data into the deployed adaptive control model.
[0131] Specifically, in step S3, the trained convolutional neural network model is deployed as an adaptive control model into the control system of the electric control device, and the control system can calculate the task allocation probability in real time through this adaptive control model; when the electric control device is running, the control system inputs the device status data collected in real time into the deployed adaptive control model, and the adaptive control model calculates the task allocation probability in real time according to this device status data.
[0132] S4: Generate an optimal task allocation strategy according to the task allocation matching degree of each electric control device output by the adaptive control model.
[0133] Reference Figure 6 As shown, specifically, in step S4, when generating the optimal task allocation strategy, the method includes the following steps:
[0134] S40: Set the task priority according to the urgency level, importance level or contribution level to the overall goal of the task.
[0135] Among them, by way of example, the urgency level is divided into 5 levels, with level 5 being the most urgent; the importance level is divided into 5 levels, with level 5 being the most important; the contribution level to the overall goal is divided into 5 levels, with level 5 being the greatest contribution.
[0136] Among them, a matching first weight coefficient is respectively set for the urgency level, importance level or contribution level to the overall goal of the task, and this first weight coefficient is adjusted by the debugger according to the actual situation. By way of example, the weight of the task priority can be determined in the following way:
[0137] Among them, here j is the jth task, is the urgency level of the task, is the importance level of the task, is the contribution level of the task to the overall goal; τ, ω are respectively the weight coefficients of task urgency, importance and contribution.
[0138] S41: Set the device status score according to the power level, real-time load, work history, operating temperature, and task type of the electric control device.
[0139] Among them, a matching second weight coefficient is respectively set for the power level, real-time load, work history, operating temperature, and task type of the electric control device, and this second weight coefficient is adjusted by the debugger according to the actual situation; by way of example, the device status score can be calculated in the following way:
[0140] S i = w1·E i + w2·L i + w3·Hi + w4·W i + w5·O i , where E i is the power level of the electronic control device, L i is the real-time load of the electronic control device, H i is the working history of the electronic control device, W i is the operating temperature of the electronic control device, O i is the adaptability of the equipment task type of the electronic control device, representing the ability of the device to perform a certain type of task well; w1, w2, w3, w4, and w5 are the weight coefficients of the power level, real-time load, working history, operating temperature, and task type respectively.
[0141] S42: According to the task priority and the device status score, calculate the matching degree between the task and each electronic control device, and use the greedy algorithm to preferentially assign the task with the highest matching degree to the corresponding device.
[0142] Among them, to calculate the matching degree between the task and each electronic control device, the task priority and the device status score can be multiplied, that is: M ij = R j × S i ; The steps of the greedy algorithm are as follows: First, sort the matching degrees of all tasks and electronic control devices to find the maximum value; Second, assign the task to the corresponding electronic control device and remove it from the tasks to be assigned and available electronic control devices; and so on until all tasks are assigned or the electronic control device resources are exhausted.
[0143] Reference Figure 7 As shown, in some embodiments, when generating the optimal task allocation strategy, the method further includes the following steps:
[0144] S400: Determine whether there are collaborative operation tasks. If so, execute step S4000: Calculate the matching degree between the collaborative operation task and each electronic control device and arrange the matching degrees of the electronic control devices in order; If not, after a preset time interval, re-determine whether there are collaborative operation tasks.
[0145] Among them, in this application, a collaborative operation task refers to a task that requires at least two electronic control devices to cooperate simultaneously to complete, such as synchronously executing or collaboratively processing multiple subtasks; after calculating the matching degree between the collaborative operation task and each electronic control device, all the devices participating in the matching degree calculation are arranged in order from high to low according to the matching degree to obtain the priority order of each device; The preset time is set by the debugger according to actual needs.
[0146] S401: Extract the number requirement of electronic control devices for the collaborative operation task and, according to the number requirement of electronic control devices, assign the collaborative operation task to the electronic control devices with the matching degree in the preset order.
[0147] Among them, by way of example, assuming that a collaborative operation task requires three electronic control devices to execute collaboratively, the task is assigned to the first three electronic control devices in the arrangement order, and the first three electronic control devices in the arrangement order execute collaboratively.
[0148] S5: According to the generated task assignment strategy, automatically assign tasks to the electronic control devices and schedule the electronic control devices to execute.
[0149] Reference Figure 8 As shown, in some embodiments, in step S5, when the electronic control device executes a task, the method includes the following steps:
[0150] S50: Update the status score of each electronic control device executing the task according to the device status data of the electronic control device collected in real time.
[0151] Among them, during the task execution process, the control system collects the status data of the electronic control device in real time, such as the power level, real-time load, operating temperature, etc., and updates the status score of each electronic control device executing the task.
[0152] S51: Determine whether the electronic control device executing the task has a matching degree drop exceeding a preset matching threshold or cannot continue to execute the task due to an abnormality. If so, execute step S510: Mark the task executed by the problematic electronic control device as an abnormal task, and then recalculate the matching degree according to the latest device status score and task priority and reassign the abnormal task to the electronic control device with the highest current matching degree. If not, execute the next step S52.
[0153] Among them, the preset matching threshold is set by the debugger according to actual needs.
[0154] S52: Determine whether the electronic control device executing the task has a load exceeding a preset load threshold. If so, execute step S520: Mark the task of the high-load electronic control device as an abnormal task, and then recalculate the matching degree according to the latest device status score and task priority and reassign the abnormal task to the low-load electronic control device with the highest current matching degree; if not, return to step S50.
[0155] Among them, the preset load threshold is set by the debugger according to actual needs; when the task is abnormal due to excessive load, the task is reassigned to the low-load electronic control device with the highest current matching degree. At this time, the electronic control device with a higher matching degree and a load lower than the load threshold is preferably selected.
[0156] Reference Figure 9 As shown, in some embodiments, when the electronic control device executes a task, the method further includes the following steps:
[0157] S500: Input the real-time collected device status data into the deployed adaptive control model, and then output the abnormal probability of the electronically controlled device executing the task according to the adaptive control model.
[0158] Among them, the abnormalities of electronic control equipment include but are not limited to abnormal equipment power, abnormal operating temperature, abnormal load, etc.
[0159] S501: Determine whether the electric control device executing the task has an abnormal probability greater than a first preset abnormal threshold. If so, execute step S5010: stop the first abnormal electric control device and mark the task executed by the first abnormal electric control device as an abnormal task, and then randomly assign the abnormal task to the electric control device with an abnormal probability lower than a second preset abnormal threshold. If not, execute the next step S502.
[0160] Among them, the first preset abnormal threshold and the second preset abnormal threshold are set by the debugging personnel according to actual needs; after the abnormality of the first abnormal electric control device is repaired, the abnormal task is reallocated back to the original electric control device.
[0161] S502: Determine whether the electric control device executing the task has an abnormal probability greater than a third preset abnormal threshold. If so, execute step S5020: restart the second abnormal electric control device and mark the task executed by the second abnormal electric control device as a temporary task, and then randomly assign the temporary task to the electric control device with an abnormal probability lower than the second preset abnormal threshold, and after the second abnormal electric control device is restarted, reallocate the temporary task to the restarted second abnormal electric control device; if not, return to step S500.
[0162] Among them, the third preset abnormal threshold is set by the debugging personnel according to actual needs; exemplarily, in this application, the third preset abnormal threshold is lower than the first preset abnormal threshold and higher than the second preset abnormal threshold; after the second abnormal electronic control device is restarted, the temporary task is reallocated back to the original electronic control device.
[0163] In some embodiments, the repair strategy can be determined based on the type and severity of the abnormality, that is, based on the identified abnormality type, a suitable repair strategy is selected from a pre-set strategy library, and the strategy library contains pre-set strategy templates for dealing with various abnormalities; for example, restarting the abnormal electronic control equipment, adjusting the parameters of the abnormal electronic control equipment (if the abnormality is low power, switch to the backup power supply, if the abnormality is too high temperature, reduce the equipment operating frequency or start the cooling system, if the abnormality is too large load, reduce the equipment load, etc.), and also the abnormal information can be fed back to the operation and maintenance personnel.
[0164] In some embodiments, in order to cope with new operating conditions or environmental changes that may occur during actual operation, an online learning function can be set up to allow the control system to continuously optimize the control strategy during actual operation and maintain optimal performance. Among them, online learning in this application refers to adjusting model parameters by means of incremental updates, including but not limited to the dataset update strategy based on a sliding window and the priority memory replay strategy, which are set by the debugging personnel according to actual needs.
[0165] After online update, it is necessary to re-verify the effectiveness of the updated model by calculating indicators such as the accuracy, recall, precision, and F1-score of the model to ensure that the updated model can effectively cope with new operating conditions or the environment.
[0166] In some embodiments, when deploying the model, set the boundary conditions of the strategy to prevent unstable or abnormal behaviors from occurring during the execution of the control strategy and ensure the safe operation of the electronic control equipment. Among them, the boundary conditions are set by the debugging personnel according to the physical and operating characteristics of the electronic control equipment, such as the safe ranges of voltage, current, temperature, etc.
[0167] During the operation of the control system, continuously monitor the status data of the electronic control equipment to detect whether it exceeds the set safety boundary. If it exceeds the safety boundary, immediately trigger the safety mechanism to limit or stop the execution of the current control strategy.
[0168] Therefore, the above development can refer to the following code:
[0169]
[0170]
[0171]
[0172] env = Environment(state_dim, action_dim)
[0173] agent = PolicyGradientAgent(state_dim, action_dim)
[0174] state = env.reset()
[0175] for episode in range(100):
[0176] action = agent.select_action(state)
[0177] new_state, reward = env.step(action)
[0178] # Add training logic and policy updates
[0179] def calculate_task_priority(task):
[0180] # Simple example: Calculate priority based on task urgency and importance
[0181] return task['urgency'] * 0.7 + task['importance'] * 0.3
[0182] def assign_tasks(devices, tasks):
[0183] sorted_tasks = sorted(tasks, key=calculate_task_priority, reverse=True)
[0184] for task in sorted_tasks:
[0185] best_device = max(devices, key=lambda d: d['state_score']) # Example matching
[0186] # Assign tasks
[0187] print(f"Task {task['id']} assigned to device {best_device['id']}")
[0188] In actual development, the above code needs to be designed and developed in detail according to specific requirements and the environment.
[0189] Thus, referring to Figure 10 and Figure 11 shown, in some embodiments, the present application also relates to an adaptive intelligent control system 1 for performing the above adaptive intelligent control method, including:
[0190] The data processing module 100 is used to perform data preprocessing on the collected device status data to generate a data set. When performing data preprocessing, it collects device status data of each electronic control device 2 including at least power level, real-time load, work history, operating temperature, and task type, and then uses the interpolation method to fill in missing data or remove outliers from the device status data; normalizes the device status data to the same numerical range, and then marks the task types that the electronic control device 2 should execute under specific states according to historical task data and corresponding allocation results; and composes the processed device status data into a training data set and a test data set according to the time series.
[0191] The deep learning module 101 is used to continuously train the data set using deep learning methods to obtain a trained adaptive control model. The training process is as follows: according to the data set, perform feature extraction and pattern recognition, and use the data set to train a convolutional neural network model to generate a trained adaptive control model; when continuously training the data set using deep learning methods, use the random initialization method to initialize the convolution kernels of the convolutional neural network model, the weight matrices of the fully connected layers, and the bias parameters; extract convolutional features from the time series using a one-dimensional convolutional neural network according to the input training data set; perform downsampling on the extracted convolutional features through max pooling operations to reduce the dimension of the features while retaining the key information of the features; map the output features to the task assignment probability space.
[0192] When continuously training the data set using deep learning methods, a cross-entropy loss function is also used to evaluate the difference between the model prediction value and the true label; the gradient of the cross-entropy loss function with respect to each parameter is calculated through the backpropagation method of the chain rule; the Adam optimization algorithm is used for momentum update and parameter update of the model; and training iterations are performed for a preset number of training rounds.
[0193] When continuously training the data set using deep learning methods, after the training of each training round is completed, the test data set is input into the trained convolutional neural network model for forward propagation calculation of the prediction result; the cross-entropy loss function is used to calculate the loss value of the convolutional neural network model on the test data set; at least one evaluation index such as accuracy, recall rate, precision rate, and F1-score of the convolutional neural network model is calculated; according to the loss value and the evaluation index, it is judged whether the convolutional neural network model reaches the preset performance index. If so, the training is stopped in advance. If not, the model structure and / or hyperparameters are adjusted, and after the adjustment, the model is retrained and verified again using the test data set.
[0194] The model deployment module 102 is used to deploy the adaptive control model to the control system of the electronic control device 2.
[0195] The policy allocation module 103 is used to input the device status data collected in real time into the deployed adaptive control model, generate an optimal task allocation policy according to the task allocation probability of each electric control device 2 output by the adaptive control model; and when generating the optimal task allocation policy, set the task priority according to the urgency level, importance level or contribution level to the overall goal of the task; set the device status score according to the power level, real-time load, work history, operating temperature, and task type of the electric control device 2; calculate the matching degree between the task and each electric control device 2 according to the task priority and the device status score, and use the greedy algorithm to preferentially allocate the task with the highest matching degree to the corresponding device.
[0196] When generating the optimal task allocation policy, it also judges whether there are collaborative operation tasks. If so, it calculates the matching degree between the collaborative operation tasks and each electric control device 2 and arranges the matching degrees of the electric control devices 2 in order; extracts the number requirement of the electric control devices 2 for the collaborative operation tasks and allocates the collaborative operation tasks to the electric control devices 2 with the preset order of matching degrees according to the number requirement of the electric control devices 2.
[0197] The policy execution module 104 is used to automatically allocate tasks to the electric control devices 2 according to the generated task allocation policy and schedule the electric control devices 2 to execute; and when the electric control devices 2 execute tasks, update the status score of each electric control device 2 executing tasks according to the device status data collected in real time; judge whether there is a situation where the matching degree of the electric control device 2 executing the task drops by more than the preset matching threshold or the task cannot continue to be executed due to an abnormality. If so, mark the task executed by the problematic electric control device 2 as an abnormal task, and then recalculate the matching degree according to the latest device status score and task priority and reallocate the abnormal task to the electric control device 2 with the highest current matching degree. If not, execute the next step; judge whether there is a situation where the load of the electric control device 2 executing the task exceeds the preset load threshold. If so, mark the task of the high-load electric control device 2 as an abnormal task, and then recalculate the matching degree according to the latest device status score and task priority and reallocate the abnormal task to the low-load electric control device 2 with the highest current matching degree.
[0198] When the electric control device 2 is performing a task, the device status data collected in real time is also input into the deployed adaptive control model, and then the abnormal probability of the electric control device 2 executing the task output by the adaptive control model is obtained; it is determined whether the electric control device 2 executing the task has an abnormal probability greater than the first preset abnormal threshold. If so, the first abnormal electric control device 2 is stopped and the task executed by the first abnormal electric control device 2 is marked as an abnormal task, and then the abnormal task is randomly assigned to the electric control device 2 with an abnormal probability lower than the second preset abnormal threshold. If not, the next step is executed; it is determined whether the electric control device 2 executing the task has an abnormal probability greater than the third preset abnormal threshold. If so, the second abnormal electric control device 2 is restarted and the task executed by the second abnormal electric control device 2 is marked as a temporary task, and then the temporary task is randomly assigned to the electric control device 2 with an abnormal probability lower than the second preset abnormal threshold. After the second abnormal electric control device 2 is restarted, the temporary task is reassigned to the restarted second abnormal electric control device 2.
[0199] In some embodiments, a terminal device is provided. The terminal device is composed of a processor, a memory, and a computer program or instruction stored in the memory. The processor executes the computer program or instruction to implement the above embodiments of the adaptive intelligent control method.
[0200] The computer program or instruction includes executable instructions or logical implementation instructions on a computing device for a computer program that executes a computer process.
[0201] In some embodiments, the computer program or instruction is provided using a signal-bearing medium. The signal-bearing medium may include one or more program instructions that, when run by one or more processors, can provide the functions or partial functions described in the above embodiments of the above adaptive intelligent control method. Thus, for example, one or more features of the adaptive intelligent control method may be borne by one or more instructions associated with the signal-bearing medium.
[0202] Therefore, the following experimental process can be referred to:
[0203] Experimental scenario setup:
[0204] Set up an intelligent factory scenario, including the following three types of electric control devices:
[0205] Industrial robot (type A): Responsible for assembly and processing tasks, with high computing and robotic arm load capabilities.
[0206] AGV (type B): Automated guided vehicle, responsible for handling tasks, limited by battery power and load.
[0207] Automatic detection device (type C): Conducts quality inspections, mainly affected by data throughput and computing power.
[0208] Device type Device number Main work Key status parameters Robot A1, A2, A3 Assembly, processing Load rate, current, voltage, temperature AGV B1, B2, B3, B4 Handling Battery level, real-time load, path congestion Quality inspection equipment C1, C2 Quality inspection CPU load, calculation task queue
[0209] Task type:
[0210] The experimental scenario involves multiple tasks, and each task requires different types of equipment to complete:
[0211] T1: Assembly task (requires type A equipment)
[0212] T2: Handling task (requires type B equipment)
[0213] T3: Quality inspection task (requires type C equipment)
[0214] T4: Complex task (requires cooperation of multiple types of equipment A + B + C)
[0215] Each task has a urgency and importance for priority calculation.
[0216] Task type Required equipment Task urgency (0 - 1) Task importance (0 - 1) T1 Type A 0.8 0.9 T2 Type B 0.6 0.7 T3 Type C 0.5 0.6 T4 A + B + C 0.9 1.0
[0217] Experimental procedure:
[0218] Collect device status data, including: battery power, load, historical tasks, operating temperature, etc.
[0219] Use interpolation method to fill in missing data and remove outliers.
[0220] Normalize the data to make it suitable for deep learning models.
[0221] Construct a training dataset: Mark the optimal matching of tasks - devices according to historical task data.
[0222] Build a Convolutional Neural Network (CNN) model for predicting the matching degree of devices and tasks.
[0223] Use the cross - entropy loss function for optimization.
[0224] Use the Adam optimization algorithm to update parameters and perform iterative training.
[0225] Evaluate the model performance on the test dataset, calculate accuracy, recall rate, and F1 - score.
[0226] During the actual operation process, continue to optimize the task allocation strategy:
[0227] Use reinforcement learning (PolicyGradient) to adjust the allocation strategy.
[0228] Define the reward function: R = α·Task completion rate+β·Device energy efficiency - γ·Task delay, where:
[0229] α, β, and γ are weight parameters. Task completion rate = number of completed tasks / total number of tasks. Equipment energy efficiency = equipment utilization rate / task success rate. Task latency = average task execution time.
[0230] Adjust the scheduling strategy:
[0231] Use the greedy algorithm to select the optimal matching device: Matching degree = w1 · device status score + w2 · task priority.
[0232] If the device is overloaded or abnormal, reallocate tasks.
[0233] Thus, under different experimental conditions, compare the performance of the adaptive control method of this application and the traditional task scheduling method:
[0234] Evaluation index Traditional method Method of this application Task completion rate 78% 92% Resource utilization rate 65% 85% Task scheduling response time 2.3s 0.8s Device exception rate 15% 5%
[0235] Thus, through the adaptive control method of deep learning + reinforcement learning in this application, the electric control equipment can dynamically adjust task allocation according to the real-time state, improving the stability and efficiency of the industrial automation system. This experimental framework can be applied to scenarios such as smart factories, autonomous driving fleet scheduling, and smart grids.
[0236] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0237] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. An adaptive intelligent control method, characterized in that: The following steps are involved: Perform data preprocessing and generate data sets based on the collected equipment status data; The data set is continuously trained using a deep learning method to obtain a trained adaptive control model, wherein the training process is: feature extraction and pattern recognition are performed according to the data set, and a convolutional neural network model is trained using the data set to generate a trained adaptive control model; Deploy the adaptive control model to the control system of the electric control equipment, and then input the real-time collected equipment status data into the deployed adaptive control model; Generate an optimal task allocation strategy according to the task allocation matching degree of each electronically controlled device output by the adaptive control model; According to the generated task allocation strategy, tasks are automatically assigned to electronic control devices and scheduled for execution.
2. The adaptive intelligent control method according to claim 1, characterized in that: During data preprocessing, the method comprises the following steps: Collecting device status data of each electronically controlled device, including at least power level, real-time load, working history, operating temperature, and task type, and then using interpolation to fill in missing data or remove abnormal values from the device status data; Normalizing the device status data to the same value range, and then marking the type of task that the electronic control device should perform in a specific state according to the historical task data and the corresponding allocation results; The processed equipment status data are organized into training data sets and test data sets according to time series.
3. The adaptive intelligent control method according to claim 2, characterized in that: When the deep learning method is used to continuously train the data set, the method includes the following steps: The convolution kernel, weight matrix and bias parameters of the fully connected layer of the convolutional neural network model are initialized using a random initialization method. According to the input training data set, a one-dimensional convolutional neural network is used to extract convolution features from the time series; The extracted convolutional features are downsampled through the maximum pooling operation to reduce the dimension of the features while retaining the key information of the features; Map the output features to the task assignment probability space.
4. The adaptive intelligent control method according to claim 3, characterized in that: When the deep learning method is used to continuously train the data set, the method further includes the following steps: The cross entropy loss function is used to evaluate the difference between the model prediction value and the true label: in, is the cross entropy loss function, N is the number of training samples in the training data set, C is the number of task types, is the true label of the i-th sample in the c-th category, The probability of the i-th sample predicted by the model in the c-th category; The gradient of the cross entropy loss function with respect to each parameter is calculated by the back-propagation method using the chain rule; Adopt Adam optimization algorithm to update the momentum and parameters of the model; Perform training iterations for a preset number of training rounds.
5. The adaptive intelligent control method according to claim 4, characterized in that: When the deep learning method is used to continuously train the data set, the method further includes the following steps: After each training round, the test data set is input into the trained convolutional neural network model to perform forward propagation to calculate the prediction results. Use the cross entropy loss function to calculate the loss value of the convolutional neural network model on the test dataset; Calculate at least one evaluation metric of the convolutional neural network model: accuracy, recall, precision, and F1-score; Based on the loss value and evaluation index, determine whether the convolutional neural network model reaches the preset performance index. If so, stop training in advance. If not, adjust the model structure and / or adjust the hyperparameters. After the adjustment, retrain the model and use the test data set again for verification.
6. The adaptive intelligent control method according to claim 1, characterized in that: When generating the optimal task allocation strategy, the method includes the following steps: Set task priorities based on their urgency, importance, or contribution to overall goals; Set equipment status scores based on the power level, real-time load, work history, operating temperature, and task type of the electronic control equipment; According to the task priority and device status score, the matching degree between the task and each electronic control device is calculated, and the greedy algorithm is used to assign the task with the highest matching degree to the corresponding device first.
7. The adaptive intelligent control method according to claim 6, characterized in that: When the electronic control device performs a task, the method includes the following steps: According to the real-time collection of the equipment status data of the electric control equipment, the status score of each electric control equipment performing the task is updated; Determine whether the electronic control device executing the task has a matching degree that drops beyond a preset matching threshold or cannot continue to execute the task due to an abnormality. If so, mark the task executed by the problematic electronic control device as an abnormal task, and then recalculate the matching degree based on the latest device status score and task priority and reallocate the abnormal task to the electronic control device with the highest current matching degree. If not, proceed to the next step; Determine whether the load of the electronic control device executing the task exceeds the preset load threshold. If so, mark the task of the high-load electronic control device as an abnormal task, and then recalculate the matching degree based on the latest device status score and task priority and reallocate the abnormal task to the low-load electronic control device with the highest current matching degree.
8. The adaptive intelligent control method according to claim 6, characterized in that: When generating the optimal task allocation strategy, the method further includes the following steps: Determine whether there is a collaborative task, and if so, calculate the matching degree between the collaborative task and each electronic control device and arrange the matching degrees of the electronic control devices in order; The number requirement of the electronic control equipment of the collaborative operation task is extracted and, according to the number requirement of the electronic control equipment, the collaborative operation task is allocated to the electronic control equipment with a preset order matching degree.
9. The adaptive intelligent control method according to claim 1, characterized in that: When the electronically controlled device performs a task, the method further comprises the following steps: Input the real-time collected device status data into the deployed adaptive control model, and then output the abnormal probability of the electronically controlled device performing the task according to the output of the adaptive control model; Determine whether the electric control device executing the task has an abnormal probability greater than a first preset abnormal threshold, if so, stop the first abnormal electric control device and mark the task executed by the first abnormal electric control device as an abnormal task, and then randomly assign the abnormal task to the electric control device with an abnormal probability lower than a second preset abnormal threshold, if not, execute the next step; Determine whether the electric control device executing the task has an abnormal probability greater than a third preset abnormal threshold. If so, restart the second abnormal electric control device and mark the task executed by the second abnormal electric control device as a temporary task. Then, randomly assign the temporary task to the electric control device with an abnormal probability lower than the second preset abnormal threshold, and after the second abnormal electric control device is restarted, reallocate the temporary task to the restarted second abnormal electric control device.
10. An adaptive intelligent control system, characterized in that: include: A data processing module is used to perform data preprocessing and generate a data set based on the collected equipment status data; A deep learning module, used to continuously train the data set using a deep learning method to obtain a trained adaptive control model, wherein the training process is: performing feature extraction and pattern recognition according to the data set, using the data set to train a convolutional neural network model, and generating a trained adaptive control model; A model deployment module, used to deploy the adaptive control model to the control system of the electronic control equipment; A strategy allocation module, used to input the real-time collected device status data into the deployed adaptive control model, and generate an optimal task allocation strategy according to the task allocation probability of each electronically controlled device output by the adaptive control model; The strategy execution module is used to automatically assign tasks to the electronic control equipment and schedule the electronic control equipment to execute according to the generated task allocation strategy.