A watchdog low-power control method, device and equipment

By dynamically adjusting the watchdog monitoring mode using the lightweight Qwen-2 model, the problems of power consumption waste and stability in traditional watchdog control methods are solved, achieving low power consumption and stable operation of the edge industrial computer.

CN121957919BActive Publication Date: 2026-07-31BEIJING GEMOTECH INTELLIGENT TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING GEMOTECH INTELLIGENT TECH
Filing Date
2026-04-01
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Traditional watchdog control methods suffer from power waste and stability issues in edge industrial PCs, and cannot accurately adapt to complex industrial control scenarios, resulting in untimely monitoring or frequent wake-ups, which affects the stable operation of edge industrial PCs.

Method used

The watchdog monitoring mode is dynamically adjusted using a lightweight Qwen-2 model. By acquiring the operating data of the edge industrial control computer through a preset acquisition frequency, and combining the load status, processor utilization, and inference request rate of the lightweight Qwen-2 model, the watchdog monitoring mode is dynamically adjusted to high frequency, low frequency, or alarm mode to achieve low power consumption control.

Benefits of technology

While ensuring the stable operation of the edge industrial control computer, the power consumption of the watchdog timer is reduced, unnecessary high-frequency monitoring is avoided, and the system energy efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121957919B_ABST
    Figure CN121957919B_ABST
Patent Text Reader

Abstract

This disclosure provides a watchdog timer low-power control method, apparatus, and device. The method includes: collecting operating data of an edge industrial control computer (IPC) at a preset sampling frequency; inferring the load state of the IPC using a pre-built lightweight Qwen-2 model based on the operating data; and adjusting the watchdog timer's monitoring mode according to the load state, wherein the monitoring mode includes at least one of a high-frequency mode and a low-frequency mode. The lightweight Qwen-2 model provides more accurate inference of the IPC's load state, effectively reducing misjudgments; and the dynamic adjustment of the watchdog timer's monitoring mode based on the inferred load state avoids unnecessary high-frequency monitoring. This ensures stable operation of the IPC while achieving low-power watchdog control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of edge industrial control computers, and more particularly to a watchdog low-power control method, apparatus and device. Background Technology

[0002] In industrial control scenarios, the watchdog timer is a key component that ensures the stable operation of edge industrial control computers, and its power consumption control directly affects the operating status of the edge industrial control computers.

[0003] However, traditional watchdog control methods mainly include fixed-period monitoring, threshold-based judgment, and simple sleep strategies. Fixed-period monitoring means the watchdog maintains a fixed monitoring frequency regardless of the edge industrial control computer's load, which can lead to untimely monitoring under high load and significant energy waste under low load. Threshold-based judgment adjusts the watchdog monitoring frequency by setting thresholds for CPU and memory usage, but these thresholds are difficult to accurately adapt to complex industrial control scenarios, easily leading to misjudgments or untimely monitoring, thus affecting the stable operation of the edge industrial control computer. Simple sleep strategies put the watchdog into sleep mode when the edge industrial control computer is under low load, but lack a dynamic adjustment mechanism. This can result in the watchdog going to sleep as soon as the edge industrial control computer enters a low-load state, only to be quickly woken up again when the load returns to high, leading to frequent wake-ups and increased power consumption.

[0004] Therefore, how to ensure the stable operation of the edge industrial control computer while achieving low-power control of the watchdog timer has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] In view of this, this disclosure proposes a low-power control method, device and equipment for watchdog timers, which can achieve low-power control of watchdog timers while ensuring stable operation of edge industrial control computers.

[0006] According to one aspect of this disclosure, a watchdog low-power control method is provided, comprising: Collect the operating data of the edge industrial control computer according to the preset collection frequency; Based on the operational data, a pre-built lightweight Qwen-2 model is used to infer the load status of the edge industrial control computer; Based on the load status, adjust the watchdog's monitoring mode, wherein the monitoring mode includes at least one of a high-frequency mode and a low-frequency mode; When adjusting the watchdog monitoring mode based on the load status, this is achieved by comprehensively analyzing the load status, the utilization rate of the edge industrial computer processor, and the inference request rate of the lightweight Qwen-2 model.

[0007] In one possible implementation, constructing the lightweight Qwen-2 model includes: Obtain historical data from the edge industrial control computer; Based on the historical data, a simplified dataset is generated; Based on the simplified dataset, the contribution of each network layer in the pre-loaded Qwen-2 model is calculated; Based on the contribution of each network layer and a preset contribution threshold, redundant layers in the Qwen-2 model are identified. The redundant layers in the Qwen-2 model are pruned to obtain the lightweight Qwen-2 model.

[0008] In one possible implementation, when inferring the load state of the edge industrial control computer based on the operational data using a pre-built lightweight Qwen-2 model, the following steps are included: Acquire and, based on the historical operating data of the edge industrial control computer, calculate the mean vector and standard deviation vector of the historical operating data; Based on the mean vector and standard deviation vector of the historical operating data, the operating data is standardized to obtain standard operating data. The standard operating data is input into the lightweight Qwen-2 model to infer the load status of the edge industrial control computer.

[0009] In one possible implementation, the load state of the edge industrial computer includes at least one of high load, low load, and load surge; When adjusting the watchdog monitoring mode based on the load status, the following is included: When the load condition is high load, the watchdog monitoring mode is adjusted to high frequency mode; When the load state is low load, the watchdog monitoring mode is adjusted to low frequency mode; When the load condition is a sudden increase in load, the watchdog alarm mode is triggered.

[0010] In one possible implementation, adjusting the watchdog's monitoring mode to a high-frequency mode includes: The utilization rate of the edge industrial control computer processor, the inference request rate of the lightweight Qwen-2 model, the basic monitoring cycle of the watchdog timer, and the preset high load monitoring threshold are obtained. The load index of the edge industrial control computer is calculated based on the processor utilization and the inference request rate. Based on the basic monitoring cycle, the high-load monitoring threshold, and the load index, the high-frequency monitoring cycle of the watchdog is calculated. Based on the aforementioned high-frequency monitoring cycle, the watchdog's monitoring mode is adjusted to a high-frequency mode.

