Resource management method and device, equipment, medium and program product

By analyzing the historical resource consumption data of the service nodes, predicting their sustainable service duration, and allocating resources based on this, the performance problems caused by frequent interactions in dynamic resource allocation in all-flash systems are solved, and more efficient resource allocation and system stability are achieved.

CN119718684AActive Publication Date: 2025-03-28INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202510224360.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-03-28
Estimated Expiration
2045-02-27

AI Technical Summary

Technical Problem

In an all-flash system, due to the large number of nodes in the service cluster, frequent interactions between nodes and load balancers are required to achieve dynamic allocation of resources, resulting in a significant increase in communication resource consumption, affecting the overall performance of the system.

Method used

By obtaining historical resource consumption data of multiple service nodes of composite nodes in the server cluster, analyzing consumption changes, determining the service duration that the service node can continuously provide services while maintaining a matching consumption rate with the current available resources, and allocating resources according to the service duration.

Benefits of technology

It reduces service interruption caused by space depletion, reduces real-time dependence on the control side, significantly reduces the interaction frequency between the control side and the service side, and improves resource allocation efficiency and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718684A_ABST
    Figure CN119718684A_ABST
Patent Text Reader

Abstract

The invention provides a resource management method which can be applied to the field of cloud computing. The resource management method comprises the following steps: obtaining respective historical resource consumption data of a plurality of service nodes including composite nodes in a server cluster, the composite nodes being service nodes integrated with a resource management function; for each service node, on the basis of a consumption change rule obtained by analyzing historical resource consumption data of the service node, determining the service duration that the service node can continuously provide the service under the condition that the service node maintains the consumption speed matched with the consumption change rule at the current available resource quantity; and performing resource allocation on a first target node determined from the plurality of service nodes by using a resource management function according to the respective service durations of the plurality of service nodes. The invention further provides a resource management device, equipment, a storage medium and a program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing, and in particular to a resource management method, device, equipment, medium and program product. Background Art

[0002] In an all-flash system, resources are usually allocated to each node in the service cluster in a pre-allocated manner. To ensure that each node maintains a balanced load when processing services, the system usually uses a load balancer to dynamically adjust resource allocation. The load balancer monitors the load status of each node in real time. If a node is overloaded, it will allocate tasks to nodes with lower loads to achieve reasonable utilization of system resources.

[0003] In the process of implementing the concept of the present invention, the inventors found that there are at least the following problems in the related art: due to the large number of nodes in the service cluster, frequent interactions are required between the nodes and the load balancer to achieve dynamic allocation of resources. Such frequent interactions will significantly increase the consumption of communication resources, thereby affecting the overall performance of the system. Summary of the invention

[0004] In view of the above problems, the present invention provides a resource management method, apparatus, device, medium and program product.

[0005] According to a first aspect of the present invention, a resource management method is provided, comprising: obtaining historical resource consumption data of each of a plurality of service nodes including a composite node in a server cluster, wherein the composite node is a service node integrated with a resource management function; for each of the above-mentioned service nodes, based on a consumption variation law obtained by analyzing the historical resource consumption data of the above-mentioned service node, determining a service duration for which the above-mentioned service node can continuously provide services while maintaining a consumption speed matching the above-mentioned consumption variation law with a current amount of available resources; and allocating resources to a first target node determined from the plurality of the above-mentioned service nodes using the above-mentioned resource management function according to the service duration of each of the plurality of the above-mentioned service nodes.

[0006] The second aspect of the present invention provides a resource management device, including: a data acquisition module, used to obtain historical resource consumption data of each of a plurality of service nodes including a composite node in a server cluster, wherein the composite node is a service node integrated with a resource management function; a duration determination module, used to determine, for each of the above-mentioned service nodes, based on a consumption variation law obtained by analyzing the historical resource consumption data of the above-mentioned service nodes, the service duration for which the above-mentioned service node can continuously provide services while maintaining a consumption speed matching the above-mentioned consumption variation law with the current available resource amount; a resource allocation module, used to allocate resources to a first target node determined from the plurality of the above-mentioned service nodes according to the service duration of each of the plurality of the above-mentioned service nodes and using the above-mentioned resource management function.

[0007] A third aspect of the present invention provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0008] The fourth aspect of the present invention further provides a computer-readable storage medium on which a computer program or instruction is stored, and the steps of the above method are implemented when the above computer program or instruction is executed by a processor.

[0009] The fifth aspect of the present invention also provides a computer program product, including a computer program or instructions, which implement the steps of the above method when executed by a processor.

[0010] According to an embodiment of the present invention, resources are allocated through the resource management function of the composite node, thereby realizing the separation of the control side and the business side. During the allocation process, the sustainable service duration of the service node is predicted based on the consumption change law of the service node. Since the consumption change law is determined based on the historical resource consumption data dynamically generated by the service node during business operation, the business side and the control side can understand the resource status without frequent interaction. By allocating resources through the determined service duration, this method not only reduces service interruptions caused by space exhaustion, but also reduces the real-time dependence on the control side because resource allocation relies on local historical resource consumption data, significantly reducing the interaction frequency between the control side and the business side, thereby improving resource allocation efficiency and system stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above content and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings.

[0012] Figure 1 An application scenario diagram of a resource management method, apparatus, device, medium, and program product according to an embodiment of the present invention is shown.

[0013] Figure 2 A flow chart of a resource management method according to an embodiment of the present invention is shown.

[0014] Figure 3 A workflow diagram of a service node in a resource management method according to an embodiment of the present invention is shown.

[0015] Figure 4 A schematic diagram showing the working principle of the resource management method according to an embodiment of the present invention is shown.

[0016] Figure 5 A schematic diagram showing a trend of consumption change rules in a resource management method according to an embodiment of the present invention is shown.

[0017] Figure 6 A schematic diagram of a data synchronization process in a resource management method according to an embodiment of the present invention is shown.

[0018] Figure 7 A structural block diagram of a resource management device according to an embodiment of the present invention is shown.

[0019] Figure 8 A block diagram of an electronic device suitable for implementing a resource management method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0020] Below, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of concepts of the present invention.

[0021] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0022] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0023] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0024] In the technical solution of the present invention, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0025] An embodiment of the present invention provides a resource management method, which includes: obtaining historical resource consumption data of each of a plurality of service nodes including a composite node in a server cluster, wherein the composite node is a service node integrated with a resource management function; for each service node, based on a consumption variation pattern obtained by analyzing the historical resource consumption data of the service node, determining a service duration for which the service node can continuously provide services while maintaining a consumption speed that matches the consumption variation pattern with a current amount of available resources; and allocating resources to a first target node determined from the plurality of service nodes using the resource management function according to the respective service durations of the plurality of service nodes.

