Resource management methods, devices and electronic equipment
By acquiring the cost of the resource pool and cluster used by the application, and combining the data center components and the cost sharing of downstream applications, the problem of inaccurate cost in existing technologies is solved, and accurate accounting of application costs and balanced resource management are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MASHANG CONSUMER FINANCE CO LTD
- Filing Date
- 2023-02-01
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies use an amortization method to calculate application costs, resulting in inaccurate costs that fail to accurately reflect actual application consumption and affect the accuracy of resource management.
By obtaining the cost of the resource pool and cluster used by the application, combined with the components of the data center and the shared costs of downstream applications, the original and shared costs of the application are determined, and these are added together to obtain the final resource usage cost, taking into account the impact of servers, data center components and downstream applications.
It improves the accuracy of application cost accounting, can truly reflect the actual consumption of applications, and achieves balanced management of resource costs.
Smart Images

Figure CN116126536B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and in particular to a resource management method, apparatus and electronic device. Background Technology
[0002] With the continuous development of Internet technology, all kinds of applications have emerged to meet the needs of different users. In order to understand the cost of each application, it is necessary to calculate the cost of each application.
[0003] In some scenarios, when calculating application costs, the first step is to calculate the monthly cost of the data center. Then, based on the actual number of servers used, the monthly cost is evenly distributed across each server. Finally, the cost of each server is evenly distributed across the applications using that server. However, because each application uses different server resources and consumes more than just server costs, this distribution method leads to inaccurate cost calculations for each application, failing to accurately reflect the actual costs incurred. Consequently, resource management based on application-specific costs can result in biases and inaccuracies. Summary of the Invention
[0004] This application provides a resource management method, apparatus, and electronic device to improve the accuracy of the calculated cost of each application, thereby improving the accuracy of resource management.
[0005] Firstly, this application provides a resource management method applied to an application service system. The application service system includes at least one data center, in which at least one resource pool and at least one server are deployed. Each resource pool provides resources to one or more applications and includes at least one cluster. A mapping relationship exists between the resource pool and the server. The server provides an interface for at least one application to use resources from the resource pool. The application service system corresponds to a resource cost accounting system, which includes a data configuration module, an application topology maintenance module, and a cost accounting module. The data configuration module is used to acquire and classify data from the application server system in real time. The application topology maintenance module is used to update the application topology relationships in the application service system in real time, including: acquiring data from the data configuration module, classifying and storing the data, and storing the data, classifying and storing the data, and updating the application topology relationships in the application service system in real time. The module obtains the resource costs of each resource pool used by each application, as well as the clusters corresponding to each application within each resource pool. The resource cost of any resource pool is determined based on the total cost of servers mapped to that resource pool, including the costs of multiple components of the data center where the corresponding server is located. The module then determines the original cost of each application based on the cost of the corresponding resource pool and the corresponding cluster. Based on the application topology relationships stored in the application topology maintenance module, the module determines the allocated cost of downstream applications corresponding to each application, where the application topology relationships represent the dependencies between the applications. The module then sums the original costs of each application and the allocated costs of the corresponding applications to obtain the final resource usage cost of each application. Finally, the module performs resource cost balancing management on the application service system based on the final resource usage cost of each application.
[0006] Secondly, this application provides a resource management device applied to an application service system. The application service system includes at least one data center, in which at least one resource pool and at least one server are deployed. Each resource pool provides resources to one or more applications and includes at least one cluster. A mapping relationship exists between the resource pool and the server. The server provides an interface for at least one application to use the resources in the resource pool. The application service system corresponds to a resource cost accounting system, which includes a data configuration module, an application topology maintenance module, and a cost accounting module. The data configuration module is used to acquire and classify data in the application server system in real time. The application topology maintenance module is used to update the application topology relationships in the application service system in real time, including: an acquisition module for acquiring the resources used by each application from the data configuration module. The system includes: a resource cost for each resource pool and the cluster corresponding to each application within each resource pool; the resource cost of any resource pool is determined based on the total cost of servers mapped to that resource pool, including the costs of multiple components of the data center where the corresponding server is located; a determination module for determining the original cost of each application based on the cost of the corresponding resource pool and the corresponding cluster; the determination module for determining the allocated cost of downstream applications corresponding to each application based on the application topology relationships stored in the application topology maintenance module, wherein the application topology relationships represent the dependencies between the applications; an overlay module for overlaying the original cost of each application and the allocated cost of the corresponding application to obtain the final resource usage cost of each application; and a management module for performing resource cost balancing management of the application service system based on the final resource usage cost of each application.
[0007] Thirdly, this application provides an electronic device, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method as described in the first aspect.
[0008] Fourthly, this application provides a computer-readable storage medium that, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the method described in the first aspect.
[0009] As can be seen, the technical solution disclosed in this application can determine the original cost of the application based on the multiple components of the server room and the cluster of resource pools used by the application, and add the cost of the downstream application to the original cost as the final cost of the application. Since the calculated cost of the application not only considers the cost of the server, but also the cost of the multiple components of the server room and the cost of the downstream application, it can truly reflect the actual cost consumed by the application, improve the accuracy of the calculated application cost, and thus improve the accuracy of resource management when using the final resource usage cost of the application to perform resource cost balancing management of the application service system. Attached Figure Description
[0010] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:
[0011] Figure 1 A schematic diagram of the structure of an application service system and a cost accounting system provided in the embodiments of this application;
[0012] Figure 2 and Figure 3 This application provides a schematic diagram of the structure of a cost accounting system according to an embodiment of the present application.
[0013] Figure 4 A flowchart illustrating a resource management method provided in an embodiment of this application;
[0014] Figure 5 This is a schematic diagram illustrating the topological relationships between applications provided in the embodiments of this application;
[0015] Figure 6 A schematic diagram illustrating the relationship between the application's business units and application service interfaces provided in this application embodiment;
[0016] Figure 7 This is a schematic diagram of the structure of a resource management device provided in an embodiment of this application;
[0017] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0019] The terms "first," "second," etc., used in this specification and claims are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein. Furthermore, in this specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0020] First, let's explain the terminology used in the embodiments of this application:
[0021] The Configuration Management Database (CMDB) is a logical database that contains information about the entire lifecycle of configuration items and the relationships between them (including relationships between data center resources, common components and IT resources, applications and resources, applications and common components, real-time associations, non-real-time communication relationships, and dependencies).
[0022] The application topology diagram graphically displays the real-time status of all service components of the application, as well as the dependencies and call relationships between various applications. It shows the topology of the service component network, the dependencies of the overall business of the components, and presents the throughput and response time of each communication link in real time.
[0023] The cost of a data center includes the cost of its network equipment, the rental cost of server racks, the cost of accessories, and the monthly depreciation cost of the servers themselves.
[0024] The cost of the resource pool, and the total cost of the data center resources used by each resource pool.
[0025] The cost of downstream applications allocated by the application is calculated based on the application topology call relationships and call frequency, representing the cost of downstream applications that the application depends on.
[0026] The cost of a business unit, the cost of a business unit provided by the application.
[0027] As mentioned above, when calculating application costs, the monthly cost of the data center is first calculated. Then, based on the actual number of servers used, the monthly cost is evenly distributed across each server. Finally, the cost of each server is evenly distributed across the applications using that server. Because each application uses different server resources and consumes more than just server costs, this distribution method leads to inaccurate cost calculations for each application. It fails to accurately reflect the actual costs incurred by the applications, thus impacting resource management based on individual application costs and introducing errors.
[0028] Therefore, this application provides a resource management method applied to an application service system. The application service system includes: an application, a data center, a cluster, a resource pool, and servers. The data center includes a resource pool and servers, and the resource pool and servers have a mapping relationship. The resource pool includes a cluster and is used to provide resources to the application. The resource management method includes: obtaining the resource cost of the resource pool used by the application, and the cluster in the resource pool used by the application. The cost of the resource pool is determined based on the total cost of the servers mapped to the resource pool. The total cost includes the cost of multiple components of the data center where the servers are located; determining the original cost of the application based on the cost of the resource pool and the cluster; determining the cost-sharing of the downstream applications of the application based on the application's topology; determining the final resource usage cost of the application based on the original cost and the shared cost; and performing resource cost balancing management on the application service system based on the final resource usage cost of the application.
[0029] The technical solution disclosed in this application can determine the original cost of an application based on the multiple components of the server room and the cluster of resource pools used by the application. The cost of the downstream applications and the original cost are used as the final cost of the application. Since the calculated cost of the application not only considers the cost of the server, but also the cost of the multiple components of the server room and the cost of the downstream applications, it can truly reflect the actual cost consumed by the application, improve the accuracy of the calculated cost of the application, and thus enable the application service system to perform resource cost balancing management by using the final resource usage cost of the application.
[0030] It should be understood that the resource management methods provided in the embodiments of this application can all be executed by electronic devices or software installed in electronic devices, specifically by terminal devices or server devices. The terminal device may include devices such as laptops, desktop computers, and vehicle-mounted terminals, while the server may include an independent physical server, a server cluster consisting of multiple servers, or a cloud server capable of cloud computing. Optionally, the resource management method may be executed by the same electronic device or by different electronic devices.
[0031] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0032] First, combine Figures 1 to 3 The application service system provided in this application embodiment will be described. The resource management method provided in this application embodiment is applied to the application service system 10, which includes at least one computer room (e.g., Figure 1 As shown in the diagram, data centers 1 to N each contain at least one resource pool (this application illustrates this by using one resource pool deployed in one data center as an example). Figure 1 Resource pools 1 to N shown are deployed in data centers 1 to N respectively, and at least one server (this application illustrates the deployment of one server in one data center as an example, such as...). Figure 1 Servers 1 to N shown are deployed in data centers 1 to N respectively. A resource pool is used to provide resources to one or more applications. A resource pool includes at least one cluster (such as...). Figure 1 The resource pools 1 to N shown include clusters 1 to N respectively. A mapping relationship exists between each resource pool and the server, for example... Figure 1 The resource pool 1 shown corresponds to server 1, resource pool 2 corresponds to server 2, and resource pool N corresponds to server N. Each server is used to provide an interface for at least one application to use the resources in the resource pool. The application service system 10 corresponds to a resource cost accounting system 20. The resource management method can be completed by calling the cost accounting system 20.
[0033] The cost accounting system 20 includes a data configuration module 201, an application topology maintenance module 202, and a cost accounting module 203. The data configuration module 201 is used to acquire and classify the data in the application service system 10 in real time. The application topology maintenance module 202 is used to update the application topology relationship in the application service system in real time. The cost accounting module 203 is used to calculate the final resource usage cost of each application and the cost of the business unit corresponding to each application.
[0034] Specifically, resource pools include, but are not limited to, resource pools corresponding to financial clouds, big data, databases, middleware, data storage, other components, and application components. Each server belongs to a specific resource pool; there is a mapping relationship between servers and resource pools. Each server corresponds to one resource pool, and each resource pool contains at least one cluster. Each cluster can be accessed by at least one application. Each server provides an interface for each application to access the resource pool, allowing applications to access resources within the pool.
[0035] The data configuration module 201 can acquire and categorize data from the application service system in real time. Specifically, it pulls basic data from the configuration management database (CMDB), a logical database containing information on the entire lifecycle of configuration items in the application service system (including servers, network devices, accessories, leased lines, virtual machines, common components, applications, domain names, application service interfaces of business units, and data of business units), as well as the relationships between configuration items (including relationships between data center resources, common components and IT resources, applications and resources, applications and common components, real-time associations, non-real-time communication relationships, and application topology relationships between applications). The application topology maintenance module 202 updates the application topology relationships in the application service system in real time. Application topology relationships refer to the dependency and call relationships between various applications in the application service system. The cost accounting module 203 calculates the final resource usage cost of each application.
[0036] Furthermore, such as Figure 2 As shown, for the cost accounting system, the data configuration module is used to pull basic data from the CMDB to form a basic data layer. The cost accounting module 203 includes a rule configuration layer, in which accounting rules are set. The accounting rules can be: first, determine the original cost of the application, then determine the allocated cost of the application, and finally add up the original cost and the allocated cost of the application to obtain the final resource usage cost of each application. After calculating the final resource usage cost of each application, the final resource cost of each application is displayed in the form of a cost data report or a cost data Sankey diagram through the cost display layer.
[0037] like Figure 3 As shown, the specific process of the cost accounting system is as follows: First, a CMDB system is built. The CMDB system contains information on the entire lifecycle of configuration items in the application service system (including servers, network devices, accessories, leased lines, virtual machines, common components, applications, domain names, application service interfaces of business units, and data of business units, etc.) as well as the relationships between configuration items (including relationships between data center resources, relationships between common components and IT resources, relationships between applications and resources, relationships between applications and common components, real-time association relationships, and non-real-time communication relationships, etc.). This provides the basic data upon which the cost accounting system depends. The following principles are followed when building the CMDB system:
[0038] Models and fields can be added based on consumption scenarios and needs; metadata maintenance should be as simple as possible; data entry and exit should be convenient, data discovery should be convenient, data reception should be convenient, data subscription interfaces should be convenient, and data query interfaces should be convenient; view consumption should provide data to consumers in the form of views composed of multiple tables.
[0039] Secondly, construct an application topology diagram within the application service system. Specifically, this involves building real-time status data for all service components of the application, reflecting the call dependencies between various applications. This provides the foundational data for calculating the cost allocation of downstream applications or the cost of application business units. The application topology diagram should display information in the following dimensions:
[0040] Relationships between application and service components: such as the middleware, big data, and databases used by the application. The relationships between application and service components can be used to verify the accuracy of the application and service component information maintained by the CMDB.
[0041] Application-to-application call relationships: The connections between applications represent application dependencies. This allows you to view business relationships within complex business systems and provides the cost accounting system with the call relationships and call frequencies that account for application costs.
[0042] Relationship between applications and application service interfaces: Collect a list of application service interfaces for each application and the frequency of interface calls for each application service interface.
[0043] Relationship between application service interfaces and business units: Based on the key services provided by the application service interfaces, mark the correspondence between the key application service interfaces and business units.
[0044] For a cost accounting system, the data configuration module retrieves basic data and application topology diagrams. To avoid wasting time by repeatedly retrieving this data when the cost accounting system uses it later, the retrieved basic data and application topology diagrams can be stored in a database. The cost accounting module in the cost accounting system includes a cost calculation module and a cost rule configuration module. The cost rule configuration module configures the cost rules, and the cost calculation module calculates the cost of each application according to the configured cost rules to obtain the final resource usage cost of each application. Then, the cost display module displays the final resource usage cost of each application and stores the calculated final resource usage cost of each application in the storage database for later use. The cost display module displays the final resource usage cost of each application in the form of reports, charts, and Sankey diagrams, among other things.
[0045] The following is combined Figures 1 to 3 The application service system and cost accounting system mentioned above illustrate the resource management method described in the embodiments of this application. Please refer to [link / reference]. Figure 4 This is a flowchart illustrating a resource management method provided in an embodiment of this application, applied to the application service system mentioned in the above embodiments. The resource management method may include:
[0046] Step S401: Obtain from the data configuration module the resource costs of each resource pool used by each application, as well as the clusters corresponding to each application in each resource pool.
[0047] The resource cost of any resource pool is determined based on the total cost of the servers that are mapped to any resource pool. The total cost includes the cost of multiple components of the data center where the corresponding server is located.
[0048] Specifically, the data configuration module can retrieve and store data from the application service system in real time from the CMDB. This means the data configuration module stores information about the entire lifecycle of configuration items in the application service system (including servers, network devices, accessories, leased lines, virtual machines, common components, applications, domain names, application service interfaces of business units, and data of business units), as well as the relationships between configuration items (including relationships between data center resources, common components and IT resources, applications and resources, applications and common components, real-time associations, non-real-time communication relationships, and application topology relationships between applications). Therefore, when calling the cost accounting system, the resource costs of the resource pools used by each application, as well as the clusters corresponding to each application within each resource pool, can be directly obtained from the data configuration module of the cost accounting system. Here, a resource pool refers to a cluster that provides various IT resources to an application. Resource pools include different types, and each type of resource pool includes at least one cluster. The clusters in the resource pools used by an application can be determined using data provided by the CMDB. The CMDB provides the clusters of each resource pool, the IP addresses of the clusters in each resource pool, and the applications associated with the clusters. Therefore, the clusters in the resource pools used by an application can be determined using the data provided by the CMDB. The types of resource pools include, but are not limited to, resource pools corresponding to financial cloud, big data, databases, middleware, data storage, other components, and application components.
[0049] Each server belongs to a resource pool, meaning there is a mapping relationship between servers and resource pools. The components of a data center include, but are not limited to, network equipment, server racks (IDC), accessories, and servers. Each component of a data center has a corresponding cost.
[0050] Before obtaining the resource cost of the resource pool used by the application, it is necessary to calculate the total cost of each server. Then, based on the mapping relationship between the resource pool and the server, the total cost of each server is used as the resource pool cost of the corresponding resource pool.
[0051] In a specific implementation, the method for calculating the total cost of each server may include: obtaining the costs of multiple components of each data center from the data configuration module. The costs of multiple components of each data center include the cost of network equipment, storage accessories, servers, and racks. The costs of multiple components of each data center are allocated to the servers belonging to the corresponding data center to obtain the total cost of each server. Based on the mapping relationship between servers and resource pools stored in the data configuration module, the resource pool corresponding to each server is determined, and the total cost of each server is determined as the cost of the resource pool corresponding to the corresponding server.
[0052] The network equipment includes, but is not limited to, switches and routers, while storage components include, but are not limited to, hard drives and memory cards. The cost of each component is allocated to each server, and the sum of the costs of each component allocated to each server is the total cost of the server. For each server, there is a mapping relationship with a corresponding resource pool. After determining the total cost of each server, the total cost of each server is determined as the cost of the resource pool corresponding to that server.
[0053] Regarding the total cost of each server, the allocation method for the costs of different components within each data center differs, thereby improving the accuracy of cost allocation for each server within each data center. In one possible implementation, the costs of multiple components within each data center are allocated to the servers within that data center to obtain the total cost of each server. This includes: allocating the cost of network equipment in each data center to each server in the area where the network equipment is located; allocating the cost of server racks in each data center to each server within the data center containing those racks; allocating the cost of storage components in each data center to each server in the corresponding data center according to the capacity of the servers using those storage components; determining the depreciation cost of each server in each data center based on monthly depreciation; and for each server in each data center, summing the allocated costs of network equipment, server racks, storage components, and depreciation costs to obtain the total cost of each server in each data center.
[0054] Specifically, taking a data center as an example, the cost of network equipment allocated to a server within the data center can be distributed according to the area where the network equipment and servers are located. The cost of network equipment in the same area is evenly distributed among the servers in that area. Specifically, the total cost of network equipment in the area is calculated, along with the total number of servers in the same area. The ratio of the total cost of network equipment in the area to the total number of servers in the same area is then calculated to obtain the cost of network equipment allocated to each server. The cost of server racks can be allocated according to the data center. Specifically, the number of servers in the data center and the total rental cost of server racks are calculated, and then the total rental cost of server racks is compared to the number of servers to obtain the cost of server racks allocated to each server. The cost of storage components can be allocated according to the proportion of storage component capacity used by each server. Specifically, the total cost of storage components and the capacity of storage components used by each server are determined, and the product of the total cost of storage components and the ratio of the capacity used by each server to the total capacity of storage components is calculated to obtain the cost of storage components allocated to each server. The depreciation cost of servers is calculated on a monthly basis.
[0055] Step S403: Determine the original cost of each application based on the cost of the corresponding resource pool and the corresponding cluster.
[0056] Specifically, each resource pool consists of at least one cluster. When an application uses resources from a resource pool, it uses the resources provided by the specific cluster within that resource pool. To determine the original cost of an application, the number of clusters in the corresponding resource pool used by each application is obtained from the data configuration module. The cost of the corresponding resource pool for each application is then evenly distributed across each cluster within that resource pool to obtain the cost of each cluster in the corresponding resource pool for each application. The number of applications accessing each cluster is then determined, and the original cost of each application is calculated based on the cost of each cluster and the number of applications accessing each cluster.
[0057] More specifically, the number of clusters in the resource pool, the IP addresses of the clusters, and the applications associated with the clusters (the applications that access the clusters) can be determined by the data retrieved from the CMDB by the data configuration module. After determining the cost of the resource pool, the cost of the resource pool is allocated to each cluster in the resource pool, and then the cost of each cluster is allocated to each application associated with each cluster to obtain the original cost of each application.
[0058] Step S405: Determine the cost-sharing of downstream applications corresponding to each application based on the application topology relationships stored in the application topology maintenance module; wherein, the application topology relationships are used to represent the dependencies between applications.
[0059] Specifically, application topology refers to the application topology diagram, which graphically displays the real-time status of all service components of an application, showing the calling and dependency relationships between applications. Downstream applications refer to applications that have calling relationships with the current application. After determining the original cost of the application, the cost allocated to downstream applications is then determined.
[0060] In one possible implementation, determining the allocated cost of downstream applications corresponding to each application based on the application topology relationships stored in the application topology maintenance module includes: identifying downstream applications that have topology call relationships with each application based on the application topology relationships stored in the application topology maintenance module; determining the first allocated cost and the original cost of the downstream applications corresponding to each application; determining the third number of times each application calls its corresponding downstream applications and the total fourth number of times the downstream applications corresponding to each application are called; and determining the allocated cost of the downstream applications corresponding to each application based on the first allocated cost, the original cost, the third number of calls, and the fourth number of calls.
[0061] Specifically, the original cost of a downstream application can be determined by the cost of the resource pool used by the downstream application and the cluster in the resource pool. The specific determination method can be determined according to step S403, which will not be repeated here in this embodiment. The first allocated cost of a downstream application is the allocated cost of the downstream application to its next layer of downstream applications. When determining the allocated cost of the current application, it starts from the bottom leaf node and is allocated layer by layer according to the call relationship and the number of calls until it reaches the current application. The third number of calls refers to the number of times the current application calls the downstream application, and the fourth number of calls refers to the total number of times the downstream application is called by multiple upstream applications.
[0062] When determining the allocated cost of each downstream application based on the first allocated cost, the original cost, the third call count, and the fourth call count of each application, the following method can be used: Sum the first allocated cost and the original cost of each downstream application to obtain the sum of each application's cost; calculate the ratio of the sum of each application's cost to the total fourth call count of each application's downstream applications; multiply the ratio of each application's cost to the third call count of each application's downstream applications to obtain the allocated cost of each application's downstream applications.
[0063] More specifically, it can be expressed as follows: Amortized cost of downstream application = (Original cost of downstream application + First amortized cost of downstream application) / Fourth call count The third is the number of calls. It is worth noting that an application can have one or more downstream applications, and the cost-sharing of an application's downstream applications includes the sum of the cost-sharing of all its downstream applications.
[0064] The following example illustrates the cost allocation for applications:
[0065] Please see Figure 5 , Figure 5 This shows the application topology relationships between various applications, from... Figure 5 As shown in the application topology, applications B and C are downstream applications of application A, applications D and E are downstream applications of application B, application F is a downstream application of applications D and E, and applications G and E are downstream applications of application C. Figure 5 The original cost of each application, as determined by steps S401 and S403, is 100 yuan. The number of times each application calls downstream is as follows: Figure 5 The numbers on the connection between two applications are used to calculate costs. For example, application A calls downstream application B 25 times and application A calls downstream application C 50 times. Here, application A is the target application that needs to be calculated, i.e., the application whose final resource usage cost needs to be determined. The cost allocation for each application is calculated according to the formula for allocating costs to downstream applications. The specific formula is as follows:
[0066] The cost allocated by application D to its downstream application F is calculated as follows: 100 / (50+25)×50 = 100 / 75 50 = 66.67.
[0067] The cost allocated by application E to its downstream application F is calculated as follows: 100 / (50+25)×25 = 100 / 75 25 = 33.33.
[0068] The cost allocated by application B to its downstream application D is calculated as follows: (100 + 66.67) / (50 + 25) × 50 = (100 + 66.67) / 75 50 = 111.11.
[0069] The cost allocated by application B to its downstream application E is calculated as follows: (100 + 33.33) / (50 + 25) × 25 = (100 + 33.33) / 75 25 = 44.44.
[0070] The cost allocated by application C to its downstream application G is 100 / (25+25)×25 = 100 / 50 25 = 50.
[0071] The cost allocated by application C to its downstream application E is calculated as follows: 100 / (25+25)×25 = 100 / 50 25 = 50.
[0072] The cost allocated by application A to its downstream application B is calculated as follows: [100 + (111.11 + 44.44)] / (25 + 50) × 25 = ((100 + 155.55) / 75 × 25 = 255.55 / 75 × 25 = 85.18).
[0073] The cost allocated by application A to its downstream application C is calculated as follows: [100 + (50 + 50)] / (25 + 50) × 50 = (100 + 100) / 75 × 50 = 200 / 75 × 50 = 133.33.
[0074] The cost allocated to downstream applications of application A = the cost allocated by application A to its downstream application B + the cost allocated by application A to its downstream application C = 85.18 + 133.33 = 218.51.
[0075] Step S407: The original costs of each application and the allocated costs of the corresponding applications are added together to obtain the final resource usage cost of each application.
[0076] Specifically, the final resource usage cost can be obtained by adding the original cost and the allocated cost. For example, the above... Figure 5 In the example, the original cost of application A is 100, and the cost allocated to its downstream applications is 700. Therefore, the final resource usage cost of application A is 700 + 100 = 800.
[0077] Step S409: Perform resource cost balancing management on the application service system based on the final resource usage cost of each application.
[0078] Specifically, after obtaining the final resource usage cost of each application, resource cost balancing management is carried out on the entire application service system according to the final resource usage cost of each application. Specifically, the calculated final resource usage cost of each application can provide a reference for formulating IT asset budgets, and can also serve as a reference for evaluating IT resource costs for internal business and external cooperation projects. By understanding the final resource usage cost of each application, the overall resource cost of the application service system can be understood, and the costs of the various components of the application service system can be allocated in a balanced manner according to the final resource usage cost of each application. In this way, the calculated final resource usage cost of each application is more accurate, and the costs of the applications and various components of the entire application service system can be managed more evenly.
[0079] The technical solution disclosed in this application can determine the original cost of an application based on the multiple components of the server room and the cluster of resource pools used by the application. The cost of the downstream applications and the original cost are used as the final cost of the application. Since the calculated cost of the application not only considers the cost of the server, but also the cost of the multiple components of the server room and the cost of the downstream applications, it can truly reflect the actual cost consumed by the application, improve the accuracy of the calculated cost of the application, and thus enable the application service system to perform resource cost balancing management by using the final resource usage cost of the application.
[0080] In one possible implementation, after summing the original costs and allocated costs of each application to obtain the final resource usage cost of each application, the cost of each business unit within each application can be further determined. The following section uses a target application as an example to illustrate how to determine the cost of a business unit within an application. The target application can be any one of the applications. It should be noted that this application only uses a target application as an example; for other applications, the cost of the business units within the corresponding application can be determined using the method described below.
[0081] In specific implementation, determining the cost of the target business unit in the target application may include: determining from the data configuration module the N application service interfaces corresponding to the target business unit of the target application, the first number of times each of the N application service interfaces is called, and the business volume of the target business unit, where N is an integer not less than 1, the target application includes multiple business units, and the target business unit is any one of the multiple business units; determining from the data configuration module the total second number of times each application's N application service interfaces are called at the gateway entry point; and determining the cost of the target business unit of each application based on the first number of times each of the N application service interfaces is called, the business volume of the target business unit, the second number of times, and the total cost of the server corresponding to each application.
[0082] Specifically, the target application comprises multiple business units. Each business unit is provided by one or more application service interfaces of the application at the system gateway entry point. There is a corresponding relationship between each business unit and the application service interface providing the service. A business unit refers to the business services provided by the system, such as single deduction, batch deduction, payment on behalf, and authentication. The first number of calls to each application service interface can be the number of calls initiated by the upstream application of the target application, or the number of calls directly initiated by the user. The total second number of calls refers to the total number of calls to all application service interfaces of the target application by its upstream applications and / or the number of calls directly initiated by the user. The business volume of the target business unit refers to the actual number of transactions performed by the business unit, such as the number of loan disbursements and authentication transactions each month. In this way, the total cost of each application is calculated. Because the calculated cost of the target application considers not only the server cost but also the costs of multiple components of the data center and the shared costs of downstream applications, it can accurately reflect the actual costs consumed by the application, improving the accuracy of the calculated application cost. This allows for resource cost balancing management of the application service system using the final resource usage cost of the application. Using this total cost to calculate the cost of each business unit in the application improves the accuracy of the calculated costs for the business units.
[0083] In one possible implementation, the cost of the target business unit of the target application is determined based on the first number of times each of the N application service interfaces of the target application is invoked, the business volume of the target business unit, the second number of times of invocation, and the total cost of the server corresponding to the target application. This includes: calculating the ratio of the first and second number of invocations for each application service interface of the target application, and multiplying the ratio result by the total cost of the server corresponding to the target application to obtain the invocation cost of each application service interface in the target application; summing the invocation costs of each application service interface in the target application to obtain the invocation cost of the target business unit of the target application; and calculating the ratio of the invocation cost of the target business unit of the target application to the business volume of the target business unit to obtain the cost of the target business unit of the target application. This method calculates the cost of each application's business unit by combining the call cost of each application service interface with the total cost of the application. Because the calculated total cost of the target application considers not only server costs but also the costs of multiple components in the data center and the shared costs of downstream applications, it accurately reflects the actual costs incurred by the application, improving the accuracy of the calculated application costs. This allows for resource cost balancing management of the application service system using the final resource usage cost of the application. Using this total cost to calculate the cost of each business unit of the application further improves the accuracy of the calculated costs for each business unit.
[0084] More specifically, the cost of the target business unit can be calculated using the following formula:
[0085] Cost of the target business unit = (Number of first calls to application service interface 1 / Number of second calls) Total cost + Number of first calls to application service interface 2 / Number of second calls Total cost + ... + (First call count / Second call count of application service interface N) Total cost / Business volume.
[0086] Here is an example, such as Figure 6 The diagram illustrates the relationship between the application's business units and application service interfaces:
[0087] According to the method described above in the embodiments of this application, the total cost of the payment system gateway application paycore is 50,000, the total number of times all application service interfaces of the application paycore are called is 1,000,000, the number of times application service interface 1 (loan receiving) of the loan disbursement business unit is called is 200,000, the number of times application service interface 2 (loan query) of the loan disbursement business unit is called is 50,000, the number of times application service interface 3 (authentication acceptance) of the authentication business unit is called is 150,000, the number of times application service interface 4 (authentication SMS sending) of the authentication business unit is called is 100,000, the number of times application service interface 5 (authentication query) of the authentication business unit is called is 50,000, the business volume of the loan disbursement business unit is 200,000, and the business volume of the authentication business unit is 250,000.
[0088] According to the cost calculation formula for the target business unit mentioned above:
[0089] Cost of the loan disbursement business unit =
[0090] (200000 / 1000000) 50000+50000 / 1000000 50000) / 200000=0.0625.
[0091] The cost of the authentication business unit =
[0092] 150000 / 1000000 50000+100000 / 1000000 50000+50000 / 1000000 50000 / 250000=0.06.
[0093] In addition, with the above Figure 4Corresponding to the resource management method shown, this application also provides a resource management device. Figure 7 This is a schematic diagram of the structure of a resource management device 700 provided in an embodiment of this application, including:
[0094] The acquisition module 701 is used to obtain the resource cost of each resource pool used by each application from the data configuration module, as well as the clusters in each resource pool corresponding to each application. The resource cost of any resource pool is determined based on the total cost of the servers that have a mapping relationship with any resource pool. The total cost includes the cost of multiple components of the data center where the corresponding server is located.
[0095] Module 702 is used to determine the original cost of each application based on the cost of the corresponding resource pool and the corresponding cluster.
[0096] The determination module 702 is also used to determine the cost allocation of downstream applications corresponding to each application based on the application topology relationships stored in the application topology maintenance module; wherein, the application topology relationships are used to represent the dependencies between applications.
[0097] The overlay module 703 is used to overlay the original costs of each application and the allocated costs of the corresponding applications to obtain the final resource usage cost of each application.
[0098] Management module 704 is used to perform resource cost balancing management of the application service system based on the final resource usage cost of each application.
[0099] The technical solution disclosed in this application can determine the original cost of an application based on the multiple components of the server room and the cluster of resource pools used by the application. The cost of the downstream applications and the original cost are used as the final cost of the application. Since the calculated cost of the application not only considers the cost of the server, but also the cost of the multiple components of the server room and the cost of the downstream applications, it can truly reflect the actual cost consumed by the application, improve the accuracy of the calculated cost of the application, and thus enable the application service system to perform resource cost balancing management by using the final resource usage cost of the application.
[0100] In one possible implementation, the acquisition module 701 is further configured to acquire the costs of multiple components of each data center from the data configuration module. The costs of the multiple components of each data center include the costs of network equipment, storage accessories, servers, and racks. It also includes: an allocation module, configured to allocate the costs of the multiple components of each data center to the servers belonging to the corresponding data center, obtaining the total cost of each server; and a determination module 702, configured to determine the resource pool corresponding to each server based on the mapping relationship between servers and resource pools stored in the data configuration module; and to determine the total cost of each server as the cost of the resource pool corresponding to the corresponding server.
[0101] In one possible implementation, the resource management device further includes an allocation module, which is used to allocate the cost of network equipment in each data center to each server in the area where the network equipment is located; allocate the cost of server racks in each data center to each server in the data center where the server racks are located; allocate the cost of storage components in each data center to each server in the corresponding data center according to the capacity of the servers using the storage components; determine the depreciation cost of each server in the corresponding data center according to monthly depreciation; and for each server in each data center, add up the cost of network equipment allocated to each server, the cost of server racks allocated to each server, the cost of storage components allocated to each server, and the depreciation cost of each server to obtain the total cost of each server in each data center.
[0102] In one possible implementation, the data configuration module includes a target application in each application, where the target application refers to any one of the applications; the determining module 702 is further configured to determine from the data configuration module N application service interfaces corresponding to the target business unit of the target application, the first number of times each of the N application service interfaces is called, and the business volume of the target business unit, where N is an integer not less than 1, and the target application includes multiple business units, where the target business unit is any one of the multiple business units;
[0103] The total second number of times the N application service interfaces of the target application are called at the gateway entry point is determined from the data configuration module; the cost of the target business unit of the target application is determined based on the first number of times the N application service interfaces of the target application are called respectively, the business volume of the target business unit, the second number of times, and the total cost of the server corresponding to the target application.
[0104] In one possible implementation, when determining the cost of the target business unit of the target application based on the first number of times the N application service interfaces of the target application are called, the business volume of the target business unit, the second number of times of calls, and the total cost of the server corresponding to the target application, the determining module 702 performs the following steps:
[0105] The ratio of the first and second call counts of each application service interface of the target application is calculated, and the ratio result is multiplied by the total cost of the server corresponding to the target application to obtain the call cost of each application service interface in the target application.
[0106] The call cost of each application service interface in the target application is summed to obtain the call cost of the target business unit of the target application.
[0107] The cost of the target business unit of the target application is obtained by calculating the ratio of the call cost of the target business unit to the business volume of the target business unit.
[0108] In one possible implementation, when determining the allocated cost of downstream applications corresponding to each application based on the application topology relationships stored in the application topology maintenance module, the determining module 702 performs the following steps: determining the downstream applications that have topology call relationships with each application based on the application topology relationships stored in the application topology maintenance module; determining the first allocated cost and the original cost of the downstream applications corresponding to each application; determining the third number of times each application calls the downstream applications corresponding to each application and the total fourth number of times the downstream applications corresponding to each application are called; and determining the allocated cost of the downstream applications corresponding to each application based on the first allocated cost, the original cost, the third number of calls, and the fourth number of calls.
[0109] In one possible implementation, when determining the allocated cost of each application's downstream application based on the first allocated cost, the original cost, the third call count, and the fourth call count of each application, the determining module 702 performs the following steps: summing the first allocated cost and the original cost of each application's downstream application to obtain the sum of each application; calculating the ratio of the sum of each application to the total fourth call count of each application's downstream application; and multiplying the ratio of each application to the third call count of each application's downstream application to obtain the allocated cost of each application's downstream application.
[0110] In one possible implementation, when determining the original cost of each application based on the cost of the corresponding resource pool and the corresponding cluster, the determining module 702 performs the following steps: obtaining the number of clusters in the corresponding resource pool of each application from the data configuration module; allocating the cost of the corresponding resource pool of each application to each cluster in the corresponding resource pool to obtain the cost of each cluster in the corresponding resource pool of each application; determining the number of applications accessing each cluster; and calculating the original cost of each application based on the cost of each cluster and the number of applications accessing each cluster.
[0111] Obviously, the resource management device disclosed in this application can serve as the execution subject of the resource management method shown in the above embodiments, and thus can realize the functions of the resource management method implemented in the above embodiments. Since the principle is the same, it will not be described again here.
[0112] Figure 8 This is a schematic diagram of the structure of an electronic device according to one embodiment of this specification. Please refer to it. Figure 8 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for other business operations.
[0113] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0114] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.
[0115] The processor reads the corresponding computer program from non-volatile memory into memory and then runs it, forming a resource management device at the logical level. The processor executes the program stored in memory and is specifically used to perform the resource management method mentioned in any of the above method embodiments.
[0116] The above is as described in this instruction manual. Figure 4 The method executed by the resource management device disclosed in the illustrated embodiments can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0117] It should be understood that the electronic device in the embodiments of this application can realize the resource management device in Figure 4 The embodiments shown have the same function. Since the principle is the same, the embodiments of this application will not be described again here.
[0118] Of course, in addition to software implementation, the electronic device described in this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0119] This application also proposes a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by a portable electronic device including multiple applications, enable the portable electronic device to perform the resource management method of any of the above embodiments.
[0120] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0121] In summary, the above are merely preferred embodiments of this specification and are not intended to limit the scope of protection of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.
[0122] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0123] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0124] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0125] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
Claims
1. A resource management method, characterized in that, An application service system is used, comprising at least one data center, in which at least one resource pool and at least one server are deployed. Each resource pool provides resources to one or more applications and includes at least one cluster. A mapping relationship exists between the at least one resource pool and the at least one server. The server provides an interface for at least one application to use resources from the corresponding resource pool. The application service system corresponds to a resource cost accounting system, which includes a data configuration module, an application topology maintenance module, and a cost accounting module. The data configuration module is used to acquire and classify data in the application service system in real time. The application topology maintenance module is used to update the application topology relationships in the application service system in real time. The resource management method includes: The resource cost of each resource pool used by each application and the cluster corresponding to each application in each resource pool are obtained from the data configuration module. The resource cost of any resource pool is determined based on the total cost of the servers that have a mapping relationship with the resource pool. The total cost includes the cost of multiple components of the data center where the corresponding server is located. The number of clusters in the corresponding resource pool of each application is obtained from the data configuration module; the cost of the corresponding resource pool of each application is allocated to each cluster in the corresponding resource pool to obtain the cost of each cluster in the corresponding resource pool of each application; the number of applications accessing each cluster in each resource pool is determined; the original cost of each application is calculated based on the cost of each cluster and the number of applications accessing each cluster. Based on the application topology relationships stored in the application topology maintenance module, the cost allocation for downstream applications corresponding to each application is determined; the application topology relationships are used to represent the dependencies between applications. The original costs of each application and the corresponding allocated costs are added together to obtain the final resource usage cost of each application. Resource cost balancing management is performed on the application service system based on the final resource usage cost of each application.
2. The resource management method according to claim 1, characterized in that, Before obtaining the resource costs of each resource pool used by each application from the data configuration module, the method further includes: The cost of multiple components of each computer room is obtained from the data configuration module. The cost of multiple components of each computer room includes the cost of network equipment, storage accessories, servers, and racks. The costs of the various components of each data center are allocated to the servers within that data center to obtain the total cost of each server. The resource pool corresponding to each server is determined based on the mapping relationship between servers and resource pools stored in the data configuration module; The total cost of each server is determined as the cost of the resource pool corresponding to that server.
3. The resource management method according to claim 2, characterized in that, The process of allocating the costs of multiple components of each data center to the servers within that data center to obtain the total cost of each server includes: The cost of network equipment in each data center is allocated to each server in the region where the network equipment in each data center is located; The cost of each rack in each data center is allocated to each server in the data center where the rack is located; The cost of storage components in each data center is allocated to each server in the corresponding data center according to the capacity of the servers using the storage components; The depreciation cost of each server in each data center is determined by monthly depreciation. For each server in each data center, the costs of network equipment, server racks, storage components, and depreciation allocated to each server are added together to obtain the total cost of each server in each data center.
4. The resource management method according to claim 1, characterized in that, The data configuration module includes target applications in each application, where a target application refers to any one of the applications; after adding up the original costs of each application and the allocated costs of the corresponding applications to obtain the final resource usage cost of each application, the method further includes: The data configuration module determines N application service interfaces corresponding to the target business unit of the target application, the first number of times each of the N application service interfaces is called, and the business volume of the target business unit, where N is an integer not less than 1, the target application includes multiple business units, and the target business unit is any one of the multiple business units; The data configuration module determines the total second number of times the N application service interfaces of the target application are invoked at the gateway entry point; The cost of the target business unit of the target application is determined based on the first number of times each of the N application service interfaces of the target application is invoked, the business volume of the target business unit, the second number of times it is invoked, and the total cost of the server corresponding to the target application.
5. The resource management method according to claim 4, characterized in that, The step of determining the cost of the target business unit of the target application based on the first number of times the N application service interfaces of the target application are called, the business volume of the target business unit, the second number of times of calls, and the total cost of the server corresponding to the target application includes: The ratio of the first and second call counts of each application service interface of the target application is calculated, and the ratio result is multiplied by the total cost of the server corresponding to the target application to obtain the call cost of each application service interface in the target application. The call cost of each application service interface in the target application is summed to obtain the call cost of the target business unit of the target application. The cost of the target business unit of the target application is obtained by calculating the ratio of the call cost of the target business unit to the business volume of the target business unit.
6. The resource management method according to claim 1, characterized in that, The step of determining the cost allocation for downstream applications corresponding to each application based on the application topology relationships stored in the application topology maintenance module includes: The downstream applications that have topology call relationships with each application are determined based on the application topology relationships stored in the application topology maintenance module; Determine the first allocated cost and the original cost of the downstream application corresponding to each application; Determine the third number of times each application calls its corresponding downstream application and the total fourth number of times each application's corresponding downstream application is called; The allocated cost of each downstream application is determined based on the first allocated cost of each application, the original cost of each downstream application, the third number of calls, and the fourth number of calls.
7. The resource management method according to claim 6, characterized in that, The step of determining the allocated cost of each downstream application based on the first allocated cost of each application, the original cost of each downstream application, the third number of calls, and the fourth number of calls includes: The sum of the first allocated cost of each application's downstream application and the original cost of each application's downstream application is obtained. Calculate the ratio of the sum of each application to the total number of fourth calls to the downstream applications corresponding to each application. Multiply the ratio of each application to the number of third calls to the downstream applications corresponding to each application to obtain the allocated cost of the downstream applications corresponding to each application.
8. A resource management device, characterized in that, This is applied to an application service system, which includes at least one data center. Each data center deploys at least one resource pool and at least one server. A resource pool provides resources to one or more applications and includes at least one cluster. A mapping relationship exists between the resource pool and the server. The server provides an interface for at least one application to use the resources in the resource pool. The application service system corresponds to a resource cost accounting system, which includes a data configuration module, an application topology maintenance module, and a cost accounting module. The data configuration module is used to acquire and classify data in the application service system in real time. The application topology maintenance module is used to update the application topology relationships in the application service system in real time, including: The acquisition module is used to acquire from the data configuration module the resource cost of each resource pool used by each application, and the clusters in each resource pool corresponding to each application. The resource cost of any resource pool is determined based on the total cost of the servers that have a mapping relationship with the resource pool. The total cost includes the cost of multiple components of the data center where the corresponding server is located. The determination module is used to obtain the number of clusters in the corresponding resource pool of each application from the data configuration module, and to distribute the cost of the corresponding resource pool of each application to each cluster in the corresponding resource pool to obtain the cost of each cluster in the corresponding resource pool of each application; determine the number of applications accessing each cluster in each resource pool; and calculate the original cost of each application based on the cost of each cluster and the number of applications accessing each cluster. The determining module is further configured to determine the cost-sharing of downstream applications corresponding to each application based on the application topology relationships stored in the application topology maintenance module; wherein, the application topology relationships are used to represent the dependencies between the applications. The overlay module is used to overlay the original costs of each application and the corresponding allocated costs of the application to obtain the final resource usage cost of each application. The management module is used to perform resource cost balancing management of the application service system based on the final resource usage cost of each application.
9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the resource management method as described in any one of claims 1 to 8.