[0011] In one possible implementation, the high load monitoring threshold is updated based on historical load indices.

[0012] In one possible implementation, after calculating the load index of the edge industrial control computer, the following is also included: Based on the load index, adjust the preset sampling frequency.

[0013] In one possible implementation, after obtaining the lightweight Qwen-2 model, the following is also included: A backtracking analysis was performed on the lightweight Qwen-2 model to obtain the backtracking analysis results; Based on the backtracking analysis results, determine whether the load state switching of the lightweight Qwen-2 model is accurate; If the load state switching output by the lightweight Qwen-2 model is determined to be inaccurate, the lightweight Qwen-2 model will be optimized and adjusted.

[0014] According to a second aspect of this disclosure, a watchdog low-power control device is provided, comprising: Data acquisition module: Collects operating data from the edge industrial control computer according to a preset acquisition frequency; The model inference module, based on the operational data, uses a pre-built lightweight Qwen-2 model to infer the load status of the edge industrial control computer; A watchdog control module is used to adjust the watchdog's monitoring mode based on the load state, wherein the monitoring mode includes at least one of a high-frequency mode and a low-frequency mode; When adjusting the watchdog monitoring mode based on the load status, this is achieved by comprehensively analyzing the load status, the utilization rate of the edge industrial computer processor, and the inference request rate of the lightweight Qwen-2 model.

[0015] According to a third aspect of this disclosure, a watchdog low-power control device is provided, comprising: a processor; Memory used to store processor-executable instructions; The processor is configured to perform the method described in the first aspect of this disclosure.

[0016] This disclosure provides a low-power watchdog control method, apparatus, and device. The method includes: collecting operating data of an edge industrial control computer at a preset sampling frequency; inferring the load state of the edge industrial control computer based on the operating data using a pre-built lightweight Qwen-2 model; and adjusting the watchdog monitoring mode based on the load state, wherein the monitoring mode includes at least one of a high-frequency mode and a low-frequency mode. This disclosure accurately calculates the load state of the edge industrial control computer by collecting its operating data at a preset sampling frequency and inputting it into a lightweight Qwen-2 model. Then, based on the current load state of the edge industrial control computer, the watchdog monitoring mode is dynamically adjusted. This ensures stable operation of the edge industrial control computer while avoiding unnecessary high-frequency monitoring, thus achieving low-power watchdog control while ensuring stable operation of the edge industrial control computer.

[0017] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0018] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this disclosure together with the specification and serve to explain the principles of this disclosure.

[0019] Figure 1 A flowchart illustrating a watchdog low-power control method according to an embodiment of the present disclosure is shown. Figure 2 A flowchart illustrating an example of a watchdog low-power control method according to an embodiment of the present disclosure; Figure 3 A schematic block diagram of a watchdog low-power control device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0020] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.

[0021] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0022] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.

[0023] <Method Implementation> Figure 1 A flowchart illustrating a watchdog low-power control method according to an embodiment of the present disclosure is shown. Figure 1 As shown, the method specifically includes: S100, collecting operating data of the edge industrial control computer according to a preset acquisition frequency; S200, based on the operating data, using a pre-built lightweight Qwen-2 model to infer the load status of the edge industrial control computer; S300, adjusting the watchdog monitoring mode based on the load status, wherein the monitoring mode includes at least one of a high-frequency mode and a low-frequency mode. When adjusting the watchdog monitoring mode based on the load status, this is achieved through comprehensive analysis of the load status, the utilization rate of the edge industrial control computer processor, and the inference request rate of the lightweight Qwen-2 model.

[0024] This disclosure collects the operating data of the edge industrial control computer at a preset acquisition frequency and inputs it into the lightweight Qwen-2 model to accurately calculate the load status of the edge industrial control computer. Then, based on the current load status of the edge industrial control computer, the monitoring mode of the watchdog is dynamically adjusted. This ensures the stable operation of the edge industrial control computer and avoids unnecessary high-frequency monitoring, thereby achieving low-power control of the watchdog while ensuring the stable operation of the edge industrial control computer.

[0025] It should first be noted that a lightweight Qwen-2 model needs to be constructed before implementing the methods disclosed herein. In one possible implementation, the construction of the lightweight Qwen-2 model may include the following: 1. Acquire historical data from the edge industrial control machine. Specifically, collect multiple historical data points from the edge industrial control machine's monitoring system (such as SCADA or a real-time database). Each historical data point includes not only historical operating data such as CPU utilization, memory utilization, and sensor data (e.g., temperature, pressure, flow), but also the actual load status labeled against the historical operating data. The load status includes at least one of high load, low load, and load surge. A load surge refers to a rapid increase in CPU or memory utilization within a short period (e.g., an increase exceeding 20% ​​within 1 second), which may cause system latency or crashes. This is common during peak production tasks, external attacks, or hardware failures. The impact of a load surge on the edge industrial control machine manifests as increased system response latency, resource overload leading to decreased operational stability, and may even trigger alarm modes, potentially causing downtime.

[0026] 2. Generate a simplified dataset based on historical data. Specifically, historical data is first filtered based on key anomaly events, prioritizing the retention of historical data related to high load, load surges, alarms, and other key anomaly events, reducing the size of the historical data to a preset proportion of the original dataset (e.g., 10%-20%). Then, the set of all the filtered historical data is used as the simplified dataset, which focuses on the task scenarios of key anomaly events on edge industrial control machines.

