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

WO2026179812A1PCT designated stage Publication Date: 2026-09-03INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2026/079333
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-02-27
Filing Date
2026-02-13
Publication Date
2026-09-03

Smart Images

  • Figure CN2026079333_03092026_PF_FP_ABST
    Figure CN2026079333_03092026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application is a resource management method. The resource management method comprises: acquiring respective historical resource consumption data of a plurality of service nodes in a server cluster, which service nodes comprise a composite node, wherein the composite node is a service node with an integrated resource management function; for each service node, on the basis of a consumption change rule obtained by means of analyzing the historical resource consumption data of the service node, determining a service duration within which the service node can continuously provide a service when using currently available resources to maintain a consumption speed matching the consumption change rule; and on the basis of respective service durations of the plurality of service nodes, using the resource management function to perform resource allocation on a first target node determined from among the plurality of service nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Resource management methods, devices, equipment, media and program products

[0001] Cross-references to related applications

[0002] This application claims priority to Chinese Patent Application No. 202510224360.8, filed on February 27, 2025, entitled “Resource Management Method, Apparatus, Equipment, Media and Program Product”, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to a resource management method, apparatus, equipment, medium, and program product. Background Technology

[0004] In all-flash systems, resources are typically pre-allocated to each node in the service cluster. To ensure load balancing across nodes during service processing, a load balancer is usually used to dynamically adjust resource allocation. The load balancer monitors the load status of each node in real time; if a node is overloaded, tasks will be distributed to nodes with lower loads to achieve efficient utilization of system resources.

[0005] In realizing the concept of this application, the inventors discovered at least the following problems in the related technology: 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 resource allocation. This frequent interaction significantly increases the consumption of communication resources, thereby affecting the overall system performance. Summary of the Invention

[0006] According to a first aspect of this application, a resource management method is provided, comprising: acquiring historical resource consumption data of each of multiple service nodes, including composite nodes, in a server cluster, wherein the composite nodes are service nodes integrated with resource management functions; for each of the service nodes, based on the consumption change pattern obtained by analyzing the historical resource consumption data of the service nodes, determining the service duration for which the service nodes can continuously provide services while maintaining a consumption rate that matches the consumption change pattern with the current available resources; and allocating resources to a first target node determined from the multiple service nodes based on the service duration of each of the multiple service nodes using the resource management function.

[0007] A second aspect of this application provides a resource management apparatus, comprising: a data acquisition module for acquiring historical resource consumption data of multiple service nodes, including composite nodes, in a server cluster, wherein the composite nodes are service nodes integrated with resource management functions; a duration determination module for determining, for each of the service nodes, the service duration during which the service node can continuously provide services while maintaining a consumption rate matching the consumption change pattern with the current available resources, based on the consumption change pattern obtained by analyzing the historical resource consumption data of the service node; and a resource allocation module for allocating resources to a first target node determined from the multiple service nodes based on the service duration of each of the multiple service nodes and using the resource management function.

[0008] A third aspect of this application provides an electronic device comprising: one or more processors; and 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 method described above.

[0009] A fourth aspect of this application also provides a non-transitory computer-readable storage medium having a computer program or computer-readable instructions stored thereon, wherein the computer program or computer-readable instructions, when executed by a processor, implement the steps of the above method.

[0010] The fifth aspect of this application also provides a computer program product, including a computer program or computer-readable instructions, which, when executed by a processor, implement the steps of the above-described method.

[0011] Details of one or more embodiments of this application are set forth in the following drawings and description. Other features and advantages of this application will become apparent from the specification, drawings, and claims. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 illustrates an application scenario of the resource management method, apparatus, device, medium, and program product according to embodiments of this application.

[0014] Figure 2 shows a flowchart of a resource management method according to an embodiment of this application.

[0015] Figure 3 shows a flowchart of the service node in the resource management method according to an embodiment of this application.

[0016] Figure 4 shows a schematic diagram illustrating the working principle of the resource management method according to an embodiment of this application.

[0017] Figure 5 shows a schematic diagram illustrating the trend of consumption change in the resource management method according to an embodiment of this application.

[0018] Figure 6 shows a schematic diagram of the data synchronization process in the resource management method according to an embodiment of this application.

[0019] Figure 7 shows a structural block diagram of a resource management device according to an embodiment of this application.

[0020] Figure 8 shows a block diagram of an electronic device suitable for implementing a resource management method according to an embodiment of this application;

[0021] Figure 9 shows a block diagram of a non-transitory computer-readable storage medium according to an embodiment of this application;

[0022] Figure 10 shows a block diagram of a computer program product according to an embodiment of this application. Detailed Implementation

[0023] The embodiments of this application will now 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 this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.

[0024] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

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

[0026] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).

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

[0028] Embodiments of this application provide a resource management method, comprising: acquiring historical resource consumption data of multiple service nodes, including composite nodes, in a server cluster, wherein the composite node is a service node integrating resource management functions; for each service node, based on the consumption change pattern obtained by analyzing the historical resource consumption data of the service node, determining the service duration for which the service node can continuously provide services while maintaining a consumption rate that matches the consumption change pattern with the current available resources; and allocating resources to a first target node determined from the multiple service nodes based on the service duration of each service node using the resource management function.

[0029] Figure 1 illustrates an application scenario of the resource management method, apparatus, device, medium, and program product according to embodiments of this application.

[0030] As shown in Figure 1, 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 serves as a medium for providing 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 or wireless communication links, or fiber optic cables, etc.

[0031] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via 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 media platform software, etc. (for example only).

[0032] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0033] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received 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 devices.

