Method and apparatus for resource configuration, electronic device and storage medium
By acquiring the preset characteristics and node configuration information of the target node and combining them with historical business bandwidth, CDN resource configuration is optimized, solving the problems of node resource waste and cost loss, and achieving more efficient resource utilization and cost control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
- Filing Date
- 2022-01-04
- Publication Date
- 2026-04-24
AI Technical Summary
The lack of stable reference standards for CDN resource allocation in existing technologies leads to serious resource waste and significant cost losses.
By acquiring the preset characteristics of the target nodes, grouping is determined, and resource configuration is performed based on the node configuration information. Combined with historical service bandwidth and node association information, cost standards for resource requirements are defined.
The resource allocation logic has been optimized, reducing node resource waste, lowering financial costs, and providing strategic guidance for scheduling and financial cost accounting.
Smart Images

Figure CN116436774B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network resource processing, and more particularly to a method and apparatus for resource allocation, electronic equipment, and storage medium. Background Technology
[0002] The node is a virtual node that depends on the on-demand node and shares the uplink bandwidth of the switch. With the rapid development of business, it accounts for an increasingly larger share of the business of CDN (Content Delivery Network) service providers, the quality requirements are getting higher and higher, and customers are demanding more refined scheduling, which puts forward higher requirements for CDN resource planning.
[0003] Currently, resource allocation is planned manually offline based on experience and feedback from the scheduling side. Because the node resource allocation obtained from the combined data of business volume and scheduling feedback is unstable and uncertain, lacks a reference standard, and has poor real-time performance, it often leads to resource waste and cost losses in order to meet business quality and customer requirements.
[0004] Therefore, the related technologies suffer from serious waste of planned node resources and significant cost losses. Summary of the Invention
[0005] This application provides a method and apparatus for resource allocation, a storage medium and an electronic device, to at least solve the problem of serious waste of planned node resources and significant cost losses in related technologies.
[0006] According to one aspect of the embodiments of this application, a method for resource allocation is provided, the method comprising:
[0007] Obtain preset features of the target node, wherein the preset features are used to characterize the regional information of the node where the target node is located and the network vendor information to which the target node belongs;
[0008] Based on the preset characteristics of the target node, a target group in which the target node is located is determined among multiple groups, wherein all nodes in each group have the same preset characteristics;
[0009] Obtain the node configuration information of the target group, wherein there are groups with different node configuration information among the multiple groups;
[0010] Configure the node resources of the target node according to the node configuration information.
[0011] According to another aspect of the embodiments of this application, a resource allocation apparatus is also provided, the apparatus comprising:
[0012] The first acquisition unit is used to acquire preset features of the target node, wherein the preset features are used to characterize the regional information of the node where the target node is located and the network vendor information to which the target node belongs;
[0013] The first determining unit is configured to determine the target group in a plurality of groups based on the preset characteristics of the target node, wherein all nodes in each group have the same preset characteristics;
[0014] The second acquisition unit is used to acquire the node configuration information of the target group, wherein there are groups with different node configuration information among the plurality of groups;
[0015] The configuration unit is used to configure the node resources of the target node according to the node configuration information.
[0016] Optionally, the device further includes:
[0017] The third acquisition unit is used to acquire resource configuration indicators of multiple reference nodes before acquiring the node configuration information of the target group, wherein the reference nodes are historical node data and the group to which the reference nodes belong is the target group;
[0018] The second determining unit is used to determine the node configuration information of the target group based on the resource configuration indicators.
[0019] Optionally, the third acquisition unit includes:
[0020] The acquisition module is used to acquire the number of reference nodes, the maximum threshold of historical resource playback bandwidth of the node, the minimum threshold of historical resource playback bandwidth of the node, and the historical maximum traffic bandwidth borne by multiple nodes at the same time point.
[0021] The configuration module is used to set the number of nodes, the maximum threshold, the minimum threshold, and the historical maximum traffic bandwidth as the resource configuration indicators.
[0022] Optionally, the second determining unit includes:
[0023] The first determining module is used to determine the first resource configuration index based on the historical maximum traffic bandwidth, the minimum threshold, and the maximum threshold, wherein the first resource configuration index is used to characterize the minimum value set by the reference node;
[0024] The second determining module is used to determine the second resource configuration index based on the maximum threshold, the number of nodes, and the historical maximum traffic bandwidth, wherein the second resource configuration index is used to characterize the maximum value set by the reference node;
[0025] The third determining module is used to determine the node configuration information of the target group based on the first resource configuration indicator and the second resource configuration indicator.
[0026] Optionally, the calculation formula for the first determining module is as follows:
[0027] a = (bc × rate) / n1;
[0028] Where a is the primary indicator of resource allocation, b is the historical maximum bandwidth, c is the minimum threshold, rate = c / e, e is the maximum threshold, and n1 is the current reference node's resource capacity.
[0029] Optionally, the calculation formula for the second determining module is as follows:
[0030] d = (min(e, f×n2) - b) / n3;
[0031] Where d is the second resource allocation indicator, e is the maximum threshold, b is the historical maximum traffic bandwidth, f is the number of nodes, and n2 = n3 is the preset carrying capacity of the current reference node resources.
[0032] Optionally, the third determining module includes:
[0033] The first sub-unit is used to round up the first resource allocation index and the second resource allocation index to obtain the rounded first resource allocation index and the rounded second resource allocation index.
[0034] The second obtaining subunit is used to obtain the node configuration information of the target group by using the rounded resource configuration first index and the rounded resource configuration second index, wherein the node configuration information includes the addition or deletion of the target node.
[0035] According to another aspect of the embodiments of this application, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein the memory is used to store a computer program; and the processor is used to execute the method steps of any of the above embodiments by running the computer program stored in the memory.
[0036] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to execute the method steps of any of the above embodiments when running.
[0037] In this embodiment, preset characteristics of the target node are obtained, whereby the preset characteristics characterize the regional information of the node where the target node is located and the network vendor information to which the target node belongs. Based on the preset characteristics of the target node, a target group in which the target node is located is determined among multiple groups, wherein all nodes in each group have the same preset characteristics. Node configuration information of the target group is obtained, wherein there are groups with different node configuration information among the multiple groups. Node resources of the target node are configured according to the node configuration information. Since this embodiment groups the node resources in the target area based on the regional information and network vendor parameters of existing nodes in the target area, and then defines a set of cost standards for measuring resource demand based on the node association information within each group and historical service bandwidth and node association information, the node resources are configured accordingly. This calculation predicts the node resource configuration, providing strategic guidance for node scheduling and financial cost accounting, and solves the problem of serious waste and significant cost losses of planned node resources in related technologies. Attached Figure Description
[0038] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a schematic diagram of the hardware environment for an optional resource configuration method according to an embodiment of the present invention;
[0041] Figure 2 This is a flowchart illustrating an optional resource configuration method according to an embodiment of this application;
[0042] Figure 3 This is a structural block diagram of an optional resource configuration apparatus according to an embodiment of this application;
[0043] Figure 4 This is a structural block diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation
[0044] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0045] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0046] According to one aspect of the embodiments of this application, a method for resource allocation is provided. Optionally, in this embodiment, the above-described resource allocation method can be applied to, for example... Figure 1 In the hardware environment shown. For example... Figure 1 As shown, terminal 102 may include memory 104, processor 106, and display 108 (optional component). Terminal 102 can communicate with server 112 via network 110. Server 112 can provide services (such as application services) to the terminal or clients installed on the terminal. Database 114 can be set up on or independently of server 112 to provide data storage services to server 112. In addition, server 112 may run a processing engine 116, which can be used to execute the steps performed by server 112.
[0047] Optionally, terminal 102 may be, but is not limited to, a terminal capable of computing data, such as a mobile terminal (e.g., mobile phone, tablet computer), laptop computer, PC (Personal Computer), etc. The aforementioned network may include, but is not limited to, a wireless network or a wired network. The wireless network includes Bluetooth, Wi-Fi (Wireless Fidelity), and other networks that enable wireless communication. The aforementioned wired network may include, but is not limited to, a wide area network (WAN), a metropolitan area network (MAN), and a local area network (LAN). The aforementioned server 112 may include, but is not limited to, any hardware device capable of computing.
[0048] Furthermore, in this embodiment, the resource configuration method described above can also be applied to, but is not limited to, independent processing devices with powerful processing capabilities, without the need for data interaction. For example, the processing device can be, but is not limited to, a terminal device with powerful processing capabilities; that is, the various operations in the resource configuration method described above can be integrated into a single independent processing device. The above is merely an example, and no limitation is made in this embodiment.
[0049] Optionally, in this embodiment, the resource configuration method described above can be executed by server 112, by terminal 102, or by both server 112 and terminal 102. The resource configuration method of this embodiment can also be executed by a client installed on terminal 102.
[0050] Taking running on a server as an example, Figure 2 This is a flowchart illustrating an optional resource configuration method according to an embodiment of this application, such as... Figure 2 As shown, the process of this method may include the following steps:
[0051] Step S201: Obtain the preset features of the target node, wherein the preset features are used to characterize the regional information of the node where the target node is located and the network vendor information to which the target node belongs.
[0052] Optionally, in this embodiment, when dynamically configuring node resources for a target region, it is necessary to first obtain multiple preset features of the node resources within that target region. These preset features include regional information corresponding to the target region. For example, if the target region includes Beijing and Shaanxi Province, the regional information corresponding to Beijing is North China, and the regional information corresponding to Shaanxi Province is Northwest China. The preset features also include the network vendor to which the network resources used by the node resources within the target region belong, such as China Mobile or China Unicom. It should be noted that the target region mentioned in this embodiment is a large area, which may include multiple provinces and regions.
[0053] Step S202: Based on the preset characteristics of the target node, determine the target group in which the target node is located among multiple groups, wherein all nodes in each group have the same preset characteristics.
[0054] Optionally, regions belonging to the same area information and using network resources from the same network vendor can be grouped together, resulting in multiple group information sets. Then, based on several preset characteristics of the target area, such as area information and network information, the target group containing the target node can be determined from these multiple groups. It should be noted that all nodes within each group have the same preset characteristics.
[0055] Step S203: Obtain the node configuration information of the target group, wherein there are groups with different node configuration information among multiple groups.
[0056] Optionally, different node configuration schemes are set in each group, that is, the configuration information of node resources in each group information exists in different groups.
[0057] Step S204: Configure the node resources of the target node according to the node configuration information.
[0058] Optionally, in this embodiment of the application, after determining the node configuration information corresponding to the target group, the node resources of the target node can be configured based on the node configuration information. Furthermore, the node resources can be constructed or decommissioned based on the configuration results.
[0059] In this embodiment, preset characteristics of the target node are obtained, whereby the preset characteristics characterize the regional information of the node where the target node is located and the network vendor information to which the target node belongs. Based on the preset characteristics of the target node, a target group in which the target node is located is determined among multiple groups, wherein all nodes in each group have the same preset characteristics. Node configuration information of the target group is obtained, wherein there are groups with different node configuration information among the multiple groups. Node resources of the target node are configured according to the node configuration information. Since this embodiment groups the node resources in the target area based on the regional information and network vendor parameters of existing nodes in the target area, and then defines a set of cost standards for measuring resource demand based on the node association information within each group and historical service bandwidth and node association information, the node resources are configured accordingly. This calculation predicts the node resource configuration, providing strategic guidance for node scheduling and financial cost accounting, and solves the problem of serious waste and significant cost losses of planned node resources in related technologies.
[0060] Based on the content of the above embodiments, as an optional embodiment, before obtaining the node configuration information of the target group, the method includes:
[0061] Obtain resource configuration metrics from multiple reference nodes, where the reference nodes are historical node data and the group to which the reference nodes belong is the target group;
[0062] Based on resource allocation indicators, determine the node configuration information for the target group.
[0063] Optionally, based on the target group, resource allocation indicators for multiple reference nodes belonging to historical node data within that target group are obtained. These resource allocation indicators may include, for example, the estimated minimum node gap and the estimated maximum capacity gap.
[0064] Then, based on the estimated gap between the minimum guaranteed node capacity and the estimated gap between the maximum capacity, the node resources of the target group are rationally allocated.
[0065] In this embodiment of the application, resource allocation is performed on the target group corresponding to the nodes based on the resource allocation indicators of multiple reference nodes. The resulting configuration provides theoretical guidance and standards for resource construction and cost settlement.
[0066] Based on the content of the above embodiments, as an optional embodiment, obtaining resource configuration indicators of multiple reference nodes includes:
[0067] Obtain the number of reference nodes, the maximum threshold of historical resource playback bandwidth for nodes, the minimum threshold of historical resource playback bandwidth for nodes, and the maximum historical traffic bandwidth that multiple nodes can withstand at the same time point.
[0068] The number of nodes, the maximum threshold, the minimum threshold, and the historical maximum bandwidth are used as resource allocation indicators.
[0069] Optionally, in this embodiment of the application, the following data can be determined based on the resource configuration indicators of multiple reference nodes: the number of reference node resources, the maximum threshold of historical resource playback bandwidth of the node, the minimum threshold of historical resource playback bandwidth of the node, and the historical maximum traffic bandwidth borne by multiple nodes at the same time point.
[0070] The maximum and minimum thresholds for historical resource playback bandwidth refer to the maximum and minimum capacity a node can handle when using bandwidth during historical playback, respectively. The maximum historical bandwidth refers to the peak bandwidth used by multiple nodes at the same time point. For example, if nodes A, B, and C have bandwidths of 4M, 6M, and 6.5M at 7:55, then the maximum peak bandwidth used by nodes A, B, and C at the same time (7:55) is 6.5M.
[0071] The number of nodes, the maximum threshold of historical resource playback bandwidth, the minimum threshold of historical resource playback bandwidth, and the historical maximum traffic bandwidth that multiple nodes can withstand at the same time are used as resource configuration indicators, and resource configuration is then carried out based on these indicators.
[0072] In this embodiment, the current status of node resources and the predicted configuration of node resources are dynamically calculated by combining the historical bandwidth usage of node resources, providing theoretical guidance and standards for scheduling execution, resource construction and cost settlement.
[0073] Based on the content of the above embodiments, as an optional embodiment, determining the node configuration information of the target group according to resource configuration indicators includes:
[0074] Based on the historical maximum traffic bandwidth, minimum threshold, and maximum threshold, the first resource configuration indicator is determined, whereby the first resource configuration indicator is used to characterize the minimum value set for the reference node.
[0075] Based on the maximum threshold, the number of nodes, and the historical maximum traffic bandwidth, a second resource configuration indicator is determined, which is used to characterize the maximum value set for the reference node.
[0076] Based on the first and second indicators of resource allocation, determine the node configuration information for the target group.
[0077] Optionally, in this embodiment of the application, a first resource configuration indicator is determined based on the historical maximum traffic bandwidth, the minimum threshold, and the maximum threshold. This first resource configuration indicator is the guaranteed estimated node gap in the above embodiment, which is used to characterize the minimum value of node resource settings.
[0078] The formula for calculating the primary indicator for resource allocation is as follows:
[0079] a = (bc × rate) / n1;
[0080] Where 'a' is the primary resource allocation indicator, 'b' is the historical maximum bandwidth, 'c' is the minimum threshold, 'rate' = 'c / e', 'e' is the maximum threshold, and 'n1' is the current node's resource capacity. Furthermore, the value of 'rate' can range from 0.4 to 0.55; 'n1' is the current node's resource capacity, which can be determined based on the node's historical playback volume, and its value can range from 25 to 50.
[0081] In this embodiment, the second resource configuration indicator is determined based on the maximum threshold, the number of nodes, and the historical maximum traffic bandwidth. This second resource configuration indicator is the estimated maximum capacity gap in the above embodiment, which is used to characterize the maximum value of node resource settings.
[0082] The formula for calculating the second indicator of resource allocation is as follows:
[0083] d = (min(e, f×n2) - b) / n3;
[0084] Where d is the second indicator of resource allocation, e is the maximum threshold, b is the historical maximum traffic bandwidth, f is the number of nodes, and n2 = n3 are the preset carrying capacity of the current node resources. It can be understood that n2 and n3 can be a preset carrying capacity value set in advance, and the value range of n2 and n3 can be 40-60.
[0085] Then, based on the first resource allocation indicator and the second resource allocation indicator, the node resources are configured so that the configured node resources are greater than the first resource allocation indicator and less than the second resource allocation indicator.
[0086] In this application embodiment, formulas for calculating the first resource allocation index and the second resource allocation index are proposed. Based on the first resource allocation index and the second resource allocation index, a set of cost standards for measuring resource demand is defined, which provides a reference standard when configuring node resources and optimizes the calculation logic of resource allocation.
[0087] Based on the content of the above embodiments, as an optional embodiment, determining the node configuration information of the target group according to the first resource configuration indicator and the second resource configuration indicator includes:
[0088] The first and second resource allocation indicators are rounded up to obtain the rounded first and second resource allocation indicators.
[0089] Using the rounded first resource allocation indicator and the rounded second resource allocation indicator, the node configuration information of the target group is obtained, including the addition or deletion of nodes in the target group.
[0090] Optionally, since nodes are usually integers, in order to make the calculated first resource allocation index and second resource allocation index rounded up, the resource allocation first index and resource allocation second index are rounded up by the number of integers. Rounding up means keeping only the integer part and removing the decimal part. If there is a decimal part, the integer value is increased by 1. For example, the value 4.9 becomes 5 after rounding up.
[0091] Then, using the rounded first and second resource allocation indicators, nodes can be added or deleted. For example, if both the first and second resource allocation indicators are positive after rounding, the number of nodes can be increased to a value between the first and second resource allocation indicators. If both the first and second resource allocation indicators are negative after rounding, the number of nodes can be deleted to a value between the first and second resource allocation indicators.
[0092] In this embodiment of the application, nodes can be added or deleted flexibly based on the values of the first resource configuration indicator and the second resource configuration indicator. This allows for automated, real-time dynamic configuration, better guidance for CDN scheduling, and avoids cost waste.
[0093] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0094] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0095] According to another aspect of the embodiments of this application, an apparatus for resource allocation for implementing the above-described resource allocation method is also provided. Figure 3 This is a structural block diagram of an optional resource configuration apparatus according to an embodiment of this application, such as... Figure 3 As shown, the device may include:
[0096] The first acquisition unit 301 is used to acquire preset features of the target node, wherein the preset features are used to characterize the regional information of the node where the target node is located and the network vendor information to which the target node belongs.
[0097] The first determining unit 302 is used to determine the target group in multiple groups based on the preset characteristics of the target node, wherein all nodes in each group have the same preset characteristics;
[0098] The second acquisition unit 303 is used to acquire node configuration information of the target group, wherein there are groups with different node configuration information among the multiple groups;
[0099] Configuration unit 304 is used to configure the node resources of the target node according to the node configuration information.
[0100] It should be noted that the first acquisition unit 301 in this embodiment can be used to execute the above step S201, the first determination unit 302 in this embodiment can be used to execute the above step S202, the second acquisition unit 303 in this embodiment can be used to execute the above step S203, and the configuration unit 304 in this embodiment can be used to execute the above step S204.
[0101] Through the above modules, this application embodiment groups node resources in the target area based on the regional information and network vendor parameters of existing nodes in the target area. Then, based on the node association information within each group and the historical service bandwidth and node association information, a set of cost standards for measuring resource demand is defined to configure node resources. This calculates and predicts the node resource configuration, providing strategic guidance for node scheduling and financial cost accounting, and solving the problem of serious waste of planned node resources and large cost losses in related technologies.
[0102] As an optional embodiment, the device further includes:
[0103] The third acquisition unit is used to acquire resource configuration indicators of multiple reference nodes before acquiring node configuration information of the target group. The reference nodes are historical node data, and the group to which the reference nodes belong is the target group.
[0104] The second determining unit is used to determine the node configuration information of the target group based on resource allocation indicators.
[0105] As an optional embodiment, the third acquisition unit includes:
[0106] The acquisition module is used to acquire the number of reference nodes, the maximum threshold of historical resource playback bandwidth of the node, the minimum threshold of historical resource playback bandwidth of the node, and the historical maximum traffic bandwidth borne by multiple nodes at the same time point.
[0107] The configuration module is used to set the number of nodes, maximum threshold, minimum threshold, and historical maximum bandwidth as resource configuration indicators.
[0108] As an optional embodiment, the second determining unit includes:
[0109] The first determination module is used to determine the first resource configuration indicator based on the historical maximum traffic bandwidth, minimum threshold, and maximum threshold. The first resource configuration indicator is used to characterize the minimum value set by the reference node.
[0110] The second determination module is used to determine the second resource configuration index based on the maximum threshold, the number of nodes, and the historical maximum traffic bandwidth. The second resource configuration index is used to characterize the maximum value set by the reference node.
[0111] The third determination module is used to determine the node configuration information of the target group based on the first resource configuration indicator and the second resource configuration indicator.
[0112] As an optional embodiment, the calculation formula for the first determining module is as follows:
[0113] a = (bc × rate) / n1;
[0114] Where a is the primary indicator of resource allocation, b is the historical maximum bandwidth, c is the minimum threshold, rate = c / e, e is the maximum threshold, and n1 is the current reference node's resource capacity.
[0115] As an optional embodiment, the calculation formula for the second determining module is as follows:
[0116] d = (min(e, f×n2) - b) / n3;
[0117] Where d is the second resource allocation indicator, e is the maximum threshold, b is the historical maximum traffic bandwidth, f is the number of nodes, and n2 = n3 is the preset carrying capacity of the current reference node resources.
[0118] As an optional embodiment, the third determining module includes:
[0119] The first sub-unit is used to round up the first resource allocation indicator and the second resource allocation indicator to obtain the rounded first resource allocation indicator and the rounded second resource allocation indicator.
[0120] The second sub-unit is used to obtain the node configuration information of the target group by using the rounded first resource configuration index and the rounded second resource configuration index. The node configuration information includes the addition or deletion of nodes in the target group.
[0121] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should also be noted that the above modules, as part of a device, can operate in environments such as... Figure 1 The hardware environment shown can be implemented through software or hardware, and the hardware environment includes the network environment.
[0122] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described resource configuration method is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0123] Figure 4 This is a structural block diagram of an optional electronic device according to an embodiment of this application, such as... Figure 4As shown, it includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404. The processor 401, communication interface 402, and memory 403 communicate with each other via the communication bus 404.
[0124] Memory 403 is used to store computer programs;
[0125] When processor 401 executes a computer program stored in memory 403, it performs the following steps:
[0126] Obtain the preset features of the target node, wherein the preset features are used to characterize the regional information of the node where the target node is located and the network vendor information to which the target node belongs;
[0127] Based on the preset characteristics of the target node, the target group in which the target node is located is determined among multiple groups, wherein all nodes in each group have the same preset characteristics;
[0128] Obtain the node configuration information of the target group, where there are multiple groups with different node configuration information;
[0129] Configure the node resources of the target node based on the node configuration information.
[0130] Optionally, in this embodiment, the communication bus can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0131] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0132] The memory may include RAM, or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0133] As an example, such as Figure 4As shown, the memory 403 may include, but is not limited to, the first acquisition unit 301, the first determination unit 302, the second acquisition unit 303, and the configuration unit 304 in the resource configuration device described above. Furthermore, it may include, but is not limited to, other module units in the document image processing device described above, which will not be elaborated upon in this example.
[0134] The processors mentioned above can be general-purpose processors, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; they can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0135] In addition, the aforementioned electronic device also includes a display for showing the results of resource configuration.
[0136] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.
[0137] Those skilled in the art will understand that Figure 4 The structure shown is for illustrative purposes only. The device implementing the above resource configuration method can be a terminal device, such as a smartphone (e.g., Android phone, iOS phone), tablet computer, PDA, mobile Internet Device (MID), PAD, etc. Figure 4 This does not limit the structure of the aforementioned electronic devices. For example, the terminal device may also include components that are more advanced than those described above. Figure 4 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 4 The different configurations shown.
[0138] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, ROM, RAM, disk or optical disk, etc.
[0139] According to another aspect of the embodiments of this application, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to execute program code for a resource configuration method.
[0140] Optionally, in this embodiment, the storage medium may be located on at least one of the network devices in the network shown in the above embodiment.
[0141] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
[0142] Obtain the preset features of the target node, wherein the preset features are used to characterize the regional information of the node where the target node is located and the network vendor information to which the target node belongs;
[0143] Based on the preset characteristics of the target node, the target group in which the target node is located is determined among multiple groups, wherein all nodes in each group have the same preset characteristics;
[0144] Obtain the node configuration information of the target group, where there are multiple groups with different node configuration information;
[0145] Configure the node resources of the target node based on the node configuration information.
[0146] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated in this embodiment.
[0147] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.
[0148] According to another aspect of the embodiments of this application, a computer program product or computer program is also provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the resource configuration method steps in any of the above embodiments.
[0149] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0150] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the resource configuration methods of the various embodiments of this application.
[0151] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0152] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or the indirect coupling or communication connection of units or modules may be electrical or other forms.
[0153] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the solution provided in this embodiment, depending on actual needs.
[0154] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0155] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for resource allocation, characterized in that, The method includes: Obtain preset features of the target node, wherein the preset features are used to characterize the regional information of the node where the target node is located and the network vendor information to which the target node belongs; Based on the preset characteristics of the target node, a target group in which the target node is located is determined among multiple groups, wherein all nodes in each group have the same preset characteristics; Obtain the node configuration information of the target group, wherein there are groups with different node configuration information among the multiple groups; Configure the node resources of the target node according to the node configuration information; Before obtaining the node configuration information of the target group, the method includes: obtaining resource configuration indicators of multiple reference nodes, wherein the reference nodes are historical node data and the group to which the reference nodes belong is the target group; and determining the node configuration information of the target group based on the resource configuration indicators. The acquisition of resource configuration indicators for multiple reference nodes includes: acquiring the number of reference nodes, the maximum threshold of historical resource playback bandwidth of the nodes, the minimum threshold of historical resource playback bandwidth of the nodes, and the historical maximum traffic bandwidth borne by multiple nodes at the same time point; and using the number of nodes, the maximum threshold, the minimum threshold, and the historical maximum traffic bandwidth as the resource configuration indicators. The step of determining the node configuration information of the target group based on the resource configuration indicators includes: determining a first resource configuration indicator based on the historical maximum traffic bandwidth, the minimum threshold, and the maximum threshold, wherein the first resource configuration indicator is used to characterize the minimum value set by the reference node; determining a second resource configuration indicator based on the maximum threshold, the number of nodes, and the historical maximum traffic bandwidth, wherein the second resource configuration indicator is used to characterize the maximum value set by the reference node; and determining the node configuration information of the target group based on the first resource configuration indicator and the second resource configuration indicator. The calculation formula for determining the first resource allocation indicator based on the historical maximum traffic bandwidth, the minimum threshold, and the maximum threshold is as follows: a = (bc × rate) / n1; Where a is the primary indicator of resource allocation, b is the historical maximum bandwidth, c is the minimum threshold, rate = c / e, e is the maximum threshold, and n1 is the carrying capacity of the current reference node's resources. The calculation formula for determining the second resource allocation indicator based on the maximum threshold, the number of nodes, and the historical maximum traffic bandwidth is as follows: d=(min(e,f×n2)-b) / n3; Where d is the second resource allocation indicator, e is the maximum threshold, b is the historical maximum traffic bandwidth, f is the number of nodes, and n2=n3 is the preset carrying capacity of the current reference node resources.
2. The method according to claim 1, characterized in that, The step of determining the node configuration information of the target group based on the first resource configuration indicator and the second resource configuration indicator includes: The resource allocation first indicator and the resource allocation second indicator are rounded up to obtain the rounded resource allocation first indicator and the rounded resource allocation second indicator. Using the rounded resource configuration first indicator and the rounded resource configuration second indicator, the node configuration information of the target group is obtained, wherein the node configuration information includes the addition or deletion of the target node.
3. A resource allocation apparatus, characterized in that, The device includes: The first acquisition unit is used to acquire preset features of the target node, wherein the preset features are used to characterize the regional information of the node where the target node is located and the network vendor information to which the target node belongs; The first determining unit is configured to determine the target group in a plurality of groups based on the preset characteristics of the target node, wherein all nodes in each group have the same preset characteristics; The second acquisition unit is used to acquire the node configuration information of the target group, wherein there are groups with different node configuration information among the plurality of groups; A configuration unit is used to configure the node resources of the target node according to the node configuration information; Before obtaining the node configuration information of the target group, resource configuration indicators of multiple reference nodes are obtained, wherein the reference nodes are historical node data and the group to which the reference nodes belong is the target group; the node configuration information of the target group is determined based on the resource configuration indicators. The acquisition of resource configuration indicators for multiple reference nodes includes: acquiring the number of reference nodes, the maximum threshold of historical resource playback bandwidth of the nodes, the minimum threshold of historical resource playback bandwidth of the nodes, and the historical maximum traffic bandwidth borne by multiple nodes at the same time point; and using the number of nodes, the maximum threshold, the minimum threshold, and the historical maximum traffic bandwidth as the resource configuration indicators. The step of determining the node configuration information of the target group based on the resource configuration indicators includes: determining a first resource configuration indicator based on the historical maximum traffic bandwidth, the minimum threshold, and the maximum threshold, wherein the first resource configuration indicator is used to characterize the minimum value set by the reference node; determining a second resource configuration indicator based on the maximum threshold, the number of nodes, and the historical maximum traffic bandwidth, wherein the second resource configuration indicator is used to characterize the maximum value set by the reference node; and determining the node configuration information of the target group based on the first resource configuration indicator and the second resource configuration indicator. The calculation formula for determining the first resource allocation indicator based on the historical maximum traffic bandwidth, the minimum threshold, and the maximum threshold is as follows: a = (bc × rate) / n1; Where a is the primary indicator of resource allocation, b is the historical maximum bandwidth, c is the minimum threshold, rate = c / e, e is the maximum threshold, and n1 is the carrying capacity of the current reference node's resources. The calculation formula for determining the second resource allocation indicator based on the maximum threshold, the number of nodes, and the historical maximum traffic bandwidth is as follows: d=(min(e,f×n2)-b) / n3; Where d is the second resource allocation indicator, e is the maximum threshold, b is the historical maximum traffic bandwidth, f is the number of nodes, and n2=n3 is the preset carrying capacity of the current reference node resources.
4. An electronic device, comprising a processor, a communication interface, a memory, and a communication bus, wherein, The processor, the communication interface, and the memory communicate with each other via the communication bus, characterized in that... The memory is used to store computer programs; The processor is configured to perform the steps of the method of claim 1 or 2 by running the computer program stored in the memory.
5. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the steps of the method described in claim 1 or 2 when it is run.
Citation Information
Patent Citations
Resource allocation method and device, and electronic equipment
CN111796940A
Method and device for configuring cluster node resources, server and storage medium
CN113127186A