[0027] 3. Based on the simplified dataset, calculate the contribution of each network layer in the pre-loaded Qwen-2 model. This may include the following steps: First, the historical data in the simplified dataset are converted into corresponding feature vectors. And the feature vectors corresponding to each historical data The data is input into a pre-loaded Qwen-2 model, which then predicts the probability distribution of load states corresponding to each historical data point. The probability distribution of this load state It includes the output probabilities of various load states, including the load state probability distribution. The calculation is as follows: ; In the formula, These are the model parameters for the Qwen-2 model.

[0028] In one possible implementation, the process of converting historical data in a simplified dataset into corresponding feature vectors may include the following steps: First, extract historical running data from the historical data; then, combine the various running parameters in the historical running data in sequence to obtain the initial feature vector corresponding to the historical data; next, perform standardization processing (such as normalization processing) on ​​the initial feature vector to obtain the feature vector corresponding to the historical data.

[0029] Then, based on the load state probability distribution corresponding to each historical data point. and the actual load status labeled thereon. Calculate the cross-entropy loss corresponding to each historical data point. Specifically, first, label the actual load status of each historical data point. Perform one-hot encoding to capture the actual payload state. and its corresponding load state probability distribution Substituting these values ​​into a pre-built cross-entropy loss function, the cross-entropy loss corresponding to each historical data point is calculated. The formula for calculating the cross-entropy loss function is shown below: In the formula, c represents the c-th load state. Let c be the probability of the c-th load state output by the model. The actual load state of the c-th category is labeled.

[0030] Next, based on the cross-entropy loss corresponding to each historical data point... Calculate the parameter gradients of each network layer l (such as the attention or feedforward layer of the Transformer) in the Qwen-2 model. , where the parameter gradient The calculation formula is as follows: , In the formula, Let l be the parametric gradient operator of the network layer. Based on the cross-entropy loss corresponding to each historical data The corresponding total loss L is calculated, and the total loss is... N represents the total number of historical data points in the simplified dataset.

[0031] Finally, based on the parameter gradients of each network layer l The contribution of each network layer to the load state inference result is calculated using the sample average gradient norm. Among them, this contribution level This directly reflects the influence of each network layer l in the Qwen-2 model on the inference results, and its calculation formula is shown below: 4. Contribution of each network layer to the load state inference results Redundant layers in the Qwen-2 model are identified using a preset contribution threshold. Specifically, a contribution threshold T (e.g., the upper quartile of the contribution distribution) is set. When the contribution of a network layer to the load state inference result is greater than or equal to the contribution threshold, i.e. If the network layer is less than a contribution threshold, then it is determined to be a core layer (such as a high-contribution attention mechanism layer). If so, the network layer is determined to be a redundant layer (such as some residual connections).

[0032] 5. Prune redundant layers in the Qwen-2 model to obtain a lightweight Qwen-2 model. Specifically, first, remove redundant layers from the Qwen-2 model, then fine-tune the pruned model using a simplified dataset to obtain a stable, directional lightweight Qwen-2 model.

[0033] In this embodiment, a targeted lightweighting process was performed on the Qwen-2 model. Specifically, by evaluating the contribution of each network layer of the Qwen-2 model to the load state inference results, the core inference layer was identified and retained, while redundant structures unrelated to load state inference were removed, thus obtaining a targeted lightweight Qwen-2 model. After this pruning process, the parameter size of the resulting lightweight Qwen-2 model is reduced by 20%-30% compared to the original model, making it more suitable for the hardware conditions of edge industrial control computers. This enables stable deployment and rapid execution under these hardware conditions, ultimately improving the response efficiency of load state prediction for edge industrial control computers.

[0034] After completing the construction of the lightweight Qwen-2 model, it is deployed on the edge industrial control computer. In this way, when carrying out watchdog low-power control work, the current load status of the edge industrial control computer can be inferred from the currently collected operating data of the edge industrial control computer using the lightweight Qwen-2 model.

[0035] In one possible implementation, when inferring the load status of the edge industrial control computer based on the currently collected operating data and using a pre-built lightweight Qwen-2 model, the following steps may be included: 1. Obtain and calculate the mean vector and standard deviation vector of the historical operating data based on the edge industrial control computer. Specifically, the system executing the method of this disclosure pre-builds a local time-series database (e.g., InfluxDB) to store the historical operating data generated by the edge industrial control computer over the past 7 days, and dynamically calculates the mean vector and standard deviation vector of the historical operating data over the past 7 days. The mean vector includes the historical mean of each operating parameter over the 7 days, and the standard deviation vector includes the historical standard deviation of each operating parameter over the 7 days. Thus, when performing this step, all historical operating data stored in the local time-series database can be obtained, and the corresponding mean vector and standard deviation vector of the historical operating data can be calculated.

[0036] 2. Based on the mean vector and standard deviation vector of historical operating data, the currently collected operating data is standardized to obtain standardized operating data. The specific standardization process is as follows: First, the collected current running data is converted into an initial feature vector.

[0037] First, it's important to note that within the edge industrial control computer, a lightweight data acquisition agent can be deployed to collect and monitor its operational data at a preset collection frequency. This lightweight data acquisition agent can be built using the EdgeXFoundry framework.

[0038] The collected operational data includes at least one operational parameter from processor utilization, memory utilization, and sensor data. Combining these parameters in sequence yields the initial feature vector corresponding to the operational data. Processor utilization can be at least one of CPU utilization and / or GPU utilization. For example, the collected operational data might include the CPU utilization of an edge industrial control machine. Memory usage Temperature sensor data Pressure sensor data press t Under the same operating parameters, the initial feature vector obtained .

[0039] Secondly, the initial feature vector is standardized using the mean vector and standard deviation vector of historical operating data to obtain the standard operating data corresponding to the current operating data. The calculation formula for the standardization process is as follows: in, This is the mean vector of historical running data. The standard deviation vector of historical operating data. This refers to the standard operating data obtained after standardization processing.

[0040] 3. Input the calculated standard operating data into the lightweight Qwen-2 model to automatically infer the load status of the edge industrial control computer.