[0034] It should be noted that the resource management method provided in this application embodiment can generally be executed by server 105. Correspondingly, the resource management device provided in this application embodiment can generally be located in server 105. The resource management method provided in this application embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the resource management device provided in this application embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.

[0035] It should be understood that the number of terminal devices, networks, and servers shown in Figure 1 is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0036] The resource management method of the embodiment will be described in detail below based on the scenario described in Figure 1, with reference to Figures 2 to 6.

[0037] Figure 2 shows a flowchart of a resource management method according to an embodiment of this application.

[0038] As shown in Figure 2, this embodiment includes operations S210 to S230.

[0039] In operation S210, historical resource consumption data of each of the multiple service nodes in the server cluster, including composite nodes, is obtained. The composite node is a service node that integrates resource management functions.

[0040] In operation S220, for each service node, based on the consumption change pattern obtained by analyzing the historical resource consumption data of the service node, the service duration that the service node can continuously provide services is determined while maintaining a consumption rate that matches the consumption change pattern with the current available resources.

[0041] In operation S230, based on the service duration of each of the multiple service nodes, the resource management function is used to allocate resources to the first target node determined from the multiple service nodes.

[0042] According to embodiments of this application, in an all-flash system, a distributed architecture is the core design supporting its high performance and scalability. This architecture achieves load balancing and high availability by distributing data across multiple service nodes. These service nodes are typically organized in the form of server clusters, with each service node in the cluster independently processing data requests and performing computational tasks.

[0043] According to embodiments of this application, each service node mainly includes two modules: a space allocation unit and a space reclamation unit (their working logic is shown in Figure 3). The space allocation unit is responsible for managing and allocating space within the service node, ensuring that resources are allocated promptly to handle data writing demands during flush operations. During service node operation, space is typically managed at the data block granularity (data block size is defined according to the actual system implementation). Therefore, the space allocation unit can manage and allocate data blocks, while also tracking and recording data block usage to ensure that data blocks are not reused.

[0044] According to the embodiments of this application, the space reclamation unit is responsible for reclaiming the used data blocks. In an all-flash system, this is generally achieved through a garbage collection mechanism, which mainly reclaims the allocated data blocks with very little valid data so that the space allocation unit can continue to use them.

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

[0046] 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 to data blocks. In operation S340, the data write operation is confirmed to be complete. In operation S350, used data blocks are reclaimed. In operation S360, reclaimed data blocks are released. In operation S370, released data blocks are reallocated for subsequent use.

[0047] According to embodiments of this application, by systematically receiving, processing, writing, acknowledging, reclaiming, releasing, and reallocating data blocks of load data, the automation of data processing and resource management is achieved, while promoting the recycling of resources and effectively improving operational efficiency and storage resource utilization.

[0048] According to embodiments of this application, the server cluster also includes a composite node for resource management among its multiple service nodes. This composite node, along with the other service nodes, can perform business processing. The composite node is selected from the multiple service nodes through arbitration 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 system's operational needs.

[0049] According to an embodiment of this application, as shown in Figure 4, in the actual system design, the server housing the composite node includes four main modules: a capacity monitoring unit 410, a trend prediction unit 420, a space scheduling unit 430, and a space management unit 440. The capacity monitoring unit 410 is primarily responsible for monitoring the capacity of each service node in the server cluster, 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 and whether resource allocation is needed; it is the core module of the entire load balancing scheduling. The space scheduling unit 430 is used to execute resource allocation tasks to each service node and is a task execution unit. When data block migration is required, it interfaces with the corresponding service node to complete the resource transfer. The space management unit 440 is mainly responsible for storing records to track the ownership of resources. The composite node implements resource management functions based on the above four modules, thereby allocating resources to each service node.

[0050] According to an embodiment of this application, as shown in Figure 4, the composite node acquires historical resource consumption data of each service node in the server cluster. During the acquisition process, periodic sampling is typically used to collect the data. Specifically, at least three time points must be retained in the historical resource consumption data. The acquired historical resource consumption data includes records of multiple monitoring indicators for the service nodes. These multiple monitoring indicators include the total capacity of the service node, the current available resources, and the resource release rate, among others. It should be noted that these are the basic indicators that need to be monitored; for more precise control, more indicators can be monitored, such as processor utilization.

[0051] According to embodiments of this application, the historical resource consumption data of a service node is generated based on the actual operations of resource allocation and release within the service node. As shown in Figure 4, the space allocation unit 450 and the space reclamation unit 460 within the service node work together through an internal loop mechanism. When a service node completes its task and releases storage space, the space reclamation unit 460 reclaims this space and returns it to the available space pool. Subsequently, the space allocation unit 450 can extract space from this pool and allocate it to new service nodes. This loop process ensures efficient utilization of storage resources and achieves continuous optimization management.

[0052] According to embodiments of this application, historical resource consumption data for each service node is analyzed to determine its resource consumption variation patterns. 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 its internal loop. As shown in Figure 5, the consumption variation patterns can be divided into seven main trends: Trend 1 (characterizing stable resource consumption), Trend 2 (characterizing a steady increase in resource consumption), Trend 3 (characterizing a slowdown in the increase in resource consumption), Trend 4 (characterizing an accelerated increase in resource consumption), Trend 5 (characterizing a steady decrease in resource consumption), Trend 6 (characterizing an accelerated decrease in resource consumption), and Trend 7 (characterizing a slowdown in the decrease in resource consumption).