[0026] Figure 1 An application scenario diagram of a resource management method, apparatus, device, medium, and program product according to an embodiment of the present invention is shown.

[0027] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104 and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0028] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0029] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0030] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0031] It should be noted that the resource management method provided in the embodiment of the present invention can generally be executed by the server 105. Accordingly, the resource management device provided in the embodiment of the present invention can generally be set in the server 105. The resource management method provided in the embodiment of the present invention can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the resource management device provided in the embodiment of the present invention can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.

[0032] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0033] The following will be based on Figure 1 The scene described by Figure 2~Figure 6 The resource management method of the embodiment is described in detail.

[0034] Figure 2 A flow chart of a resource management method according to an embodiment of the present invention is shown.

[0035] like Figure 2As shown, this embodiment includes operations S210 to S230.

[0036] In operation S210, historical resource consumption data of each of a plurality of service nodes including a composite node in a server cluster is obtained, wherein the composite node is a service node integrated with a resource management function.

[0037] In operation S220, for each service node, based on the consumption variation pattern obtained by analyzing the historical resource consumption data of the service node, determine the service duration for which the service node can continue to provide services while maintaining a consumption speed that matches the consumption variation pattern with the current available resource amount.

[0038] In operation S230, resources are allocated to a first target node determined from the plurality of service nodes by using a resource management function according to the service durations of the plurality of service nodes.

[0039] According to an embodiment of the present invention, in an all-flash memory system, a distributed architecture is the core design that supports its high performance and scalability. The architecture achieves load balancing and high availability by distributing and storing data on multiple service nodes. These service nodes are usually organized in the form of a server cluster, and each service node in the cluster independently processes data requests and performs computing tasks.

[0040] According to an embodiment of the present invention, each service node mainly includes two modules, namely, a space allocation unit and a space recovery unit (whose working logic is as follows: Figure 3 As shown). Among them, the space allocation unit is responsible for managing and allocating the space in the service node to ensure that when performing the flush operation, resources can be allocated in time to meet the data writing needs. During the operation of the service node, the space of the service node is usually managed according to the granularity of the data block (the size of the data block is defined according to the actual system implementation). Therefore, the space allocation unit can manage and allocate data blocks, and also track and record the usage of data blocks to ensure that data blocks are not reused.

[0041] According to an embodiment of the present invention, the space recovery unit is responsible for completing the recovery of used data blocks, which is generally achieved through a garbage collection mechanism in an all-flash system, mainly to recover allocated data blocks with little valid data for continued use by the space allocation unit.

[0042] Specifically, Figure 3 As shown, the workflow of the service node in this embodiment includes operations S310 to S370.

[0043] In operation S310, load data is received. In operation S320, the load data is aggregated and flushed. In operation S330, the processed data is written into a data block. In operation S340, it is confirmed that the data has completed the disk writing operation. In operation S350, the used data block is recycled. In operation S360, the recycled data block is released. In operation S370, the released data block is reallocated for subsequent use.

[0044] According to an embodiment of the present invention, by systematically receiving, processing, writing, confirming, recycling, releasing and reallocating data blocks of load data, automation of data processing and resource management is achieved, while the recycling of resources is promoted, effectively improving operational efficiency and utilization of storage resources.

[0045] According to an embodiment of the present invention, the multiple service nodes of the server cluster also include a composite node for resource management, and the composite node and other service nodes can both perform business processing. The composite node is selected from the multiple service nodes according to preset rules. The composite node can monitor the load changes and resource consumption of each service node in the server cluster, and dynamically allocate resources to multiple service nodes including itself based on this information to meet the needs of system operation.

[0046] According to an embodiment of the present invention, Figure 4 As shown, in the actual system design, the server where the composite node is located includes four main modules, namely, capacity monitoring unit 410, trend prediction unit 420, space scheduling unit 430, and space management unit 440. Among them, the capacity monitoring unit 410 is mainly responsible for monitoring the capacity of each service node in the server cluster and providing reference data for subsequent resource allocation. The trend prediction unit 420 is mainly responsible for analyzing whether the capacity of each service node meets the business operation requirements, whether resource allocation is required, etc., and is the core module of the entire load balancing scheduling. The space scheduling unit 430 is used to perform resource allocation tasks to each service node and belongs to the task execution unit. When data block migration is required, it is connected with the corresponding service node to complete the transfer of resources. The space management unit 440 is mainly responsible for storing records, which are used to track the ownership of record resources. The composite node implements the resource management function based on the above four modules, thereby allocating resources to each service node.

[0047] According to an embodiment of the present invention, Figure 4As shown, the composite node obtains the historical resource consumption data of each service node in the server cluster. In the process of acquisition, the data is usually collected by periodic sampling. Specifically, the historical resource consumption data must retain records of at least three time points. The historical resource consumption data obtained includes records of multiple monitoring indicator items in the service node. Among them, the multiple monitoring indicator items include the total capacity of the service node, the current available resources, and the resource release rate. It should be noted that these items are basic indicators that need to be monitored. If you want to adjust more finely, you can also monitor more indicators, such as the processor utilization rate.

[0048] According to an embodiment of the present invention, the historical resource consumption data of the service node is generated based on the actual operation of resource allocation and release within the service node. Figure 4 As shown, the space allocation unit 450 and the space recovery unit 460 in the service node work together through an internal loop mechanism. When the service node completes the task and releases the storage space, the space recovery unit 460 reclaims the space and puts it back into the available space pool. Subsequently, the space allocation unit 450 can extract space from the pool and allocate it to a new service node. This cyclic process ensures that storage resources are used efficiently and achieves continuous optimized management.

[0049] According to an embodiment of the present invention, the historical resource consumption data of each service node is analyzed to determine the consumption variation pattern of its resources. These consumption variation patterns are used to describe the resource consumption characteristics exhibited by the service node during the resource allocation and release process of the internal loop. Figure 5 As shown, the consumption variation pattern can be divided into seven main trends, namely, trend one 501 representing the stabilization of resource consumption, trend two 502 representing the steady increase of resource consumption, trend three 503 representing the slowdown in the increase of resource consumption, trend four 504 representing the accelerated increase in resource consumption, trend five 505 representing the steady decrease of resource consumption, trend six 506 representing the accelerated decrease in resource consumption, and trend seven 507 representing the slowdown in the decrease of resource consumption.

[0050] According to an embodiment of the present invention, after determining the current available resource amount of the service node, based on the consumption change law, determine the service time for which the service node can continue to provide services while maintaining a consumption speed that matches the consumption change law with the current available resource amount. According to the service time of each service node, the urgency of each service node's space demand is evaluated. In this case, the service node with the shortest service time, i.e., the first target node, should obtain priority resource allocation rights.