[0041] In one possible implementation, the lightweight Qwen-2 model is derived from a targeted lightweighting of the Transformer architecture and is specifically designed for load state inference of edge industrial control computers. In this embodiment, when the lightweight Qwen-2 model infers the load state of the edge industrial control computer based on input standard operating data, it may include the following steps: First, the hidden states corresponding to the standard running data are calculated using a lightweight Qwen-2 model, in order to capture the long-term dependencies present in the standard running data through the calculated hidden states. The inference formula for the hidden states is shown below: In the formula, This represents the self-attention layer of the lightweight Qwen-2 model. It is the hidden state corresponding to the standard running data of the previous moment, and the hidden state is initialized as a zero vector.

[0042] Then, the output layer of the lightweight Qwen-2 model is based on the hidden states corresponding to the standard running data. Calculate the load state probability distribution of the edge industrial control computer, and determine the current load state of the edge industrial control computer based on the load state probability distribution. The formula for calculating the load state probability distribution is as follows: In the formula, This is the weight matrix. It is a bias term. This is the load state probability distribution of the edge industrial control computer. This includes probability values ​​for various load states such as high load, low load, and load surge. The load state with the highest probability value is taken as the current load state of the edge industrial control computer.

[0043] After determining the current load status of the edge industrial control computer, the watchdog monitoring mode can be adjusted based on this load status. The watchdog monitoring mode includes at least one of the following: high-frequency mode, low-frequency mode, and alarm mode. Adjusting the watchdog monitoring mode may include the following steps: 1. When the edge industrial computer is under high load, adjust the watchdog monitoring mode to high-frequency mode. This can specifically include the following steps: (1) Obtain the utilization rate of the edge industrial computer processor Inference request rate of the lightweight Qwen-2 model Basic monitoring cycle for watchdogs and preset high load monitoring thresholds The utilization rate of the edge industrial control computer's processor includes either CPU utilization or GPU utilization. Specifically, during this step, the current utilization rate of the edge industrial control computer's processor can be obtained through a real-time monitoring system. (Normalized to [0,1]), Inference request rate of the lightweight Qwen-2 model (Number of requests per second), while the basic monitoring cycle of the watchdog. (e.g., 100ms) and high load monitoring threshold It is pre-set and stored in the system, and can be read directly from the system.

[0044] (2) Based on processor utilization and inference request rate Calculate the load index of the edge industrial control computer. Among them, the load index The calculation formula is as follows: in, and It is a preset weighting coefficient ( ), and This is derived from optimization based on historical operating data. One possible implementation involves conducting a grid search experiment on historical operating data to select the index that optimizes the load. The set of values ​​at which the performance metrics of the computational model reach their optimal state on the validation set.

[0045] (3) Based on the basic monitoring cycle High load monitoring threshold and load index Calculate the high-frequency monitoring cycle of the watchdog. Among them, this high-frequency monitoring cycle The calculation formula is as follows: In the formula, This is the first adjustment factor. This is used to ensure that the watchdog's monitoring cycle is shortened in high-frequency mode (e.g., reduced to 10ms) so that the watchdog can detect anomalies in the edge industrial control computer in a timely manner.

[0046] (4) Based on high-frequency monitoring cycle The watchdog monitoring mode will be adjusted to a high-frequency mode. Specifically, the watchdog monitoring cycle will be adjusted to a high-frequency monitoring cycle. This allows the watchdog's monitoring mode to be adjusted to a high-frequency mode.

[0047] In another possible implementation, when the edge industrial control computer's load state is calculated to be high, the load index of the edge industrial control computer is further calculated. When the load index Greater than the high load monitoring threshold Then, the calculation of the high-frequency monitoring cycle mentioned above is performed again, and the watchdog monitoring mode is adjusted to high-frequency mode based on the high-frequency monitoring cycle. By integrating the load status and load index of the edge industrial control computer, the accuracy of determining whether the edge industrial control computer is in a high-load state can be improved.

[0048] Furthermore, in one possible implementation, when the edge industrial control computer is under high load, in addition to adjusting the watchdog timer's monitoring cycle to a higher frequency, the inference accuracy of other non-critical task function models running on the edge industrial control computer is reduced. This reduces the computational overhead of the edge industrial control computer for non-critical tasks, thereby freeing up more computing resources to ensure the stable operation of critical tasks. The formula for adjusting the inference accuracy of the non-critical task function models is shown below: In the formula, The inference accuracy is adjusted for non-critical task functional models. The maximum inference accuracy (e.g., FP32) is pre-defined for non-critical task function models. The load index of the edge industrial control computer High load monitoring threshold This is the attenuation coefficient.

[0049] In one possible implementation, the aforementioned high load monitoring threshold The update is based on historical load indices. Specifically, a historical load index sequence generated by the edge industrial control computer within a set time period (e.g., the past 24 hours) is obtained. Based on each historical load index in this sequence, the mean and standard deviation of the historical load index corresponding to the historical load sequence are calculated. Based on the mean and standard deviation of the historical load index, the adjusted high load monitoring threshold is calculated. Among them, the high load monitoring threshold The calculation formula is as follows: This is the historical average load index. Historical load index mean and standard deviation It is a preset adjustment constant.

[0050] In another possible implementation, the error rate of the lightweight Qwen-2 model output will be monitored in real time during the watchdog low-power control process. (i.e., the error rate of load status prediction), which measures the accuracy of the lightweight Qwen-2 model's output load status under high-frequency monitoring mode. If the error rate... greater than the preset error rate threshold (Right now > If an alarm is triggered, an alarm notification is pushed to the monitoring terminal in real time, and automatic degradation is performed, that is, switching to the pre-stored backup model (such as a backup network or rule algorithm with low computational complexity) to predict the load status, so as to ensure the accuracy of the industrial control computer load status prediction in high-frequency monitoring mode.