[0053] According to an embodiment of this application, after determining the current available resources of a service node, based on the consumption change pattern, the service duration for which the service node can continuously provide services while maintaining a consumption rate that matches the consumption change pattern with the current available resources is determined. Based on the service duration of each service node, the urgency of each service node's space requirements is assessed. In this case, the service node with the shortest service duration, i.e., the first target node, should receive priority in resource allocation.

[0054] According to embodiments of this application, resource allocation is achieved through the resource management function of composite nodes, thus separating the control side from the business side. During allocation, the sustainable service duration of service nodes is predicted based on their consumption patterns. Since these consumption patterns are determined by historical resource consumption data dynamically generated by the service nodes during business operations, the business side and control side do not need frequent interaction to understand the resource status. Allocating resources based on predetermined service durations not only reduces service interruptions caused by space exhaustion but also reduces real-time dependence on the control side because resource allocation relies on local historical resource consumption data. This significantly reduces the frequency of interaction between the control side and the business side, thereby improving resource allocation efficiency and system stability.

[0055] According to an embodiment of this application, based on the consumption change pattern obtained by analyzing the historical resource consumption data of the service node, the service duration for which the service node can continuously provide services while maintaining a consumption rate that matches the consumption change pattern with the current available resources is determined includes: quantifying the consumption change pattern using the discrete difference method based on the acquisition period of the historical resource consumption data to obtain consumption characteristic parameters; performing difference analysis on the current available resources and the historical resource remaining amount in the historical resource consumption data, and calibrating the analysis results by introducing consumption characteristic parameters to obtain the consumption rate of the service node; and determining the service duration for which the service node can continuously provide services while maintaining the consumption rate under the current available resources.

[0056] According to an embodiment of this application, the acquisition period for historical resource consumption data is determined, assuming the acquisition period is ΔT. The consumption change pattern is quantified using the discrete difference method to obtain consumption characteristic parameters. Specifically, it is assumed that the current available resource quantities corresponding to the three sampling times of the service node are A1, A2, and A3, respectively. Based on the data acquisition period ΔT, the consumption change pattern is quantified using formula (1).

[0057] Where P represents the consumption characteristic parameter obtained after quantization.

[0058] According to an embodiment of this application, a difference analysis is performed on the current available resource quantity and the historical remaining resource quantity in the historical resource consumption data. The historical remaining resource quantity used in the difference analysis is the available resource quantity corresponding to the sampling point closest to the current time. For example, if the current available resource quantity is A3, then the historical remaining resource quantity is A2. By selecting adjacent and continuous data, the predicted results are more accurate.

[0059] According to an embodiment of this application, 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 pattern. Based on the resource consumption rate obtained after calibration, the service duration that the service node can continuously provide services under the current available resource quantity is calculated. By calculating the service duration, the urgency of each service node's resource demand can be determined, and resources can be allocated preferentially to the node with the shortest service time, making resource allocation more reasonable and reducing service interruptions caused by resource exhaustion.

[0060] According to an embodiment of this application, a difference analysis is performed on the current available resource quantity and the historical remaining resource quantity in the historical resource consumption data, and a consumption characteristic parameter is introduced to calibrate the analysis results to obtain the resource consumption rate of the service node, including: calculating the rate of change of resource quantity within the acquisition period based on the difference between the current available resource quantity and the historical remaining resource quantity; adding the consumption characteristic parameter to the rate of change to calibrate the rate of change and obtain the consumption rate.

[0061] According to the embodiments of this application, in the process of calculating the resource consumption rate, the rate of change of the resource quantity within the acquisition period is first determined, and then the rate of change is calibrated using consumption characteristic parameters 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 quantity is calculated. The specific calculation method is shown in formulas (2) and (3). W=(A3-A2) / ΔT+P (2)

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

[0063] According to the embodiments of this application, the sustainable service duration of a service node is predicted based on the consumption change pattern, and this is used as the basis for resource allocation, effectively reducing service interruptions caused by space exhaustion.

[0064] According to an embodiment of this application, based on the service duration of each of the multiple service nodes, resource allocation is performed on a first target node determined from the multiple service nodes using resource management functions. This includes: determining a first target node from the multiple service nodes based on their respective service durations, wherein the first target node has the shortest service duration; and allocating resources to the first target node using resource management functions based on the free data blocks in the reserved space of the server cluster and the free data blocks of other service nodes in the server cluster besides the first target node.

[0065] According to the embodiments of this application, since the resource demand of each service node is detected in each sampling period, if a service node has a short service duration, it indicates that its resource demand is high and resource allocation is required. During the selection of service nodes, since service nodes also perform internal resource allocation during business operation, it is not necessary to allocate resources for multiple service nodes at once when using the resource management function; only the first target node with the shortest service duration needs to be determined from among the multiple service nodes for resource allocation.

[0066] According to embodiments of this application, during resource allocation, allocation can be based on idle data blocks in the reserved space of the service cluster and idle data blocks on other service nodes in the server cluster besides the first target node. Specifically, the source of idle data blocks for allocation can be selected based on the resource availability in the reserved space of the service cluster. However, both sources can be utilized simultaneously during resource allocation; for example, resources can be allocated preferentially from the reserved space in the server cluster, and if the reserved space is insufficient, resources can be supplemented from other service nodes. By allocating resources in stages, resource utilization can be made more efficient.

[0067] According to an embodiment of this application, based on the idle data blocks in the reserved space of the server cluster and the idle data blocks of other service nodes in the server cluster besides the first target node, resources are allocated to the first target node using resource management functions, including: when it is determined that the resource balance in the reserved space of the server cluster is greater than a preset threshold, using resource management functions, the idle data blocks of a first preset data amount in the reserved space are migrated to the first target node; when it is determined that the resource balance in the reserved space of the server cluster is less than or equal to the preset threshold, resources are allocated to the first target node based on the idle data blocks of other service nodes among the multiple service nodes besides the first target node using resource management functions.

