Resource adjustment method and device of edge computing node, equipment and medium
By monitoring the resource usage and business scenario data of edge computing nodes and dynamically adjusting resource allocation, the problem of uneven resource allocation in the existing technology is solved, and the system's response speed and stability are improved.
Patent Information
- Application Number
- CN202411472215.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-03-18
AI Technical Summary
The prior art lacks flexibility in resource allocation of edge computing nodes, and it is difficult to adapt to changes in different business scenarios and resource conditions, resulting in uneven resource allocation, high response delay and poor system stability.
By monitoring the target resource usage and business scenario data of edge computing nodes, dynamically select appropriate scheduling policies from the pre-established scheduling policy database, and adjust the resource allocation of each edge computing node.
It realizes dynamic adjustment of edge computing node resources allocation according to different business scenarios and resource conditions, improves resource utilization efficiency, reduces response delay, and enhances system stability.
Smart Images

Figure CN119645618A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a resource adjustment method, device, equipment and medium for edge computing nodes. Background Art
[0002] With the rapid development of IoT technology, the number of connected devices has increased dramatically, and the demand for data processing and storage has also increased dramatically. Edge computing, as a technology that pushes data processing and intelligent analysis to the edge of the network, has gradually become an important solution to the challenge of massive data processing.
[0003] As the core of data processing in edge computing, the performance and resource utilization efficiency of edge computing nodes directly affect the stability and response speed of the entire system. Therefore, how to efficiently and intelligently manage and optimize the resources of edge computing nodes has become one of the current research hotspots.
[0004] In the related technology, resources are mainly allocated to edge computing nodes based on static resource configuration strategies and simple rule-based scheduling algorithms. This resource allocation method lacks flexibility and is difficult to adapt to changes in different business scenarios and resource conditions. It is prone to uneven and unreasonable resource allocation, which in turn causes problems such as high response delay of edge computing nodes and poor system stability. Summary of the invention
[0005] In view of the above problems, embodiments of the present application provide a method, apparatus, device and medium for adjusting resources of an edge computing node, so as to overcome the above problems or at least partially solve the above problems.
[0006] In a first aspect of an embodiment of the present application, a resource adjustment method for an edge computing node is provided, the method comprising: Monitor the usage and business scenario data of target resources associated with each edge computing node, where the target resources include at least one of a central processing unit (CPU), memory, and network bandwidth; According to the monitored data, a target scheduling strategy is selected from a pre-established scheduling strategy library, wherein the scheduling strategy library includes: resource scheduling strategies for different business scenarios and resource usage conditions; According to the target scheduling strategy and the current usage of the target resources by the edge computing nodes, the resources currently allocated to the edge computing nodes are adjusted.
[0007] As a possible implementation mode, selecting a target scheduling strategy from a pre-established scheduling strategy library according to the monitored data includes: Determining whether execution instruction information related to resource pre-allocation is received; In the case where no execution instruction information related to resource pre-allocation is received, selecting a target scheduling policy associated with resource allocation from the scheduling policy library according to the monitored data; When receiving execution instruction information related to resource pre-allocation, using a pre-trained resource demand prediction model, according to the historical usage and current usage of the target resource by each edge computing node, a prediction result is determined, wherein the prediction result is used to characterize the future resource usage demand; After the prediction result is determined, a target scheduling policy associated with resource pre-allocation is selected from the scheduling policy library based on the prediction result and the monitored data.
[0008] As a possible implementation, the use of a pre-trained resource demand prediction model to determine a prediction result according to the historical usage and current usage of the target resource by each edge computing node includes: Acquire external environment data and business activity data within a set time period, and acquire usage of target resources by each edge computing node within the set time period from the monitored data, wherein the set time period ends at the current time; The acquired external environment data, business activity data and usage of target resources are input into the resource demand prediction model to obtain the prediction result.
[0009] As a possible implementation, the method further includes: After determining a prediction result using the resource demand prediction model, obtaining the future actual resource usage demand corresponding to the prediction result; According to the deviation between the actual future resource usage demand and the prediction result, the parameters of the resource demand prediction model are adjusted.
[0010] As a possible implementation, the scheduling strategy library is established by the following steps: For edge computing nodes associated with different business scenarios, collect target resource usage and business scenario data; By using a pre-trained analysis model, according to the usage of target resources associated with different business scenarios, analysis results associated with different business scenarios are determined, and the analysis results include: resource usage trends within a set time period and maximum resource usage of related computing tasks; Determining optimization goals associated with the different business scenarios according to the analysis results associated with the different business scenarios; Determining optimization strategies associated with the different business scenarios according to the optimization goals associated with the different business scenarios, wherein the optimization strategies include: at least one of a scheduling optimization strategy based on priority, a scheduling optimization strategy based on load balancing, and a scheduling optimization strategy based on predicted resource usage requirements; For each of the business scenarios, a resource scheduling strategy for different resource usage conditions is generated according to the determined optimization strategy, and the applicable conditions corresponding to the resource scheduling strategy for different resource usage conditions are determined according to the collected target resource usage conditions, business scenario data and the optimization goal; The scheduling strategy library is established according to the resource scheduling strategies for different resource usage situations associated with the different business scenarios and their corresponding applicable conditions.
[0011] As a possible implementation mode, selecting a target scheduling strategy from a pre-established scheduling strategy library according to the monitored data includes: Selecting an optimization target as a scheduling target from multiple optimization targets under the business scenario corresponding to the current business scenario data associated with each edge computing node; Match the current usage of the target resources associated with each edge computing node, the current business scenario data, and the scheduling target with the applicable conditions corresponding to different resource scheduling strategies in the scheduling strategy library, and obtain multiple resource scheduling strategies that successfully match the current usage, the current business scenario data, and the scheduling target; According to the target information of the multiple resource scheduling policies, a target scheduling policy is determined from the multiple resource scheduling policies, wherein the target information includes at least one of a priority of the policy and a historical effect evaluation result of the policy.
[0012] As a possible implementation, the method further includes: After adjusting the resources currently allocated to each edge computing node based on the selected target scheduling strategy, acquiring execution effect data and anomaly detection data of each edge computing node, the execution effect data including at least one of task completion time, resource utilization, task success rate and failure rate, and the anomaly detection data including: whether there is an anomaly in the resource scheduling process and the type of the anomaly; The target scheduling policy is adjusted in the scheduling policy library according to the execution effect data, the anomaly detection data and the relevant scheduling targets.
[0013] According to a second aspect of an embodiment of the present application, a resource adjustment device for an edge computing node is provided, the device comprising: A first monitoring module is used to monitor the usage and business scenario data of target resources associated with each edge computing node, wherein the target resources include at least one of a central processing unit (CPU), memory, and network bandwidth; A strategy selection module is used to select a target scheduling strategy from a pre-established scheduling strategy library according to the monitored data, wherein the scheduling strategy library includes: resource scheduling strategies for different business scenarios and resource usage conditions; The resource adjustment module is used to adjust the resources currently allocated to each edge computing node according to the target scheduling strategy and the current usage of the target resources by each edge computing node.
[0014] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the resource adjustment method for the edge computing node described in the first aspect are implemented.
[0015] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the resource adjustment method of the edge computing node as described in the first aspect are implemented.
[0016] The embodiment of the present application includes the following advantages: by monitoring the usage of target resources and business scenario data, changes in business scenarios and resource conditions are perceived, and appropriate target scheduling strategies are selected from a pre-established scheduling strategy library accordingly, and then the resources currently allocated to each edge computing node are reasonably adjusted according to the target scheduling strategy and the current usage of the target resources. In this way, the resources allocated to each edge computing node can be dynamically adjusted according to changes in different business scenarios and resource conditions, so that when facing complex and changeable business scenarios and resource conditions, the flexible and reasonable allocation of edge computing node resources can be guaranteed, which is conducive to improving the response speed and system stability of edge computing nodes. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0018] Figure 1 It is an implementation flow chart of a resource adjustment method of an edge computing node in an embodiment of the present application; Figure 2It is a schematic diagram of an implementation flow of a resource adjustment method in an embodiment of the present application; Figure 3 It is a structural diagram of a resource adjustment device of an edge computing node in an embodiment of the present application; Figure 4 It is a schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0019] In combination with the accompanying drawings, a resource adjustment method, device, equipment and medium for an edge computing node provided in an embodiment of the present application are described in detail through some embodiments and their application scenarios.
[0020] First, refer to Figure 1 As shown, it is an implementation flow chart of a resource adjustment method of an edge computing node provided in an embodiment of the present application, and the method may include the following steps: Step S11: monitor the usage and business scenario data of target resources associated with each edge computing node, wherein the target resources include at least one of a central processing unit (CPU), memory, and network bandwidth.
[0021] In specific implementation, data monitoring can be achieved using sensors or software tools (such as written or configured monitoring programs). For example, a resource monitoring module can be embedded in each edge computing node to regularly collect the usage of target resources such as the central processing unit (CPU), memory, and network bandwidth; and a business monitoring module can be embedded in each edge computing node to regularly collect business scenario data such as the type and task description of the computing tasks performed by the node. Then, the monitored data can be stored locally or sent to the central management system for storage for subsequent use.
[0022] Step S12: According to the monitored data, a target scheduling strategy is selected from a pre-established scheduling strategy library, wherein the scheduling strategy library includes resource scheduling strategies for different business scenarios and resource usage conditions.
[0023] During the specific implementation, the monitored usage of target resources and business scenario data are matched with the resource scheduling strategies for different business scenarios and resource usage in the scheduling strategy library (also called intelligent scheduling strategy library) to obtain a target scheduling strategy suitable for the business scenario and resource status (i.e., resource usage) associated with the currently monitored usage of target resources and business scenario data.
[0024] Step S13: adjusting the resources currently allocated to each edge computing node according to the target scheduling strategy and the current usage of the target resources by each edge computing node.
[0025] In a specific implementation, a resource adjustment strategy is determined according to the target scheduling strategy and the current usage of the target resources by each edge computing node, and the resources currently allocated to each edge computing node are adjusted according to the resource adjustment strategy.
[0026] Taking the current usage of the target resource as the current memory occupancy rate as an example, the high-priority nodes (such as nodes with higher business importance) determined based on the target scheduling strategy have a higher current memory occupancy rate, while the low-priority nodes (such as nodes with lower business importance) determined based on the target scheduling strategy have a lower current memory occupancy rate. The resource adjustment strategy can be determined as: increase the memory allocated to the high-priority nodes and reduce the memory allocated to the low-priority nodes. This is conducive to improving the response speed of the high-priority nodes and system stability.
[0027] The technical solution of the embodiment of the present application is adopted to perceive changes in business scenarios and resource conditions by monitoring the usage of target resources and business scenario data, and accordingly select a suitable target scheduling strategy from a pre-established scheduling strategy library, and then reasonably adjust the resources currently allocated to each edge computing node according to the target scheduling strategy and the current usage of the target resources. In this way, it is possible to dynamically adjust the resources allocated to each edge computing node according to changes in different business scenarios and resource conditions, so that when facing complex and changeable business scenarios and resource conditions, it is possible to ensure flexible and reasonable allocation of edge computing node resources, which is conducive to improving the response speed and system stability of edge computing nodes.
[0028] As a possible implementation mode, selecting a target scheduling strategy from a pre-established scheduling strategy library according to the monitored data includes: Determining whether execution instruction information related to resource pre-allocation is received; In the case where no execution instruction information related to resource pre-allocation is received, selecting a target scheduling policy associated with resource allocation from the scheduling policy library according to the monitored data; When receiving execution instruction information related to resource pre-allocation, using a pre-trained resource demand prediction model, according to the historical usage and current usage of the target resource by each edge computing node, a prediction result is determined, wherein the prediction result is used to characterize the future resource usage demand; After the prediction result is determined, a target scheduling policy associated with resource pre-allocation is selected from the scheduling policy library based on the prediction result and the monitored data.
[0029] In specific implementation, refer to Figure 2As shown in the implementation flow diagram of the resource adjustment method, the resource management node associated with each edge computing node first determines whether execution instruction information related to resource pre-allocation is received.
[0030] If no execution instruction information related to resource pre-allocation is received, it means that the resource management node needs to select the corresponding target scheduling strategy based on the resource usage monitored in the current business scenario (i.e., the current business load) to make real-time adjustments to the resources allocated to each edge computing node (i.e., the resource allocation strategy currently used). For example, based on the resource allocation ratio of each node described by the target scheduling strategy, the resources currently allocated to each edge computing node are adjusted in real time to make them suitable for the current business scenario and resource status (i.e., the current business load), thereby improving the response speed of the edge computing node and the system stability.
[0031] If execution instructions related to resource pre-allocation are received, it means that the resource management node needs to select the corresponding target scheduling strategy based on the future resource usage requirements of the current business scenario to adjust the timing of pre-allocation of resources to each edge computing node and the proportion of resources to be allocated (i.e., the currently used resource pre-allocation strategy). For example, before the peak of resource demand for edge computing nodes arrives, more resources are allocated to edge computing nodes in advance based on the timing of pre-allocation of resources and the proportion of resources to be allocated as described in the target scheduling strategy, so that they have sufficient resource reserves to face the upcoming peak of resource demand.
[0032] Optionally, using a pre-trained resource demand prediction model to determine a prediction result according to historical usage and current usage of the target resource by each edge computing node includes: Acquire external environment data and business activity data within a set time period, and obtain usage of target resources by each edge computing node within the set time period from the monitored data, wherein the set time period ends at the current time; The acquired external environment data, business activity data and usage of target resources are input into the resource demand prediction model to obtain the prediction result.
[0033] During the specific implementation, obtain the external environment data (such as chassis temperature), business activity data (used to indicate business trends, which can be data such as the read and write speed of the relevant database storing business data) and the usage of the target resources in the recent period. Input the obtained external environment data, business activity data and the usage of the target resources into the resource demand prediction model. The resource demand prediction model can more accurately predict future resource needs by comprehensively analyzing the aforementioned input data in multiple dimensions, thereby providing a more scientific and reliable basis for the formulation and adjustment of resource pre-allocation strategies (such as when, where, and how to pre-allocate resources, etc.), which is beneficial to improving the overall performance of the system and resource utilization efficiency.
[0034] Optionally, in the model training phase, external environment data, business activity data, and target resource usage in different historical time periods, as well as the corresponding future actual resource requirements in the different historical time periods (such as the actual occupancy of network bandwidth in the future), are collected, and a data set is established accordingly. The data set is then divided into a training set, a validation set, and a test set. The selected machine learning model is trained using the training set to optimize the model prediction performance by iteratively adjusting the model parameters, and the prediction performance of the model is evaluated using the validation set and the test set, and the model whose prediction performance meets the set requirements is used as a trained resource demand prediction model.
[0035] Optionally, in order to improve the quality of the model input data and thus ensure the prediction capability of the model, before the acquired external environment data, business activity data and target resource usage are input into the resource demand prediction model, the acquired data are pre-processed such as duplicate data removal, missing value processing and error data correction. Then, features are extracted from the pre-processed data, and the extracted features are converted and standardized in accordance with the model input format, and then the processed features are input into the resource demand prediction model.
[0036] Optionally, the resource demand prediction model can be established based on a linear regression machine learning algorithm. For example, the resource demand prediction model can be expressed as follows:
[0037] in, Represents the prediction result, represents the model parameters, Represents the model input data.
[0038] Optionally, the method further comprises: After determining a prediction result using the resource demand prediction model, obtaining the future actual resource usage demand corresponding to the prediction result; According to the deviation between the actual future resource usage demand and the prediction result, the parameters of the resource demand prediction model are adjusted.
[0039] In specific implementation, the model prediction performance is evaluated based on the deviation between the actual future resource usage demand and the predicted result (the evaluation may also be performed periodically). If the model prediction performance does not meet the set requirements, the model parameters are tuned or retrained (for example, new data is collected to retrain the model) to ensure the prediction capability of the resource demand prediction model used for resource adjustment.
[0040] As a possible implementation, the scheduling strategy library is established by the following steps: Step S21: For edge computing nodes associated with different business scenarios, collect target resource usage and business scenario data.
[0041] In specific implementation, the usage status and business scenario data of target resources can be collected for different edge computing nodes in different business scenarios; alternatively, the usage status and business scenario data of target resources can be collected when each edge computing node is in a different business scenario.
[0042] Step S22: using a pre-trained analysis model, based on the collected usage of target resources associated with different business scenarios, determine analysis results associated with different business scenarios, the analysis results including: resource usage trends within a set time period and maximum resource usage of related computing tasks.
[0043] In specific implementation, the usage of target resources in different historical time periods, their corresponding resource usage trends, and the maximum resource usage of related computing tasks can be used as training data to train the machine learning model to obtain the analysis model.
[0044] Step S23: Determine optimization goals associated with the different business scenarios according to the analysis results associated with the different business scenarios.
[0045] In the specific implementation, the optimization goal is reasonably determined according to the resource usage trend (such as an increasing or decreasing trend) and the maximum resource usage of the relevant computing tasks. For example, it is determined whether the resource allocation amount of each edge computing node needs to be controlled to be consistent or the resource allocation amount of each edge computing node needs to be controlled to be close to a specific value.
[0046] Step S24: Determine the optimization strategies associated with the different business scenarios according to the optimization goals associated with the different business scenarios, wherein the optimization strategies include: a scheduling optimization strategy based on priority, a scheduling optimization strategy based on load balancing, and at least one of a scheduling optimization strategy based on predicted resource usage requirements.
[0047] It can be understood that the scheduling optimization strategy based on priority is applicable to situations where resources need to be allocated according to the importance or urgency of the business, the scheduling optimization strategy based on load balancing is applicable to situations where resource allocation needs to be dynamically adjusted according to the load conditions of each node, and the scheduling optimization strategy based on predicted resource usage requirements is applicable to situations where future resource requirements need to be predicted based on historical data and real-time data to allocate resources in advance. Optionally, the optimization strategy may also include a scheduling optimization strategy based on dynamic resource allocation.
[0048] Step S25: For each of the business scenarios, a resource scheduling strategy for different resource usage situations is generated based on the determined optimization strategy, and the applicable conditions corresponding to the resource scheduling strategy for different resource usage situations are determined based on the collected target resource usage, business scenario data and the optimization goal.
[0049] During the specific implementation, the business scenario data of the edge computing nodes (such as high-load periods, applications with low latency requirements, and resource-constrained environments, etc.) are identified and analyzed, and the optimization goals that need to be achieved by the generated scheduling strategy are clarified. Then, based on the determined optimization strategy, a resource scheduling strategy for different resource usage scenarios is generated (including the specific execution process of resource allocation), and the business scenario data of the relevant business scenarios, the usage of the target resources, and the optimization goals are used as the applicable conditions for the generated resource scheduling strategy to ensure the effectiveness and operability of the strategy.
[0050] Step S26: Establish the scheduling strategy library according to the resource scheduling strategies for different resource usage situations associated with the different business scenarios and their corresponding applicable conditions.
[0051] In the specific implementation, the resource scheduling strategies for different resource usage situations associated with the different business scenarios are organized into a scheduling strategy library, each resource scheduling strategy is assigned a unique identifier, and its name, description, applicable conditions, and priority information are recorded to improve the scalability and maintainability of the scheduling strategy library, and facilitate the subsequent addition of new strategies or modification of existing strategies.
[0052] Optionally, the resource scheduling strategies in the scheduling strategy library are pre-evaluated in a simulation environment or test platform to verify their effectiveness and performance, and the parameters of the resource scheduling strategies or the optimization strategies they use are adjusted according to the evaluation results to improve the actual application effect of the resource scheduling strategies.
[0053] Optionally, in actual application, the resource usage of each edge computing node is continuously monitored to ensure that the system can run stably after resource adjustment, and the system performance after resource adjustment is evaluated, including response time, throughput, and resource utilization, etc., and the optimization algorithm and strategy are adjusted according to the evaluation results.
[0054] Optionally, in actual applications, a security mechanism for data collection and storage can be introduced and a related fault-tolerant mechanism can be designed (for example, if the target scheduling strategy is not currently obtained, a new round of resource adjustments can be allowed based on newly monitored data), thereby ensuring the security and stability of the system.
[0055] As a possible implementation mode, selecting a target scheduling strategy from a pre-established scheduling strategy library according to the monitored data includes: Selecting an optimization target as a scheduling target from multiple optimization targets under the business scenario corresponding to the current business scenario data associated with each edge computing node; Match the current usage of the target resources associated with each edge computing node, the current business scenario data, and the scheduling target with the applicable conditions corresponding to different resource scheduling strategies in the scheduling strategy library, and obtain multiple resource scheduling strategies that successfully match the current usage, the current business scenario data, and the scheduling target; According to the target information of the multiple resource scheduling strategies, a target scheduling strategy is determined from the multiple resource scheduling strategies, wherein the target information includes at least one of a priority of the strategy (determined according to actual needs of the user) and a historical effect evaluation result of the strategy.
[0056] In the specific implementation, if there is only one successfully matched resource scheduling strategy, the resource scheduling strategy will be directly used as the target scheduling strategy; if there are multiple successfully matched resource scheduling strategies, the strategy will be selected based on the target information so that the determined target scheduling strategy can better meet the actual needs of the user and / or can achieve better resource optimization effects.
[0057] Optionally, the method further comprises: After adjusting the resources currently allocated to each edge computing node based on the selected target scheduling strategy, acquiring execution effect data and anomaly detection data of each edge computing node, the execution effect data including at least one of task completion time, resource utilization, task success rate and failure rate, and the anomaly detection data including: whether there is an anomaly in the resource scheduling process and the type of the anomaly; The target scheduling policy is adjusted in the scheduling policy library according to the execution effect data, the anomaly detection data and the relevant scheduling targets.
[0058] The types of anomalies include uneven resource allocation, scheduling delay, etc. The adjustment of resource scheduling strategies includes: updating strategy parameters, adding new strategies, or eliminating invalid strategies, etc.
[0059] In specific implementation, the execution effect data can be compared with the scheduling target to obtain effect feedback data, which is used to characterize whether the expected target (for example, the expected CPU occupancy rate) is achieved after the resources of each edge computing node are adjusted based on the target scheduling strategy. According to the effect feedback data and the abnormal detection data, the target scheduling strategy in the scheduling strategy library is adjusted, and the document information of the scheduling strategy library (including strategy description, instructions for use, update records, etc.) is updated accordingly after the execution strategy adjustment.
[0060] After applying the adjusted target scheduling strategy to the actual system, the new execution effect data and anomaly detection data will continue to be fed back to the system for the next round of adaptive learning and optimization, thereby continuously optimizing the resource scheduling strategies in the scheduling strategy library by continuously monitoring anomalies and execution effects.
[0061] The following is an example of the implementation process of the resource adjustment method of the edge computing node provided in the embodiment of the present application, combined with Examples 1 to 4.
[0062] Example 1 When establishing a scheduling strategy library, an optimization strategy is selected based on the optimization goal, and resource scheduling strategies are generated for different business scenarios and resource usage conditions. Each of the resource scheduling strategies includes but is not limited to prioritizing resource allocation to key business-related nodes and evenly allocating resources according to resource usage rates.
[0063] For each resource scheduling strategy , define its applicable conditions For example, resource scheduling strategy Applicable conditions ,in, Indicates the business type. Indicates resource demand. Determines the parameters of each resource scheduling strategy based on the optimization strategy, such as the weight of resource allocation .
[0064] After establishing the scheduling strategy library, each edge computing node collects business scenario data (including business type , Business traffic ), and monitor resource usage in real time (including CPU usage , memory usage ).
[0065] Based on the monitored resource usage, the resource demand forecast value for a period of time in the future is obtained through the pre-trained resource demand forecast model Then, all policies in the scheduling policy library are traversed according to the resource demand forecast value and the business type to determine whether the current business scenario and resource status meet the applicable conditions of the policy. For example, for the above resource scheduling policy If the currently monitored and , then the strategy is considered to meet the conditions. Calculate the score of each strategy that meets the conditions ,The score can be determined based on the priority of the ,strategy, historical effect factors, e.g. ,in is the priority of the strategy, is the historical effect evaluation value of the strategy, and the strategy with the highest score is selected Use it as the target resource scheduling strategy and execute corresponding resource adjustment operations. Update the historical effect evaluation value of the strategy based on the actual effect after execution.
[0066] Example 2 Comprehensively identify and analyze the business scenarios of the e-commerce platform, obtain data for each business scenario (including but not limited to peak hours, order processing with low latency requirements, resource-constrained environments, etc.), and clarify the resource demand characteristics (i.e. optimization goals) under each business scenario.
[0067] According to the business scenario and optimization goals, an optimization strategy is selected and a variety of resource scheduling strategies are designed accordingly. The resource scheduling strategies include but are not limited to: giving priority to node resource allocation for designated key businesses or high-priority tasks; to ensure the normal execution of key businesses or high-priority tasks.
[0068] Dynamically adjusting resource allocation based on current business scenarios and resource conditions can achieve efficient resource utilization and avoid single-point overload; and when a resource demand peak is predicted, sufficient resources can be reserved in advance based on the target scheduling strategy related to resource pre-allocation to ensure stable system operation. In this way, by dynamically adjusting the resource allocation ratio based on real-time monitoring data and prediction results, current business needs can be met.
[0069] Example 3 During the model training phase, the types of data that need to be collected are clearly defined, including but not limited to resource usage, business activity data, and external environment data.
[0070] Use sensors, software tools or log systems to collect relevant data in real time or regularly, and preprocess the collected data (such as removing duplicate data, processing missing values and correcting erroneous data) to ensure the quality and accuracy of the data. Convert and standardize the preprocessed data so that data of different dimensions and ranges can be used normally in the same model. Then extract useful features from the processed data, that is, extract features that can reflect the changing laws of resource demand.
[0071] Based on the features extracted from each collected data and the corresponding future actual resource requirements, a data set is established. The data set is divided into a training set, a validation set, and a test set. The training set can be randomly divided into 70%, the validation set can be divided into 15%, and the test set can be divided into 15% to avoid introducing bias.
[0072] Use the training set to train the selected machine learning model, optimize the model performance by adjusting the model parameters, and use the validation set and test set to evaluate the model's predictive performance, including accuracy, recall, F1 score indicators, etc., to ensure that the model shows good generalization ability on different data sets.
[0073] The following is a detailed implementation process for evaluating and optimizing model performance: 1. Feature Selection Engineering Useful features that are highly correlated with the changing patterns of resource demand are extracted from the above-mentioned processed data, and processed based on feature engineering, including feature normalization, encoding categorical variables, processing missing values, etc., to improve the predictive ability of the model.
[0074] 2. Model training The training set is used to train the machine learning model and adjust the model parameters by minimizing the error between the predicted values and the actual values.
[0075] 3. Model Validation Use the validation set to adjust the model's hyperparameters, such as the learning rate, regularization parameters, etc., to prevent the model from overfitting or underfitting. Cross-validation techniques can also be applied to further verify the stability and reliability of the model.
[0076] 4. Performance evaluation Use the test set to evaluate the performance of the model, focusing on indicators such as accuracy, recall, and F1 score, and analyze the performance of the model on different data sets to ensure that the model has good generalization ability.
[0077] 5. Results Analysis Analyze the prediction results of the model and identify the factors that limit the model performance. Visualize the prediction effect of the model through visualization techniques (such as residual plots and comparison plots of predicted values and actual values).
[0078] 6. Model Optimization According to the results of performance evaluation, the model is optimized, including adjusting the model structure, adding or reducing features, changing model parameters, etc. The prediction accuracy can also be improved by introducing other machine learning algorithms.
[0079] 7. Continuous iteration The optimized model is retrained and tested on the validation set to evaluate the optimization effect. The model is updated regularly according to business needs and data changes to maintain its predictive performance.
[0080] 8. Deployment and monitoring The final optimized model is deployed as a resource demand prediction model in the production environment to predict future resource demand in real time. The performance of the model in actual applications is monitored and feedback data is collected to provide a basis for further optimization of the model.
[0081] Through the above steps, it can be ensured that the performance of the model in resource demand forecasting is effectively evaluated and continuously optimized, thereby improving the accuracy and reliability of the model in practical applications.
[0082] Based on the trained model, the future resource demand is predicted, and the prediction results are generated. According to the prediction results, the target resource scheduling strategy related to resource pre-allocation is selected to clarify when, where, and how to pre-allocate resources. For example, when it is predicted that the resource demand will increase significantly in a certain period of time in the future, the resource supply can be increased in advance.
[0083] Implement the formulated target resource scheduling strategy in the system, monitor the difference between actual resource usage and predicted results, and evaluate the effect of resource pre-allocation. If a large deviation is found between the predicted results and actual usage, the resource demand prediction model and target resource scheduling strategy need to be adjusted in a timely manner.
[0084] It is understandable that by continuously collecting new data and updating the model, the resource demand forecasting model can have adaptive learning capabilities and maintain the timeliness and accuracy of the model; and the performance of the model can be checked regularly, and the model can be tuned or retrained as needed. For example, when the business scenario or external environment changes significantly, the model needs to be retrained to adapt to the new data distribution.
[0085] Example 4 Identify and analyze various business scenarios (i.e., production scenarios) in smart factories, obtain business scenario data (such as peak hours, task types with low latency requirements), design resource scheduling strategies for different scenarios and store them in the scheduling strategy library. The resource scheduling strategies can be associated with load balancing algorithms and resource reservation mechanisms. Assign a unique identifier to each strategy and record its name, description, applicable conditions, and priority information.
[0086] Collect resource usage and business scenario data (or business load data) of edge computing nodes in real time, use resource demand prediction models to predict future resource demand, and select the most suitable target scheduling strategy from the scheduling strategy library based on real-time monitoring data and prediction results.
[0087] Collect the execution effect data of the scheduling strategy, including task completion time, resource utilization and failure rate, analyze the abnormal situations and potential problems in the scheduling process, and calculate various performance indicators to obtain feedback data. The feedback data is used to retrain or fine-tune the resource demand prediction model to improve the model prediction accuracy, and update the scheduling strategy library based on the scheduling effect feedback to continuously optimize system performance.
[0088] Based on the above examples and embodiments, this application designs and maintains an intelligent scheduling strategy library (including a variety of resource scheduling strategies for different business scenarios and resource conditions). The system that implements the resource adjustment method provided by this application can flexibly select and execute the most appropriate target scheduling strategy from the intelligent scheduling strategy based on real-time monitoring data and prediction results. In addition, the system also has adaptive learning capabilities. By continuously collecting feedback on scheduling effects, it continuously optimizes the model and scheduling strategy to ensure that the scheduling strategy always remains in the optimal state. This mechanism greatly enhances the flexibility and scalability of the resource scheduling strategy, enabling it to better adapt to complex and changing business environments.
[0089] This application monitors key resource indicators (i.e., the usage of target resources) in real time and uses optimization strategies to automatically adjust resource allocation strategies, ensuring that the system can maintain a stable operating state when facing complex and changing business scenarios. In addition, the continuous iteration of adaptive learning and optimization mechanisms enables continuous optimization of models and scheduling strategies, further improving the system's prediction accuracy and scheduling efficiency. These measures work together on the system, significantly improving its overall stability and response speed, and providing a strong guarantee for the efficient operation of IoT devices.
[0090] For the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the order of the actions described, because according to the embodiments of the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
[0091] Second, Figure 3 1 is a schematic diagram of a resource adjustment device for an edge computing node according to an embodiment of the present application, the device comprising: The first monitoring module 310 is used to monitor the usage and business scenario data of the target resources associated with each edge computing node, wherein the target resources include at least one of a central processing unit CPU, a memory, and a network bandwidth; A strategy selection module 320 is used to select a target scheduling strategy from a pre-established scheduling strategy library according to the monitored data, wherein the scheduling strategy library includes: resource scheduling strategies for different business scenarios and resource usage conditions; The resource adjustment module 330 is used to adjust the resources currently allocated to each edge computing node according to the target scheduling strategy and the current usage of the target resources by each edge computing node.
[0092] The technical solution of the embodiment of the present application is adopted to perceive changes in business scenarios and resource conditions by monitoring the usage of target resources and business scenario data, and accordingly select a suitable target scheduling strategy from a pre-established scheduling strategy library, and then reasonably adjust the resources currently allocated to each edge computing node according to the target scheduling strategy and the current usage of the target resources. In this way, it is possible to dynamically adjust the resources allocated to each edge computing node according to changes in different business scenarios and resource conditions, so that when facing complex and changeable business scenarios and resource conditions, it is possible to ensure flexible and reasonable allocation of edge computing node resources, which is conducive to improving the response speed and system stability of edge computing nodes.
[0093] Optionally, the strategy selection module 320 includes: A first selection module, used to determine whether execution instruction information related to resource pre-allocation is received; A second selection module is used to select a target scheduling policy associated with resource allocation from the scheduling policy library according to the monitored data when no execution instruction information related to resource pre-allocation is received; A third selection module is used to, upon receiving execution instruction information related to resource pre-allocation, use a pre-trained resource demand prediction model to determine a prediction result based on the historical usage and current usage of the target resource by each edge computing node, wherein the prediction result is used to characterize future resource usage requirements; The fourth selection module is used to select a target scheduling policy associated with resource pre-allocation from the scheduling policy library according to the prediction result and the monitored data after determining the prediction result.
[0094] Optionally, the third selection module includes: The first selection submodule is used to obtain external environment data and business activity data within a set time period, and obtain the usage of target resources by each edge computing node within the set time period from the monitored data, and the set time period is based on the current time as the end time; The second selection submodule is used to input the acquired external environment data, business activity data and usage of target resources into the resource demand prediction model to obtain the prediction result.
[0095] Optionally, the device further comprises: A first acquisition module is used to obtain the future actual resource usage demand corresponding to the prediction result after the prediction result is determined using the resource demand prediction model; The parameter adjustment module is used to adjust the parameters of the resource demand prediction model according to the deviation between the future actual resource usage demand and the prediction result.
[0096] Optionally, the device further comprises a policy library establishment module, configured to perform the following steps: For edge computing nodes associated with different business scenarios, collect target resource usage and business scenario data; By using a pre-trained analysis model, according to the usage of target resources associated with different business scenarios, analysis results associated with different business scenarios are determined, and the analysis results include: resource usage trends within a set time period and maximum resource usage of related computing tasks; Determining optimization goals associated with the different business scenarios according to the analysis results associated with the different business scenarios; Determining optimization strategies associated with the different business scenarios according to the optimization goals associated with the different business scenarios, wherein the optimization strategies include: at least one of a scheduling optimization strategy based on priority, a scheduling optimization strategy based on load balancing, and a scheduling optimization strategy based on predicted resource usage requirements; For each of the business scenarios, a resource scheduling strategy for different resource usage conditions is generated according to the determined optimization strategy, and the applicable conditions corresponding to the resource scheduling strategy for different resource usage conditions are determined according to the collected target resource usage conditions, business scenario data and the optimization goal; The scheduling strategy library is established according to the resource scheduling strategies for different resource usage situations associated with the different business scenarios and their corresponding applicable conditions.
[0097] Optionally, the strategy selection module 320 includes: A fifth selection module, configured to select an optimization target as a scheduling target from a plurality of optimization targets under a business scenario corresponding to the current business scenario data associated with each edge computing node; The sixth selection module is used to match the current usage of the target resources associated with each edge computing node, the current business scenario data, and the scheduling target with the applicable conditions corresponding to different resource scheduling strategies in the scheduling strategy library, and obtain multiple resource scheduling strategies that successfully match the current usage, the current business scenario data, and the scheduling target; The seventh selection module is used to determine a target scheduling strategy from the multiple resource scheduling strategies according to the target information of the multiple resource scheduling strategies, wherein the target information includes at least one of a priority of the strategy and a historical effect evaluation result of the strategy.
[0098] Optionally, the device further comprises: A second acquisition module is used to acquire execution effect data and anomaly detection data of each edge computing node after adjusting the resources currently allocated to each edge computing node based on the selected target scheduling strategy, wherein the execution effect data includes at least one of task completion time, resource utilization rate, task success rate and failure rate, and the anomaly detection data includes: whether there is an anomaly in the resource scheduling process and the type of the anomaly; A strategy adjustment module is used to adjust the target scheduling strategy in the scheduling strategy library according to the execution effect data, the anomaly detection data and the relevant scheduling goals.
[0099] It should be noted that the device embodiment is similar to the method embodiment, so the description is relatively simple, and the relevant parts can be referred to the method embodiment.
[0100] The present application also provides an electronic device, referring to Figure 4 , Figure 4 Schematic diagram of an electronic device proposed in an embodiment of the present application. Figure 4 As shown, the electronic device 100 includes: a memory 110 and a processor 120. The memory 110 and the processor 120 are connected via a bus communication. A computer program is stored in the memory 110. The computer program can be run on the processor 120 to implement the steps in the resource adjustment method of the edge computing node disclosed in the embodiment of the present application.
[0101] An embodiment of the present application also provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the resource adjustment method of the edge computing node disclosed in the embodiment of the present application is implemented.
[0102] An embodiment of the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the resource adjustment method of the edge computing node as disclosed in the embodiment of the present application.
[0103] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0104] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0105] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, systems, devices, storage media, and program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0106] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0107] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0108] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0109] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0110] The above is a detailed introduction to the resource adjustment method, device, equipment and medium of an edge computing node provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A resource adjustment method for an edge computing node, characterized in that: The method comprises: Monitor the usage and business scenario data of target resources associated with each edge computing node, where the target resources include at least one of a central processing unit (CPU), memory, and network bandwidth; According to the monitored data, a target scheduling strategy is selected from a pre-established scheduling strategy library, wherein the scheduling strategy library includes: resource scheduling strategies for different business scenarios and resource usage conditions; According to the target scheduling strategy and the current usage of the target resources by the edge computing nodes, the resources currently allocated to the edge computing nodes are adjusted.
2. The method according to claim 1, characterized in that The target scheduling strategy is selected from a pre-established scheduling strategy library according to the monitored data, including: Determining whether execution instruction information related to resource pre-allocation is received; In the case where no execution instruction information related to resource pre-allocation is received, selecting a target scheduling policy associated with resource allocation from the scheduling policy library according to the monitored data; When receiving execution instruction information related to resource pre-allocation, using a pre-trained resource demand prediction model, according to the historical usage and current usage of the target resource by each edge computing node, a prediction result is determined, wherein the prediction result is used to characterize the future resource usage demand; After the prediction result is determined, a target scheduling policy associated with resource pre-allocation is selected from the scheduling policy library based on the prediction result and the monitored data.
3. The method according to claim 2, characterized in that The use of the pre-trained resource demand prediction model to determine the prediction result according to the historical usage and current usage of the target resource by each edge computing node includes: Acquire external environment data and business activity data within a set time period, and acquire usage of target resources by each edge computing node within the set time period from the monitored data, wherein the set time period ends at the current time; The acquired external environment data, business activity data and usage of target resources are input into the resource demand prediction model to obtain the prediction result.
4. The method according to claim 3, characterized in that The method further comprises: After determining a prediction result using the resource demand prediction model, obtaining the future actual resource usage demand corresponding to the prediction result; According to the deviation between the actual future resource usage demand and the prediction result, the parameters of the resource demand prediction model are adjusted.
5. The method according to claim 1, characterized in that The scheduling strategy library is established by the following steps: For edge computing nodes associated with different business scenarios, collect target resource usage and business scenario data; By using a pre-trained analysis model, according to the usage of target resources associated with different business scenarios, analysis results associated with different business scenarios are determined, and the analysis results include: resource usage trends within a set time period and maximum resource usage of related computing tasks; Determining optimization goals associated with the different business scenarios according to the analysis results associated with the different business scenarios; Determining optimization strategies associated with the different business scenarios according to the optimization goals associated with the different business scenarios, wherein the optimization strategies include: at least one of a scheduling optimization strategy based on priority, a scheduling optimization strategy based on load balancing, and a scheduling optimization strategy based on predicted resource usage requirements; For each of the business scenarios, a resource scheduling strategy for different resource usage conditions is generated according to the determined optimization strategy, and the applicable conditions corresponding to the resource scheduling strategy for different resource usage conditions are determined according to the collected target resource usage conditions, business scenario data and the optimization goal; The scheduling strategy library is established according to the resource scheduling strategies for different resource usage situations associated with the different business scenarios and their corresponding applicable conditions.
6. The method according to any one of claims 1 to 5, characterized in that: The target scheduling strategy is selected from a pre-established scheduling strategy library according to the monitored data, including: Selecting an optimization target as a scheduling target from multiple optimization targets under the business scenario corresponding to the current business scenario data associated with each edge computing node; Match the current usage of the target resources associated with each edge computing node, the current business scenario data, and the scheduling target with the applicable conditions corresponding to different resource scheduling strategies in the scheduling strategy library, and obtain multiple resource scheduling strategies that successfully match the current usage, the current business scenario data, and the scheduling target; According to the target information of the multiple resource scheduling policies, a target scheduling policy is determined from the multiple resource scheduling policies, wherein the target information includes at least one of a priority of the policy and a historical effect evaluation result of the policy.
7. The method according to claim 6, characterized in that The method further comprises: After adjusting the resources currently allocated to each edge computing node based on the selected target scheduling strategy, acquiring execution effect data and anomaly detection data of each edge computing node, the execution effect data including at least one of task completion time, resource utilization, task success rate and failure rate, and the anomaly detection data including: whether there is an anomaly in the resource scheduling process and the type of the anomaly; The target scheduling policy is adjusted in the scheduling policy library according to the execution effect data, the anomaly detection data and the relevant scheduling targets.
8. A resource adjustment device for an edge computing node, characterized in that: The device comprises: A first monitoring module is used to monitor the usage and business scenario data of target resources associated with each edge computing node, wherein the target resources include at least one of a central processing unit (CPU), memory, and network bandwidth; A strategy selection module is used to select a target scheduling strategy from a pre-established scheduling strategy library according to the monitored data, wherein the scheduling strategy library includes: resource scheduling strategies for different business scenarios and resource usage conditions; The resource adjustment module is used to adjust the resources currently allocated to each edge computing node according to the target scheduling strategy and the current usage of the target resources by each edge computing node.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the resource adjustment method for the edge computing node according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the resource adjustment method for the edge computing node as described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Intelligent computing power scheduling method and device for intelligent common computing power computing center
CN119938340A
Server data processing method, device and system and storage medium
CN120162157A
A server data processing method and device, system, and storage medium
CN120162157B
Domain name resource data distribution method and device, computer equipment and storage medium
CN120200853A
Domain Name Resource Data Distribution Method, Device, Computer Equipment and Storage Medium
CN120200853B