[0051] 2. When the edge industrial computer is under low load, adjust the watchdog monitoring mode to low-frequency mode. This can specifically include the following steps: (1) Obtain the utilization rate of the edge industrial computer processor Inference request rate of the lightweight Qwen-2 model Basic monitoring cycle for watchdogs and preset low load monitoring thresholds For details on how to obtain it, please refer to the above text, which will not be repeated here.

[0052] (2) Based on processor utilization and inference request rate Calculate the load index of the edge industrial control computer. The specific calculation process is described above and will not be repeated here.

[0053] (3) Based on the basic monitoring cycle Low load monitoring threshold and load index Calculate the low-frequency monitoring cycle of the watchdog. Among them, the low-frequency monitoring cycle The calculation formula is as follows: In the formula, This is the second adjustment factor. This is used to ensure that the watchdog monitoring cycle is extended in low-frequency mode, reducing the energy loss caused by unnecessary high-frequency monitoring.

[0054] (4) Based on low-frequency monitoring cycle The watchdog monitoring mode will be adjusted to a low-frequency mode. Specifically, the watchdog monitoring cycle will be adjusted to a low-frequency monitoring cycle. This allows the watchdog's monitoring mode to be adjusted to a low-frequency mode.

[0055] In another possible implementation, when the watchdog monitoring mode is adjusted to a low-frequency mode, the load index of the edge industrial control computer will be further calculated. When the load index Less than the low load monitoring threshold Then, the calculation of the low-frequency monitoring cycle and the adjustment of the watchdog's monitoring mode to low-frequency mode based on the low-frequency monitoring cycle are performed again. By integrating the load status and load index of the edge industrial control computer, the accuracy of determining whether the edge industrial control computer is in a low-load state can be improved.

[0056] Furthermore, in one possible implementation, when the edge industrial control computer is under low load, in addition to adjusting the watchdog monitoring cycle to a low-frequency monitoring cycle, the sleep depth of the lightweight Qwen-2 model is also calculated. Based on this hibernation depth, it adjusts to a light hibernation state corresponding to the hibernation depth. Wherein, this hibernation depth... Based on the preset maximum hibernation level (The lightweight Qwen-2 model operates in the minimum power consumption mode at this maximum hibernation level), watchdog low load monitoring threshold. and the current load index of edge industrial control computers The calculated hibernation depth The formula for calculating can be shown below: In one possible implementation, based on sleep depth When adjusting the lightweight Qwen-2 model to a light sleep state with a corresponding sleep depth, a preset light sleep state setting table is used. This light sleep state setting table has multiple light sleep levels, and for each light sleep level, a corresponding range of sleep depth values ​​and a set of network layers in the lightweight Qwen-2 model that can be frozen at that level are set.

[0057] In this embodiment, the lightweight Qwen-2 model is adjusted to a different hibernation depth using the light hibernation state setting table. When in light hibernation mode, the following steps may be included: First, read the light hibernation mode setting table, and according to the hibernation depth value range corresponding to each light hibernation level, set the hibernation depth... Mapping to the corresponding sleep mode, the system reads the set of network layers that can be frozen under the mapped sleep mode and freezes the corresponding set of network layers in the lightweight Qwen-2 model. This pauses the calculation of the parameters of that set of network layers, thereby reducing the power consumption of the lightweight Qwen-2 model itself and adjusting it to match the sleep depth. The corresponding light hibernation state.

[0058] Under low load conditions, adjust the lightweight Qwen-2 model to a dormant depth. The corresponding light sleep state can significantly reduce the static power consumption of the edge industrial control computer and release the video memory resources. At the same time, it can also retain the context state of the lightweight Qwen-2, avoid the high latency of cold start caused by complete model unloading, and realize a fast warm start response for business requests.

[0059] 3. When the load state of the edge industrial control computer is a sudden load increase, the watchdog alarm mode is triggered. When the alarm mode is triggered, the alarm mechanism is immediately activated (such as sending an MQTT message) and linked to the control strategy module to adjust the output correction coefficient of the lightweight Qwen-2 model through the control strategy module.

[0060] In one possible implementation, adjusting the output correction coefficients of the lightweight Qwen-2 model may include the following steps: First, calculate the prediction bias of the current lightweight Qwen-2 model using the simplified dataset mentioned above; then, adjust the output correction coefficients of the lightweight Qwen-2 model online based on the prediction bias to compensate for the prediction delay of the lightweight Qwen-2 model when the load increases sharply.

[0061] During the watchdog monitoring mode adjustment process described above: when the edge industrial control computer (IPC) is under high load, shortening the watchdog monitoring cycle and reducing the inference accuracy of other non-critical task function models running on the IPC can ensure efficient anomaly detection under high load conditions; when the edge IPC is under low load, extending the watchdog monitoring cycle and adjusting the lightweight Qwen-2 model to the corresponding light sleep state can reduce system energy consumption; when the edge IPC experiences a sudden load increase, issuing an alarm and adjusting the output correction coefficient of the lightweight Qwen-2 model can compensate for the prediction delay of the lightweight Qwen-2 model during a sudden load increase. Through this overall watchdog monitoring mode adjustment strategy, the stable operation of the edge IPC can be ensured while reducing the energy consumption of the watchdog and even the entire edge IPC system.

[0062] In one possible implementation, after calculating the load index of the edge industrial control computer, it also includes calculating the load index of the current edge industrial control computer. Adjust the preset acquisition frequency of the edge industrial control computer's operating data. The steps for adjusting the preset acquisition frequency are as follows: First, the basic sampling period for obtaining edge industrial control computer operation data. (e.g., 100ms), based on the base sampling period and the current front-end industrial control computer load index Calculate the sampling period of the edge industrial control computer's operating data at the next moment. Among them, the sampling period of the edge industrial control computer's operating data at the next moment. The calculation formula is as follows: in, This is an adjustment factor (default is 0.1).