[0068] According to embodiments of this application, as the composite node migrates idle 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 remaining resource balance of the reserved space in the server cluster falls below a certain preset threshold (e.g., 10%), it is determined that the reserved space of the current server cluster is insufficient to continue providing resource allocation. Therefore, the source of the idle data blocks used in resource allocation is changed, and resources are allocated to the first target node based on the idle data blocks of other service nodes besides the first target node among multiple service nodes.

[0069] According to embodiments of this application, when migrating idle data blocks to the first target node using resource management functions, the service node will provide idle data blocks from its internal space based on its consumption patterns when resource demand trends emerge. Therefore, during resource allocation, it is unnecessary to allocate excessive space to the first target node at a time, reducing the likelihood of being unable to allocate resources 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 service node's business processing capacity, for example, to 5 data blocks or more. By selecting different allocation strategies at different stages, fluctuations in resource demand can be effectively addressed, reducing service interruptions or performance degradation caused by insufficient resources.

[0070] According to an embodiment of this application, based on the idle data blocks of other service nodes among multiple service nodes besides the first target node, resources are allocated to the first target node using resource management functions, including: calculating the resource release rate of each service node based on the historical resource consumption data of multiple service nodes; determining a second target node from among the other service nodes besides the first target node; and using resource management functions to call up the idle data blocks of a second preset data amount in the second target node to the first target node.

[0071] According to embodiments of this application, the core of the composite node's determination of whether resource allocation is necessary is whether the currently available resources in each service node can support the service node's business consumption. If it is determined that the currently available resources of a certain service node are insufficient or at risk of being exhausted, then the service node is considered to have insufficient space and needs to be allocated more resources. Conversely, if it is determined that the free space of a certain service node has increased, then the service node is considered to have surplus space. In this case, if other service nodes are at risk of insufficient space, some space will be appropriately reclaimed from the service nodes with relatively surplus space and ultimately allocated to the service nodes with insufficient space.

[0072] According to embodiments of this application, based on the above rules, when analyzing the space availability of each service node, the resource release rate of each service node is first examined. Generally, a higher resource release rate indicates a relatively higher load pressure on the service node. Analyzing the resource release rate of each service node confirms that the resources of each service node are being consumed, but some service nodes may consume resources faster than others, resulting in an unbalanced load. Therefore, if 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 that service node is significantly less than that of other service nodes, free data blocks can be transferred from that service node to other service nodes.

[0073] According to an embodiment of this application, if it is determined that the remaining resources in the reserved space are lower than a preset threshold, it can be known that there are not enough resources available for allocation in the current reserved space. From multiple service nodes other than the first target node, a second target node with a lower resource release rate is identified, and its idle data blocks are transferred to the first target node. Using resource management functions, idle data blocks of a second preset data volume from the second target node are transferred to the first target node. Similarly, the second preset data volume involved in the resource allocation process can be set according to the service node's business processing capabilities. By selecting the second target node based on the resource release rate, the selection result better meets the business operation requirements.

[0074] According to an embodiment of this application, determining a second target node from multiple service nodes other than the first target node includes: matching the resource release rate of each service node with a preset division range to determine the resource reserve level of each service node based on a preset mapping relationship between the preset division range and the resource reserve level; extracting multiple target service nodes with a preset resource reserve level from the multiple service nodes; and determining a second target node from the multiple target service nodes based on the service duration of each target service node, wherein the second target node is the node with the longest service duration among the multiple target service nodes, and the resource reserve level of the second target node is lower than that of the first target node.

[0075] According to embodiments of this application, when analyzing resource release rates, the current resource release rate range is typically determined based on a threshold within a preset range. The resource reserve level for each service node is then determined based on a preset mapping relationship between the preset range and the resource reserve level. The resource reserve level includes three levels: Level 1, Level 2, and Level 3. Level 1 indicates limited space, Level 2 indicates moderate space, and Level 3 indicates abundant space.

[0076] According to an embodiment of this application, for a target service node with a resource reserve level of third level, a second target node with the longest service time is determined from multiple target service nodes based on the service duration of each target service node. Furthermore, the resource reserve level of the second target node is lower than that of the first target node, which is typically at the first level. By determining the resource reserve level of a service node based on its resource release rate, and then filtering for the second target node based on its service duration, the filtering results are more accurate, allowing for the priority selection of nodes with ample space for resource allocation.

[0077] According to an embodiment of this application, the resource management method further includes: monitoring the growth rate of available resource balance in each service node to determine a third target node with the highest growth rate from multiple service nodes; using resource management functions to release a preset number of occupied data blocks from the third target node to a reserved space; and updating the resource balance in the reserved space, wherein the occupied data blocks include a preset proportion of invalid data.

[0078] According to an embodiment of this application, if the reserved space of the server cluster is lower than a preset threshold, the composite node will attempt to reclaim some resources from a certain service node and redeem them as reserved space for the server cluster. The resource reclamation method is the reverse of the resource allocation process. The composite node will detect the growth rate of available resource balance in each service node. For service nodes with a high growth rate (if there are service nodes with increased available resource balance), the composite node's space scheduling unit will be notified to return a predetermined number of occupied data blocks from that service node to the reserved space.

