A CPU adaptive dynamic adjustment method for network security equipment

By introducing CNN+LSTM technology for temporal feature extraction and GNN technology for spatial feature extraction in network security devices, combined with an adaptive dynamic adjustment algorithm, the problem of insufficient energy optimization of the CPU of network security devices under different load conditions is solved, and more efficient energy management is achieved.

CN118884838BActive Publication Date: 2025-10-14CHUANGQI TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411343466.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-10-14
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

The CPU of existing network security devices cannot dynamically adjust when processing different loads, resulting in limited energy optimization effects. In addition, the static scheduling strategy cannot adapt to real-time task changes, affecting system energy efficiency.

Method used

An algorithm-based optimization method is adopted to extract temporal features through temporal convolution operations (CNN) and long short-term memory (LSTM) networks, and spatial features are extracted by combining graph neural networks (GNN). After fusion, task priority weight analysis is performed to achieve adaptive dynamic adjustment of CPU core frequency and number, including multi-dimensional frequency adjustment, core number adjustment, multi-task scheduling frequency optimization, and interrupt merging strategies.

Benefits of technology

It achieves a significant reduction in energy consumption while ensuring system performance, and achieves better energy optimization effects by dynamically adjusting CPU resource usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118884838B_ABST
    Figure CN118884838B_ABST
Patent Text Reader

Abstract

The application discloses a CPU self-adaptive dynamic adjustment method for a network security device, which is based on an algorithm optimization mode, introduces a time sequence feature extraction CNN+LSTM and a space feature extraction GNN technology, can comprehensively analyze the space-time variation law of system load, effectively captures complex task modes, and further realizes dynamic adjustment of the core frequency and the core number of the CPU of the network security device, can greatly reduce energy consumption by reducing the scheduling and interruption of the CPU, and makes the CPU achieve better energy optimization effect under the premise of guaranteeing system performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of CPU control, and in particular relates to a CPU adaptive dynamic adjustment method for network security equipment. Background Art

[0002] Network security devices, such as firewalls, intrusion detection systems, and VPNs, often need to handle large volumes of complex network traffic and security tasks, consuming significant computing resources. To cope with these multitasking demands, these devices typically require multi-core CPUs. However, when processing low-load or non-critical tasks, the constant operation of all cores results in unnecessary energy consumption. Dynamically adjusting the frequency and number of CPU cores under varying loads to reduce CPU scheduling and interrupts, thereby achieving energy conservation and emission reduction, has become an important research topic.

[0003] Existing CPUs in network security devices typically perform frequency adjustments and core management based on a single type of data or simple rules, failing to fully consider complex temporal and spatial relationships, resulting in limited energy optimization. Furthermore, existing scheduling strategies are often static and unable to dynamically adjust to real-time changes in tasks, thus impacting the overall energy efficiency of the system. Summary of the Invention

[0004] In order to solve the above problems, this application designs a CPU adaptive dynamic adjustment method for network security equipment, so as to dynamically adjust the core frequency and core number of the CPU of the network security equipment through an algorithm-based optimization method. In specific circumstances, it can reduce energy consumption by reducing CPU scheduling and interruptions, thereby achieving the goal of energy conservation and emission reduction.

[0005] A CPU adaptive dynamic adjustment method for a network security device includes the following steps:

[0006] Step S1: collecting system load data and CPU energy consumption data, and then mapping the system load data and CPU energy consumption data into a high-dimensional feature space;

[0007] Step S2: extracting temporal and spatial features from the system load data and the CPU energy consumption data;

[0008] Step S3: Fusing the extracted temporal features with the spatial features to form a complete feature representation of the task and system state;

[0009] Step S4: Perform task priority weight analysis on the fused feature representation to obtain the priority of different tasks, and assign corresponding weights to each task to ensure that critical tasks have priority in obtaining computing resources;

[0010] Step S5: Dynamically adjust the CPU through an adaptive dynamic adjustment algorithm to ensure that it can adapt to the load and task changes of the current system to achieve the purpose of energy saving and emission reduction.