[0063] Then, based on the sampling period of the edge industrial control computer's operating data at the next moment. Calculate the acquisition frequency of the edge industrial control computer's operating data at the next moment, and acquire the edge industrial control computer's operating data according to the latest calculated acquisition frequency.

[0064] In this embodiment, based on the current edge industrial control computer load index Dynamically adjusting the acquisition frequency of the edge industrial control computer can ensure that the acquisition cycle is shortened under high load and sudden load increase to improve response speed, and the acquisition cycle is extended under low load to reduce system power consumption.

[0065] In one possible implementation, after obtaining the lightweight Qwen-2 model, the process further includes: performing backtracking analysis on the lightweight Qwen-2 model to obtain the backtracking analysis results; determining whether the load state switching output by the lightweight Qwen-2 model is accurate based on the backtracking analysis results; and optimizing and adjusting the lightweight Qwen-2 model if the load state switching output by the lightweight Qwen-2 model is determined to be inaccurate. The specific backtracking analysis process is as follows: 1. Periodically collect watchdog log files within a defined time range (e.g., the latest 30 days). These log files record, in chronological order, the timestamp t corresponding to each piece of edge control computer running data collected, the load state ct obtained after processing by the lightweight Qwen-2 model, and the inference power consumption a generated by the lightweight Qwen-2 model when processing that running data. t and the load index of edge industrial control computers .

[0066] 2. Construct a multidimensional time series dataset based on the collected log files. Specifically, first, for each collected edge industrial control computer's operating data, the corresponding load status (ct) and inference power consumption (a) are... t and load index Preprocessing operations such as data cleaning and normalization are performed. Then, for the operating data of each edge industrial control computer, the corresponding preprocessed load index is calculated. Inference power consumption a t The load state ct is combined sequentially to obtain its corresponding multidimensional feature vector. Finally, according to the chronological order of the data collection timestamps t of each edge industrial control computer's operating data, the multidimensional feature vectors corresponding to the operating data of each edge industrial control computer are arranged in sequence to obtain a multidimensional time series dataset. , where s is the total number of edge control computer operation data recorded in the obtained log files.

[0067] 3. Transform the multidimensional time series dataset The data is input into a pre-trained backtracking analysis model to determine the accuracy of the load state switching output by the lightweight Qwen-2 model. Specifically, the backtracking analysis model analyzes a multi-dimensional time series dataset. The changes in load index and inference power consumption can be used to determine the accurate points of load state change by analyzing multidimensional time series datasets. The load state labels corresponding to each data point determine the load state change points identified by the lightweight Qwen-2 model. By comparing the accurate load state change points with the load state change points identified by the lightweight Qwen-2 model, it can be determined whether the load state switching output by the lightweight Qwen-2 model is accurate.

[0068] 4. If the load state switching output of the lightweight Qwen-2 model is determined to be inaccurate, optimize and adjust the lightweight Qwen-2 model.

[0069] In one possible implementation, after obtaining the lightweight Qwen-2 model, the process also includes optimizing the lightweight Qwen-2 model. Specifically, this may include the following steps: 1. Simplify the runtime parameters in the simplified dataset. This includes the following steps: First, based on the simplified dataset, the redundancy score of the runtime parameters used to construct each historical data set within the simplified dataset is calculated. Specifically, each runtime parameter is iterated over, and for the current runtime parameter xi, its various values ​​appearing in all historical data are determined. For each value... Calculate the eigenvalue distribution probability corresponding to this value. The information entropy of the current running parameter xi is calculated based on the probability distribution of the feature values ​​corresponding to various values. Among them, information entropy The calculation formula is as follows: In the formula, k represents the number of different values ​​of the current operating parameter xi in all historical data. Next, the information entropy based on the current operating parameter xi is calculated. and the corresponding preset feature power consumption weights Calculate the redundancy score of the current running parameter xi. Among them, redundancy score The calculation formula is as follows: Once the traversal is complete, the redundancy score for each running parameter will be obtained.

[0070] Then, operating parameters with redundancy scores below a preset redundancy threshold are identified as redundancy parameters. The preset redundancy threshold can be set according to the specific application scenario; preferably, it can be set to 0.1.

[0071] Finally, redundant parameters in the historical data of the simplified dataset are removed, thereby simplifying the operating parameters in the simplified dataset.

[0072] 2. Using a simplified dataset with reduced operating parameters, the lightweight Qwen-2 model is optimized and trained to obtain the optimized lightweight Qwen-2 model. The optimized lightweight Qwen-2 model can accurately predict load states based on the simplified operating parameters, thereby further reducing the computational overhead of the lightweight Qwen-2 model and minimizing power consumption losses caused by computational overhead.

[0073] After completing the optimized training of the lightweight Qwen-2 model, the optimized lightweight Qwen-2 model will be launched for load state prediction. Specifically, in collecting the operating data of the edge industrial control computer, only operating parameters other than redundant parameters are collected, and then these are output to the optimized lightweight Qwen-2 model for load state prediction, thereby further reducing the power consumption of the lightweight Qwen-2 model.

[0074] In one possible implementation, the watchdog's basic monitoring cycle The inference latency can be determined based on the average inference latency of the lightweight Qwen-2 model corresponding to multiple candidate periods. Specifically, multiple candidate periods are pre-defined. Each candidate period is iterated over, and the current candidate period is used as the basic monitoring period for the watchdog timer. The watchdog monitoring mode was adjusted as described above, and the inference latency of the lightweight Qwen-2 model corresponding to the operating data of N edge industrial control computers was recorded during the adjustment process. Where T is the current candidate period, t is the t-th edge industrial control computer running data, and the inference latency of the lightweight Qwen-2 model based on the running data of N edge industrial control computers is... The average inference delay corresponding to the current selected period is calculated. After the traversal ends, the average inference delay of each candidate period is obtained. Finally, the candidate period with the smallest average inference delay is selected as the optimal period. and the optimal period Set the basic monitoring cycle for the watchdog. Among them, the optimal period The formula for calculating can be shown below: To clearly illustrate the technical concept of this disclosure, the following is combined with... Figure 2 An example of the low-power control method for the watchdog timer is provided to further illustrate the method of this disclosure. For example... Figure 2 As shown, the method includes: Step A001: Collect historical operating data and generate a lightweight model. That is, based on the collected historical operating data of the edge industrial control computer, a simplified dataset is generated. Then, based on the simplified data, the contribution of each network layer of the pre-loaded Qwen-2 model is calculated. Redundant layers are identified based on the contribution of each network layer and pruned to generate a lightweight Qwen-2 model.

