Resource processing method, device, electronic device and storage medium of network element
By predicting the resource load value of network elements and expanding or shrinking the capacity in advance, the problem of lagging elastic scaling response in the existing technology is solved, and the service and network quality are improved.
Patent Information
- Application Number
- CN202310814483.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-04
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2043-07-04
AI Technical Summary
In the existing technology, the elastic scaling mode is basically responsive scaling. The elastic scaling action is triggered based on the comparison between the monitoring indicator and the threshold. There is a response lag phenomenon, which leads to a decrease in service quality and network quality.
By obtaining the historical resource load value of the network element for normalization processing, and inputting it into the trained long-short-term memory neural network, the resource load value is predicted, and the expected number of copies is calculated based on the current and predicted resource load value to achieve early expansion or contraction. , ensuring that the number of replicas of the network element is equal to the expected number.
It reduces the lag of network element resource scaling response, improves service quality and network quality, and avoids service interruption and resource waste caused by insufficient or idle resources.
Smart Images

Figure CN117009076B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of network element resources, and in particular to a method, device, electronic device and storage medium for processing resources of a network element. Background Art
[0002] Containers are a typical lightweight virtualization technology that has been widely used in the IT field. 5GC, a service network element represented by the 5G independent networking (SA) core network, draws on the concept of IT system service-oriented and proposes a service-based architecture (SBA), which splits the network elements of the traditional core network into fine-grained network functions (NFs). The introduction of SBA makes NFs particularly suitable for containerized deployment, and containerized NFs can be quickly and elastically scaled according to business loads.
[0003] Elastic scaling is different from traditional fixed deployment servers. It responds according to actual usage. When the network element load is high, elastic scaling expands the network element resources to avoid service interruption due to insufficient resources; when the network element load is low, it shrinks the network element resources to avoid idle waste of resources. However, in related technologies, the elastic scaling mode is basically responsive scaling, which triggers elastic scaling actions based on the comparison between monitoring indicators and thresholds. However, there is a certain response lag in the passive response to monitoring indicators, which will reduce network quality in the communication field with high quality of service (QoS) requirements. Summary of the invention
[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a resource processing method, device, electronic device and storage medium of a network element, which can expand or reduce the capacity of the network element according to the predicted resource load value to ensure the service quality of the network element and the network quality.
[0005] A resource processing method for a network element according to an embodiment of the first aspect of the present application includes:
[0006] Obtaining a historical resource load value of the network element;
[0007] Normalizing the historical resource load value;
[0008] Inputting the normalized historical resource load value into a trained long short-term memory neural network to obtain a predicted resource load value;
[0009] Obtaining a current resource load value of the network element;
[0010] Obtaining an expected number of replicas according to the current resource load value and the predicted resource load value;
[0011] The network element is expanded or reduced in capacity according to the expected number of copies, so that the number of copies of the network element is equal to the expected number of copies.
[0012] The resource processing method of the network element according to the embodiment of the present application has at least the following beneficial effects: the method of the embodiment of the present application first obtains the historical resource load value of the network element; then normalizes the historical resource load value; inputs the normalized historical resource load value into the trained long short-term memory neural network to obtain the predicted resource load value; obtains the current resource load value of the network element; obtains the expected number of copies according to the current resource load value and the predicted resource load value; expands or shrinks the network element according to the expected number of copies, so that the number of copies of the network element is equal to the expected number of copies. In this way, the network element can be expanded or shrunk in advance according to the predicted resource load value, reducing the lag in the scaling response of the network element resources, and ensuring the service quality and network quality of the network element.
[0013] According to some embodiments of the present application, obtaining the expected number of replicas according to the current resource load value and the predicted resource load value includes:
[0014] If the current resource load value and the predicted resource load value are both smaller than a preset resource load threshold, and the current resource load value is greater than or equal to the predicted resource load value, the expected number of replicas is determined according to the current resource load value.
[0015] According to some embodiments of the present application, obtaining the expected number of replicas according to the current resource load value and the predicted resource load value includes:
[0016] If the current resource load value and the predicted resource load value are both smaller than a preset resource load threshold, and the current resource load value is smaller than the predicted resource load value, the expected number of replicas is determined according to the predicted resource load value.
[0017] According to some embodiments of the present application, the expanding or shrinking the network element according to the expected number of replicas so that the number of replicas of the network element is equal to the expected number of replicas includes:
[0018] The network element copies of the network element are reduced according to the expected number of copies, so that the number of copies of the network element is equal to the expected number of copies.
[0019] According to some embodiments of the present application, obtaining the expected number of replicas according to the current resource load value and the predicted resource load value includes:
[0020] If the current resource load value is greater than the predicted resource load value, and the current resource load value is greater than the preset resource load threshold, the expected number of replicas is determined according to the current resource load value.
[0021] According to some embodiments of the present application, obtaining the expected number of replicas according to the current resource load value and the predicted resource load value includes:
[0022] If the predicted resource load value is greater than or equal to the current resource load value, and the predicted resource load value is greater than the preset resource load threshold, the expected number of replicas is determined according to the predicted resource load value.
[0023] According to some embodiments of the present application, the expanding or shrinking the network element according to the expected number of replicas so that the number of replicas of the network element is equal to the expected number of replicas includes:
[0024] The network element replicas of the network element are increased according to the expected number of replicas, so that the number of replicas of the network element is equal to the expected number of replicas.
[0025] A second aspect of the present application provides a resource processing device for a network element, including:
[0026] A first acquisition unit, the first acquisition unit is used to acquire a historical resource load value of the network element;
[0027] A normalization unit, the normalization unit is used to normalize the historical resource load value;
[0028] A prediction unit, the prediction unit is used to input the historical resource load value after the normalization process into a trained long short-term memory neural network to obtain a predicted resource load value;
[0029] A second acquisition unit, the second acquisition unit is used to acquire a current resource load value of the network element;
[0030] A replica determination unit, the replica determination unit being configured to obtain an expected number of replicas according to the current resource load value and the predicted resource load value;
[0031] A resource scaling unit, the resource scaling unit is used to expand or reduce the capacity of the network element according to the expected number of copies, so that the number of copies of the network element is equal to the expected number of copies.
[0032] An embodiment of the third aspect of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the resource processing method of the network element described in any one of the embodiments of the first aspect is implemented.
[0033] The fourth aspect of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the resource processing method of the network element described in any one of the first aspect embodiments.
[0034] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The present application is further described below with reference to the accompanying drawings and embodiments, wherein:
[0036] Figure 1 A schematic diagram of the structure of a resource processing system of a network element in some embodiments of the present application;
[0037] Figure 2 A flowchart of the steps of a method for processing resources of a network element in some embodiments of the present application;
[0038] Figure 3 A flowchart of the steps of reducing the capacity of a network element in a method for processing network element resources in some embodiments of the present application;
[0039] Figure 4 A flowchart of the steps of expanding the capacity of a network element in a method for processing network element resources in some embodiments of the present application;
[0040] Figure 5 A schematic diagram of the structure of a resource processing device of a network element in some embodiments of the present application;
[0041] Figure 6 This is a schematic diagram of the structure of an electronic device according to some embodiments of the present application.
[0042] Reference numerals: DETAILED DESCRIPTION
[0043] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0044] In the description of the present application, it should be understood that descriptions involving orientation, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0045] In the description of this application, "several" means more than one, "more" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0046] In the description of this application, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in this application based on the specific content of the technical solution.
[0047] In the description of the present application, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0048] Elastic scaling can be classified into vertical scaling (Vertical Pod Autoscaling, VPA) and horizontal scaling (Horizontal Pod Autoscaling, HPA) based on the way of resource control. Vertical scaling is to achieve the purpose of improving performance by enhancing the computing resources occupied by NF instances. For example, increasing memory, increasing the number of CPU cores, and so on. Horizontal scaling has no requirements on the performance of a single machine and is achieved by increasing or reducing the number of NF instances. In the related art, the elastic scaling mode is basically responsive scaling, which triggers the elastic scaling action based on the comparison between the monitoring index and the threshold. However, there is a certain response lag in the passive response to the monitoring index, which will reduce the network quality for the communication field with high service quality requirements. Based on this, the embodiment of the present application proposes a resource processing method, device, electronic device and storage medium of a network element, which can expand or shrink the network element according to the predicted resource load value to ensure the service quality and network quality of the network element.
[0049] Reference Figure 1 , Figure 1 A schematic diagram of the structure of a resource processing system of a network element is shown. Figure 1 The system can be used to execute the resource processing method of the network element in the embodiment of the present application. Figure 1The system shown includes a resource load value monitoring module 110, a prediction module 120, a replica calculation module 140, and a replica controller 130. The resource load value monitoring module 110 is used to periodically monitor the resource load value of the network element to obtain the historical resource load value and the current resource load value of the network element. The prediction module 120 deploys a trained long short-term memory neural network, which can input the normalized historical resource load value into the trained long short-term memory neural network to obtain the predicted resource load value. The replica calculation module 140 can obtain the expected number of replicas based on the current resource load value and the predicted resource load value; the replica controller 130 is used to adjust the number of replicas of the network element so that the number of replicas of the network element is equal to the expected number of replicas.
[0050] based on Figure 1 The system shown, see Figure 2 The first aspect of the present application provides a method for processing resources of a network element, including but not limited to the following steps:
[0051] Step S210, obtaining the historical resource load value of the network element;
[0052] Step S220, normalizing the historical resource load value;
[0053] Step S230, inputting the normalized historical resource load value into the trained long short-term memory neural network to obtain a predicted resource load value;
[0054] Step S240, obtaining the current resource load value of the network element;
[0055] Step S250, obtaining the expected number of replicas according to the current resource load value and the predicted resource load value;
[0056] Step S260: Expand or shrink the network element according to the expected number of replicas, so that the number of replicas of the network element is equal to the expected number of replicas.
[0057] The resource processing method of the network element according to the embodiment of the present application has at least the following beneficial effects: the method of the embodiment of the present application first obtains the historical resource load value of the network element; then normalizes the historical resource load value; inputs the normalized historical resource load value into the trained long short-term memory neural network (Long Short-Term Memory, LSTM) to obtain the predicted resource load value; obtains the current resource load value of the network element; obtains the expected number of copies according to the current resource load value and the predicted resource load value; expands or shrinks the network element according to the expected number of copies, so that the number of copies of the network element is equal to the expected number of copies. In this way, the network element can be expanded or shrunk in advance according to the predicted resource load value, reducing the lag of the network element resource scaling response, and ensuring the service quality and network quality of the network element.
[0058] It should be noted that the network element of the embodiment of the present application can be a containerized network element, such as a service network element 5GC represented by the 5G independent networking core network. It should be noted that a network element is composed of a number of network element copies. In step S260, the elastic expansion and contraction of the network element is achieved by controlling the elastic increase and decrease of the number of copies, which belongs to horizontal scaling HPA. Horizontal scaling has no requirements on the performance of a single machine. It is achieved by increasing or decreasing the number of NF instances, which can ensure the continuity of the service. There is no theoretical performance bottleneck, but there are requirements for the application type, generally requiring statelessness. In fact, most of the network function modules of the 5G core network adopt a stateless design and can use horizontal scaling. Therefore, 5GC containerized network elements are based on horizontal scaling.
[0059] It is worth noting that the resource load value can be CPU usage or memory usage. The current resource load value and the predicted resource load value both correspond to the historical resource load value. When the historical resource load value is CPU usage, the current resource load value and the predicted resource load value are also CPU usage. When the historical resource load value is memory usage, the current resource load value and the predicted resource load value are also memory usage.
[0060] It is worth noting that the resource load value monitoring module 110 includes a probe, a time series database, and an API unit. The probe is responsible for collecting and monitoring the system resource indicator data of the containerized network element. The indicator data includes CPU utilization and memory utilization. It periodically and actively pulls indicator data from the containerized network element and converts the captured indicator data into the format of the indicator. The indicator data collected by the probe are all saved in the built-in time series database (TSDB) in the form of indicators. TSDB belongs to the same indicator name, the same label set, and the data stream marked with timestamps to realize the persistent storage of indicator data. The HTTP API provides an HTTP interface. Through the TSDB query statement, you can perform multiplication, addition, concatenation, fractional digit extraction and other operations on multiple indicators, and finally return the query results in HTTP form.
[0061] It should be noted that since the network element is composed of several network element copies, the average value of the resource load values of all network element copies is used as the resource load value of the network element. For example, if the current resource load value is the CPU utilization, then the current resource load value is the average value of the CPU utilization of all network element copies of the network element.
[0062] It is understandable that before the prediction module 120 uses the trained long short-term memory neural network to make predictions, it is necessary to first train the long short-term memory neural network to obtain the trained long short-term memory neural network. The prediction module 120 first obtains the historical resource load value from the resource load value monitoring module 110, and divides the historical resource load value into a training set and a test set. The historical resource load value is a time series, [S0 S1 S 2…… S t ]. Select the time step N, that is, the length of each sequence, and split the time series into [S0 S1 S2…S N ],[S0 S1 S2……S N+1 ],[S t-n S t-n+ 1S t-n+2…… S t ]. The first N data of each time series is used as a sample feature, and the last data of each time series is used as the corresponding sample label. The training set includes sample features and sample labels corresponding to sample features. Before training, the initial long short-term memory neural network is first constructed, and then the training set and the test set are normalized. The training set is input into the initial long short-term memory neural network for training to obtain a preliminarily trained long short-term memory neural network. The test set is then input into the preliminarily trained long short-term memory neural network for testing. The test results are compared with the true values to determine the accuracy, precision, and recall of the preliminarily trained long short-term memory neural network. The accuracy is the percentage of correctly predicted results in the total samples; the precision is the probability of samples that are actually positive among all samples predicted to be positive; the recall is the probability of samples that are actually positive being predicted to be positive. According to the accuracy, precision, and recall, the hyperparameters of the preliminarily trained long short-term memory neural network are adjusted so that the accuracy, precision, and recall meet the preset conditions, thereby obtaining a trained long short-term memory neural network.
[0063] It is worth noting that when making predictions, the prediction module 120 pulls the most recent N time series indicators from the resource load value monitoring module 110, including two dimensions of CPU usage and memory usage, as historical resource load values, and as input for LTSM model prediction. The historical resource load values are normalized. Normalization is to limit the data to be processed within a certain range, usually within the interval [0, 1] or [-1, 1] after being processed by a certain algorithm. For each dimension of feature X i , the eigenvalue of the kth sample is X ik , after normalization:
[0064]
[0065] Taking the CPU usage of dimension 1 as an example, the CPU usage sample sequence is [10, 20, 30, 40, 50, 60, 70, 80, 90], then the CPU usage of 50 is normalized to:
[0066]
[0067] The normalized historical resource load values are input into the trained long short-term memory neural network to obtain the prediction results. Since the input data of the long short-term memory neural network is normalized data, the prediction results need to be denormalized. When denormalizing, the maximum and minimum values in the input data and the maximum and minimum values in the historical resource load values are used. For example, if the prediction result is y, y is denormalized to obtain the predicted resource load value Y, which is:
[0068] Y=y*(max(X i )-min(X i )+min(Xi)
[0069] For example, taking the CPU usage of dimension 1 as an example, the CPU usage sample sequence is [10, 20, 30, 40, 50, 60, 70, 80, 90], and the predicted result y is 0.5, then the denormalization process is:
[0070] Y=0.5*(90-10)+10=50.
[0071] It is understandable that, referring to Figure 3 , step S250 may include the following steps:
[0072] Step S310: If the current resource load value and the predicted resource load value are both smaller than the preset resource load threshold, and the current resource load value is greater than or equal to the predicted resource load value, the expected number of replicas is determined according to the current resource load value.
[0073] Step S320: If the current resource load value and the predicted resource load value are both smaller than the preset resource load threshold, and the current resource load value is smaller than the predicted resource load value, the expected number of replicas is determined according to the predicted resource load value.
[0074] Correspondingly, step S260 may include the following steps:
[0075] Step S330: reducing the number of network element copies of the network element according to the expected number of copies, so that the number of copies of the network element is equal to the expected number of copies.
[0076] Specifically, the replica calculation module 140 obtains the predicted resource load value from the prediction module 120, and obtains the current resource load value from the resource load value monitoring module 110. When the predicted resource load value and the current resource load value are both less than the preset resource load threshold, the network element needs to be scaled down. When the current resource load value is greater than or equal to the predicted resource load value, the expected number of replicas is determined according to the current resource load value; when the current resource load value is less than the predicted resource load value, the expected number of replicas is determined according to the predicted resource load value. Then the replica controller 130 reduces the network element replicas of the network element according to the expected number of replicas so that the number of replicas of the network element is equal to the expected number of replicas. For example, when the predicted resource load value is the predicted CPU usage, the predicted CPU usage is greater than the preset resource load threshold, and the predicted CPU usage is greater than the current CPU usage, the expected number of replicas is calculated according to the predicted CPU usage, so that when the number of replicas in the network element is equal to the expected number of replicas, the network element can meet the predicted CPU usage and will not cause resource waste. Due to the large volatility of cloud resource load, it often happens that the current resource load value is temporarily lower than the threshold, but the resource load value will rise rapidly soon. In such a case, if the capacity is reduced only according to the current resource load value, it is easy to reduce the capacity in a short time and then expand the capacity, that is, the problem of frequent resource expansion and contraction occurs. However, when reducing the capacity, the embodiment of the present application uses the larger of the predicted resource load value and the current resource load value as the basis for calculating the expected number of replicas, which can reduce the probability of frequent resource expansion and contraction problems.
[0077] It is understandable that, referring to Figure 4 , step S250 may include the following steps:
[0078] S410: If the current resource load value is greater than the predicted resource load value and the current resource load value is greater than a preset resource load threshold, determine the expected number of replicas according to the current resource load value.
[0079] S420: If the predicted resource load value is greater than or equal to the current resource load value, and the predicted resource load value is greater than a preset resource load threshold, determine the expected number of replicas according to the predicted resource load value.
[0080] Correspondingly, step S260 may include the following steps:
[0081] S430: Increase the number of network element copies of the network element according to the expected number of copies, so that the number of copies of the network element is equal to the expected number of copies.
[0082] Specifically, the replica calculation module 140 obtains the predicted resource load value from the prediction module 120, and obtains the current resource load value from the resource load value monitoring module 110. When either the current resource load value or the predicted resource load value is greater than the preset resource load threshold, the network element needs to be expanded. When the current resource load value is greater than the predicted resource load value, the expected number of replicas is determined based on the current resource load value; when the predicted resource load value is greater than or equal to the current resource load value, the expected number of replicas is determined based on the predicted resource load value. Then the replica controller 130 increases the network element replicas of the network element according to the expected number of replicas so that the number of replicas of the network element is equal to the expected number of replicas. When expanding the capacity of the network element, the embodiment of the present application calculates the expected number of replicas by selecting the larger one between the predicted resource load value and the current resource load value so that the network element has sufficient resources to ensure the quality of service.
[0083] Reference Figure 5 The second aspect of the present application provides a resource processing device for a network element, including:
[0084] A first acquisition unit 510, the first acquisition unit 510 is used to acquire a historical resource load value of a network element;
[0085] A normalization unit 520, the normalization unit 520 is used to normalize the historical resource load value;
[0086] A prediction unit 530, which is used to input the normalized historical resource load value into the trained long short-term memory neural network to obtain a predicted resource load value;
[0087] A second acquisition unit 540, the second acquisition unit 540 is used to acquire a current resource load value of a network element;
[0088] A replica determination unit 550, the replica determination unit 550 is used to obtain an expected number of replicas according to a current resource load value and a predicted resource load value;
[0089] The resource scaling unit 560 is used to expand or reduce the capacity of the network element according to the expected number of copies, so that the number of copies of the network element is equal to the expected number of copies.
[0090] The first acquisition unit 510 acquires the historical resource load value of the network element; then the normalization unit 520 is used to normalize the historical resource load value; the prediction unit 530 inputs the normalized historical resource load value into the trained long short-term memory neural network to obtain the predicted resource load value; the second acquisition unit 540 is used to acquire the current resource load value of the network element; the replica determination unit 550 is used to obtain the expected number of replicas based on the current resource load value and the predicted resource load value; the resource scaling unit 560 is used to expand or shrink the network element according to the expected number of replicas, so that the number of replicas of the network element is equal to the expected number of replicas. In this way, the network element can be expanded or shrunk in advance according to the predicted resource load value, reducing the lag of the network element resource scaling response, and ensuring the service quality and network quality of the network element.
[0091] It should be noted that the specific implementation of the resource processing device of the network element is basically the same as the specific implementation example of the resource processing method of the network element mentioned above, and will not be repeated here.
[0092] In a third aspect, an embodiment of the present application further provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the resource processing method of the network element when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0093] See also Figure 6 , Figure 6 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0094] The processor 601 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0095] The memory 602 may be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 may store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 602, and the processor 601 calls and executes the resource processing method of the network element in the embodiment of this application;
[0096] Input / output interface 603, used to implement information input and output;
[0097] Communication interface 604, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0098] Bus 605 , which transmits information between various components of the device (e.g., processor 601 , memory 602 , input / output interface 603 , and communication interface 604 );
[0099] The processor 601 , the memory 602 , the input / output interface 603 and the communication interface 604 are connected to each other in communication within the device via a bus 605 .
[0100] The fourth aspect embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements the resource processing method of the above-mentioned network element.
[0101] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0102] The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments. Various changes can be made within the knowledge of ordinary technicians in the relevant technical field without departing from the purpose of the present application. In addition, the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
Claims
1. A method for processing network element resources, characterized in that: include: Obtaining a historical resource load value of the network element; Normalizing the historical resource load value; Inputting the normalized historical resource load value into a trained long short-term memory neural network to obtain a predicted resource load value; Obtaining a current resource load value of the network element; Obtaining an expected number of replicas according to the current resource load value and the predicted resource load value; Expanding or reducing the capacity of the network element according to the expected number of copies, so that the number of copies of the network element is equal to the expected number of copies; The obtaining the expected number of replicas according to the current resource load value and the predicted resource load value includes: If the current resource load value and the predicted resource load value are both less than a preset resource load threshold, and the current resource load value is greater than or equal to the predicted resource load value, determining the expected number of replicas according to the current resource load value; The obtaining the expected number of replicas according to the current resource load value and the predicted resource load value includes: If the current resource load value and the predicted resource load value are both smaller than a preset resource load threshold, and the current resource load value is smaller than the predicted resource load value, the expected number of replicas is determined according to the predicted resource load value.
2. The resource processing method according to claim 1, characterized in that: The expanding or reducing the capacity of the network element according to the expected number of copies so that the number of copies of the network element is equal to the expected number of copies includes: The network element copies of the network element are reduced according to the expected number of copies, so that the number of copies of the network element is equal to the expected number of copies.
3. The resource processing method according to claim 1, characterized in that: The obtaining the expected number of replicas according to the current resource load value and the predicted resource load value includes: If the current resource load value is greater than the predicted resource load value, and the current resource load value is greater than the preset resource load threshold, the expected number of replicas is determined according to the current resource load value.
4. The resource processing method according to claim 1, characterized in that: The obtaining the expected number of replicas according to the current resource load value and the predicted resource load value includes: If the predicted resource load value is greater than or equal to the current resource load value, and the predicted resource load value is greater than the preset resource load threshold, the expected number of replicas is determined according to the predicted resource load value.
5. The method for processing network element resources according to claim 3 or 4, characterized in that: The expanding or reducing the capacity of the network element according to the expected number of copies so that the number of copies of the network element is equal to the expected number of copies includes: The network element replicas of the network element are increased according to the expected number of replicas, so that the number of replicas of the network element is equal to the expected number of replicas.
6. A resource processing device for a network element, characterized in that: include: A first acquisition unit, the first acquisition unit is used to acquire a historical resource load value of the network element; A normalization unit, the normalization unit is used to normalize the historical resource load value; A prediction unit, the prediction unit is used to input the historical resource load value after the normalization process into a trained long short-term memory neural network to obtain a predicted resource load value; A second acquisition unit, the second acquisition unit is used to acquire a current resource load value of the network element; A replica determination unit, the replica determination unit being configured to obtain an expected number of replicas according to the current resource load value and the predicted resource load value; A resource scaling unit, the resource scaling unit being configured to expand or reduce the capacity of the network element according to the expected number of replicas, so that the number of replicas of the network element is equal to the expected number of replicas; The obtaining the expected number of replicas according to the current resource load value and the predicted resource load value includes: If the current resource load value and the predicted resource load value are both less than a preset resource load threshold, and the current resource load value is greater than or equal to the predicted resource load value, determining the expected number of replicas according to the current resource load value; The obtaining the expected number of replicas according to the current resource load value and the predicted resource load value includes: If the current resource load value and the predicted resource load value are both smaller than a preset resource load threshold, and the current resource load value is smaller than the predicted resource load value, the expected number of replicas is determined according to the predicted resource load value.
7. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the resource processing method of the network element as described in any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the resource processing method of a network element according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Virtual machine capacity expansion and contraction method and device, computing equipment and computer storage medium
CN115686734A