[0011] Preferably, in step S1, the system load data and the CPU energy consumption data are mapped into a high-dimensional feature space in the form of a data vector X(t);

[0012] X(t)=[L(t),H(t),C(t),E(t),]

[0013] L(t) is the current overall load of the system; H(t) is the historical load data; C(t) is the CPU core status; E(t) is the energy consumption data.

[0014] Preferably, in step S2, the method for extracting time series features includes:

[0015] Through the temporal convolution operation CNN and long short-term memory network LSTM, the time series features of the data in the high-dimensional feature space are extracted.

[0016] The feature representation after the temporal convolution operation is:

[0017] F CNN (t) = ReLU(W c *X(t)+b c )

[0018] Among them, the convolution kernel is W C , bias is b c , ReLU is the linear rectification function;

[0019] The convolution feature F CNN (t) is substituted into the long short-term memory network LSTM to extract the time series features. The extracted time series features are expressed as

[0020] h(t)=LSTM(h(t-1),F CNN (t))

[0021] Output the time series features and get

[0022] F time (t) = h(t);

[0023] Among them, h(t) is the hidden state of the long short-term memory network LSTM.

[0024] Preferably, in step S2, the spatial feature extraction method includes:

[0025] The spatial relationship features between CPU cores are extracted through the graph neural network (GNN).

[0026] The CPU core state is represented as a graph (G = (V, E));

[0027] Where V is the node, i.e., the CPU core; E is the communication between the cores, which is represented as a set of connections (e); (e) = (u, v), where u and v are two adjacent nodes. The spatial feature is expressed as:

[0028]

[0029] H v (t) is the hidden state of node (v), H u (t) is the hidden state of node (u), N(v) is the set of neighbor nodes (u) of node (v), W s and b s is a trainable parameter, then the spatial feature output is:

[0030] F space (t) = H v (t).

[0031] Preferably, in step S3, the fused feature is represented as F fusion (t);

[0032] F fusion (t)=σ(W f ·[F time (t); F space (t)]+b f )

[0033] Among them, W f and b f is a trainable parameter.

[0034] Preferably, in step S4, task priority weight analysis includes: using the attention mechanism to analyze the fused feature F fusion (t) Conduct task priority weight analysis;

[0035] The characteristics of task (j) are T j (t), the attention score is e j (t), then:

[0036]

[0037] Among them, q(·) and k(·) are linear transformation functions, d k is the scaling factor, then the task weight is expressed as W j (t), then the task priority weight output is

[0038] w j (t) = e j(t)·v(F fusion (t))

[0039] V() represents a linear transformation function.

[0040] Preferably, in step S5, the adaptive dynamic adjustment algorithm includes: multi-dimensional dynamic frequency adjustment, dynamic core quantity adjustment, multi-task scheduling frequency optimization, interrupt merging and priority processing strategy, and comprehensive control of core frequency and scheduling;

[0041] Step S51, multi-dimensional dynamic frequency adjustment includes:

[0042] The current load of the system is L(t) and the core frequency is f i (t), the priority weight of each task is w j (t), the historical load trend is H(t), and the maximum frequency is f max , the lowest frequency is f min , the load threshold is L th ;

[0043] According to the task priority weight in step S4 and the real-time system load data collected in step S1, the task weighted load value is obtained through task weighted load calculation, thereby determining the CPU resources that need to be adjusted.

[0044] The task weighted load is calculated as follows:

[0045] The task weighted load value is L w (t),

[0046]

[0047] Among them, T j (t) represents the real-time load of the jth task, w j (t) is the priority weight of task j, M is the number of tasks;

[0048] Considering the influence of historical load data, the weighted load L needs to be revised w (t), let the corrected weighted load be L h (t), then

[0049] L h (t) = α·L w (t)+β·H(t)

[0050] Among them, α and β are adjustment parameters used to balance the impact of current load and historical trends;