[0079] According to embodiments of this application, the occupied data blocks include a preset proportion of invalid data. By reclaiming resources from the occupied data blocks, resource utilization can be effectively improved. After resource release, the remaining resource space in the reserved area is updated to facilitate subsequent resource allocation.

[0080] According to embodiments of this application, during actual system operation, all service nodes may be in a state of consumption, at which point there will be no service nodes with increasing available resource reserves. In this case, resources will be considered irretrievable, and no forced resource release will be performed to reduce the situation where composite nodes and service nodes repeatedly release and allocate resources.

[0081] According to an embodiment of this application, the resource management method further includes: when a preset number of occupied data blocks include a forcibly occupied data block, releasing the other occupied data blocks in the third target node besides the forcibly occupied data block, wherein the forcibly occupied data block is a data block in the third target node that is forcibly occupied and cannot be released.

[0082] According to embodiments of this application, the composite node will also ensure that each service node retains a minimum amount of space based on the total capacity information of each service node provided by the capacity monitoring unit. This space 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 amount of database to meet the data flushing requirements.

[0083] According to an embodiment of this application, if the preset number of occupied data blocks to be released during resource release includes preempted data blocks, then all data blocks except the preempted data blocks will be released. By leaving preempted data blocks for each service node while releasing resources, the normal operation of the service nodes is guaranteed to a certain extent.

[0084] According to an embodiment of this application, the resource management method further includes: in response to a received system operation instruction, distributing the storage space in the system's occupied space, excluding the reserved space in the server cluster, evenly to multiple service nodes in the server cluster, wherein the storage space is used to store data generated by services running on the storage service nodes.

[0085] According to the embodiments of this application, in the initial stage of system operation, since there is relatively little data being written, 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. Therefore, it is assumed that each service node is in a load-balanced state. At this time, the composite node will allocate 20% to 30% of the space as reserved space for the server cluster, and the remaining storage space will be pre-allocated to all service nodes in the server cluster in an equal manner.

[0086] According to embodiments of this application, the storage space allocated to service nodes is managed by each service node itself. Resource allocation and migration are only performed when some service nodes face a risk of insufficient space. By pre-allocating storage space to service nodes, the need for dynamic allocation of storage resources during runtime is reduced, thereby reducing latency caused by allocating and reclaiming storage resources and improving overall system performance.

[0087] According to an embodiment of this application, the resource management method further includes: determining the capacity of the preemptive data block allocated from the storage space for each service node based on the number of multiple service nodes in the server cluster and the resource capacity in the system's occupied space.

[0088] According to the embodiments of this application, the capacity of the 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 data block should not exceed 1 / N of the resource capacity of the system's occupied space (i.e., the space occupied internally by the system and not exposed to the outside), where N is the number of service nodes in the server cluster.

[0089] According to embodiments of this application, the capacity of the preemptive data blocks to be allocated in the storage space is calculated based on the number of service nodes in the server cluster and the resource capacity in the system's occupied space. Based on the capacity of the preemptive data blocks, the preemptive data blocks in the storage space are evenly distributed among the service nodes. By calculating and allocating the capacity of the preemptive data blocks, the normal operation of the service nodes is guaranteed to a certain extent.

[0090] According to an embodiment of this application, the resource management method further includes: when allocating resources to a first target node, sending allocation information corresponding to an idle data block to the first target node to notify the first target node to receive the resources; and when reclaiming resources from a third target node, sending release information corresponding to an occupied data block to the third target node to notify the third target node to release the resources.

[0091] According to an embodiment of this application, 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 based on the capacity of the resources to be allocated in a single instance. Allocation information is then sent to the first target node based on this capacity to notify the first target node to receive the resources, and simultaneously to notify the space management unit in the composite node to complete the information update.

[0092] According to an embodiment of this application, when resources need to be reclaimed from a third target node, the space scheduling unit in the composite node notifies the third target node of the number of databases to be returned. Based on this number, release information is sent to the third target node to notify it to release resources, and then the space reclamation unit in the third target node waits to complete the corresponding capacity of space preparation. The resources released by the third target node are returned to the reserved space of the server cluster, and the remaining resource balance in the reserved space is updated. Resource allocation and reclamation are performed through information interaction, enabling service nodes to manage resources in a timely manner.

[0093] According to an embodiment of this application, the resource management method further includes: when it is determined that resource allocation is complete, obtaining resource distribution data in each service node; and synchronizing the resource distribution data to each service node.

[0094] According to embodiments of this application, once resource allocation is confirmed to be complete, resource distribution data is recorded and updated. The recording of resource distribution data can typically be accomplished using arrays or tables. As shown in Figure 6, when the resource distribution data of composite node 610 changes, the space management unit 611 of composite node 610 needs to synchronize the resource distribution data to the respective space management units of other service nodes 620.

[0095] According to the embodiments of this application, since the composite node selects only one service node from the server cluster to serve as the backup node, the other service nodes only play a backup role. The update is only considered complete after all information has been synchronized. By synchronizing 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.

[0096] According to an embodiment of this application, the resource management method further includes: when a failure of the composite node is detected, determining a new composite node from other service nodes in the server cluster according to a preset rule associated with the node identifiers of the multiple service nodes, wherein the new composite node is capable of performing resource management functions based on synchronized resource distribution data.

[0097] According to an embodiment of this application, if a failure of a composite node is detected during system operation, a new composite node will be selected from the remaining service nodes. 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 preset rules associated with the node identifiers of the respective service nodes. The node identifier can be the ID of each server, and the preset rules can elect the service node with the largest or smallest ID as the new composite node.