[0051] According to an embodiment of the present invention, resources are allocated through the resource management function of the composite node, thereby realizing the separation of the control side and the business side. During the allocation process, the sustainable service duration of the service node is predicted based on the consumption change law of the service node. Since the consumption change law is determined based on the historical resource consumption data dynamically generated by the service node during business operation, the business side and the control side can understand the resource status without frequent interaction. By allocating resources through the determined service duration, this method not only reduces service interruptions caused by space exhaustion, but also reduces the real-time dependence on the control side because resource allocation relies on local historical resource consumption data, significantly reducing the interaction frequency between the control side and the business side, thereby improving resource allocation efficiency and system stability.

[0052] According to an embodiment of the present invention, based on the consumption variation law obtained by analyzing the historical resource consumption data of the service node, the service duration for which the service node can continuously provide services when the service node maintains a consumption speed that matches the consumption variation law with the current available resource amount is determined, including: based on the acquisition cycle of the historical resource consumption data, the consumption variation law is quantified using the discrete difference method to obtain consumption characteristic parameters; a difference analysis is performed on the current available resource amount and the historical resource remaining amount in the historical resource consumption data, and consumption characteristic parameters are introduced to calibrate the analysis results to obtain the resource consumption speed of the service node; and the service duration for which the service node can continuously provide services while maintaining the consumption speed under the current available resource amount is determined.

[0053] According to an embodiment of the present invention, the acquisition period of historical resource consumption data is determined. Assuming that the acquisition period is , the consumption variation law is quantified by discrete difference method to obtain consumption characteristic parameters. Specifically, it is assumed that the current available resources corresponding to the three sampling times of the service node are A1, A2, and A3 respectively. According to the data acquisition cycle , use formula (1) to quantify the consumption change law.

[0054]

[0055] Wherein, P represents the consumption characteristic parameter obtained after quantization.

[0056] According to an embodiment of the present invention, a difference analysis is performed on the current available resource amount and the historical resource remaining amount in the historical resource consumption data. The historical resource remaining amount used in the difference analysis process is the available resource amount corresponding to the sampling point closest to the current moment. For example, if the current available resource amount is A3, the historical resource remaining amount is A2. By selecting adjacent and continuous data, the prediction result is more accurate.

[0057] According to an embodiment of the present invention, after obtaining the analysis results, consumption characteristic parameters are introduced to calibrate the analysis results so that the analysis results are more consistent with the consumption change law. Based on the consumption speed of resources obtained after calibration, the service time that the service node can continue to provide services under the current available resource amount is calculated. By calculating the service time, the urgency of each service node's demand for resources can be known, and resources can be allocated preferentially to those with the shortest service time, so that the allocation of resources is more reasonable and the service interruption of service nodes due to resource exhaustion is reduced.

[0058] According to an embodiment of the present invention, a difference analysis is performed on the current available resource amount and the historical resource remaining amount in the historical resource consumption data, and a consumption characteristic parameter is introduced to calibrate the analysis result to obtain the resource consumption speed of the service node, including: based on the difference between the current available resource amount and the historical resource remaining amount, the rate of change of the resource amount within the acquisition cycle is calculated; the consumption characteristic parameter is added to the change rate to calibrate the change rate to obtain the consumption speed.

[0059] According to an embodiment of the present invention, in the process of calculating the resource consumption rate, the change rate of the resource amount within the acquisition cycle is first determined, and then the change rate is calibrated using the consumption characteristic parameter to obtain the consumption rate. Based on the consumption rate, the service duration that the service node can continuously provide services under the current available resource amount is calculated. The specific calculation method is shown in formula (2) and formula (3).

[0060]

[0061] Where W represents the consumption rate, and T represents the service time that the service node can continue to provide services when the current available resource amount A3 maintains the consumption rate W. If W is less than or equal to zero, it means that the current resource consumption is showing a negative growth trend, and the service time theoretically approaches infinity. However, in actual use, this situation usually means that there is redundancy in resource allocation or the business load is low, which may lead to insufficient resource utilization.

[0062] According to an embodiment of the present invention, the sustainable service duration of a service node is predicted based on the consumption variation rule of the service node, and this is used as the basis for resource allocation, thereby effectively reducing service interruptions caused by space exhaustion.

[0063] According to an embodiment of the present invention, resources are allocated to a first target node determined from a plurality of service nodes based on the service durations of each of the plurality of service nodes using a resource management function, including: determining the first target node from the plurality of service nodes based on the service durations of each of the plurality of service nodes, wherein the service duration of the first target node is the shortest; and allocating resources to the first target node based on free data blocks in reserved space in a server cluster and free data blocks of other service nodes in the server cluster except the first target node using the resource management function.

[0064] According to the embodiment of the present invention, since the demand for resources of each service node is detected in each sampling period, if a service node has a short service time, it means that its demand for resources is large and resource allocation is required. In the process of selecting service nodes, since the service nodes will also allocate resources internally during the service operation process. Therefore, in the process of allocating resources using the resource management function, it is not necessary to allocate resources for multiple service nodes at a time, and only the first target node with the shortest service time is determined from multiple service nodes for resource allocation.

[0065] According to an embodiment of the present invention, in the process of resource allocation, allocation can be performed based on the free data blocks in the reserved space in the service cluster and the free data blocks in other service nodes in the server cluster except the first target node. Specifically, the allocation source of the free data blocks can be selected according to the resource margin of the reserved space in the service cluster. However, in the resource allocation process, two sources can also be used at the same time, for example: resources are allocated preferentially from the reserved space in the server cluster, and if the reserved space is insufficient, additional allocation is made from other service nodes. By performing resource allocation in stages, resource utilization can be made more efficient.

[0066] According to an embodiment of the present invention, based on the free data blocks in the reserved space in the server cluster and the free data blocks of other service nodes in the server cluster except the first target node, resources are allocated to the first target node using a resource management function, including: when it is determined that the resource margin of the reserved space in the server cluster is greater than a preset threshold, the resource management function is used to migrate the free data blocks of a first preset data amount in the reserved space to the first target node; when it is determined that the resource margin of the reserved space in the server cluster is less than or equal to the preset threshold, based on the free data blocks of other service nodes in multiple service nodes except the first target node, resources are allocated to the first target node using the resource management function.

[0067] According to an embodiment of the present invention, as the composite node migrates the free data blocks from the reserved space in the server cluster to the first target node, the reserved space in the server cluster may be gradually consumed. Once the resource margin of the reserved space in the server cluster is lower than a certain preset threshold (such as 10%), it is determined that the reserved space of the current server cluster is difficult to continue to provide resource allocation. Therefore, the source of calling the free data blocks in resource allocation is replaced, and resources are allocated to the first target node based on the free data blocks of other service nodes in the multiple service nodes except the first target node.

