Internet protocol (IP) resource creation method and device and electronic equipment
By obtaining the historical IP resource usage to predict the number of IP resources required at the target time, and creating and binding QOS policies during idle time, the problem of poor flexibility in the creation steps of mobile cloud elastic public network IP resources is solved, and IP resource dynamics are realized. Adjustment and efficient allocation.
Patent Information
- Application Number
- CN202410980608.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-09-27
AI Technical Summary
The flexible public IP resource creation steps of Mobile Cloud are less flexible, resulting in inflexible IP resource creation.
By obtaining the historical IP resource usage within a preset historical time period, predicting the number of IP resources required at the target time, creating IP resources during idle time and binding them to quality of service QOS policies, this improves the flexibility of IP resource creation.
The number of IP resources is dynamically adjusted according to changes in historical usage, which improves the flexibility and efficiency of IP resource creation, avoids resource waste, and meets the needs of different business scenarios.
Smart Images

Figure CN118714098A
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a method, device and electronic device for creating Internet Protocol (IP) resources. Background Art
[0002] Mobile Cloud's elastic public Internet Protocol (IP) product can provide customers with static public IP address resources, flexibly bind and unbind cloud resources such as cloud hosts, elastic load balancers, cloud databases, and cloud bastion hosts, freely adjust bandwidth on demand, and achieve Internet access to cloud resources to meet the needs of various business scenarios.
[0003] Currently, the steps for creating elastic public IP resources in Mobile Cloud are as follows: after the customer logs in to the Mobile Cloud system, they configure parameters on the page. After the parameter configuration is completed, a specified number of IP resources are created based on the configured bandwidth and other information. This results in poor flexibility in creating IP resources. Summary of the invention
[0004] The embodiments of the present application provide a method, device and electronic device for creating Internet Protocol (IP) resources to solve the problem of poor flexibility in the creation of existing IP resources.
[0005] To solve the above technical problems, this application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for creating an Internet Protocol (IP) resource, the method comprising:
[0007] Get the historical IP resource usage within the preset historical time period;
[0008] Predicting the amount of IP resources required at the target time based on the historical IP resource usage;
[0009] During idle time, IP resources and a quality of service (QOS) policy are created according to the number of IP resources, and the IP resources are bound to the QOS policy.
[0010] In a second aspect, an embodiment of the present application provides an Internet Protocol IP resource creation device, the device comprising:
[0011] An acquisition module is used to obtain the historical IP resource usage within a preset historical time period;
[0012] A prediction module, used to predict the amount of IP resources needed to be used at a target time based on the historical IP resource usage;
[0013] The creation module is used to create IP resources and service quality QOS policies according to the number of IP resources during idle time, and bind the IP resources to the QOS policies.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, including a transceiver and a processor.
[0015] The processor is configured to:
[0016] Get the historical IP resource usage within the preset historical time period;
[0017] Predicting the amount of IP resources required at the target time based on the historical IP resource usage;
[0018] During idle time, IP resources and a quality of service (QOS) policy are created according to the number of IP resources, and the IP resources are bound to the QOS policy.
[0019] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the Internet Protocol IP resource creation method described in the first aspect are implemented.
[0020] In a fifth aspect, an embodiment 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 Internet Protocol IP resource creation method described in the first aspect above are implemented.
[0021] In a sixth aspect, an embodiment of the present application further provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps in the method described above.
[0022] In the Internet Protocol IP resource creation method of the present embodiment, since the historical IP resource usage can characterize the IP resource usage within a preset historical time period, the historical IP resource usage can be used to predict the number of IP resources required at the target time, that is, the number of IP resources can change according to the change of historical IP resource usage, instead of specifying a constant number. During idle time, IP resources and service quality QOS policies can be created based on the predicted number of IP resources and bound to improve the flexibility of IP resource creation. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0024] Figure 1 It is a flowchart of an Internet Protocol IP resource creation method provided by an embodiment of the present application;
[0025] Figure 2 It is a schematic diagram of an Internet Protocol IP resource creation method provided in an embodiment of the present application;
[0026] Figure 3 It is a structural diagram of an Internet Protocol IP resource creation device provided in an embodiment of the present application;
[0027] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0029] See also Figure 1 , Figure 1 1 is a flowchart of a method for creating an Internet Protocol (IP) resource provided by an embodiment of the present application, which is executed by a first electronic device, wherein the first electronic device can be a network device, etc. Figure 1 As shown, the Internet Protocol IP resource creation method provided in this embodiment includes the following steps:
[0030] Step 101: Obtain historical IP resource usage within a preset historical time period.
[0031] It should be understood that the preset historical time period can be pre-set according to actual needs without specific limitation. For example, by way of example, it can be one month before the current day, etc. In this way, the IP resource usage within this month can be obtained.
[0032] Step 102: Predict the amount of IP resources required at the target time based on historical IP resource usage.
[0033] It should be understood that the target time can be any time after the upper limit of the preset historical time period, without specific limitation, for example, the target time can be the same day. That is, in this embodiment, the historical IP resource usage in the historical time period can be used to predict the number of IP resources required for the future target time.
[0034] Step 103: During idle time, create IP resources and a quality of service (QOS) policy according to the number of IP resources, and bind the IP resources to the QOS policy.
[0035] Among them, QOS is the abbreviation of Quality of Service, which is the quality of service. The idle time in this embodiment can be understood as the time when there is no IP resource creation request. During this period of time, no one orders IP resources, and the system does not need to respond to the IP resource creation request. That is, during the idle time when there is no IP resource creation request, the IP resource quantity and the service quality QOS policy can be created in advance, and they are bound so that IP resources can be allocated in the subsequent actual IP resource creation request process.
[0036] In the Internet Protocol IP resource creation method of the present embodiment, since the historical IP resource usage can characterize the IP resource usage within a preset historical time period, the historical IP resource usage can be used to predict the number of IP resources required at the target time, that is, the number of IP resources can change according to the change of historical IP resource usage, instead of specifying a constant number. During idle time, IP resources and service quality QOS policies can be created based on the predicted number of IP resources and bound to improve the flexibility of IP resource creation.
[0037] In one embodiment, creating IP resources and a quality of service (QOS) policy according to the number of IP resources includes:
[0038] The actual number of pre-created resources is determined based on the number of IP resources and the preset protection factor, where the preset protection factor is a number greater than 1;
[0039] Create IP resources and QOS policies in the pre-created resource pool based on the actual number of pre-created resources.
[0040] The preset protection factor may also be referred to as a preset protection coefficient. It should be understood that the preset protection factor is a factor used to prevent the created IP resources from being insufficient, that is, a factor used to make the created IP resources sufficient. The preset protection factor may be preset according to actual needs, without specific limitation, for example, illustratively, it may be 1.2, etc. Exemplarily, the actual number of pre-created resources may be the product of the number of IP resources and the preset protection factor.
[0041] In this embodiment, a preset protection factor can be set. The preset protection factor is a number greater than 1. The actual number of pre-created resources can be determined by the number of IP resources and the preset protection factor. The actual number of pre-created resources can be used to create IP resources and QOS policies in the pre-created resource pool. The preset protection factor can reduce the situation where the actually created IP resources are insufficient, so that there are enough P resources to be used in scenarios where the predicted IP resource data volume and the actual IP resource usage are large.
[0042] In one embodiment, after creating IP resources and QOS policies in the pre-created resource pool according to the actual number of pre-created resources, the method further includes:
[0043] Establishing a cache resource queue sequence corresponding to the gateway group, wherein the cache resource queue sequence includes at least one cache resource queue;
[0044] The identifiers of the IP resources in the pre-created resource pool are assigned to the resource cache queue sequence corresponding to the gateway group, and the queue information of the resource cache queue to which the identifiers of the IP resources are assigned is saved in the pre-created resource pool, wherein each resource cache queue includes at least one identifier of an IP resource, and the collection of resources in the resource cache queue sequence is the IP resources in the pre-created resource pool.
[0045] It should be understood that resources can be allocated according to gateway groups, and gateway division can be performed in advance to obtain multiple gateway groups. The above-mentioned acquisition of the historical IP resource usage within the preset historical time period can be to obtain the historical IP resource usage corresponding to each gateway group in the multiple gateway groups. In this way, for each gateway group, according to the historical IP resource usage of the gateway group, the number of IP resources required for the target time under the gateway group can be predicted. During the idle time, the IP resources and service quality QOS policy under the gateway group are created and bound according to the number of IP resources under the gateway group. In this embodiment, after creating IP resources and QOS policies in the pre-created resource pool, for each gateway group in the multiple gateway groups, a gateway group cache resource queue sequence can also be established, and then the identifier of the IP resource corresponding to the gateway group in the pre-created resource pool can be allocated to the resource cache queue sequence corresponding to the gateway group. The collection of resources in the resource cache queue sequence corresponding to the gateway group is the IP resource corresponding to the gateway group in the pre-created resource pool.
[0046] In this embodiment, the identifier of the IP resource created in the pre-created resource pool can be assigned to the resource cache queue sequence corresponding to the gateway group, so that when the IP resource is actually needed later, the required IP resource can be found from the resource cache queue sequence.
[0047] In one embodiment, after creating IP resources and a quality of service (QOS) policy according to the number of IP resources and binding the IP resources to the QOS policy, the process further includes:
[0048] receiving an IP resource creation request, the IP resource creation request being associated with a target user identifier;
[0049] Determine the target gateway group to which the target user corresponding to the target user identifier belongs;
[0050] Determine the target IP resource identifier according to the resource cache queue sequence corresponding to the target gateway group;
[0051] The user of the target IP resource corresponding to the target IP resource identifier is modified to the target user.
[0052] That is, in this embodiment, after receiving the IP resource creation request of the target user, the target gateway group to which the target user belongs can be determined first, and the target IP resource identifier is searched in the resource cache queue sequence corresponding to the target gateway group to which the target user belongs, and then the user to which the target IP resource corresponding to the target IP resource identifier belongs is modified to be the target user. In this way, the efficiency of allocating resources to the target user can be improved.
[0053] In one embodiment, determining the target IP resource identifier according to the resource cache queue sequence corresponding to the target gateway group includes:
[0054] The following steps are executed in a loop until the target IP resource identifier is successfully selected or the target IP resource identifier is not selected in the resource cache queue sequence corresponding to the target gateway group:
[0055] Selecting a target resource cache queue from the resource cache queue sequence corresponding to the target gateway group, the target resource cache queue being any queue in the resource cache queue sequence;
[0056] When there are no remaining IP resource identifiers in the target resource cache queue or the target resource cache queue is abnormal, the target resource cache queue is deleted from the resource cache queue sequence to update the resource cache queue sequence;
[0057] When there are remaining IP resource identifiers in the target resource cache queue, the target IP resource identifier is selected from the remaining IP resource identifiers.
[0058] That is, the queues in the resource cache queue sequence corresponding to the target gateway group can be queried by polling. Once there are remaining IP resource identifiers in the polled queue (optionally, once there are remaining IP resource identifiers in the polled queue and there is no abnormality in the queue), the target IP resource identifier can be selected from the remaining IP resource identifiers, that is, the target IP resource identifier is successfully selected, and the loop can be stopped. The target IP resource identifier can be any identifier in the remaining IP resource identifiers, and the remaining IP resource identifier can be understood as the identifier of the remaining unused IP resource. In the case that there are no remaining IP resource identifiers in the polled queue, the target resource cache queue can be deleted from the resource cache queue sequence to update the resource cache queue sequence, and the target resource cache queue does not participate in the next polling, and then the next round of search is performed until the target IP resource identifier is successfully selected or the target IP resource identifier fails to be selected in the resource cache queue sequence corresponding to the target gateway group. That is, the loop can be stopped in the case of successful search, or the loop can be stopped in the case of failed selection of the target IP resource identifier in all queues of the resource cache queue sequence corresponding to the target gateway group. Exemplarily, in the case where the search fails in a preset number of queues in the resource cache queue sequence corresponding to the target gateway group, the loop is stopped, that is, the above steps are executed in a loop until the number of times the target IP resource identifier selection fails in the resource cache queue sequence corresponding to the target gateway group reaches a preset number. In addition, exemplarily, in the case where the target IP resource identifier selection fails in the resource cache queue sequence corresponding to the target gateway group or the search fails in a preset number of queues in the resource cache queue sequence corresponding to the target gateway group, a related process can be used to allocate IP resources to the target user, for example, to allocate IP resources to the target user through an existing ordinary process.
[0059] That is, in an embodiment of the present application, the queue in the resource cache queue sequence corresponding to the target gateway group can be queried in a polling manner to determine the target IP resource identifier, and then the user to which the target IP resource corresponding to the target IP resource identifier belongs can be modified to the target user, thereby allocating resources to the target user and improving the efficiency of allocating resources to the user.
[0060] The process of the above method is described in detail below with reference to a specific embodiment.
[0061] IP resource pre-creation resource prediction model:
[0062] First, a prediction model is established based on historical IP resource subscription data (i.e., historical IP resource usage). The model can be used to predict the number of IP resources required for the day (prediction can be performed according to the underlying gateway grouping) and set as the predicted value. After obtaining the predicted value, during the system idle time, for example, set to 2:00 to 4:00 in the evening, during this period, there is basically no one ordering IP resources, and there is basically no underlying request to create IP resources. In the pre-created IP resource pool, a corresponding number of IP resources and QOS policies are pre-created according to the underlying gateway grouping, and bound. The speed limit of the QOS policy can be set to 0, so that the number of IP resources in the current pre-created resource pool meets the use of the day. Using the prediction model to pre-establish a certain number of IP resources can not only control the use of IP resources and avoid resource waste, but also meet actual use.
[0063] The embodiment of the present application can use an exponential smoothing model to predict the number of IP resources that need to be ordered and used every day. The exponential smoothing method is actually a special weighted moving average method. On the one hand, the exponential smoothing method further strengthens the effect of recent observations in the observation period on the predicted value, and the weights assigned to observations at different times are different, thereby increasing the weights of recent observations, so that the predicted value can quickly reflect the actual changes in the market. The weights are reduced in a geometric series, the first term of this series is the smoothing constant α, and the common ratio is 1-α; on the other hand, the exponential smoothing method is flexible for the weights assigned to the observations, and different α values can be used to change the rate of change of the weights. If α takes a small value, the weight changes more quickly, and the recent change trend of the observations can be more quickly reflected in the exponential moving average. Therefore, using the exponential smoothing method, different α values can be selected to adjust the uniformity of the time series observations.
[0064] Taking gateway group G1 as an example, let x t is the number of IP resources ordered and used by this group on day t, s t is the smoothed value on day t, and let That is, the predicted value on day t+1, and satisfies It can be proved that:
[0065]
[0066] in Considered as initial value;
[0067] After determining the value of the smoothing parameter, the number of IP resources that need to be ordered on the day can be predicted based on the ordering situation of the historical days (the usage of IP resources). The value of α is 0 to 1, and can be adjusted according to the trend of IP resource changes. Suppose the predicted IP resource value for the t+1 day is α t ,set up is the optimal smoothing parameter for the tth day, which means Minimum, the parameter value is rounded to two decimal places.
[0068] but That is, α is obtained by averaging the best historical smoothing factor. t , in and out prediction value s t (i.e. the predicted number of IP resources to be used), add a preset protection factor ε, for example, the value is 1.2, that is, the actual number of resources to be created is s t ε. By combining the preset protection factor with the pre-created IP resource monitoring strategy, we can prevent the situation where the pre-created IP resources are insufficient. That is, we enable the scheduled task to monitor the usage of pre-created IP resources in real time. When the pre-created IP resource usage rate exceeds 0.9, 10% of the total pre-created IP resources are added to the pre-created resource pool and related queues to ensure that there are enough pre-created IP resources for scenarios where there is a large gap between the predicted application amount and the actual consumption.
[0069] According to the above calculation model, the number of IP resources required for each group (G1, G2, G3...GN) on day t is predicted to be G1 t ,G2 t ...GN t , call the underlying batch compensation to create a corresponding number of IP resources in the pre-created resource pool during idle time every day.
[0070] like Figure 2 As shown in the figure, after completing the creation of the IP pre-creation resource pool resources, a fast resource creation process is established in combination with the redis cache queue (i.e., resource cache queue). The specific steps are as follows:
[0071] According to the gateway grouping, each gateway group establishes multiple resource cache queues. The purpose of establishing multiple cache queues is to divert users in high-concurrency scenarios to access different queues and improve concurrency performance. The number of queues is the number of pre-created resources / the number of planned caches for each queue. If the planned cache number is Y, the calculation formula for the number of cache queues corresponding to the group is:
[0072] LN=GN t / Y;
[0073] After obtaining the number of redis queues, the resource ID of the synchronous pre-created resource pool is evenly distributed to each redis cache queue, and the redis queue information assigned to this ip is saved in the pre-created resource pool. Among them, the KEY value of the redis cache queue is the current resource pool number + underlying gateway group + group sequence number, CIDC_RP_25_G1_LIST_N represents the G1 gateway group pre-created resource queue N, and VALUE is the pre-created IPID (identification ID of the public network IP resource) set. Through the identification ID of the IP resource, the detailed information of this IP (IP address, QOS, etc.) can be obtained from the pre-created resource pool. When the user sends an IP resource creation request, the identification ID of the IP resource is obtained from the corresponding redis cache queue through the underlying group to which this user belongs, and then the detailed resource information is obtained by polling. The current IP owner can be modified to the current user, and the speed limit can be issued according to the actual bandwidth size. For example, neutron can be called to modify the IP owner user to the current user and re-issue the speed limit rule, and the process ends.
[0074] Among them, the pre-created resource allocation fault tolerance and compensation mechanism can be adopted, that is, after the redis cache queue is determined according to the polling strategy, check whether the redis cache queue is normal or whether there are any remaining IP resources. If not (failed to obtain the pre-created resources), randomly obtain a queue from the remaining queues and retry three times. If the pre-created resources still fail to be obtained after three times, follow the normal creation process, that is, call the normal process to create the IP, and remove this queue from the polling queue and do not participate in the next polling. If the problem is caused by the abnormality of the redis cache queue, mark this queue as an abnormal queue (such as a redis abnormality problem on a node in the redis cluster) and report an alarm. After the redis problem is solved, restore this queue through the queue information saved in the pre-created resource pool and add it to the polling list.
[0075] In addition, a pre-creation resource recycling strategy can also be adopted: when pre-creating resources for the next cycle, first check the remaining unused resources in the pre-creation resource pool, clean up the redis fast resource queue information, subtract the remaining unused number from the number of resources required for pre-creation, and get the actual resources that need to be newly created. After the pre-creation is completed, rebuild the redis fast queue to ensure that resources that are not used in time can be recycled.
[0076] That is, the embodiment of the present application studies a solution for dynamic and rapid creation of IP with pre-allocated resources, targeting the situation where the creation process of mobile cloud public network IP is slow and the anti-high concurrency performance is weak. A prediction model is built based on the historical IP usage to predict in advance the number of IP resources needed every day, pre-create the IP and the required QOS in the idle time, and bind the resources in advance. In addition, when the customer (user) actually creates an IP, a polling solution is used in combination with the redis fast cache queue to quickly obtain the pre-created resources. After that, only the tenant information of the underlying IP and the actual bandwidth size need to be modified to complete the entire resource creation process. Resources can be allocated quickly, which greatly improves the creation time of the mobile cloud public network IP. Moreover, since the request uses the polling solution to quickly obtain the redis cache queue data, it has a higher anti-concurrency performance.
[0077] like Figure 3 As shown, Figure 3 is a schematic diagram of the structure of an Internet Protocol IP resource creation device provided in an embodiment of the present application, such as Figure 3 As shown, the Internet Protocol IP resource creation device 300 includes:
[0078] The acquisition module 301 is used to acquire the historical IP resource usage within a preset historical time period;
[0079] Prediction module 302, used to predict the number of IP resources required to be used at the target time based on the historical IP resource usage;
[0080] The creation module 303 is used to create IP resources and a quality of service (QOS) policy according to the number of IP resources during idle time, and to bind the IP resources to the QOS policy.
[0081] In one embodiment, the creation module 303 includes:
[0082] A determination unit, configured to determine the actual number of pre-created resources according to the number of IP resources and a preset protection factor, wherein the preset protection factor is a number greater than 1;
[0083] The creation unit is used to create IP resources and QOS policies in the pre-created resource pool according to the actual number of pre-created resources.
[0084] In one embodiment, the Internet Protocol IP resource creation device 300 further includes:
[0085] An establishing module, used to establish a cache resource queue sequence corresponding to the gateway group, wherein the cache resource queue sequence includes at least one cache resource queue;
[0086] An allocation module is used to allocate the identifiers of IP resources in the pre-created resource pool to the resource cache queue sequence corresponding to the gateway group, and save the queue information of the resource cache queue to which the identifier of the IP resource is allocated in the pre-created resource pool, wherein each resource cache queue includes at least one identifier of an IP resource, and the collection of resources in the resource cache queue sequence is the IP resources in the pre-created resource pool.
[0087] In one embodiment, the Internet Protocol IP resource creation device 300 further includes:
[0088] A receiving module, used for receiving an IP resource creation request, wherein the IP resource creation request is associated with a target user identifier;
[0089] A group determination module, used to determine the target gateway group to which the target user corresponding to the target user identifier belongs;
[0090] An identification determination module, used to determine the target IP resource identification according to the resource cache queue sequence corresponding to the target gateway group;
[0091] The modification module is used to modify the belonging user of the target IP resource corresponding to the target IP resource identifier to the target user.
[0092] In one embodiment, the identification determination module is specifically used to:
[0093] The following steps are executed in a loop until the target IP resource identifier is successfully selected or the target IP resource identifier is not selected in the resource cache queue sequence corresponding to the target gateway group:
[0094] Selecting a target resource cache queue from the resource cache queue sequence corresponding to the target gateway group, the target resource cache queue being any queue in the resource cache queue sequence;
[0095] When there are no remaining IP resource identifiers in the target resource cache queue or the target resource cache queue is abnormal, the target resource cache queue is deleted from the resource cache queue sequence to update the resource cache queue sequence;
[0096] When there are remaining IP resource identifiers in the target resource cache queue, the target IP resource identifier is selected from the remaining IP resource identifiers.
[0097] The electronic device provided in this embodiment can implement each process of each embodiment of the above-mentioned Internet Protocol IP resource creation method, the technical features correspond one to one, and can achieve the same technical effect. To avoid repetition, they will not be repeated here.
[0098] An embodiment of the present application also provides an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, each process of the above-mentioned Internet Protocol IP resource creation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0099] The embodiment of the present application also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, the various processes in the above method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0100] For details, see Figure 4 An embodiment of the present application further provides an electronic device, including a bus 401, a transceiver 402, an antenna 403, a bus interface 404, a processor 405 and a memory 406.
[0101] The processor 405 is used for:
[0102] Get the historical IP resource usage within the preset historical time period;
[0103] Based on the historical IP resource usage, predict the number of IP resources needed at the target time;
[0104] During idle time, create IP resources and service quality QOS policies according to the number of IP resources, and bind the IP resources to the QOS policies.
[0105] In one embodiment, the creation module 303 includes:
[0106] A determination unit, configured to determine the actual number of pre-created resources according to the number of IP resources and a preset protection factor, wherein the preset protection factor is a number greater than 1;
[0107] The creation unit is used to create IP resources and QOS policies in the pre-created resource pool according to the actual number of pre-created resources.
[0108] In one embodiment, the processor 405 is further configured to:
[0109] Establishing a cache resource queue sequence corresponding to the gateway group, wherein the cache resource queue sequence includes at least one cache resource queue;
[0110] The identifiers of the IP resources in the pre-created resource pool are assigned to the resource cache queue sequence corresponding to the gateway group, and the queue information of the resource cache queue to which the identifiers of the IP resources are assigned is saved in the pre-created resource pool, wherein each resource cache queue includes at least one identifier of an IP resource, and the collection of resources in the resource cache queue sequence is the IP resources in the pre-created resource pool.
[0111] In one embodiment, the processor 405 is further configured to:
[0112] receiving an IP resource creation request, the IP resource creation request being associated with a target user identifier;
[0113] Determine the target gateway group to which the target user corresponding to the target user identifier belongs;
[0114] Determine the target IP resource identifier according to the resource cache queue sequence corresponding to the target gateway group;
[0115] The user of the target IP resource corresponding to the target IP resource identifier is modified to the target user.
[0116] In one embodiment, the processor 405 is specifically configured to:
[0117] The following steps are executed in a loop until the target IP resource identifier is successfully selected or the target IP resource identifier is not selected in the resource cache queue sequence corresponding to the target gateway group:
[0118] Selecting a target resource cache queue from the resource cache queue sequence corresponding to the target gateway group, the target resource cache queue being any queue in the resource cache queue sequence;
[0119] When there are no remaining IP resource identifiers in the target resource cache queue or the target resource cache queue is abnormal, the target resource cache queue is deleted from the resource cache queue sequence to update the resource cache queue sequence;
[0120] When there are remaining IP resource identifiers in the target resource cache queue, the target IP resource identifier is selected from the remaining IP resource identifiers.
[0121] exist Figure 4 In the embodiment, a bus architecture (represented by bus 401) is shown, bus 401 may include any number of interconnected buses and bridges, bus 401 links various circuits including one or more processors represented by processor 405 and memory represented by memory 406. Bus 401 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. Bus interface 404 provides an interface between bus 401 and transceiver 402. Transceiver 402 may be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. Data processed by processor 405 is transmitted on a wireless medium via antenna 403, and further, antenna 403 also receives data and transmits the data to processor 405.
[0122] Processor 405 is responsible for managing bus 401 and general processing, and may also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory 406 may be used to store data used by processor 405 when performing operations.
[0123] Optionally, the processor 405 may be a CPU, an ASIC, an FPGA or a CPLD.
[0124] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned Internet Protocol IP resource creation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0125] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0126] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0127] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for creating an Internet Protocol IP resource, It is characterized in that The method comprises: Get the historical IP resource usage within the preset historical time period; Predicting the amount of IP resources required at the target time based on the historical IP resource usage; During idle time, IP resources and a quality of service (QOS) policy are created according to the number of IP resources, and the IP resources are bound to the QOS policy.
2. The method according to claim 1, It is characterized in that The step of creating IP resources and a quality of service (QOS) strategy according to the number of IP resources includes: Determine the actual number of pre-created resources according to the number of IP resources and a preset protection factor, wherein the preset protection factor is a number greater than 1; The IP resources and the QOS policy are created in a pre-created resource pool according to the actual pre-created resource quantity.
3. The method according to claim 2, It is characterized in that After creating the IP resources and the QOS policy in the pre-created resource pool according to the actual pre-created resource quantity, the method further includes: Establishing a cache resource queue sequence corresponding to the gateway group, wherein the cache resource queue sequence includes at least one cache resource queue; The identifiers of the IP resources in the pre-created resource pool are assigned to the resource cache queue sequence corresponding to the gateway group, and the queue information of the resource cache queue to which the identifiers of the IP resources are assigned is saved in the pre-created resource pool, wherein each resource cache queue includes at least one identifier of an IP resource, and the collection of resources in the resource cache queue sequence is the IP resources in the pre-created resource pool.
4. The method according to claim 3, It is characterized in that After creating IP resources and a quality of service (QOS) policy according to the number of IP resources and binding the IP resources with the QOS policy, the method further includes: Receiving an IP resource creation request, wherein the IP resource creation request is associated with a target user identifier; Determine the target gateway group to which the target user corresponding to the target user identifier belongs; Determine the target IP resource identifier according to the resource cache queue sequence corresponding to the target gateway group; The belonging user of the target IP resource corresponding to the target IP resource identifier is modified to the target user.
5. The method according to claim 4, It is characterized in that The step of determining the target IP resource identifier according to the resource cache queue sequence corresponding to the target gateway group includes: The following steps are executed in a loop until the target IP resource identifier is successfully selected or the target IP resource identifier fails to be selected in the resource cache queue sequence corresponding to the target gateway group: Selecting a target resource cache queue in the resource cache queue sequence corresponding to the target gateway group, the target resource cache queue being any queue in the resource cache queue sequence; When there are no remaining IP resource identifiers in the target resource cache queue or the target resource cache queue is abnormal, deleting the target resource cache queue from the resource cache queue sequence to update the resource cache queue sequence; In the case that there are remaining IP resource identifiers in the target resource cache queue, the target IP resource identifier is selected from the remaining IP resource identifiers.
6. An Internet Protocol (IP) resource creation device, It is characterized in that The device comprises: An acquisition module is used to obtain the historical IP resource usage within a preset historical time period; A prediction module, used to predict the amount of IP resources needed to be used at a target time based on the historical IP resource usage; The creation module is used to create IP resources and service quality QOS policies according to the number of IP resources during idle time, and bind the IP resources to the QOS policies.
7. An electronic device, It is characterized in that Including transceiver and processor, The processor is configured to: Get the historical IP resource usage within the preset historical time period; Predicting the amount of IP resources required at the target time based on the historical IP resource usage; During idle time, IP resources and a quality of service (QOS) policy are created according to the number of IP resources, and the IP resources are bound to the QOS policy.
8. An electronic device, It is characterized in that include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program implements the steps of the method according to any one of claims 1 to 5 when executed by the processor.
9. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any one of the methods of claims 1 to 5.
10. A computer program product, It is characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 5.