[0075] Step A002: Define the watchdog cycle rules. That is, establish the mapping rules between the inference load state of the lightweight Qwen-2 model and the watchdog monitoring cycle.

[0076] Step A003: Collect real-time operating data of the edge industrial control computer, specifically including the CPU utilization, memory utilization, and sensor data of the edge industrial control computer.

[0077] Step A004: Input the model inference load status, that is, input the real-time collected operating data of the edge industrial control computer into the load status of the lightweight Qwen-2 model inference edge industrial control computer.

[0078] Step A005: Determine the load status of the edge industrial control computer: When the edge industrial control computer is under high load, proceed to step A006; when the edge industrial control computer is under low load, proceed to step A007.

[0079] Step A006: Switch the watchdog to high-frequency monitoring mode, while reducing the inference accuracy of the lightweight Qwen-2 model for non-critical tasks, and check for alarms.

[0080] Execute step A007, switch the watchdog to low-frequency monitoring mode, and adjust the lightweight Qwen-2 model to the corresponding light sleep state.

[0081] Step A008: Regularly collect monitoring data from the watchdog and lightweight Qwen-2 model for retrospective analysis.

[0082] Step A009 involves optimizing and iterating the lightweight Qwen-2 model and watchdog cycle rules based on the backtracking analysis results.

[0083] Therefore, this disclosure provides a low-power watchdog control method, comprising: collecting operating data of an edge industrial control computer according to a preset sampling frequency; based on the operating data, using a pre-constructed lightweight Qwen-2 model to infer the load state of the edge industrial control computer; and adjusting the watchdog's monitoring mode according to the load state, wherein the monitoring mode includes at least one of a high-frequency mode and a low-frequency mode. By using a lightweight Qwen-2 model to accurately calculate the load state of the edge industrial control computer, and then dynamically adjusting the watchdog's monitoring mode according to the current load state of the edge industrial control computer, the stable operation of the edge industrial control computer can be ensured while avoiding unnecessary high-frequency monitoring, thereby achieving low-power watchdog control while ensuring the stable operation of the edge industrial control computer.

[0084] <Device Embodiment> A low-power watchdog control device according to an embodiment of this disclosure. The device includes: a data acquisition module for acquiring operating data of an edge industrial control computer at a preset acquisition frequency; a model inference module for inferring the load state of the edge industrial control computer based on the operating data using a pre-built lightweight Qwen-2 model; and a watchdog control module for adjusting the watchdog's monitoring mode based on the load state, wherein the monitoring mode includes at least one of a high-frequency mode and a low-frequency mode. Adjusting the watchdog's monitoring mode based on the load state is achieved through comprehensive analysis of the load state, the utilization rate of the edge industrial control computer's processor, and the inference request rate of the lightweight Qwen-2 model.

[0085] <Equipment Example> Figure 3 A schematic block diagram of a watchdog low-power control device according to an embodiment of the present disclosure is shown. Figure 3 As shown, the watchdog low-power control device 200 includes a processor 210 and a memory 220 for storing executable instructions of the processor 210. The processor 210 is configured to implement any of the watchdog low-power control methods described above when executing the executable instructions.

[0086] It should be noted here that the number of processors 210 can be one or more. Furthermore, the watchdog low-power control device 200 in this embodiment may also include an input device 230 and an output device 240. The processors 210, memory 220, input device 230, and output device 240 can be connected via a bus or other means, without specific limitations here.

[0087] The memory 220, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and various modules, such as the program or module corresponding to the watchdog low-power control device method of this disclosure. The processor 210 executes various functional applications and data processing of the watchdog low-power control device 200 by running the software program or module stored in the memory 220.

[0088] Input device 230 can be used to receive input digital numbers or signals. These signals may include key signals related to user settings and function control of the device / terminal / server. Output device 240 may include a display device such as a screen.

[0089] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or technical improvements to the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A watchdog low-power control method, characterized in that, include: According to a preset acquisition frequency, the operating data of the edge industrial control computer is acquired, wherein the operating data includes at least one operating parameter among processor utilization, memory utilization, and sensor data; Based on the operational data, a pre-built lightweight Qwen-2 model is used to infer the load status of the edge industrial control computer; Based on the load status, adjust the watchdog's monitoring mode, wherein the monitoring mode includes at least one of a high-frequency mode and a low-frequency mode; When adjusting the watchdog monitoring mode based on the load status, this is achieved by comprehensively analyzing the load status, the utilization rate of the edge industrial control computer processor, and the inference request rate of the lightweight Qwen-2 model. The load state of the edge industrial control computer includes at least one of high load, low load, and load surge; When adjusting the watchdog monitoring mode based on the load status, the following is included: When the load condition is high load, the watchdog monitoring mode is adjusted to high frequency mode, and the specific steps are as follows: Obtain the utilization rate of the edge industrial computer processor. The inference request rate of the lightweight Qwen-2 model The basic monitoring cycle of the watchdog. and preset high load monitoring thresholds ; Based on the utilization rate of the processor and the inference request rate Calculate the load index of the edge industrial control computer. Among them, the load index The calculation formula is as follows: In the formula, and These are preset weighting coefficients, and ; Based on the aforementioned basic monitoring cycle The high load monitoring threshold and the load index Calculate the high-frequency monitoring period of the watchdog. Among them, high-frequency monitoring cycle The calculation formula is as follows: In the formula, For adjustment factors; The monitoring cycle of the watchdog is adjusted to a high-frequency monitoring cycle. In order to adjust the watchdog's monitoring mode to a high-frequency mode, ensuring that the watchdog's monitoring cycle is shortened in the high-frequency mode; When the load condition is low load, the watchdog monitoring mode is adjusted to low frequency mode, and the specific steps are as follows: Obtain the utilization rate of the edge industrial computer processor. Inference request rate of the lightweight Qwen-2 model Basic monitoring cycle for watchdogs and preset low load monitoring thresholds ; Based on processor utilization and inference request rate Calculate the load index of the edge industrial control computer. ; Based on the basic monitoring cycle Low load monitoring threshold and load index Calculate the low-frequency monitoring cycle of the watchdog. Among them, the low-frequency monitoring cycle The calculation formula is as follows: Adjust the watchdog monitoring cycle to a low-frequency monitoring cycle. This is to adjust the watchdog's monitoring mode to a low-frequency mode, ensuring that the watchdog's monitoring cycle is extended in the low-frequency mode; When the load condition is a sudden increase in load, the watchdog alarm mode is triggered.