[0051] When the corrected load L h (t)≤L th , through dynamic frequency adjustment, the new core frequency is obtained, namely:

[0052]

[0053] When L h (t)≥L th hour:

[0054] f i (t) = f max ;

[0055] Step S52, dynamic core quantity adjustment includes:

[0056] The current system load is L(t), and the total number of cores is N total , the current number of active cores is N active (t), the task weight is W j (t); the maximum load threshold is L max , the core switching cost is C switch ;

[0057] Considering the core switching cost, the number of active cores is corrected to obtain:

[0058]

[0059] Adjust the number of active cores based on the corrected core utilization:

[0060] N active (t) = min(N total ,max(N util (t), 1))

[0061] Among them, C switch Reflects the cost of core startup and shutdown, to avoid unnecessary overhead caused by frequent core switching;

[0062] Step S53: Multi-task scheduling frequency optimization is as follows:

[0063] The system scheduling frequency is S(t), and the priority task ratio is P j (t), the historical interruption rate is I h (t), the scheduling time overhead is C s ;

[0064] Adjust the scheduling frequency according to the task priority:

[0065]

[0066] Among them, P max is the proportion of the highest priority tasks; S j (t) represents the scheduling frequency of task j; S min Indicates the minimum value of system scheduling frequency; Smax Indicates the maximum system scheduling frequency; adjust the scheduling frequency based on the historical interruption rate and scheduling overhead:

[0067]

[0068] γ and δ are adjustment coefficients, I h (t) represents the impact of historical interruption rate, C s The cost of scheduling time;

[0069] Step S54: interrupt merging and priority processing strategies are as follows:

[0070] Assume that the interruption frequency is I j (t), the priority task ratio is P j (t), the interruption delay tolerance is D j (t), calculate the comprehensive interrupt processing priority:

[0071]

[0072] Among them, λ is the coefficient for adjusting interrupt priority and delay;

[0073] Merge interrupts of low priority:

[0074]

[0075] Among them, the processing frequency of low priority interrupt j after merging will be adjusted according to the task priority and delay tolerance; max Indicates the proportion of the highest priority task; Low-priority indicates a set of minimum task priorities;

[0076] Step S55: Comprehensive control of core frequency and scheduling is as follows:

[0077] Comprehensively control CPU core frequency and scheduling based on current load, task priority, historical trends, and interrupt conditions:

[0078]

[0079] Among them, E(f i (t)) represents the core i frequency f i (t) corresponding energy consumption, S j (t) is the scheduling frequency of task j, C s is the scheduling overhead.

[0080] The advantages and effects of the present application are as follows: The present application designs a CPU adaptive dynamic adjustment method for network security equipment. Based on an algorithm optimization approach, by introducing the time series feature extraction CNN+LSTM and spatial feature extraction GNN technology, it can comprehensively analyze the temporal and spatial variation patterns of the system load and effectively capture complex task modes; thereby dynamically adjusting the core frequency and number of cores of the network security device CPU. In certain circumstances, it can significantly reduce energy consumption by reducing CPU scheduling and interruptions, enabling the CPU to achieve better energy optimization effects while ensuring system performance.

[0081] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application so that it can be implemented in accordance with the contents of the specification, and to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the following is a detailed description of the preferred embodiment of the present application in conjunction with the accompanying drawings.

[0082] Based on the detailed description of the specific embodiments of the present application in conjunction with the accompanying drawings below, those skilled in the art will become more aware of the above and other objects, advantages and features of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without inventive work. In all drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.

[0084] Figure 1 A flowchart of a CPU adaptive dynamic adjustment method for network security devices designed for this application. DETAILED DESCRIPTION

[0085] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. In the following description, specific details such as specific configurations and components are provided only to help fully understand the embodiments of the present application. Therefore, it should be clear to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. In addition, for clarity and brevity, the description of known functions and structures has been omitted in the embodiments.