[0068] According to an embodiment of the present invention, when the resource management function is used to migrate the free data blocks to the first target node, since the service node will provide it with free data blocks from the internal space of the service node according to the law of its consumption change when the resource demand trend is generated. Therefore, in the process of resource allocation, there is no need to allocate too much space to the first target node at a time to reduce the situation where resources cannot be allocated to other service nodes in a timely manner later. Specifically, the first preset data volume involved in the resource allocation process can be set according to the business processing capacity of the service node, for example, set to 5 data blocks or more. By selecting different allocation strategies at different stages, it is possible to effectively cope with fluctuations in resource demand and reduce service interruptions or performance degradation caused by insufficient resources.

[0069] According to an embodiment of the present invention, based on the free data blocks of other service nodes except the first target node among multiple service nodes, resources are allocated to the first target node using a resource management function, including: calculating the resource release rate of each service node based on the historical resource consumption data of the multiple service nodes; and determining a second target node from other service nodes except the first target node among the multiple service nodes; and using the resource management function to call the free data blocks of the second preset data volume in the second target node to the first target node.

[0070] According to an embodiment of the present invention, the core of the composite node determining whether resource allocation is currently required is whether the current available resource amount in each service node can support the business consumption of the service node. If it is determined that the current available resource amount of a service node is insufficient or there is a risk of exhaustion, it is considered that the service node is short of space and more resources need to be allocated to it. On the contrary, if it is determined that the free space of a service node increases, it is considered that the space of the service node is abundant. At this time, if other service nodes are at risk of insufficient space, some space will be appropriately recovered from the service nodes with relatively abundant space, and finally transferred to the service nodes with insufficient space.

[0071] According to an embodiment of the present invention, based on the above rules, when analyzing the spatial free degree of each service node, the resource release rate of each service node will be checked first. Generally, the higher the resource release rate, the greater the load pressure of the service node. The resource release rate of each service node is analyzed. Although it is determined that the resources of each service node are in a consumption state, it may appear that some service nodes consume faster, while other service nodes consume slower, resulting in a load imbalance. Therefore, once it is found that the resource release rate of an individual service node is higher than that of other service nodes, and the number of free data blocks in the service node is significantly less than that of other service nodes, the free data blocks can be transferred from the service node to other service nodes.

[0072] According to an embodiment of the present invention, if it is determined that the resource margin of the reserved space at this time is lower than a preset threshold, it can be known that there are not enough resources available for allocation in the current reserved space. From the other service nodes other than the first target node among the multiple service nodes, a second target node with a lower resource release rate is determined to transfer the free data blocks of the second target node to the first target node. Using the resource management function, the free data blocks of the second preset data volume in the second target node are called to the first target node. As above, the second preset data volume involved in the resource allocation process can be set according to the business processing capacity of the service node. By selecting the second target node based on the resource release rate, the selection result is more in line with the business operation requirements.

[0073] According to an embodiment of the present invention, a second target node is determined from service nodes other than a first target node among a plurality of service nodes, including: matching the resource release rate of each service node with a preset division range, respectively, to determine the resource margin level of each service node according to a preset mapping relationship between the preset division range and the resource margin level; extracting a plurality of target service nodes whose resource margin levels are preset levels from the plurality of service nodes; and determining a second target node from the plurality of target service nodes according to the service duration of each target service node, wherein the second target node is a node having the longest service duration among the plurality of target service nodes, and the resource margin level of the second target node is lower than that of the first target node.

[0074] According to an embodiment of the present invention, when analyzing the resource release rate, the range to which the current resource release rate belongs is usually determined according to the threshold value in the preset division range. The resource margin level of each service node is determined according to the preset mapping relationship between the preset division range and the resource margin level. The resource margin level includes three levels, namely the first level, the second level and the third level. The first level represents tight space, the second level represents moderate space, and the third level represents abundant space.

[0075] According to an embodiment of the present invention, for a target service node with a resource margin level of the third level, a second target node with the longest service time is determined from multiple target service nodes according to the service time of each target service node. In addition, the resource margin level of the second target node is lower than that of the first target node, and the level of the first target node is usually the first level. By determining the resource margin level of the service node according to the resource release rate, the second target node is obtained by screening according to the service time, so that the screening result is more accurate, and nodes with abundant space can be preferentially selected for resource allocation.

[0076] According to an embodiment of the present invention, the resource management method also includes: monitoring the growth rate of the available resource margin in each service node to determine a third target node with the highest growth rate from multiple service nodes; utilizing the resource management function to release a preset number of occupied data blocks from the third target node to the reserved space; and updating the resource margin in the reserved space, wherein the occupied data blocks include a preset proportion of invalid data.

[0077] According to an embodiment of the present invention, if the reserved space of the server cluster is lower than a preset threshold, the composite node will try to recycle some resources from a certain service node and redo it as the reserved space of the server cluster. The resource allocation process of the resource recovery method is opposite. The composite node will detect the growth rate of the available resource margin in each service node. For the service node with a higher growth rate (if there is a service node with an increased available resource margin), the spatial scheduling unit of the composite node is notified to return a predetermined number of occupied data blocks in the service node to the reserved space.

[0078] According to an embodiment of the present invention, the occupied data blocks include a preset proportion of invalid data, and by recycling the occupied data blocks, the utilization rate of resources can be effectively improved. After releasing the resources, the resource margin in the reserved space is updated to facilitate the subsequent allocation of resources.

[0079] According to the embodiment of the present invention, during the actual system operation, it is possible that all service nodes are in a state of consumption, and there will be no service node with increased available resource margin. In this case, it will be considered that there are no resources to return, and no forced resource release will be performed to reduce the situation where the composite node and the service node repeatedly release and allocate resources.

[0080] According to an embodiment of the present invention, the resource management method also includes: when it is determined that a preset number of occupied data blocks includes a forced data block, releasing other occupied data blocks in the third target node except the forced data block, wherein the forced data block is a data block in the third target node that is forcibly occupied and cannot be released.

[0081] According to an embodiment of the present invention, the composite node will also ensure that a minimum amount of space is reserved in each service node based on the total capacity information of each service node provided by the capacity monitoring unit. These spaces will be forcibly occupied by each service node and cannot be transferred to other service nodes, thereby ensuring that each service node will pre-allocate a minimum database to meet the needs of data flushing.

[0082] According to an embodiment of the present invention, if during the process of releasing resources, the preset number of occupied data blocks that need to be released include the occupied data blocks, the data blocks other than the occupied data blocks are released. Under the premise of releasing resources, the occupied data blocks are left for each service node, which guarantees the normal operation of the service node to a certain extent.