[0098] According to an embodiment of this application, if a faulty composite node recovers, the new composite node also needs to synchronize resource distribution data with it first. Only after the resource distribution data is fully synchronized can the recovered service node join the system and provide services. In the event of a composite node failure, node switching can promptly address the fault situation.

[0099] According to an embodiment of this application, the resource management method further includes: determining a fourth target node from multiple service nodes based on the consumption change pattern of the service nodes, wherein the consumption change pattern of the fourth target node conforms to a growth pattern; allocating resources to the fourth target node to update the current available resource quantity of the fourth target node; and determining the service duration for which each service node can continuously provide services based on the current available resource quantity of each of the multiple service nodes including the fourth target node.

[0100] According to an embodiment of this application, before calculating the service duration of each service node, a fourth target node conforming to the growth pattern can be determined from multiple service nodes. The growth trend of the fourth target node is the most significant among the multiple service nodes in the service cluster. During resource allocation, a certain number of idle data blocks are pre-allocated to the fourth target node. After allocation, the current available resources of the fourth target node are updated, and then the service duration of the multiple service nodes, including the fourth target node, is calculated.

[0101] According to the embodiments of this application, resource allocation is split into two parts within each monitoring cycle. This effectively reduces the amount of resources allocated in a single allocation while controlling the number of accesses, making the allocation of idle data blocks more reasonable. Furthermore, within the same monitoring cycle, resource allocation can be performed on two different service nodes, effectively maintaining the normal operation of the service.

[0102] According to an embodiment of this application, a fourth target node is determined from multiple service nodes based on the consumption change pattern of service nodes, including: for each service node, calculating the growth rate of multiple monitoring indicators of the service node in historical resource consumption data; based on the preset weights corresponding to each monitoring indicator, weighting and summing the growth rates of the multiple monitoring indicators to obtain a comprehensive growth rate characterizing the consumption change pattern of the service node; and ranking 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.

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

[0104] According to embodiments of this application, the consumption change pattern can also be determined based on the current available resource quantity at each sampling point. Specifically, the sampling times and corresponding available resource quantities of multiple sampling points are plotted on a Cartesian coordinate system, and the consumption change pattern is determined using curve fitting. When selecting the fourth target node, the fourth target node can be selected based on the rate of change of the curve at different times. Specifically, multiple selection conditions can be set, such as the rate of change at the last moment reaching a first threshold, and the average rate of change of multiple sampling points reaching a second threshold. By determining the fourth target node based on the current available resource quantity at multiple sampling points, the determination result becomes more real-time and dynamic.

[0105] Based on the above resource management method, this application also provides a resource management device. The device will be described in detail below with reference to Figure 7.

[0106] Figure 7 shows a structural block diagram of a resource management device according to an embodiment of this application.

[0107] As shown in FIG7, 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.

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

[0109] The duration determination module 720 is used to determine, for each service node, the service duration that the service node can continuously provide services while maintaining a consumption rate that matches the consumption change pattern with the current available resources, based on the consumption change pattern 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.

[0110] The resource allocation module 730 is used to allocate resources to a first target node determined from multiple service nodes based on the service duration of each service node and utilizing resource management functions. In one embodiment, the resource allocation module 730 can be used to perform the operation S230 described above, which will not be repeated here.

[0111] According to an embodiment of this application, the duration determination module 720 includes a regularity quantification submodule, a difference analysis submodule, and a duration determination submodule.

[0112] The regularity quantification submodule is used to quantify the consumption change pattern based on the acquisition period of historical resource consumption data and the discrete difference method to obtain consumption characteristic parameters.

[0113] The difference analysis submodule is used to perform difference analysis between the current available resources and the historical remaining resources in the historical resource consumption data, and to introduce consumption characteristic parameters to calibrate the analysis results to obtain the resource consumption rate of the service node.

[0114] The duration determination submodule is used to determine the duration for which a service node can continuously provide services while maintaining its consumption rate, given the current available resources.

[0115] According to an embodiment of this application, the difference analysis submodule includes a change calculation unit and a change calibration unit.

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

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

[0118] According to an embodiment of this application, the resource allocation module 730 includes a first target determination submodule and a resource allocation submodule.

[0119] The first target determination submodule is used to determine the first target node from multiple service nodes based on the service duration of each service node, wherein the first target node has the shortest service duration.

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

[0121] According to an embodiment of this application, the resource allocation submodule includes a resource migration unit and a resource allocation unit.

[0122] The resource migration unit is used to migrate idle data blocks of a first preset data amount in the reserved space to the first target node when it is determined that the resource reserve in the server cluster is greater than a preset threshold.

[0123] The resource allocation unit is used to allocate resources to the first target node based on the idle data blocks of other service nodes (excluding the first target node) in the server cluster when the resource reserve in the reserved space is less than or equal to a preset threshold.

[0124] According to an embodiment of this application, the resource allocation unit includes a release calculation subunit, a second target determination subunit, and a resource invocation subunit.

[0125] 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.

[0126] The second target determination subunit is used to determine the second target node from among the service nodes other than the first target node.

[0127] The resource retrieval subunit is used to utilize resource management functions to retrieve idle data blocks of a second preset data volume from the second target node to the first target node.

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

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

[0130] The node extraction component is used to extract multiple target service nodes with preset resource availability levels from multiple service nodes.

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

[0132] According to an embodiment of this application, the resource management device 700 further includes a third target determination module, a resource release module, and a surplus update module.

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

[0134] The resource release module is used to release a preset number of occupied data blocks from the third target node to the reserved space using resource management functions.

[0135] The reserve update module is used to update the resource reserve in the reserved space. The occupied data blocks include a preset proportion of invalid data.