[0086] It should be understood that references throughout this specification to "one embodiment" or "this embodiment" mean that a particular feature, structure, or characteristic associated with the embodiment is included in at least one embodiment of the present application. Therefore, the appearance of "one embodiment" or "this embodiment" throughout this specification does not necessarily refer to the same embodiment. Furthermore, these particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0087] In addition, the present application may repeat reference numerals and / or letters in different examples. This repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or settings discussed.

[0088] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist at the same time. The term " / and" in this article describes another type of association object relationship, indicating that two relationships can exist. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " in this article generally indicates that the previous and subsequent associated objects are in an "or" relationship.

[0089] The term "at least one" in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, at least one of A and B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0090] It should also be noted that, in this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include," "comprises," or any other variations thereof are intended to cover non-exclusive inclusion.

[0091] Example 1: Please refer to Figure 1 This embodiment mainly introduces a CPU adaptive dynamic adjustment method for a network security device, including the following steps:

[0092] Step S1: collecting system load data and CPU energy consumption data, and then mapping the system load data and CPU energy consumption data into a high-dimensional feature space;

[0093] Step S2: extracting temporal and spatial features from the system load data and the CPU energy consumption data;

[0094] Step S3: Fusing the extracted temporal features with the spatial features to form a complete feature representation of the task and system state;

[0095] Step S4: Perform task priority weight analysis on the fused feature representation to obtain the priority of different tasks, and assign corresponding weights to each task to ensure that critical tasks have priority in obtaining computing resources;

[0096] Step S5: Dynamically adjust the CPU through an adaptive dynamic adjustment algorithm to ensure that it can adapt to the load and task changes of the current system to achieve the purpose of energy saving and emission reduction.

[0097] Furthermore, in step S1, the system load data and the CPU energy consumption data are mapped into a high-dimensional feature space in the form of a data vector X(t);

[0098] X(t)=[L(t),H(t),C(t),E(t),]

[0099] L(t) is the current overall load of the system; H(t) is the historical load data; C(t) is the CPU core status; E(t) is the energy consumption data.

[0100] Furthermore, in step S2, the method for extracting time series features includes:

[0101] Through the temporal convolution operation CNN and long short-term memory network LSTM, the time series features of the data in the high-dimensional feature space are extracted.

[0102] The feature representation after the temporal convolution operation is:

[0103] F CNN (t) = ReLU(W c *X(t)+b c )

[0104] Among them, the convolution kernel is W C , bias is b c , ReLU is the linear rectification function;

[0105] The convolution feature F CNN (t) is substituted into the long short-term memory network LSTM to extract the time series features. The extracted time series features are expressed as

[0106] h(t)=LSTM(h(t-1),F CNN (t))

[0107] Output the time series features and get

[0108] F time (t) = h(t);

[0109] Among them, h(t) is the hidden state of the long short-term memory network LSTM.

[0110] Furthermore, in step S2, the spatial feature extraction method includes:

[0111] The spatial relationship features between CPU cores are extracted through the graph neural network (GNN).

[0112] The CPU core state is represented as a graph (G = (V, E));

[0113] Where V is the node, i.e., the CPU core; E is the communication between the cores, which is represented as a set of connections (e); (e) = (u, v), where u and v are two adjacent nodes. The spatial feature is expressed as:

[0114]

[0115] H v (t) is the hidden state of node (v), H u (t) is the hidden state of node (u), N(v) is the set of neighbor nodes (u) of node (v), W s and b s is a trainable parameter, then the spatial feature output is:

[0116] F space (t) = H v (t).

[0117] Furthermore, in step S3, the fused features are represented as F fusion (t);

[0118] F fusion (t)=σ(W f ·[F time (t); F space (t)]+b f )

[0119] Among them, W f and b f is a trainable parameter.

[0120] Furthermore, in step S4, task priority weight analysis includes: using the attention mechanism to analyze the fused feature F fusion (t) Conduct task priority weight analysis;

[0121] The characteristics of task (j) are T j (t), the attention score is e j (t), then:

[0122]

[0123] Among them, q(·) and k(·) are linear transformation functions, d kis the scaling factor, then the task weight is expressed as W j (t), then the task priority weight output is

[0124] w j (t) = e j (t)·v(F fusion (t))

[0125] V() represents a linear transformation function.

[0126] Furthermore, in step S5, the adaptive dynamic adjustment algorithm includes: multi-dimensional dynamic frequency adjustment, dynamic core number adjustment, multi-task scheduling frequency optimization, interrupt merging and priority processing strategy, and comprehensive control of core frequency and scheduling;

[0127] Step S51, multi-dimensional dynamic frequency adjustment includes:

[0128] The current load of the system is L(t) and the core frequency is f i (t), the priority weight of each task is w j (t), the historical load trend is H(t), and the maximum frequency is f max , the lowest frequency is f min , the load threshold is L th ;

[0129] According to the task priority weight in step S4 and the real-time system load data collected in step S1, the task weighted load value is obtained through task weighted load calculation, thereby determining the CPU resources that need to be adjusted.

[0130] The task weighted load is calculated as follows:

[0131] The task weighted load value is L w (t),

[0132]

[0133] Among them, T j (t) represents the real-time load of the jth task, w j (t) is the priority weight of task j, M is the number of tasks;

[0134] Considering the influence of historical load data, the weighted load L needs to be revised w (t), let the corrected weighted load be L h (t), then

[0135] L h (t) = α·L w (t)+β·H(t)

[0136] Among them, α and β are adjustment parameters used to balance the impact of current load and historical trends;

[0137] When the corrected load L h (t)≤L th , through dynamic frequency adjustment, the new core frequency is obtained, namely:

[0138]

[0139] When L h (t)≥L th hour:

[0140] f i (t) = f max ;

[0141] Step S52, dynamic core quantity adjustment includes:

[0142] The current system load is L(t), and the total number of cores is N total , the current number of active cores is N active (t), the task weight is W j (t); the maximum load threshold is L max , the core switching cost is C switch ;

[0143] Considering the core switching cost, the number of active cores is corrected to obtain:

[0144]

[0145] Adjust the number of active cores based on the corrected core utilization:

[0146] N active (t) = min(N total ,max(N util (t), 1))

[0147] Among them, C switch Reflects the cost of core startup and shutdown, to avoid unnecessary overhead caused by frequent core switching;

[0148] Step S53: Multi-task scheduling frequency optimization is as follows:

[0149] The system scheduling frequency is S(t), and the priority task ratio is P j (t), the historical interruption rate is I h (t), the scheduling time overhead is C s ;

[0150] Adjust the scheduling frequency according to the task priority:

[0151]

[0152] Among them, P max is the proportion of the highest priority tasks; S j (t) represents the scheduling frequency of task j; S min Indicates the minimum value of system scheduling frequency; S max Indicates the maximum system scheduling frequency; adjust the scheduling frequency based on the historical interruption rate and scheduling overhead:

[0153]

[0154] γ and δ are adjustment coefficients, I h (t) represents the impact of historical interruption rate, C s The cost of scheduling time;

[0155] Step S54: interrupt merging and priority processing strategies are as follows:

[0156] Assume that the interruption frequency is I j (t), the priority task ratio is P j (t), the interruption delay tolerance is D j (t), calculate the comprehensive interrupt processing priority:

[0157]

[0158] Among them, λ is the coefficient for adjusting interrupt priority and delay;

[0159] Merge interrupts of low priority:

[0160]

[0161] Among them, the processing frequency of low priority interrupt j after merging will be adjusted according to the task priority and delay tolerance; max Indicates the proportion of the highest priority task; Low-priority indicates a set of minimum task priorities;

[0162] Step S55: Comprehensive control of core frequency and scheduling is as follows:

[0163] Comprehensively control CPU core frequency and scheduling based on current load, task priority, historical trends, and interrupt conditions:

[0164]

[0165] Among them, E(f i (t)) represents the core i frequency f i (t) corresponding energy consumption, S j (t) is the scheduling frequency of task j, C s is the scheduling overhead.

[0166] Dynamically adjust the data obtained by the adaptive algorithm to ensure that it can adapt to the current system load and task changes to achieve the purpose of energy saving and emission reduction. The goal is to minimize energy consumption E(t) and delay D(t) while maximizing the task completion rate P eff (t).

[0167] By introducing temporal feature extraction (CNN+LSTM) and spatial feature extraction (GNN) technologies, this application can comprehensively analyze the temporal and spatial variations of system load and effectively capture complex task patterns. Furthermore, the adaptive dynamic adjustment algorithm proposed in this invention can significantly reduce energy consumption by adjusting various parameters in real time, achieving better energy optimization while ensuring system performance.

[0168] The foregoing description is merely a preferred embodiment of the present invention and does not limit the scope of protection of the present invention. Those skilled in the art will readily appreciate that the present invention is susceptible to various modifications and variations. Any variation, modification, replacement, integration, or parameter change to these embodiments, which is within the spirit and principles of the present invention and which achieves the same functionality through conventional substitutions, without departing from the principles and spirit of the present invention, falls within the scope of protection of the present invention.

Claims

1. A CPU adaptive dynamic adjustment method for network security equipment, characterized in that: The following steps are involved: Step S1: Collect system load data and CPU energy consumption data, and then map the system load data and CPU energy consumption data into a high-dimensional feature space; Step S2: extracting temporal and spatial features from the system load data and the CPU energy consumption data; Step S3: Fusing the extracted temporal features with the spatial features to form a complete feature representation of the task and system state; Step S4: Perform task priority weight analysis on the fused feature representation to obtain the priority of different tasks, and assign corresponding weights to each task to ensure that critical tasks have priority in obtaining computing resources; Step S5: Dynamically adjust the CPU through an adaptive dynamic adjustment algorithm to ensure that it can adapt to the current system load and task changes to achieve the purpose of energy conservation and emission reduction; In step S2, the method for extracting time series features includes: Through the temporal convolution operation CNN and long short-term memory network LSTM, the time series features of the data in the high-dimensional feature space are extracted. The feature representation after the temporal convolution operation is: F CNN (t)=ReLU(W c *X(t)+b c ) Among them, the convolution kernel is W C , bias is b c , ReLU is the linear rectification function; The convolution feature F CNN (t) is substituted into the long short-term memory network LSTM to extract the time series features. The extracted time series features are expressed as h(t)=LSTM(h(t-1),F CNN (t)) Output the time series features and get F time (t)=h(t); Where h(t) is the hidden state of the long short-term memory network LSTM; In step S1, the system load data and the CPU energy consumption data are mapped into a high-dimensional feature space in the form of a data vector X(t); X t = L t H t C t E t L(t) is the current total load of the system; H(t) is the historical load data; C(t) is the CPU core status; E(t) is the energy consumption data; In step S2, the spatial feature extraction method includes: The spatial relationship features between CPU cores are extracted through the graph neural network (GNN). The CPU core state is represented as a graph (G = (V, E)); Where V is the node, i.e., the CPU core; E is the communication between the cores, which is represented as a set of connections (e); (e) = (u, v), where u and v are two adjacent nodes. The spatial feature is expressed as: H v (t) is the hidden state of node (v), H u (t) is the hidden state of node (u), N(v) is the set of neighbor nodes (u) of node (v), W s and b s is a trainable parameter, then the spatial feature output is: F space (t)=H v (t); In step S3, the fused feature is represented as F fusion (t); F fusion (t)=σ(W f [F time (t);F space (t)]+b f ) Among them, W f and b f is a trainable parameter; In step S4, the task priority weight analysis includes: using the attention mechanism to analyze the fused feature F fusion (t) Conduct task priority weight analysis; The characteristics of task (j) are T j (t), the attention score is e j (t), then: Among them, q(·) and k(·) are linear transformation functions, d k is the scaling factor, then the task weight is expressed as W j (t), then the task priority weight output is w j (t)=e j (t)·v(F fusion (t)) V() represents the linear transformation function; In step S5, the adaptive dynamic adjustment algorithm includes: multi-dimensional dynamic frequency adjustment, dynamic core number adjustment, multi-task scheduling frequency optimization, interrupt merging and priority processing strategy, and comprehensive control of core frequency and scheduling; Step S51, multi-dimensional dynamic frequency adjustment includes: The current load of the system is L(t) and the core frequency is f i (t), the priority weight of each task is w j (t), the historical load trend is H(t), and the maximum frequency is f max , the lowest frequency is f min , the load threshold is L th ; According to the task priority weight in step S4 and the real-time system load data collected in step S1, the task weighted load value is obtained through task weighted load calculation, thereby determining the CPU resources that need to be adjusted. The task weighted load is calculated as follows: The task weighted load value is L w (t), Among them, T j (t) represents the real-time load of the jth task, w j (t) is the priority weight of task j, M is the number of tasks; Considering the influence of historical load data, the weighted load L needs to be revised w (t), let the corrected weighted load be L h (t), then L h (t)=α·L w (t)+β·H(t) Among them, α and β are adjustment parameters used to balance the impact of current load and historical trends; When the corrected load L h (t)≤L th , through dynamic frequency adjustment, the new core frequency is obtained, namely: When L h (t)≥L th hour: f i (t)=f max ; Step S52, dynamic core quantity adjustment includes: The current system load is L(t), and the total number of cores is N total , the current number of active cores is N active (t), the task weight is W j (t); the maximum load threshold is L max , the core switching cost is C switch ; Considering the core switching cost, the number of active cores is corrected to obtain: Adjust the number of active cores based on the corrected core utilization: N active (t)=min(N total ,max(N util (t),1)) Among them, C switch Reflects the cost of core startup and shutdown, and is used to avoid unnecessary overhead caused by frequent core switching.

