VCPE resource allocation method and device, electronic equipment and storage medium
By obtaining system operation data, and dynamically adjusting vCPE resource configuration using abnormal detection and target prediction models, the problem of resource allocation in the existing technology cannot be dynamically adjusted, and efficient resource utilization and network performance improvement are achieved.
Patent Information
- Application Number
- CN202510747882.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-07-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing vCPE resource allocation method cannot be dynamically adjusted based on real-time network conditions and user business needs, resulting in low resource utilization and limited network performance.
By obtaining system operation data, using an exception detection model to identify abnormal data points, formulating resource allocation strategies, and using the target prediction model to predict future operation data, and dynamically adjusting resource configuration.
It improves the accuracy and effectiveness of resource allocation, solves the problems of low resource utilization and limited network performance, and achieves efficient resource utilization and network performance improvement.
Smart Images

Figure CN120281655A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and particularly to a vCPE resource allocation method, apparatus, electronic device, and storage medium. Background Art
[0002] A virtual customer premise equipment (vCPE, also known as cloud CPE) uses software-based functions to replace proprietary hardware and is applied to the network edge in cloud computing and virtualization technologies. By using software-defined network (SDN) and network function virtualization (NFV) technologies, the functions of traditional hardware CPEs (such as firewalls, border gateways, routers, NAT, VPNs, etc.) are implemented in software form, thus providing higher flexibility, scalability, and cost-effectiveness.
[0003] However, most of the existing vCPE resource allocation methods are based on static configuration or simple rule scheduling and cannot be dynamically adjusted according to real-time network conditions and user service requirements, resulting in problems such as low resource utilization and limited network performance. Summary of the Invention
[0004] To overcome the deficiencies of the prior art, the present invention provides a vCPE resource allocation method, apparatus, electronic device, and storage medium to improve network resource management and achieve on-demand allocation and efficient utilization of resources.
[0005] The first aspect of this application provides a vCPE resource allocation method, and the method includes: Obtain system operation data of each monitoring point; Input the system operation data into a preset anomaly detection model to output anomaly data points in the system operation data through the anomaly detection model; Determine a resource allocation strategy corresponding to vCPE resources according to the anomaly data points; Input the system operation data into a preset target prediction model to output predicted operation data corresponding to the system operation data in a future time period through the target prediction model; Adjust the resource allocation strategy according to the predicted operation data; Adjust the vCPE resource configuration according to the adjusted resource allocation strategy.
[0006] In an optional implementation, before inputting the system operation data into the preset anomaly detection model, the method further includes: Determine categorical features corresponding to the system operation data; Create one-hot columns based on the categorical features, the number of one-hot columns being equal to the number of different values in the categorical features, and each one-hot column representing a category; Fill the one-hot columns according to the category information in the system operation data; After the one-hot columns are filled, delete the categorical features to obtain the preprocessed system operation data.
[0007] In an alternative embodiment, the method further includes: Step 31: Obtain the original operation data of each monitoring point among multiple monitoring points to obtain an original operation data set, where each original operation data in the original operation data set includes flag information; Step 32: Preprocess each original operation data in the original operation data set to obtain a first target training sample set; Step 33: Construct an isolation forest model based on the isolation forest; Step 34: Input the first target training sample into the isolation forest model to output the recognition result corresponding to the first target training sample through the isolation forest model, where the first target training sample is any training sample in the first target training sample set; Step 35: Adjust the model parameters of the isolation forest model based on the difference between the recognition result and the flag information corresponding to the first target training sample; Step 36: Iteratively execute steps 34 to 35 based on the adjusted model parameters until a first preset iteration termination condition is met; Step 37: Determine the isolation forest model when the first preset iteration termination condition is met as the anomaly detection model.
[0008] In an alternative embodiment, the method further includes: Step 41: Obtain historical monitoring data, where the historical monitoring data includes flag information; Step 42: Preprocess the original operation data to obtain a second target training sample set; Step 43: Construct an LSTM model based on LSTM; Step 44: Input the second target training sample into the LSTM model to output the prediction result corresponding to the second target training sample through the LSTM model, where the second target training sample is any training sample in the second target training sample set; Step 45: Adjust the loss function of the LSTM model based on the difference between the prediction result and the flag information corresponding to the second target training sample; Step 46: Iteratively execute steps 44 to 45 based on the adjusted loss function until a second preset iteration termination condition is met; Step 47: Determine the LSTM model when the second preset iteration termination condition is satisfied as the target prediction model.
[0009] In an optional implementation manner, the method further includes: Step 51: Obtain the initial solution of each resource allocation policy in the resource allocation policy set, and use the initial solution as the initial population of the genetic algorithm; Step 52: Define a fitness function, and determine the fitness value corresponding to each resource allocation policy according to the fitness function; Step 53: Determine the parental resource allocation policies from the resource allocation policy set according to the fitness values; Step 54: Perform crossover combination on the parental resource allocation policies to generate offspring resource allocation policies; Step 55: Perform random mutation on the offspring resource allocation policies; Step 56: Repeat the above steps 53 to 55 until the third preset iteration termination condition is satisfied.
[0010] In an optional implementation manner, before inputting the system operation data into a preset target prediction model, the method further includes: Arrange the system operation data according to the time sequence; Preprocess the arranged system operation data; Perform normalization processing on the preprocessed system operation data; reshape the normalized system operation data into a three-dimensional array format, and the three-dimensional array format is [number of samples, time steps, number of features].
[0011] In an optional implementation manner, the method further includes: When receiving an access / management request from a user for the vCPE resource, obtain the user role of the user; Determine the user permissions corresponding to the user role; Judge whether the user is allowed to access / manage the vCPE resource according to the user permissions; When it is determined that the user is allowed to access / manage the vCPE resource, execute the access / management operation requested by the user, and feedback the operation result to the user.
[0012] The second aspect of the present application provides a vCPE resource allocation device, and the device includes: A real-time monitoring module, configured to obtain system operation data of each monitoring point; Anomaly detection module, configured to input the system operation data into a preset anomaly detection model, so as to output anomaly data points in the system operation data through the anomaly detection model; Resource allocation module, configured to determine a resource allocation strategy corresponding to the vCPE resources according to the anomaly data points; Prediction module, configured to input the system operation data into a preset target prediction model, so as to output predicted operation data corresponding to the system operation data in a future time period through the target prediction model; The resource allocation module is further configured to adjust the resource allocation strategy according to the predicted operation data; The resource allocation module is further configured to adjust the vCPE resource configuration according to the adjusted resource allocation strategy.
[0013] A third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the vCPE resource allocation method are implemented.
[0014] A fourth aspect of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned vCPE resource allocation method are implemented.
[0015] In summary, the vCPE resource allocation method, device, electronic device, and storage medium provided by the present application can timely discover problems existing in the system by obtaining system operation data and performing anomaly detection through an anomaly detection model to obtain anomaly data points. For the identified anomaly data points, corresponding resource allocation strategies are formulated, which can make the resource allocation strategy adapt to the abnormal situation in the current network. At the same time, the system operation data in the next period of time is predicted through the target prediction model to make preparations for resource allocation in advance, further optimize and adjust the currently determined resource allocation strategy, and avoid the situation of resource shortage or waste due to changes in network conditions and user service requirements, improving the accuracy and effectiveness of resource allocation, solving the problems of low resource utilization rate and limited network performance; implementing the finally determined resource allocation strategy into the actual vCPE resource configuration, realizing dynamic allocation and optimization of resources, and realizing efficient utilization of resources and improvement of network performance. Description of the Drawings
[0016] Figure 1 is a schematic flowchart of a vCPE resource allocation method shown in an embodiment of the present application; Figure 2 is a schematic flowchart of the training process of an anomaly detection model shown in an embodiment of the present application; Figure 3It is a schematic diagram of the training process of a target detection model shown in an embodiment of the present application; Figure 4 It is a schematic diagram of the process of an optimization method for resource allocation strategy shown in an embodiment of the present application; Figure 5 It is a functional module diagram of a vCPE resource allocation device shown in an embodiment of the present application; Figure 6 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. Detailed implementation manners
[0017] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0018] The concept, specific structure and technical effects of the present invention will be clearly and completely described below in conjunction with the embodiments and the drawings, so as to fully understand the purpose, features and effects of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, other embodiments obtained by those skilled in the art without creative efforts shall fall within the scope of protection of the present invention. In addition, all the connection / connection relationships involved in the patent do not simply refer to the direct connection of components, but refer to the formation of a more optimal connection structure by adding or reducing connection accessories according to specific implementation situations. Each technical feature in the present invention can be combined interactively without conflict.
[0019] Refer to Figure 1 As shown, it is a schematic diagram of the process of a vCPE resource allocation method shown in an embodiment of the present application. The vCPE resource allocation method includes the following steps.
[0020] S11. Obtain the system operation data of each monitoring point.
[0021] In some embodiments, the electronic device can monitor the monitoring data of each monitoring point in real time according to the NetFlow v9 protocol. Among them, the system operation data may include network traffic, latency, packet loss rate, bandwidth utilization rate, operation status, fault alarm, CPU temperature, memory utilization rate, etc. Each monitoring point corresponds to a type of system operation data, and the system operation data reflects the operation status of the system.
[0022] In an optional implementation manner, before inputting the system operation data into a preset anomaly detection model, the method further includes: Determine the categorical features corresponding to the system operation data; Create one-hot columns based on the categorical features. The number of one-hot columns is equal to the number of different values in the categorical features, and each one-hot column represents a category; Fill the one-hot columns according to the category information in the system operation data; After the filling of the one-hot columns is completed, delete the categorical features to obtain the preprocessed system operation data.
[0023] In some embodiments, when system operation data is obtained, that is, system operation data such as network traffic, latency, packet loss rate, bandwidth utilization, operating status, fault alarm, CPU temperature, memory utilization, etc. are collected, new binary columns (i.e., one-hot columns) are created for the categorical features therein. One type of system operation data corresponds to one type of category. For example, network traffic corresponds to one type of category, latency corresponds to one type of category, and so on. The number of one-hot columns is equal to the number of different values in the categorical feature. Each one-hot column represents a possible category. In this one-hot column, the data points belonging to this category are marked as 1, and other data points are marked as 0. Then, according to the category information in the system operation data, fill it into the one-hot columns. For each system operation data, determine its value in the categorical feature, and then mark it as 1 in the corresponding one-hot column. After completing the one-hot encoding, that is, after the filling of the one-hot columns is completed, delete the categorical features corresponding to the system operation data to obtain the preprocessed system operation data, and input the preprocessed system operation data into the anomaly detection model in step S12.
[0024] Through the above optional implementation manner, by performing one-hot encoding processing on the categorical features in the system operation data, converting them into a format suitable for input to the machine learning model, the interference of the categorical features on model training is eliminated, the model's understanding and processing ability of the data are improved, and the accuracy and reliability of the subsequent anomaly detection model are improved.
[0025] S12, input the system operation data into a preset anomaly detection model to output the anomaly data points in the system operation data through the anomaly detection model.
[0026] In some embodiments, an electronic device can pre-train an anomaly detection model according to Isolation Forest to perform real-time monitoring and early warning on network traffic anomalies, device failures, etc. That is, build multiple isolation trees (iTrees). Each tree divides the data by randomly selecting features and cut points until there is only one data point left on each leaf node. Due to the difference between anomaly points and normal points, anomaly points will be isolated earlier, that is, they are closer to the root node of the tree. Therefore, use the isolation characteristics of anomaly data points for detection, calculate the average path length of each data point in the forest, and use this as the anomaly score. After the anomaly detection model is trained, apply the anomaly detection model to the monitoring points for anomaly detection and monitoring. For the convenience of understanding, the following is combined with Figure 2Describe the specific training process of the anomaly detection model. Figure 2 It is a schematic diagram of the training process of an anomaly detection model shown in the embodiments of the present application.
[0027] Step 31: Obtain the original operation data of each monitoring point among multiple monitoring points to obtain an original operation data set, and each original operation data in the original operation data set includes flag information.
[0028] The electronic device can obtain the original operation data of each monitoring point among multiple monitoring points to obtain an original operation data set, and construct a training data set. The original operation data includes network traffic, latency, packet loss rate, bandwidth utilization, operation status, fault alarm, CPU temperature, memory utilization, etc., and each original operation data is marked with an anomaly point, that is, it includes annotation information.
[0029] Step 32: Preprocess each original operation data in the original operation data set to obtain a first target training sample set.
[0030] In some embodiments, after obtaining the original operation data set, the electronic device can preprocess each original operation data in the original operation data. Specifically, first create new binary columns (also called one-hot columns), and the number of the one-hot columns is equal to the number of different values in the features of the original data. Each one-hot column represents a possible category, and in this column, the data points belonging to this category are marked as 1, and other data points are marked as 0. Then, fill the one-hot columns according to the category information in the original data. For each data point, find its value in the original categorical feature, and then mark it as 1 in the corresponding one-hot column. After completing the one-hot encoding, delete the original categorical feature to obtain the preprocessed original operation data, that is, the first target training sample set.
[0031] Step 33: Build an isolation forest model based on the isolation forest.
[0032] In some embodiments, the electronic device may install the machine learning library Scikit - learn, import "import numpy as np" and "from sklearn.ensemble import IsolationForest", set the model parameters of the isolation forest algorithm, including the number of trees in the forest (n_estimators), the estimated proportion of abnormal data (contamination), and the random number seed (random_state) to ensure the repeatability of the results, and create an isolation forest model using the set parameters, model = IsolationForest(n_estimators = 100, contamination = 0.1, random_state = 42).
[0033] Step 34: Input the first target training sample into the isolation forest model to output the recognition result corresponding to the first target training sample through the isolation forest model.
[0034] After the isolation forest model is constructed, the electronic device can use a pre - prepared data set to train the isolation forest model. Specifically, the electronic device can arbitrarily select a first target training sample from the first target training sample set and input the first target training sample into the isolation forest model. The isolation forest model can determine whether the data point corresponding to the first target training sample is an abnormal point to obtain a recognition result.
[0035] During the training process, the isolation forest model can learn the correct pattern of the data and can identify abnormal data points. Among them, data is the pre - processed data set, which is a two - dimensional array or a Pandas DataFrame. Use the trained model to predict new data and determine whether each data point is an abnormal point. The prediction result will return an array, where - 1 indicates an abnormal point and 1 indicates a normal point. According to the prediction result, an abnormal threshold can be further determined.
[0036] Step 35: Adjust the model parameters of the isolation forest model based on the difference between the recognition result and the flag information corresponding to the first target training sample.
[0037] Since each training sample in the first target training sample set includes annotation information, after the isolation forest model identifies the first target training sample to obtain the corresponding recognition result, the model parameters of the isolation forest model can be adjusted based on the difference between the recognition result and the annotation information corresponding to the first target training sample.
[0038] Step 36: Iteratively execute Step 34 to Step 35 based on the adjusted model parameters until a first preset iteration termination condition is met.
[0039] Step 37: Determine the Isolation Forest model when the first preset iteration termination condition is met as the anomaly detection model.
[0040] During the iterative training process, the electronic device determines whether the current iteration termination condition is met. If it is met, the iteration stops and Step 37 is executed; if not, Steps 34 to 35 are repeatedly executed. Among them, the first preset iteration termination condition can be set as whether the number of iterations reaches a preset number threshold; or whether the iteration time meets a preset threshold.
[0041] After obtaining the anomaly detection model, apply the anomaly training model to each monitoring point for anomaly detection and monitoring. For each system operation data, the anomaly detection model can determine whether it is an abnormal data point. If it is an abnormal data point, the anomaly detection model can output -1; if it is not an abnormal data point, the anomaly detection model can output 1.
[0042] In some embodiments, when the anomaly detection model outputs the recognition result, it also outputs a corresponding anomaly score. Among them, the anomaly score can intuitively reflect the degree of difference between the data point and the normal data point. The closer the anomaly score is to 1, the easier it is for the data point to be isolated, that is, the higher the possibility that this point is an abnormal point; the closer the anomaly score is to 0.5, the closer the average path length of the data point is to the average path length of the tree, and it is impossible to distinguish whether it is abnormal; if all the anomaly scores are less than 0.5, then it can be basically determined as normal data. At the same time, the electronic device can preset an anomaly threshold. When the anomaly detection model outputs an anomaly score, compare the anomaly score with the anomaly threshold. Among them, the anomaly threshold is used to convert the anomaly score into a specific classification result, that is, to judge whether the data point is a normal point or an abnormal point. When the anomaly score of the data point is greater than or equal to the anomaly threshold, determine that the data point is an abnormal point; when the anomaly score of the data point is less than the anomaly threshold, determine that the data point is a normal point. The anomaly score is a calculated quantitative indicator to measure the degree of abnormality of the data point, while the anomaly threshold is the judgment criterion for classification based on the anomaly score. By comparing the anomaly score with the anomaly threshold, it is possible to judge whether the data point is an abnormal value, thus completing the anomaly detection task.
[0043] S13. Determine the resource allocation strategy corresponding to the vCPE resource according to the abnormal data point.
[0044] When it is determined as an abnormal data point, determine the category of the abnormal data point. When it is detected that the abnormal data point is a network traffic anomaly, determine that the resource allocation strategy corresponding to the vCPE resource is to take one or more of the measures of traffic rate limiting, increasing bandwidth resources, and adjusting routing strategies. When it is detected that the abnormal data point is an anomaly in latency and packet loss rate, determine that the resource allocation strategy corresponding to the vCPE resource is to optimize the network topology structure, upgrade network device hardware, or one or more of them. When it is detected that the abnormal data point is an anomaly in bandwidth utilization, determine that the resource allocation strategy corresponding to the vCPE resource is to increase bandwidth resources, optimize traffic allocation, or one or more of them. When it is detected that the abnormal data point is an anomaly in the running state or fault alarm, determine that there is a fault in the system hardware or software, locate the fault point according to the alarm information, and determine that the resource allocation strategy corresponding to the vCPE resource is to repair the fault point or replace the faulty hardware / software. When it is detected that the abnormal data point is an anomaly in CPU temperature, determine that the resource allocation strategy corresponding to the vCPE resource is to optimize system load distribution, report one or more of the abnormal information. When it is detected that the abnormal data point is an anomaly in memory utilization, determine that the resource allocation strategy corresponding to the vCPE resource is to increase memory resources, optimize memory usage, find processes that consume too much memory and close them, close processes that have been idle for a long time, or one or more of them.
[0045] In an optional implementation manner, before inputting the system operation data into a preset target prediction model, the method further includes: Arrange the system operation data according to the time sequence; Preprocess the arranged system operation data; Normalize the preprocessed system operation data; Reshape the normalized system operation data into a three-dimensional array format, and the three-dimensional array format is [number of samples, time step, number of features].
[0046] In some embodiments, when obtaining system operation data within the current time period, including network traffic, latency, packet loss rate, bandwidth utilization, operation status, fault alarms, CPU temperature, and system resources such as memory utilization, the electronic device can arrange the system operation data in chronological order, sorting the system operation data collected earlier in the front and the system operation data collected later in the back. After the arrangement is completed, preprocessing is performed on the system operation data, including cleaning to remove outliers and missing values. After the preprocessing is completed, standardization or normalization processing is performed on the system operation data to eliminate the influence brought about by the differences in dimension and order of magnitude between different feature data, making the data comparable. After the standardization or normalization processing is completed, the system operation data after the standardization or normalization processing is reshaped into a three-dimensional array format suitable for the LSTM model. The three-dimensional array format is [number of samples, time step, number of features], where the number of samples represents the number of samples included in the system operation data set; the time step represents the length of the time series included in each system operation data, that is, the number of consecutive time points used for prediction or analysis; the number of features represents the number of feature dimensions included at each time point, that is, the number of types of the various system operation data collected and processed above. Further, the electronic device can input the system operation data in the three-dimensional array format into a preset target prediction model.
[0047] S14. Input the system operation data into a preset target prediction model to output, through the target prediction model, the predicted operation data corresponding to the system operation data in the future time period.
[0048] In some embodiments, the electronic device can train a target prediction model according to the long short-term memory (LSTM) algorithm to predict the system operation data in the next time period. When obtaining the preprocessed system operation data for a current period of time, the electronic device can input the system operation data into the target prediction model, and output, through the target prediction model, the system operation data corresponding to the future time period, that is, the next time period, of the system operation data in the current time period, which is called predicted operation data. For ease of understanding, the following is combined with Figure 3 to illustrate the specific training process of the anomaly detection model. Figure 3 FIG. is a schematic diagram of the training process of an anomaly detection model shown in an embodiment of the present application.
[0049] Step 41: Obtain historical monitoring data, where the historical monitoring data includes flag information.
[0050] Step 42: Perform preprocessing on the original operation data to obtain a second target training sample set.
[0051] In some examples, the electronic device can collect the historical monitoring data corresponding to each monitoring point among multiple monitoring points, including the historical data of network traffic, latency, packet loss rate, bandwidth utilization, operating status, fault alarm, CPU temperature, and memory utilization system resources, and sort the historical monitoring data in chronological order. Then, preprocess the historical monitoring data, including data cleaning to remove outliers and missing values. Then, perform standardization or normalization processing on the cleaned original monitoring data, and reshape the original monitoring data into a three-dimensional array of the LSTM model [number of samples, number of time steps, number of features] to obtain the historical monitoring data after the preprocessing is completed, which is called the second target training sample set.
[0052] Step 43: Construct an LSTM model based on LSTM.
[0053] In some embodiments, the electronic device can add multiple LSTM layers to construct an LSTM model, and specify the number of units in the LSTM layer (i.e., the number of hidden units). The input layer is responsible for receiving the input data and passing it to the LSTM layer. The output layer is responsible for converting the output of the LSTM layer into the final prediction result, and establishing a loss function based on the mean square error (MSE), and selecting the optimizer Adam.
[0054] Step 44: Input the second target training sample into the LSTM model to output the prediction result corresponding to the second target training sample through the LSTM model.
[0055] After the LSTM model is constructed, the electronic device can use the pre-prepared data set to train the LSTM model. Specifically, the electronic device can arbitrarily select a training sample from the second target training sample set as the second target training sample, and input the second target training sample into the LSTM model. The LSTM model can output the prediction result of the second target training sample.
[0056] Step 45: Adjust the loss function of the LSTM model based on the difference between the prediction result and the flag information corresponding to the second target training sample.
[0057] The LSTM model is trained using historical monitoring data. At each time step, the input sequence is provided to the LSTM model, and the loss function is calculated based on the actual labels. The weights and biases of the model are updated to minimize the loss function, and the trained LSTM model is determined as the target prediction model. Specifically, since each second training sample set in the second target training sample set includes annotation information, after the prediction result is obtained through the LSTM model, the electronic device can adjust the loss function of the LSTM model based on the difference between the prediction result and the annotation information of the second target training sample, that is, determine the difference between the actual value of the second target training sample and the output value of the last layer, that is, the output layer, of the LSTM model when training the second target training sample, and adjust the loss function of the LSTM model through this difference.
[0058] Step 46: Iteratively execute Step 44 to Step 45 based on the adjusted loss function until the second preset iteration termination condition is met.
[0059] Step 47: Determine the LSTM model that meets the second preset iteration termination condition as the target prediction model.
[0060] During the iterative training process, the electronic device can determine whether the current situation meets the second preset iteration termination condition. If it meets, the iteration stops and Step 47 is executed; if it does not meet, Steps 44 and 45 are repeatedly iterated. Among them, the second preset iteration termination condition can be set as the iteration times meeting the preset number threshold; or the loss function of the LSTM model converges, that is, the loss function does not change significantly after multiple iterations; or the iteration time meets the preset iteration time threshold.
[0061] S15. Adjust the resource allocation strategy according to the predicted operation data.
[0062] In some embodiments, after the LSTM model is trained to obtain the target prediction model, the target prediction model can be used to predict the system operation data within a period of time in the future, that is, the predicted operation data, including network traffic, bandwidth utilization, CPU temperature, memory utilization, and fault alarm information, and the current resource allocation strategy can be adjusted in advance based on the predicted operation data. Specifically, the network traffic and bandwidth utilization data in the predicted operation data are analyzed to identify the time periods when the network traffic and bandwidth utilization are expected to be high. For these time periods, an adjustment strategy for increasing network bandwidth and server resources is formulated. The specific adjusted resource allocation strategy includes but is not limited to temporarily upgrading the network bandwidth package, enabling standby servers, or increasing server computing resources, etc., to ensure that the network and servers can meet the expected business requirements during this time period. The CPU temperature and memory utilization data in the predicted operation data are analyzed to identify the time periods when the CPU temperature and memory utilization are expected to be high. For these time periods, an adjustment strategy for heat dissipation treatment or increasing memory resources is formulated. The specific adjusted resource allocation strategy includes but is not limited to turning on or strengthening heat dissipation devices (such as fans, heat sinks, etc.), adjusting the server heat dissipation layout, and adding memory modules or enabling standby memory resources according to actual needs, etc., to prevent the system performance from decreasing or malfunctioning due to too high CPU temperature or insufficient memory. The fault alarm information in the predicted operation data is analyzed to determine the devices that may malfunction and the time periods when the faults are expected to occur. For these devices and time periods, an adjustment strategy for timely repairing or replacing the faulty devices is formulated. The specific adjusted resource allocation strategy includes but is not limited to preparing the spare parts and tools required for maintenance in advance, arranging professional maintenance personnel to arrive at the scene as soon as possible before or after the expected fault occurs for maintenance, and if the device cannot be repaired, replacing the faulty device in time, to reduce the impact of device faults on the business.
[0063] According to the adjusted resource allocation strategy, actual adjustment operations are performed on the network bandwidth, server resources, heat dissipation devices, memory resources, and faulty devices within the corresponding time periods, ensuring that the resource allocation can be dynamically optimized according to the predicted operation data to adapt to the business requirements and system operation conditions in different future time periods, thereby improving the stability and performance of the system.
[0064] S16. Adjust the vCPE resource configuration according to the adjusted resource allocation strategy.
[0065] After obtaining the adjusted resource allocation strategy, the electronic device can automatically adjust the vCPE resource configuration. For example, use the API interface of the cloud management platform to dynamically adjust the CPU and memory resources of the virtual machine; adjust the network bandwidth allocation and traffic routing through the network management tool.
[0066] After the resource allocation is adjusted, continuously monitor the system operation data of the vCPE device to observe whether the adjusted resource allocation strategy effectively solves the previous problems or meets the expected business goals. If it is found that problems still exist after the resource allocation is adjusted, or the business requirements have changed, return to the above steps again to re-obtain data, detect anomalies, perform predictive analysis, and adjust the resource allocation strategy, forming a closed-loop optimization process.
[0067] In an alternative embodiment, the method further includes: Step 51, obtain the initial solution of each resource allocation strategy in the resource allocation strategy set, and use the initial solution as the initial population of the genetic algorithm; Step 52, define a fitness function, and determine the fitness value corresponding to each resource allocation strategy according to the fitness function; Step 53, determine the parent resource allocation strategy from the resource allocation strategy set according to the fitness value; Step 54, perform cross combination on the parent resource allocation strategy to generate offspring resource allocation strategies; Step 55, perform random mutation on the offspring resource allocation strategies; Step 56, repeat the above steps 53 to 55 until the third preset iteration termination condition is met.
[0068] In some embodiments, the electronic device can use the Genetic Algorithm (GA) to optimize the resource allocation strategy. Referring together Figure 4, the electronic device first initializes the population, that is, within the feasible solution space of the resource allocation strategy, a series of initial solutions of the resource allocation strategy are randomly generated. These initial solutions constitute the initial population of the genetic algorithm, and each initial solution represents a resource allocation strategy plan. Next, a fitness function is defined. This fitness function can evaluate the performance of each resource allocation strategy based on indicators such as resource utilization rate, network performance, and user satisfaction. The fitness function is used to calculate the comprehensive performance of each resource allocation strategy in terms of resource utilization rate (such as network bandwidth utilization rate, server resource utilization rate, etc.), network performance (such as network latency, packet loss rate, etc.), and user satisfaction (which can be calculated through a preset user feedback model or index system), and obtain the fitness value of each resource allocation strategy. Then, the electronic device can use selection strategies such as roulette wheel selection and tournament selection to select resource allocation strategies with higher fitness (for example, fitness values greater than a preset threshold) from the initial population as parents for generating the next generation population; the higher the fitness value, the greater the probability of being selected. Further, the electronic device can use crossover methods such as single-point crossover and multi-point crossover to cross-combine the resource allocation strategies of the parents, exchange at specific positions or features of the parent strategies, and generate new offspring resource allocation strategies; for example, for strategies involving resource allocation in different time periods, the strategy features can be cross-combined in different time periods. The electronic device can use mutation methods such as bit flipping and random replacement to randomly mutate the offspring resource allocation strategies, randomly change some parameters or features in the offspring strategies to increase the diversity of the population; for example, for the quantity parameter of resource allocation, it can be randomly increased or decreased within a certain range. The set of mutated offspring resource allocation strategies is used as the new population, and the selection, crossover, and mutation operations are repeated to form an iterative process; in each iteration, the fitness values of each strategy in the new population are recalculated, and the selection, crossover, and mutation operations are performed until the third preset iteration condition is reached, such as a predetermined number of iterations or the result of the fitness function no longer changes significantly (that is, in two adjacent iterations, the improvement amplitude of the optimal fitness value is less than the preset threshold) to obtain the optimal resource allocation strategy after reaching the iteration termination condition.
[0069] Through the above optional implementation manners, initial strategy solutions are randomly generated to form the initial population, the performance of the strategies is evaluated by the fitness function, parents are selected according to the fitness values, offspring are generated through cross-combination and random mutation, an iteration is formed, and the selection, crossover, and mutation operations are continuously repeated until the iteration termination condition is met, automatically exploring the optimal strategy, improving the resource utilization rate, network performance, and user satisfaction, and enhancing the rationality and effectiveness of resource allocation.
[0070] In an optional implementation manner, the method further includes: When receiving an access / management request from a user for the vCPE resource, obtain the user role of the user; Determine the user permissions corresponding to the user role; Based on the user permissions, determine whether the user is allowed to access / manage the vCPE resources; When it is determined that the user is allowed to access / manage the vCPE resources, perform the access / manage operation requested by the user and feedback the operation result to the user.
[0071] In some embodiments, the electronic device can use role-based access control (RBAC) means to ensure that only authorized users can access and manage vCPE resources. Specifically, the electronic device can define different roles according to business requirements and security requirements, such as administrators, operation and maintenance personnel, ordinary users, etc., and assign different permissions to each role, such as resource allocation, fault recovery, user management, log viewing, etc. The specific permission allocation rules can be: the administrator role has all permissions such as resource allocation, fault recovery, user management, log viewing, etc.; the operation and maintenance personnel role has permissions such as resource allocation (partial resource scope), fault recovery, log viewing, etc.; the ordinary user role only has limited permissions such as viewing resource information related to itself. Based on this, the electronic device can generate a role-permission mapping relationship table to clarify the operations that each role can perform and the resource scope that can be accessed. Then, according to the user's identity, position, and responsibilities, associate the user with the defined role. For example, associate the user with system management responsibilities to the administrator role, associate the user responsible for daily operation and maintenance work to the operation and maintenance personnel role, and associate the ordinary business user to the ordinary user role; through the association operation, ensure that each user can only access the resources and operations allowed by their role. Based on this, the electronic device can generate a user-role association relationship table to record the role information corresponding to each user.
[0072] When a certain user needs to access and / or manage a certain vCPE resource, send an access / manage request for the certain vCPE resource. When the electronic device receives the access / manage request for the certain vCPE resource, determine the user role of the user according to the user-role association relationship table, and determine the user permissions corresponding to the user role according to the role-permission mapping relationship table. Based on the user permissions, determine whether the user has the permission scope / to manage the certain vCPE resource. When it is determined that the user has the permission to access / manage the certain vCPE resource, perform the access / manage operation requested by the user, and after obtaining the corresponding operation result, feedback the operation result to the user. When it is determined that the user does not have the permission to access / manage the certain vCPE resource, terminate the access / manage operation requested by the user and return a no-permission prompt to the user.
[0073] In some embodiments, the electronic device can also regularly audit and change roles and permissions to adapt to changes in business development and security requirements, ensuring that users can only access the resources and operations permitted by their roles. Additionally, the electronic device can establish a security audit mechanism to monitor and record network traffic, user behavior, etc. in real time, ensuring data security and operation compliance during the resource allocation process.
[0074] Through the above optional real-time method, RBAC realizes fine-grained access control by assigning different roles to users and defining different permissions for each role, ensuring that only authorized users can access and manage vCPE resources, enhancing security, preventing unauthorized operations, and facilitating flexible adjustment of permissions according to business and security requirements to ensure the reasonable use of resources.
[0075] In some embodiments, the electronic device can provide a visualization management interface. Additionally, it can record information such as resource allocation, network status, and user behavior, and generate detailed logs and reports. For resource allocation, it can record the time of resource allocation, the allocator, the type and quantity of allocated resources, the allocation target, etc. For example, "[Time] The administrator allocated a virtual machine with 10 CPUs"; for network status, it records changes in indicators such as network latency, packet loss rate, and bandwidth utilization. Such as "[Time] The network latency is 50 ms and the packet loss rate is 1%"; for user behavior, it records user login, operations (such as creating, modifying, deleting resources, etc.), logout, and other behaviors. For example, "[Time] User B logged in to the system". Among them, a unified log format (such as JSON, CSV, etc.) can be used to facilitate storage and analysis.
[0076] Refer to Figure 5 As shown, it is a functional module diagram of the vCPE resource allocation device shown in the embodiments of the present application.
[0077] In some embodiments, the vCPE resource allocation device 50 may include multiple functional modules composed of computer program segments. The computer programs of each program segment of the vCPE resource allocation device 50 can be stored in the memory of the electronic device and executed by at least one processor to perform the functions of vCPE resource allocation (see details in Figure 1 description). According to the functions it performs, it can be divided into multiple functional modules. The functional modules may include: a real-time monitoring module 501, an anomaly detection module 502, a resource allocation module 503, a prediction module 504, an optimization module 505, and a permission management module 506. The modules referred to in the present application refer to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, and are stored in the memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0078] The real-time monitoring module 501 is used to obtain the system operation data of each monitoring point.
[0079] The anomaly detection module 502 is used to input the system operation data into a preset anomaly detection model, so as to output the anomaly data points in the system operation data through the anomaly detection model.
[0080] The resource allocation module 503 is used to determine the resource allocation strategy corresponding to the vCPE resources according to the anomaly data points.
[0081] The prediction module 504 is used to input the system operation data into a preset target prediction model, so as to output the predicted operation data corresponding to the system operation data in a future time period through the target prediction model.
[0082] The resource allocation module 503 is further used to adjust the resource allocation strategy according to the predicted operation data.
[0083] The resource allocation module 503 is further used to adjust the vCPE resource configuration according to the adjusted resource allocation strategy.
[0084] The real-time monitoring module 501 is further used to: determine the categorical features corresponding to the system operation data; create one-hot columns based on the categorical features, the number of one-hot columns being equal to the number of different values in the categorical features, and each one-hot column representing a category; fill the one-hot columns according to the category information in the system operation data; and delete the categorical features after the one-hot columns are filled, to obtain the preprocessed system operation data.
[0085] The anomaly detection module 502 is further used to: Step 31, obtain the original operation data of each monitoring point among multiple monitoring points to obtain an original operation data set, where each original operation data in the original operation data set includes flag information; Step 32, preprocess each original operation data in the original operation data set to obtain a first target training sample set; Step 33, construct an isolation forest model based on the isolation forest; Step 34, input the first target training sample into the isolation forest model, so as to output the recognition result corresponding to the first target training sample through the isolation forest model, where the first target training sample is any training sample in the first target training sample set; Step 35, adjust the model parameters of the isolation forest model based on the difference between the recognition result and the flag information corresponding to the first target training sample; Step 36, iteratively execute Steps 34 to 35 based on the adjusted model parameters until a first preset iteration termination condition is met; Step 37, determine the isolation forest model when the first preset iteration termination condition is met as the anomaly detection model.
[0086] The prediction module 504 is further configured to: Step 41, obtain historical monitoring data, where the historical monitoring data includes flag information; Step 42, preprocess the original operation data to obtain a second target training sample set; Step 43, construct an LSTM model based on LSTM; Step 44, input the second target training sample into the LSTM model to output a prediction result corresponding to the second target training sample through the LSTM model, where the second target training sample is any training sample in the second target training sample set; Step 45, adjust the loss function of the LSTM model based on the difference between the prediction result and the flag information corresponding to the second target training sample; Step 46, iteratively execute Steps 44 to 45 based on the adjusted loss function until a second preset iteration termination condition is met; Step 47, determine the LSTM model when the second preset iteration termination condition is met as the target prediction model.
[0087] The optimization module 505 is configured to: Step 51, obtain an initial solution for each resource allocation policy in the resource allocation policy set and use the initial solution as the initial population of the genetic algorithm; Step 52, define a fitness function and determine the fitness value corresponding to each resource allocation policy according to the fitness function; Step 53, determine the parent resource allocation policy from the resource allocation policy set according to the fitness value; Step 54, perform crossover combination on the parent resource allocation policy to generate offspring resource allocation policies; Step 55, perform random mutation on the offspring resource allocation policies; Step 56, repeatedly execute the above Steps 53 to 55 until a third preset iteration termination condition is met.
[0088] The real-time monitoring module 501 is further configured to: arrange the system operation data according to the time sequence; preprocess the arranged system operation data; perform normalization processing on the preprocessed system operation data; reshape the normalized system operation data into a three-dimensional array format, where the three-dimensional array format is [number of samples, time step, number of features].
[0089] The permission management module 506 is configured to: when receiving an access / management request from a user for the vCPE resource, obtain the user role of the user; determine the user permission corresponding to the user role; judge whether the user is allowed to access / manage the vCPE resource according to the user permission; when it is determined that the user is allowed to access / manage the vCPE resource, execute the access / management operation requested by the user and feedback the operation result to the user.
[0090] It should be understood that the various variations and specific embodiments of the vCPE resource allocation method provided in the above embodiments are equally applicable to the vCPE resource allocation device in this embodiment. Through the foregoing detailed description of the vCPE resource allocation method, those skilled in the art can clearly know the implementation method of the vCPE resource allocation device in this embodiment. For the sake of brevity of the specification, it will not be elaborated herein.
[0091] Refer to Figure 6 As shown, it is a schematic structural diagram of an electronic device shown in an embodiment of the present application. In a preferred embodiment of the present application, the electronic device 6 includes a memory 61, at least one processor 62, and at least one communication bus 63.
[0092] Those skilled in the art should understand that Figure 6 the structure of the electronic device shown does not constitute a limitation to the embodiments of the present application. It can be a bus structure or a star structure. The electronic device 6 may further include more or fewer other hardware or software than shown in the figure, or different component arrangements.
[0093] In some embodiments, the electronic device 6 is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits, programmable gate arrays, digital signal processors, and embedded devices, etc. The electronic device 6 may further include a user device, and the user device includes, but is not limited to, any electronic product that can interact with the user through a keyboard, mouse, remote control, touchpad, or voice control device, etc. For example, a personal computer, a tablet computer, a smart phone, a digital camera, etc.
[0094] In the above embodiments provided by the present application, it should be understood that the disclosed methods, devices, computer-readable storage media, and electronic devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple components or modules can be combined or integrated into another device, or some features can be ignored or not executed. Another point, the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, indirect couplings or communication connections of devices or components or modules, and can be in electrical, mechanical or other forms.
[0095] The components described as separate components may or may not be physically separated. The components shown as components may or may not be physical modules, that is, they may be located in one place, or may be distributed to multiple network modules. Some or all of the components can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0096] In addition, in each embodiment of the present invention, each functional module may be integrated into one processing module, or each component may exist physically alone, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module.
[0097] If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0098] It should be noted that for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps may be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0099] In the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0100] The above is a specific description of the preferred embodiments of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art can also make various equivalent deformations or substitutions without departing from the spirit of the present invention, and these equivalent deformations or substitutions are all included within the scope defined by the claims of this application.
Claims
1. A vCPE resource allocation method, characterized in that The method includes: Obtaining the system operation data of each monitoring point; Inputting the system operation data into a preset anomaly detection model to output the anomaly data points in the system operation data through the anomaly detection model; Determining the resource allocation strategy corresponding to the vCPE resources according to the anomaly data points; Inputting the system operation data into a preset target prediction model to output the predicted operation data corresponding to the system operation data in a future time period through the target prediction model; Adjusting the resource allocation strategy according to the predicted operation data; Adjusting the vCPE resource configuration according to the adjusted resource allocation strategy.
2. The vCPE resource allocation method according to claim 1, characterized in that Before inputting the system operation data into the preset anomaly detection model, the method further includes: Determining the categorical features corresponding to the system operation data; Creating one-hot columns based on the categorical features, the number of one-hot columns being equal to the number of different values in the categorical features, and each one-hot column representing a category; Filling the one-hot columns according to the category information in the system operation data; After the one-hot columns are filled, deleting the categorical features to obtain the preprocessed system operation data.
3. The vCPE resource allocation method according to claim 1, characterized in that, The method further includes: Step 31: Obtaining the original operation data of each monitoring point among multiple monitoring points to obtain an original operation data set, and each original operation data in the original operation data set includes flag information; Step 32: Preprocessing each original operation data in the original operation data set to obtain a first target training sample set; Step 33: Constructing an isolation forest model based on the isolation forest; Step 34: Inputting the first target training sample into the isolation forest model to output the recognition result corresponding to the first target training sample through the isolation forest model, where the first target training sample is any training sample in the first target training sample set; Step 35: Adjusting the model parameters of the isolation forest model based on the difference between the recognition result and the flag information corresponding to the first target training sample; Step 36: Iteratively executing steps 34 to 35 based on the adjusted model parameters until a first preset iteration termination condition is met; Step 37: Determining the isolation forest model when the first preset iteration termination condition is met as the anomaly detection model.
4. The vCPE resource allocation method according to claim 1, wherein The method further includes: Step 41: Obtaining historical monitoring data, where the historical monitoring data includes flag information; Step 42: Preprocessing the original operation data to obtain a second target training sample set; Step 43: Constructing an LSTM model based on LSTM; Step 44: Inputting the second target training sample into the LSTM model to output the prediction result corresponding to the second target training sample through the LSTM model, where the second target training sample is any training sample in the second target training sample set; Step 45: Adjusting the loss function of the LSTM model based on the difference between the prediction result and the flag information corresponding to the second target training sample; Step 46: Iteratively execute Step 44 to Step 45 based on the adjusted loss function until a second preset iteration termination condition is met; Step 47: Determine the LSTM model when the second preset iteration termination condition is met as the target prediction model.
5. The vCPE resource allocation method according to claim 1, wherein The method further includes: Step 51: Obtain the initial solution of each resource allocation strategy in the resource allocation strategy set, and use the initial solution as the initial population of the genetic algorithm; Step 52: Define a fitness function, and determine the fitness value corresponding to each resource allocation strategy according to the fitness function; Step 53: Determine the parental resource allocation strategies from the resource allocation strategy set according to the fitness values; Step 54: Perform crossover combination on the parental resource allocation strategies to generate offspring resource allocation strategies; Step 55: Perform random mutation on the offspring resource allocation strategies; Step 56: Repeat the above Step 53 to Step 55 until a third preset iteration termination condition is met.
6. The vCPE resource allocation method according to claim 1, wherein Before inputting the system operation data into a preset target prediction model, the method further includes: Arrange the system operation data according to the time sequence; Preprocess the arranged system operation data; Perform normalization processing on the preprocessed system operation data; reshape the normalized system operation data into a three-dimensional array format, and the three-dimensional array format is [number of samples, time steps, number of features].
7. The vCPE resource allocation method according to claim 1, wherein The method further includes: When receiving a user's access / management request for the vCPE resource, obtain the user's user role; Determine the user permissions corresponding to the user role; Judge whether the user is allowed to access / manage the vCPE resource according to the user permissions; When it is determined that the user is allowed to access / manage the vCPE resource, execute the access / management operation requested by the user, and feedback the operation result to the user.
8. A vCPE resource allocation device, characterized in that The device includes: A real-time monitoring module, configured to obtain the system operation data of each monitoring point; An anomaly detection module, configured to input the system operation data into a preset anomaly detection model, so as to output the anomaly data points in the system operation data through the anomaly detection model; A resource allocation module, configured to determine the resource allocation strategy corresponding to the vCPE resource according to the anomaly data points; A prediction module, configured to input the system operation data into a preset target prediction model, so as to output the predicted operation data corresponding to the system operation data in a future time period through the target prediction model; The resource allocation module is further configured to adjust the resource allocation strategy according to the predicted operation data; The resource allocation module is further configured to adjust the vCPE resource configuration according to the adjusted resource allocation strategy.
9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the vCPE resource allocation method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the vCPE resource allocation method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Comprehensive management method and system for power distribution communication network
CN118647092A
Communication system for dividing VLAN (Virtual Local Area Network) into network cards based on high-speed signal connection switch
CN119254574A
Resource adjustment method and device of edge computing node, equipment and medium
CN119645618A
Systems and methods for network resource allocations
US20220129828A1
Cited By
Multi-cloud service component exception supervision method and device, electronic equipment and storage medium
CN120768788A
Risk policy configuration method, device and equipment based on access data analysis
CN120915597A
Risk policy configuration method, device and equipment based on access data analysis
CN120915597B