[0083] According to an embodiment of the present invention, the resource management method also includes: in response to a received system operation instruction, the storage space in the system's occupied space except for the reserved space in the server cluster is evenly distributed to multiple service nodes in the server cluster, and the storage space is used to store data generated by running services on the service nodes.

[0084] According to the embodiment of the present invention, in the initial stage of system operation, due to less written data, the system space will be relatively abundant, and it is impossible to determine the business balance of each service node in the subsequent system operation, so each service node will be defaulted to a load balancing state. At this time, the composite node will divide 20% to 30% of the space as the reserved space of the server cluster, and the remaining storage space will be pre-allocated to all service nodes in the server cluster in an equal manner.

[0085] According to the embodiment of the present invention, the storage space allocated to the service nodes is managed by each service node. Only when some service nodes are at risk of insufficient space in the future, will the resource call and migration tasks be performed. By pre-allocating storage space for service nodes, the need for dynamic allocation of storage resources at the service nodes during operation is reduced, thereby reducing the delay caused by the allocation and recovery of storage resources and improving the overall performance of the system.

[0086] According to an embodiment of the present invention, the resource management method further includes: determining the capacity of the occupied data block allocated to each service node from the storage space based on the number of multiple service nodes in the server cluster and the resource capacity in the occupied space of the system.

[0087] According to an embodiment of the present invention, the capacity of the occupied data block in the service node needs to be determined according to the specific design of the system. The general principle is that the capacity corresponding to the occupied data block should not exceed 1 / N of the resource capacity of the system's occupied space (i.e., the space occupied inside the system, not reflected externally), where N is the number of service nodes in the server cluster.

[0088] According to an embodiment of the present invention, based on the number of multiple service nodes in the server cluster and the resource capacity in the occupied space of the system, the capacity of the occupied data blocks to be allocated in the storage space is calculated. Based on the capacity of the occupied data blocks, the occupied data blocks in the storage space are evenly distributed to each service node. By calculating and distributing the capacity of the occupied data blocks, the normal operation of the service nodes is guaranteed to a certain extent.

[0089] According to an embodiment of the present invention, the resource management method also includes: in the case of allocating resources to the first target node, sending allocation information corresponding to the free data block to the first target node to notify the first target node to receive the resources; in the case of reclaiming resources from the third target node, sending release information corresponding to the occupied data block to the third target node to notify the third target node to release the resources.

[0090] According to an embodiment of the present invention, when resources need to be allocated to the first target node, the corresponding capacity is selected from the reserved space of the server cluster or the second target node according to the capacity of the resources that need to be allocated at a time. Based on the capacity, allocation information is sent to the first target node to notify the first target node to receive the resources, and at the same time, the space management unit in the composite node is notified to complete the information update.

[0091] According to an embodiment of the present invention, when it is necessary to recycle resources from the third target node, the space scheduling unit in the composite node will notify the third target node to return the number of databases. Based on the number, a release message is sent to the third target node to notify the third target node to release resources, and then wait for the space recovery unit in the third target node to complete the space preparation of the corresponding capacity. The resources released by the third target node are returned to the reserved space of the server cluster, and the resource margin in the reserved space is updated. Resource allocation and recovery are performed by information interaction, so that the service node can manage resources in a timely manner.

[0092] According to an embodiment of the present invention, the resource management method further includes: when it is determined that resource allocation is completed, acquiring resource distribution data in each service node; and synchronizing the resource distribution data to each service node.

[0093] According to an embodiment of the present invention, when it is determined that resource allocation is completed, the resource distribution data is recorded and updated. The recording of resource distribution data can usually be completed in the form of an array or a table. Figure 6 As shown, when the resource distribution data of the composite node 610 changes, the space management unit 611 of the composite node 610 needs to synchronize the resource distribution data to the space management units of other service nodes 620 respectively.

[0094] According to the embodiment of the present invention, since the composite node only selects one service node in the server cluster to serve, the other service nodes only play a backup role, and the update is completed only after all information is synchronized. By synchronizing the resource distribution data to each service node, it is convenient for other service nodes to take over the resource management work of the composite node.

[0095] According to an embodiment of the present invention, the resource management method also includes: when a failure of a composite node is detected, a new composite node is determined from other service nodes other than the composite node according to preset rules associated with respective node identifiers of multiple service nodes in the server cluster, and the new composite node can perform resource management functions based on synchronized resource distribution data.

[0096] According to an embodiment of the present invention, if a composite node fails during system operation, a new composite node will be selected from the remaining service nodes, and the new composite node will continue to perform resource management functions based on its own backed-up resource distribution data. Specifically, the new composite node is selected based on a preset rule associated with the node identifiers of the service nodes. The node identifier can be the ID of each server, and the preset rule can select the service node with the largest or smallest ID as the new composite node.

[0097] According to an embodiment of the present invention, if the failed composite node is restored, the current new composite node also needs to synchronize resource distribution data with it first. Only when the resource distribution data is fully synchronized, the service node that has been restored after the failure can join the system and provide services to the outside world. When a composite node fails, the failure can be dealt with in a timely manner by switching the node.

[0098] According to an embodiment of the present invention, the resource management method also includes: determining a fourth target node from multiple service nodes based on a consumption change law of the service node, wherein the consumption change law of the fourth target node conforms to a growth law; allocating resources to the fourth target node to update the current available resource amount of the fourth target node; and determining the service duration that each service node can continuously provide services based on the current available resource amount of each of the multiple service nodes including the fourth target node.

[0099] According to an embodiment of the present invention, before calculating the service duration of each service node, a fourth target node that conforms to the growth law can be determined from multiple service nodes. Among them, the growth trend of the fourth target node growth law is most significant among multiple service nodes in the service cluster. In the resource allocation process, a certain number of free data blocks are first allocated to the fourth target node in advance. After the allocation, the current available resource amount of the fourth target node is updated, and then the service duration of multiple service nodes including the fourth target node is calculated.

[0100] According to the embodiment of the present invention, in each monitoring cycle, the resource allocation is divided into two times, which can effectively reduce the amount of resources allocated in a single time under the premise of controlling the number of accesses, making the allocation of free data blocks more reasonable. In addition, in the same monitoring cycle, resource allocation can be implemented for two different service nodes, effectively maintaining the normal operation of the service.