2. The method according to claim 1, characterized in that, The construction of the lightweight Qwen-2 model includes: The historical data of the edge industrial control computer is obtained, wherein each piece of historical data includes not only the historical operating data of the edge industrial control computer, but also the actual load status marked for the historical operating data; Based on the historical data, a simplified dataset is generated; Based on the simplified dataset, the contribution of each network layer in the pre-loaded Qwen-2 model is calculated; Based on the contribution of each network layer and a preset contribution threshold, redundant layers in the Qwen-2 model are identified. The redundant layers in the Qwen-2 model are pruned to obtain the lightweight Qwen-2 model.

3. The method according to claim 1, characterized in that, When inferring the load status of the edge industrial control computer based on the aforementioned operational data using a pre-built lightweight Qwen-2 model, the following steps are included: Acquire and, based on the historical operating data of the edge industrial control computer, calculate the mean vector and standard deviation vector of the historical operating data; Based on the mean vector and standard deviation vector of the historical operating data, the operating data is standardized to obtain standard operating data. The standard operating data is input into the lightweight Qwen-2 model to infer the load status of the edge industrial control computer.

4. The method according to claim 1, characterized in that, The high load monitoring threshold is updated based on historical load indices.

5. The method according to claim 1, characterized in that, After calculating the load index of the edge industrial control computer, the following is also included: Based on the load index, adjust the preset sampling frequency.

6. The method according to claim 1, characterized in that, After obtaining the lightweight Qwen-2 model, the following is also included: A backtracking analysis was performed on the lightweight Qwen-2 model to obtain the backtracking analysis results; Based on the backtracking analysis results, determine whether the load state switching of the lightweight Qwen-2 model is accurate; If the load state switching output by the lightweight Qwen-2 model is determined to be inaccurate, the lightweight Qwen-2 model will be optimized and adjusted.

7. A low-power watchdog control device, characterized in that, include: Data acquisition module: Collects the operating data of the edge industrial control computer according to a preset acquisition frequency, wherein the operating data includes at least one operating parameter among processor utilization, memory utilization and sensor data; Model inference module: Based on the operational data, a pre-built lightweight Qwen-2 model is used to infer the load status of the edge industrial control computer; Watchdog control module: Based on the load status, adjust the watchdog monitoring mode, wherein the monitoring mode includes at least one of high-frequency mode and low-frequency mode; When adjusting the watchdog monitoring mode based on the load status, this is achieved by comprehensively analyzing the load status, the utilization rate of the edge industrial control computer processor, and the inference request rate of the lightweight Qwen-2 model. The load state of the edge industrial control computer includes at least one of high load, low load, and load surge; When adjusting the watchdog monitoring mode based on the load status, the following is included: When the load condition is high load, the watchdog monitoring mode is adjusted to high frequency mode, and the specific steps are as follows: Obtain the utilization rate of the edge industrial computer processor. The inference request rate of the lightweight Qwen-2 model The basic monitoring cycle of the watchdog. and preset high load monitoring thresholds ; Based on the utilization rate of the processor and the inference request rate Calculate the load index of the edge industrial control computer. Among them, the load index The calculation formula is as follows: In the formula, and These are preset weighting coefficients, and ; Based on the aforementioned basic monitoring cycle The high load monitoring threshold and the load index Calculate the high-frequency monitoring period of the watchdog. Among them, high-frequency monitoring cycle The calculation formula is as follows: In the formula, For adjustment factors; The monitoring cycle of the watchdog is adjusted to a high-frequency monitoring cycle. In order to adjust the watchdog's monitoring mode to a high-frequency mode, ensuring that the watchdog's monitoring cycle is shortened in the high-frequency mode; When the load condition is low load, the watchdog monitoring mode is adjusted to low frequency mode, and the specific steps are as follows: Obtain the utilization rate of the edge industrial computer processor. Inference request rate of the lightweight Qwen-2 model Basic monitoring cycle for watchdogs and preset low load monitoring thresholds ; Based on processor utilization and inference request rate Calculate the load index of the edge industrial control computer. ; Based on the basic monitoring cycle Low load monitoring threshold and load index Calculate the low-frequency monitoring cycle of the watchdog. Among them, the low-frequency monitoring cycle The calculation formula is as follows: Adjust the watchdog monitoring cycle to a low-frequency monitoring cycle. This is to adjust the watchdog's monitoring mode to a low-frequency mode, ensuring that the watchdog's monitoring cycle is extended in the low-frequency mode; When the load condition is a sudden increase in load, the watchdog alarm mode is triggered.

8. A low-power watchdog control device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to implement the method of any one of claims 1 to 6 when executing the executable instructions.