[0136] According to an embodiment of this application, the resource management device 700 further includes a preemption release module.

[0137] The forced-occupancy release module is used to release other occupied data blocks in the third target node, excluding the forced-occupancy data blocks, when a predetermined number of occupied data blocks include forced-occupancy data blocks. The forced-occupancy data blocks are data blocks in the third target node that are forcibly occupied and cannot be released.

[0138] According to an embodiment of this application, the resource management device 700 further includes a storage allocation module.

[0139] The storage allocation module is used to respond to received system operation commands and evenly distribute the storage space occupied by the system, excluding 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 storage service nodes.

[0140] According to an embodiment of this application, the resource management device 700 further includes a preemption determination module.

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

[0142] According to embodiments of this application, the resource management device 700 further includes an allocation notification module and a release notification module.

[0143] The allocation notification module is used to send the allocation information corresponding to the idle data block to the first target node when resources are allocated to the first target node, so as to notify the first target node to receive the resources.

[0144] The release notification module is used to send release information corresponding to the occupied data block to the third target node when resources are reclaimed from the third target node, so as to notify the third target node to release the resources.

[0145] According to an embodiment of this application, the resource management device 700 further includes a distributed acquisition module and a data synchronization module.

[0146] The distribution acquisition module is used to acquire resource distribution data in each service node after it is determined that resource allocation has been completed.

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

[0148] According to an embodiment of this application, the resource management device 700 further includes a composite determination module.

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

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

[0151] The fourth target determination module is used to determine the fourth target node from multiple service nodes based on the consumption change pattern of the service nodes, wherein the consumption change pattern of the fourth target node conforms to the growth pattern.

[0152] The resource update module is used to allocate resources for the fourth target node and update the current available resources of the fourth target node.

[0153] The duration update module is used to determine the service duration that each service node can continuously provide services based on the current available resources of each of the multiple service nodes, including the fourth target node.

[0154] According to an embodiment of this application, the fourth target determination module includes a growth calculation submodule, a comprehensive calculation submodule, and a fourth target determination submodule.

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

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

[0157] The fourth target determination submodule is used to sort the overall growth rates of multiple service nodes in order to determine the fourth target node with the highest overall growth rate among the multiple service nodes.

[0158] According to embodiments of this application, any multiple modules among the data acquisition module 710, duration determination module 720, and resource allocation module 730 can be merged into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module. According to embodiments of this application, at least one of the data acquisition module 710, duration determination module 720, and resource allocation module 730 can be at least partially implemented as hardware circuitry, 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-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware through any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, and firmware, or in any appropriate combination of any of these three implementation methods. Alternatively, at least one of the data acquisition module 710, duration determination module 720, and resource allocation module 730 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.

[0159] Figure 8 shows a block diagram of an electronic device suitable for implementing a resource management method according to an embodiment of this application.

[0160] As shown in FIG8, an electronic device 800 according to an embodiment of the present application 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 portion 808 into 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 an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include 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 application.

[0161] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804. Processor 801 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 802 and / or RAM 803. It should be noted that programs may also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in one or more memories.

[0162] According to embodiments of this application, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the input / output (I / O) interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 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 disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.

[0163] Referring to FIG9, this application also provides a non-transitory computer-readable storage medium 900, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The non-transitory computer-readable storage medium 900 carries one or more computer programs 910, which, when executed, implement the method according to the embodiments of this application.

[0164] According to embodiments of this application, the non-transitory computer-readable storage medium 900 may be a non-volatile non-transitory computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the non-transitory computer-readable storage medium 900 may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the non-transitory computer-readable storage medium 900 may include ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803 described above.

[0165] Referring to FIG10, embodiments of this application also include a computer program product 1000, which includes a computer program 1100 containing program code for performing the methods shown in the flowchart. When the computer program product 1000 is run in a computer system, the program code is used to enable the computer system to implement the resource management method provided in the embodiments of this application.

[0166] When the computer program is executed by the processor 801, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

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

[0168] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, it performs the functions defined in the system of this application embodiment. According to the embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0169] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0170] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0171] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.

[0172] The embodiments of this application have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of this application. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Without departing from the scope of this application, those skilled in the art can make various substitutions and modifications, all of which should fall within the scope of this application.

Claims

1. A resource management method, characterized in that, The method includes: Obtain historical resource consumption data for each of multiple service nodes in a server cluster, including composite nodes, wherein the composite node is a service node that integrates resource management functions; For each service node, based on the consumption change pattern obtained by analyzing the historical resource consumption data of the service node, the service duration for which the service node can continuously provide services while maintaining a consumption rate that matches the consumption change pattern with the current available resources is determined; and Based on the service duration of each of the multiple service nodes, the resource management function is used to allocate resources to the first target node determined from the multiple service nodes.

2. The method according to claim 1, characterized in that, The service duration for which a service node can continuously provide services, determined by analyzing the historical resource consumption data of the service node to identify consumption patterns and maintaining a consumption rate that matches these patterns with the current available resources, includes: Based on the acquisition period of the historical resource consumption data, the consumption change pattern is quantified using the discrete difference method to obtain consumption characteristic parameters. A difference analysis is performed between the currently available resource quantity and the historical resource remaining quantity in the historical resource consumption data, and the analysis results are calibrated by introducing the consumption characteristic parameters to obtain the resource consumption rate of the service node; and Determine the duration for which the service node continues to provide services while maintaining the consumption rate given the current available resources.