[0101] According to an embodiment of the present invention, based on the consumption change law of the service nodes, a fourth target node is determined from multiple service nodes, including: for each service node, calculating the growth rate of multiple monitoring indicators of the service node in the historical resource consumption data; based on the preset weight corresponding to each monitoring indicator, weighted summing up the growth rates of the multiple monitoring indicators to obtain a comprehensive growth rate that characterizes the consumption change law of the service nodes; and sorting the comprehensive growth rates of the multiple service nodes to determine the fourth target node with the highest comprehensive growth rate from the multiple service nodes.

[0102] According to an embodiment of the present invention, in the process of determining the fourth target node, the growth rates of multiple monitoring indicators of the service node in the historical resource consumption data can be calculated to determine the consumption change law based on multiple growth rates. Specifically, the multiple monitoring indicator items include the total capacity of the service node, the current available resources, and the resource release rate, etc. According to the preset weights corresponding to each monitoring indicator, the multiple growth rates are weighted and summed to obtain a comprehensive growth rate that characterizes the consumption change law. By determining the fourth target node based on various monitoring indicators, the determination result is more comprehensive and accurate.

[0103] According to an embodiment of the present invention, the consumption change rule can also be determined based on the current available resource amount at each sampling point. Specifically, the sampling moments and corresponding available resource amounts of multiple sampling points are marked on a rectangular coordinate system, and the consumption change rule is determined by curve fitting. When selecting the fourth target node, the fourth target node can be selected based on the change rate of the curve at different times. Specifically, multiple selection conditions can be determined, such as the change rate at the last moment reaches the first threshold, and the average change rate of multiple sampling points reaches the second threshold, etc. By determining the fourth target node based on the current available resource amounts of multiple sampling points, the determination result is more real-time and dynamic.

[0104] Based on the above resource management method, the present invention also provides a resource management device. Figure 7 The device is described in detail.

[0105] Figure 7 A structural block diagram of a resource management device according to an embodiment of the present invention is shown.

[0106] like Figure 7 As shown, the resource management device 700 of this embodiment includes a data acquisition module 710 , a duration determination module 720 and a resource allocation module 730 .

[0107] The data acquisition module 710 is used to acquire historical resource consumption data of each of a plurality of service nodes including a composite node in the server cluster, wherein the composite node is a service node integrated with a resource management function. In one embodiment, the data acquisition module 710 can be used to perform the operation S210 described above, which will not be described in detail here.

[0108] The duration determination module 720 is used to determine, for each service node, the service duration for which the service node can continue to provide services when the service node maintains a consumption speed that matches the consumption variation law with the current available resource amount based on the consumption variation law obtained by analyzing the historical resource consumption data of the service node. In one embodiment, the duration determination module 720 can be used to perform the operation S220 described above, which will not be repeated here.

[0109] The resource allocation module 730 is used to allocate resources to the first target node determined from the multiple service nodes according to the service duration of each of the multiple service nodes using the resource management function. In one embodiment, the resource allocation module 730 can be used to perform the operation S230 described above, which will not be repeated here.

[0110] According to an embodiment of the present invention, the duration determination module 720 includes a regularity quantization submodule, a difference analysis submodule and a duration determination submodule.

[0111] The law quantification submodule is used to quantify the consumption change law based on the acquisition cycle of historical resource consumption data using discrete difference method to obtain consumption characteristic parameters.

[0112] The difference analysis submodule is used to perform difference analysis on the current available resource amount and the historical resource remaining amount in the historical resource consumption data, and introduce consumption characteristic parameters to calibrate the analysis results to obtain the resource consumption speed of the service node.

[0113] The duration determination submodule is used to determine the service duration for which the service node can continue to provide services while maintaining the consumption speed under the current available resource amount.

[0114] According to an embodiment of the present invention, the difference analysis submodule includes a change calculation unit and a change calibration unit.

[0115] The change calculation unit is used to calculate the change rate of the resource quantity within the acquisition cycle based on the difference between the current available resource quantity and the historical resource remaining quantity.

[0116] The change calibration unit is used to add the consumption characteristic parameter to the change rate to calibrate the change rate and obtain the consumption speed.

[0117] According to an embodiment of the present invention, the resource allocation module 730 includes a first target determination submodule and a resource allocation submodule.

[0118] The first target determination submodule is used to determine a first target node from a plurality of service nodes based on the respective service durations of the plurality of service nodes, wherein the service duration of the first target node is the shortest.

[0119] The resource allocation submodule is used to allocate resources to the first target node using the resource management function based on the free data blocks in the reserved space in the server cluster and the free data blocks of other service nodes in the server cluster except the first target node.

[0120] According to an embodiment of the present invention, the resource allocation submodule includes a resource migration unit and a resource allocation unit.

[0121] The resource migration unit is used to migrate free data blocks of a first preset data volume in the reserved space to a first target node by using a resource management function when determining that the resource margin of the reserved space in the server cluster is greater than a preset threshold.

[0122] The resource allocation unit is used to allocate resources to the first target node using the resource management function based on the free data blocks of other service nodes in the plurality of service nodes except the first target node when it is determined that the resource margin of the reserved space in the server cluster is less than or equal to a preset threshold.

[0123] According to an embodiment of the present invention, the resource allocation unit includes a release calculation subunit, a second target determination subunit and a resource calling subunit.

[0124] The release calculation subunit is used to calculate the resource release rate of each service node based on the historical resource consumption data of multiple service nodes.

[0125] The second target determination subunit is used to determine the second target node from other service nodes in the plurality of service nodes except the first target node.

[0126] The resource calling subunit is used to call the free data blocks of the second preset data volume in the second target node to the first target node by using the resource management function.

[0127] According to an embodiment of the present invention, the release calculation subunit includes a range matching component, a node extraction component and a second target determination component.

[0128] The range matching component is used to match the resource release rate of each service node with the preset division range respectively, so as to determine the resource margin level of each service node according to the preset mapping relationship between the preset division range and the resource margin level.

[0129] The node extraction component is used to extract a plurality of target service nodes whose resource margin levels are preset levels from a plurality of service nodes.

[0130] The second target determination component is used to determine a second target node from multiple target service nodes based on the service time of each target service node, wherein the second target node is the node with the longest service time among the multiple target service nodes, and the resource margin level of the second target node is lower than that of the first target node.

[0131] According to an embodiment of the present invention, the resource management device 700 further includes a third target determination module, a resource release module and a margin update module.

[0132] The third target determination module is used to monitor the growth rate of the available resource margin in each service node to determine the third target node with the highest growth rate from multiple service nodes.

[0133] The resource release module is used to release a preset number of occupied data blocks from the third target node to the reserved space by utilizing the resource management function.

[0134] The margin updating module is used to update the resource margin in the reserved space, wherein the occupied data blocks include a preset proportion of invalid data.

[0135] According to an embodiment of the present invention, the resource management device 700 further includes a forced release module.