2. The CPU adaptive dynamic adjustment method for network security equipment according to claim 1, characterized in that: Step S53: Multi-task scheduling frequency optimization is as follows: The system scheduling frequency is S(t), and the priority task ratio is P j (t), the historical interruption rate is I h (t), the scheduling time overhead is C s ; Adjust the scheduling frequency according to the task priority: Among them, P max is the proportion of the highest priority tasks; S j (t) represents the scheduling frequency of task j; S min Indicates the minimum value of system scheduling frequency; S max Indicates the maximum system scheduling frequency; adjust the scheduling frequency based on the historical interruption rate and scheduling overhead: γ and δ are adjustment coefficients, I h (t) represents the impact of historical interruption rate, C s The cost of scheduling time; Step S54: interrupt merging and priority processing strategies are as follows: Assume that the interruption frequency is I j (t), the priority task ratio is P j (t), the interruption delay tolerance is D j (t), calculate the comprehensive interrupt processing priority: Among them, λ is the coefficient for adjusting interrupt priority and delay; Merge interrupts of low priority: Among them, the processing frequency of low priority interrupt j after merging will be adjusted according to the task priority and delay tolerance; max Indicates the proportion of the highest priority task; Low-priority indicates a set of minimum task priorities; Step S55: Comprehensive control of core frequency and scheduling is as follows: Comprehensively control CPU core frequency and scheduling based on current load, task priority, historical trends, and interrupt conditions: Among them, E(f i (t)) represents the core i frequency f i (t) corresponding energy consumption, S j (t) is the scheduling frequency of task j, C s is the scheduling overhead.

Citation Information

Patent Citations

  • Method for calculating load balance based on adaptive fuzzy control

    CN117093360A

  • Task scheduling optimization method and system based on equipment state analysis

    CN118193169A

  • Efficient high-throughput calculation task scheduling method

    CN118656181A