3. The method according to claim 2, characterized in that, The step of performing a difference analysis between the current available resource quantity and the historical remaining resource quantity in the historical resource consumption data, and calibrating the analysis results by introducing the consumption characteristic parameters, to obtain the resource consumption rate of the service node includes: Based on the difference between the current available resource quantity and the historical remaining resource quantity, calculate the rate of change of resource quantity within the acquisition period; and The consumption characteristic parameter is added to the rate of change to calibrate the rate of change, thus obtaining the consumption rate.

4. The method according to claim 1, characterized in that, The step of allocating resources to a first target node determined from the multiple service nodes based on their respective service durations, using the resource management function, includes: Based on the service duration of each of the multiple service nodes, a first target node is determined from the multiple service nodes, wherein the first target node has the shortest service duration; and Based on the free data blocks in the reserved space of the server cluster, and the free data blocks of other service nodes in the server cluster besides the first target node, resources are allocated to the first target node using the resource management function.

5. The method according to claim 4, characterized in that, The allocation of resources to the first target node using the resource management function, based on the free data blocks reserved in the server cluster and the free data blocks of other service nodes in the server cluster besides the first target node, includes: If it is determined that the remaining resource space in the reserved space of the server cluster is greater than a preset threshold, the resource management function is used to migrate idle data blocks of a first preset data amount in the reserved space to the first target node; or If the remaining resource balance 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 idle data blocks of the other service nodes besides the first target node.

6. The method according to claim 5, characterized in that, The allocation of resources to the first target node based on the idle data blocks of the service nodes other than the first target node, using the resource management function, includes: Based on the historical resource consumption data of the multiple service nodes, the resource release rate of each service node is calculated; and a second target node is determined from the service nodes other than the first target node; and Using the resource management function, idle data blocks of a second preset data amount in the second target node are called to the first target node.

7. The method according to claim 6, characterized in that, Determining the second target node from among the service nodes other than the first target node includes: The resource release rate of each service node is matched with a preset range, so as to determine the resource reserve level of each service node according to the preset mapping relationship between the preset range and the resource reserve level. Extract multiple target service nodes with a preset resource balance level from the multiple service nodes; and Based on the service duration of each target service node, a second target node is determined from a plurality of target service nodes, wherein the second target node is the node with the longest service duration among the plurality of target service nodes, and the resource reserve 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 includes: The growth rate of available resource balance in each of the service nodes is monitored in order to determine the third target node with the highest growth rate from among the multiple service nodes; Using 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 balance in the reserved space is updated. The occupied data blocks include a preset proportion of invalid data.

9. The method according to claim 8, characterized in that, The method further includes: If the predetermined number of occupied data blocks includes a forcibly occupied data block, the other occupied data blocks in the third target node, excluding the forcibly occupied data block, are released. The forcibly occupied 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 includes: In response to the received system operation command, the storage space in the system's occupied space, excluding the reserved space in the server cluster, is evenly distributed to multiple service nodes in the server cluster. The storage space is used to store the data generated by the services running on the service nodes.

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

12. The method according to any one of claims 8 to 11, characterized in that, The method further includes: When resources are allocated to the first target node, allocation information corresponding to the idle data block is sent to the first target node to notify it to receive the resources; or In the event that resources are reclaimed 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 includes: Once resource allocation is confirmed to be complete, obtain resource distribution data for each of the service nodes; and 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 includes: In the event of a failure of the composite node, a new composite node is determined from the other service nodes in the server cluster according to a preset rule associated with the node identifiers of the multiple service nodes. The new composite node is able to perform the resource management function based on the synchronized resource distribution data.

15. The method according to claim 1, characterized in that, The method further includes: Based on the consumption change pattern of the service nodes, a fourth target node is determined from the multiple service nodes, wherein the consumption change pattern of the fourth target node conforms to a growth pattern. Resource allocation is performed for the fourth target node to update the current available resources of the fourth target node; and Based on the current available resources of each of the multiple service nodes, including the fourth target node, the service duration for which each service node can continuously provide services is determined.

16. The method according to claim 15, characterized in that, The step of determining the fourth target node from among the multiple service nodes based on the consumption change pattern of the service nodes includes: For each of the service nodes, calculate the growth rate of multiple monitoring indicators of the service node in historical resource consumption data; Based on the preset weights corresponding to each of the monitoring indicators, the growth rates of multiple monitoring indicators are weighted and summed to obtain a comprehensive growth rate characterizing the consumption change pattern of the service node; and The overall growth rates of the multiple service nodes are ranked to determine the fourth target node with the highest overall growth rate from among the multiple service nodes.

17. The method according to claim 1, characterized in that, 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, and the consumption change pattern is used to describe the resource consumption characteristics exhibited by the service node during the execution of resource allocation and release.

18. A resource management device, characterized in that, The device includes: The data acquisition module is used to acquire the historical resource consumption data of each of the multiple service nodes, including composite nodes, in the server cluster, wherein the composite node is a service node that integrates resource management functions. The duration determination module is used to determine, for each service node, the service duration for which the service node can continuously provide services while maintaining a consumption rate that matches the consumption change pattern with the current available resources, based on the consumption change pattern obtained by analyzing the historical resource consumption data of the service node; and The resource allocation module is used to allocate resources to a first target node determined from the multiple service nodes based on the service duration of each of the multiple service nodes and by utilizing the resource management function.

19. An electronic device comprising: One or more processors; as well as Memory, used to store one or more computer programs. The characteristic feature is 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 17.

20. A non-transitory computer-readable storage medium storing a computer program or computer-readable instructions thereon, characterized in that, When the computer program or computer-readable instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 17.

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