[0136] The forced release module is used to release other occupied data blocks in the third target node except the forced data block when it is determined that the preset number of occupied data blocks includes the forced data block, wherein the forced data block is a data block in the third target node that is forcibly occupied and cannot be released.

[0137] According to an embodiment of the present invention, the resource management device 700 further includes a storage allocation module.

[0138] The storage allocation module is used to respond to the received system operation instructions and evenly distribute the storage space in the system's occupied space except the reserved space in the server cluster to multiple service nodes in the server cluster. The storage space is used to store the data generated by the business running on the service nodes.

[0139] According to an embodiment of the present invention, the resource management device 700 further includes a preemption determination module.

[0140] The seizure determination module is used to determine the capacity of the seizure data block allocated to each of the service nodes from the storage space based on the number of multiple service nodes in the server cluster and the resource capacity in the occupied space of the system.

[0141] According to an embodiment of the present invention, the resource management device 700 further includes an allocation notification module and a release notification module.

[0142] The allocation notification module is used to send allocation information corresponding to the free data block to the first target node when allocating resources to the first target node, so as to notify the first target node to receive the resources.

[0143] The release notification module is used to send release information corresponding to the occupied data block to the third target node in order to notify the third target node to release the resources when reclaiming the resources from the third target node.

[0144] According to an embodiment of the present invention, the resource management device 700 further includes a distribution acquisition module and a data synchronization module.

[0145] The distribution acquisition module is used to acquire resource distribution data in each service node when it is determined that resource allocation is completed.

[0146] The data synchronization module is used to synchronize resource distribution data to each service node.

[0147] According to an embodiment of the present invention, the resource management device 700 further includes a composite determination module.

[0148] The composite determination module is used to determine a new composite node from other service nodes except the composite node according to preset rules associated with the node identifiers of multiple service nodes in the server cluster when a composite node failure is detected. The new composite node can perform resource management functions based on synchronized resource distribution data.

[0149] According to an embodiment of the present invention, the resource management device 700 further includes a fourth target determination module, a resource update module and a duration update module.

[0150] The fourth target determination module is used to determine a fourth target node from multiple service nodes according to the consumption change law of the service node, wherein the consumption change law of the fourth target node conforms to the growth law.

[0151] The resource updating module is used to allocate resources to the fourth target node to update the current available resource amount of the fourth target node.

[0152] The duration updating module is used to determine the service duration for which each service node can continuously provide services based on the currently available resource amounts of each of the multiple service nodes including the fourth target node.

[0153] According to an embodiment of the present invention, the fourth target determination module includes a growth calculation submodule, a comprehensive calculation submodule and a fourth target determination submodule.

[0154] The growth calculation submodule is used to calculate the growth rate of multiple monitoring indicators of the service node in the historical resource consumption data for each service node.

[0155] The comprehensive calculation submodule is used to perform weighted summation of the growth rates of multiple monitoring indicators based on the preset weights corresponding to each monitoring indicator, so as to obtain a comprehensive growth rate that characterizes the law of changes in service node consumption.

[0156] The fourth target determination submodule is used to sort the comprehensive growth rates of the multiple service nodes to determine the fourth target node with the highest comprehensive growth rate from the multiple service nodes.

[0157] According to an embodiment of the present invention, any multiple modules of the data acquisition module 710, the duration determination module 720 and the resource allocation module 730 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present invention, at least one of the data acquisition module 710, the duration determination module 720 and the resource allocation module 730 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the data acquisition module 710, the duration determination module 720 and the resource allocation module 730 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.

[0158] Figure 8 A block diagram of an electronic device suitable for implementing a resource management method according to an embodiment of the present invention is shown.

[0159] like Figure 8As shown, the electronic device 800 according to an embodiment of the present invention includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 to a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include an onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.

[0160] In RAM 803, various programs and data required for the operation of electronic device 800 are stored. Processor 801, ROM 802 and RAM 803 are connected to each other via bus 804. Processor 801 performs various operations of the method flow according to the embodiment of the present invention by executing the programs in ROM 802 and / or RAM 803. It should be noted that the program can also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 can also perform various operations of the method flow according to the embodiment of the present invention by executing the programs stored in one or more memories.

[0161] According to an embodiment of the present invention, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to the bus 804. The electronic device 800 may further include one or more of the following components connected to the input / output (I / O) interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 808 including a hard disk, etc.; and a communication portion 809 including a network interface card such as a LAN card, a modem, etc. The communication portion 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that the computer program read therefrom is installed into the storage portion 808 as needed.

[0162] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present invention is implemented.

[0163] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present invention, the computer-readable storage medium may include the ROM 802 and / or RAM 803 described above and / or one or more memories other than ROM 802 and RAM 803.

[0164] The embodiment of the present invention also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the resource management method provided by the embodiment of the present invention.

[0165] The computer program executes the above functions defined in the system / device of the embodiment of the present invention when the processor 801 executes the computer program. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0166] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 809, and / or installed from a removable medium 811. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0167] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above functions defined in the system of the embodiment of the present invention are performed. According to the embodiment of the present invention, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0168] According to an embodiment of the present invention, the program code for executing the computer program provided by the embodiment of the present invention can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0169] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0170] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present invention may be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features described in the various embodiments of the present invention may be combined and / or combined in various ways. All of these combinations and / or combinations fall within the scope of the present invention.

[0171] The embodiments of the present invention are described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present invention. Although each embodiment is described above, it does not mean that the measures in each embodiment cannot be used in combination advantageously. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.

Claims

1. A resource management method, characterized in that: The method comprises: Acquire historical resource consumption data of each of a plurality of service nodes including a composite node in a server cluster, wherein the composite node is a service node integrated with a resource management function; For each of the service nodes, based on a consumption variation law obtained by analyzing historical resource consumption data of the service node, determine a service duration for which the service node can continue to provide services if the service node maintains a consumption speed matching the consumption variation law with the current available resource amount; According to the service durations of the plurality of service nodes, and utilizing the resource management function, resources are allocated to a first target node determined from the plurality of service nodes.

2. The method according to claim 1, characterized in that The determining, based on the consumption variation law obtained by analyzing the historical resource consumption data of the service node, the service duration for which the service node can continuously provide services when the service node maintains a consumption speed matching the consumption variation law with the current available resource amount, includes: Based on the acquisition cycle of the historical resource consumption data, the consumption change law is quantified using discrete difference method to obtain consumption characteristic parameters; Performing a difference analysis on the current available resource amount and the historical resource remaining amount in the historical resource consumption data, and introducing the consumption characteristic parameter to calibrate the analysis result to obtain the resource consumption speed of the service node; Determine the service time duration for which the service node continues to provide services while maintaining the consumption speed under the current available resource amount.

3. The method according to claim 2, characterized in that The performing difference analysis on the current available resource amount and the historical resource remaining amount in the historical resource consumption data, and introducing the consumption characteristic parameter to calibrate the analysis result to obtain the resource consumption speed of the service node includes: Calculating the rate of change of the resource quantity during the acquisition cycle based on the difference between the current available resource quantity and the historical resource remaining quantity; The consumption characteristic parameter is added to the change rate to calibrate the change rate to obtain the consumption speed.

4. The method according to claim 1, characterized in that: The allocating resources to the first target node determined from the plurality of service nodes by using the resource management function according to the service durations of the plurality of service nodes respectively includes: Determine a first target node from the plurality of service nodes based on respective service durations of the plurality of service nodes, wherein the service duration of the first target node is the shortest; Based on the free data blocks in the reserved space in the server cluster and the free data blocks of other service nodes in the server cluster except the first target node, the resource management function is used to allocate resources to the first target node.

5. The method according to claim 4, characterized in that The allocating resources to the first target node by using the resource management function based on the free data blocks in the reserved space in the server cluster and the free data blocks of other service nodes in the server cluster except the first target node includes: When it is determined that the resource margin of the reserved space in the server cluster is greater than a preset threshold, using the resource management function to migrate free data blocks of a first preset data volume in the reserved space to the first target node; When it is determined that the resource margin of the reserved space in the server cluster is less than or equal to the preset threshold, the resource management function is used to allocate resources to the first target node based on the free data blocks of other service nodes among the multiple service nodes except the first target node.

6. The method according to claim 5, characterized in that The allocating resources to the first target node by using the resource management function based on the idle data blocks of other service nodes except the first target node among the plurality of service nodes includes: Calculating the resource release rate of each of the service nodes based on historical resource consumption data of the plurality of service nodes; and determining a second target node from other service nodes among the plurality of service nodes except the first target node; By using the resource management function, the free data blocks of the second preset data volume in the second target node are called to the first target node.

7. The method according to claim 6, characterized in that The determining the second target node from other service nodes among the plurality of service nodes except the first target node comprises: Matching the resource release rate of each of the service nodes with the preset division range respectively, so as to determine the resource margin level of each of the service nodes according to the preset mapping relationship between the preset division range and the resource margin level; Extracting a plurality of target service nodes whose resource margin levels are at a preset level from the plurality of service nodes; According to the service duration of each of the target service nodes, the second target node is determined from the multiple target service nodes, wherein the second target node is the node with the longest service duration among the multiple target service nodes, and the resource margin level of the second target node is lower than that of the first target node.

8. The method according to claim 4, characterized in that The method further comprises: Monitoring the growth rate of the available resource margin in each of the service nodes to determine the third target node with the highest growth rate from the plurality of service nodes; By utilizing the resource management function, a preset number of occupied data blocks are released from the third target node to the reserved space; and the resource margin in the reserved space is updated, wherein the occupied data blocks include a preset proportion of invalid data.

9. The method according to claim 8, characterized in that The method further comprises: When it is determined that the preset number of occupied data blocks includes a forced data block, other occupied data blocks in the third target node except the forced data block are released, wherein the forced data block is a data block in the third target node that is forcibly occupied and cannot be released.

10. The method according to claim 9, characterized in that The method further comprises: In response to the received system operation instruction, the storage space in the system occupied space except the reserved space in the server cluster is evenly distributed to multiple service nodes in the server cluster, and the storage space is used to store data generated by running business on the service nodes.

11. The method according to claim 10, characterized in that The method further comprises: Based on the number of the plurality of service nodes in the server cluster and the resource capacity in the occupied space of the system, the capacity of the occupied data block allocated from the storage space to each of the service nodes is determined.

12. The method according to any one of claims 8 to 11, characterized in that The method further comprises: In the case of allocating resources to the first target node, sending allocation information corresponding to the free data block to the first target node to notify the first target node to receive the resources; In the case of reclaiming resources from the third target node, release information corresponding to the occupied data block is sent to the third target node to notify the third target node to release the resources.

13. The method according to claim 1, characterized in that The method further comprises: When it is determined that resource allocation is completed, obtaining resource distribution data in each of the service nodes; The resource distribution data is synchronized to each of the service nodes.

14. The method according to claim 13, characterized in that The method further comprises: When a failure of the composite node is detected, a new composite node is determined from other service nodes other than the composite node according to preset rules associated with the node identifiers of each of the multiple service nodes in the server cluster, and the new composite node is capable of performing the resource management function based on the synchronized resource distribution data.

15. The method according to claim 1, characterized in that The method further comprises: Determine a fourth target node from the plurality of service nodes according to a consumption variation law of the service node, wherein the consumption variation law of the fourth target node conforms to an increasing law; Allocating resources for the fourth target node to update the current available resource amount of the fourth target node; The service duration for which each of the service nodes can continuously provide services is determined based on currently available resource amounts of each of the service nodes including the fourth target node.

16. The method according to claim 15, characterized in that The step of determining a fourth target node from the plurality of service nodes according to a consumption change rule of the service node includes: For each of the service nodes, calculating growth rates of multiple monitoring indicators of the service node in historical resource consumption data; Based on the preset weight corresponding to each of the monitoring indicators, weighted sum is performed on the growth rates of the plurality of monitoring indicators to obtain a comprehensive growth rate that characterizes the change rule of the service node consumption; The comprehensive growth rates of the plurality of service nodes are sorted to determine a fourth target node with the highest comprehensive growth rate from the plurality of service nodes.

17. A resource management device, characterized in that: The device comprises: A data acquisition module, used to acquire historical resource consumption data of each of a plurality of service nodes including a composite node in a server cluster, wherein the composite node is a service node integrated with a resource management function; a duration determination module, configured to determine, for each of the service nodes, based on a consumption variation law obtained by analyzing historical resource consumption data of the service node, a service duration for which the service node can continuously provide services if the service node maintains a consumption speed matching the consumption variation law with a current available resource amount; The resource allocation module is used to allocate resources to a first target node determined from the multiple service nodes by using the resource management function according to the service durations of the multiple service nodes.

18. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 16.

19. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 16 are implemented.

20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 16.

Citation Information

Patent Citations

  • Big data resource processing method and device, terminal and storage medium

    CN111198767A

  • Early warning method and device, electronic equipment and storage medium

    CN111858267A

  • Allocation method, server and storage medium

    CN112187839A

  • Micro-service process processing method and device, electronic equipment and storage medium

    CN114168234A

  • Resource management method and device, electronic equipment and storage medium

    CN114185675A

Cited By

  • Resource management method and apparatus, and device, medium and program product

    WO2026179812A1