Resource recovery method and device, electronic equipment and storage medium

By collecting data from the cloud platform's database table structure and multi-dimensional monitoring metrics, the priority of resource node reclamation is calculated, solving the problem of insufficient perception of importance and business status in cloud resource reclamation, and achieving secure and efficient atomic reclamation.

CN121864804APending Publication Date: 2026-04-14CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing cloud resource reclamation technologies lack a comprehensive understanding of the importance of resource systems and the status of business usage under complex dependency topologies, making it difficult to securely and effectively identify and execute atomized reclamation targets.

Method used

By collecting the database table structure of the cloud platform, the importance and correlation of resource nodes in the cloud service dependency topology are calculated. Combined with multi-dimensional resource monitoring indicators, the priority of recycling is determined, and the target resource nodes are identified for recycling based on this.

Benefits of technology

It enables precise priority calculation and atomic operation for the recycling of cloud resources, improving recycling efficiency, security and automation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121864804A_ABST
    Figure CN121864804A_ABST
Patent Text Reader

Abstract

The invention discloses a resource recovery method and device, electronic equipment and a storage medium, which can accurately calculate the recovery priority of resources by comprehensively fusing resource dependence topology risks and dynamic service state indexes, ensure that the recovery operation is safely executed in an atomized manner, and improve the recovery efficiency. And the efficiency, the security and the automation level of cloud resource recovery are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of resource recycling technology, and in particular to a resource recycling method, a resource recycling device, an electronic device, and a readable storage medium. Background Technology

[0002] With the widespread application of cloud computing technology and the continuous expansion of cloud service scale, the problems of idle and inefficient use of resources in cloud platforms are becoming increasingly prominent. In order to save operating costs and improve resource utilization, major cloud service providers generally need to establish effective resource recycling mechanisms. However, under complex dependency topologies, relevant cloud resource recycling technologies lack a comprehensive understanding of the importance of the resource system and the business usage status, making it difficult to securely and effectively determine and execute atomic recycling targets. Summary of the Invention

[0003] The present invention provides a resource recycling method, apparatus, electronic device, and readable storage medium to overcome or at least partially solve the above-mentioned problems.

[0004] To solve the above-mentioned technical problems, this application is implemented as follows: In a first aspect, embodiments of this application provide a resource recycling method, including: Collect the database table structure of the cloud platform; The database table structure is used to calculate node dependency weights that characterize the importance of resource nodes in cloud service dependency topology, the degree of association with other resource nodes, and the number of resource instances. Determine multi-dimensional resource monitoring indicators to characterize the rationality of resource node reclamation and business usage status; The priority of reclaiming multiple resource nodes is determined by the node dependency weights and the multi-dimensional resource monitoring indicators. The target resource node is determined based on the recycling priority, and the target resource node is recycled.

[0005] Secondly, embodiments of this application provide a resource recycling device, comprising: The database table structure acquisition module is used to collect the database table structure of the cloud platform. The node dependency weight calculation module is used to calculate node dependency weights that characterize the importance of resource nodes in the cloud service dependency topology, the degree of association with other resource nodes, and the number of resource instances through the database table structure. The multi-dimensional resource monitoring indicator determination module is used to determine multi-dimensional resource monitoring indicators that characterize the rationality of resource node reclamation and business usage status. The recycling priority determination module is used to determine the recycling priority of multiple resource nodes through the node dependency weight and the multi-dimensional resource monitoring indicators; The target resource node recycling module is used to determine the target resource node based on the recycling priority and recycle the target resource node.

[0006] Thirdly, embodiments of this application provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0007] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0008] The embodiments of the present invention have the following advantages: This invention, by fully integrating resource dependency topology risks and dynamic business status indicators, can accurately calculate resource reclamation priorities and ensure that reclamation operations are executed securely in an atomic manner, greatly improving the efficiency, security, and automation level of cloud resource reclamation. Attached Figure Description

[0009] Figure 1 This is a flowchart of the steps of a resource recycling method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the training logic of a decision computing layer provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the DDQN training logic provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of a hybrid cloud platform resource table structure provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the overall logic of a cloud resource adaptive recycling method provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of resource dependencies in a hybrid cloud platform provided in an embodiment of the present invention; Figure 7 This is a structural block diagram of a resource recycling device provided in an embodiment of the present invention. Detailed Implementation

[0010] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0011] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of 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 the 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.

[0012] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0013] Reference Figure 1 The diagram illustrates a flowchart of a resource recycling method provided in an embodiment of the present invention, which may specifically include the following steps: Step 101: Collect the database table structure of the cloud platform; Step 102: Calculate the node dependency weights that characterize the importance of resource nodes in the cloud service dependency topology, the degree of association with other resource nodes, and the number of resource instances through the database table structure. Step 103: Determine multi-dimensional resource monitoring indicators to characterize the rationality of resource node reclamation and business usage status; Step 104: Determine the reclamation priority of multiple resource nodes using the node dependency weights and the multi-dimensional resource monitoring indicators; Step 105: Determine the target resource node based on the recycling priority, and recycle the target resource node.

[0014] This invention can collect the database table structure of a cloud platform to obtain static metadata in the cloud service environment, i.e., the underlying structure information of the database. This information serves as the fundamental input for determining the inherent importance and dependencies of subsequent computing resource nodes within the system.

[0015] Cloud platform: generally refers to virtualized infrastructure that provides elastic computing, storage, networking and other resources.

[0016] Database table structure: This refers to the definition information of a table in a database, including the table name, fields, field types, and most importantly, foreign key relationships. Example: If there is a table named "Orders", its table structure includes "Order ID" and "User ID" fields, where "User ID" is a foreign key referencing the "Users table".

[0017] Resource nodes: These refer to the various specific resource instances that constitute cloud services, such as a record in a database, a virtual machine instance, or a storage volume. Example: An idle record in the `user_login_log` table in a database, or an ECS virtual machine instance that has not been used for a long time.

[0018] In this embodiment of the invention, the node dependency weight of resource nodes can be calculated through the database table structure. By utilizing the static structural information collected in the first step, the inherent importance, associated risks, and scale of each resource node in the entire service topology can be calculated and quantified into node dependency weight.

[0019] Cloud service dependency topology: A hierarchical network structure diagram formed by foreign key relationships or other dependencies between resource nodes. Example: In the topology diagram, the user table (parent node) points to the order table (child node), and the order table points to the payment record table (leaf node).

[0020] Node dependency weight: A comprehensive quantitative value that integrates the resource's importance in the topology (degree of dependency), association risk, and the number of its own resource instances (scale). A higher value indicates a more important resource and a higher risk of resource reclamation. Example: A core user table that serves as a foreign key in 100 downstream tables (high association, resulting in a high risk of resource reclamation), coupled with its extremely large number of resource instances, will have its node dependency weight reach the highest level.

[0021] In this embodiment of the invention, multi-dimensional resource monitoring indicators can be determined to characterize the rationality of resource node reclamation and business usage status, so as to obtain dynamic characteristics, that is, indicators reflecting the current usage status of resources and whether reclamation is reasonable (i.e., whether they are idle), providing real-time basis for subsequent priority judgment.

[0022] Multi-dimensional resource monitoring metrics include two types of metrics: user-defined business metrics M and general evaluation dimensions H. Example: Monitoring metric M may include, but is not limited to, the current CPU utilization of virtual machines (e.g., 5%), inbound / outbound traffic, etc., to reflect the status of business usage.

[0023] The general dimension H can be used to reflect the rationality of recycling. Examples include, but are not limited to, the idle time of resources since the last activity, the monthly cost of resources, etc.

[0024] In this embodiment of the invention, the recycling priority of multiple resource nodes can be determined by the node dependency weight and the multi-dimensional resource monitoring indicators, so as to weight and fuse static system risks (node ​​dependency weight) and dynamic business status (M,H) to calculate the final recycling priority of each resource node.

[0025] Reclaim Priority: A comprehensive quantitative value reflecting the urgency of whether a resource node is suitable for reclamation in its current state. Example: If a virtual machine has a low node dependency weight (low risk) and multi-dimensional resource monitoring indicators show extremely low utilization, its reclamation priority value will be very high (high priority, should be reclaimed first).

[0026] In this embodiment of the invention, a target resource node can be determined based on the recycling priority, and the target resource node can be recycled, so as to transform the priority calculated in the previous step into an actual recycling execution plan.

[0027] Target resource node: refers to the specific resource instance that the system ultimately determines should be removed and subject to recycling. Example: all resource nodes in the entire relational subgraph that are at the front of the recycling queue and have been confirmed by the DDQN model to be eligible for removal.

[0028] Reclaim operation: refers to the atomic deletion operation performed by the system, which removes the target resource node from the cloud platform and releases the computing, storage or network resources it occupies.

[0029] This invention, by fully integrating resource dependency topology risks and dynamic business status indicators, can accurately calculate resource reclamation priorities and ensure that reclamation operations are executed securely in an atomic manner, greatly improving the efficiency, security, and automation level of cloud resource reclamation.

[0030] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.

[0031] In an optional embodiment of the present invention, the step of calculating the node dependency weights, which characterize the importance of resource nodes in cloud service dependency topology, the degree of association with other resource nodes, and the number of resource instances, through a database table structure, includes: A resource dependency graph is constructed using a database table structure to represent the dependency relationships between resource nodes. The resource dependency weight of each node is calculated using the number of resources containing the current resource as a foreign key, the number of resources in the table containing the foreign key in the current resource table, the number of the current resource, and the level of the resource in the relationship graph. Traverse the resource dependency graph and update the resource dependency weight of each node to the node dependency weight.

[0032] In this embodiment of the invention, a resource dependency graph representing the dependency relationships between resource nodes can be constructed based on the database table structure. This transforms the static database table structure information collected from the cloud platform into a graph structure model that can be computed and traversed, namely, the resource dependency graph. This graph model is the basis for subsequent calculation of node dependency weights.

[0033] Resource dependency graph: A graph structure where nodes represent resource entities (such as database tables) in a cloud service, and edges (or connections) represent dependency relationships (such as foreign keys) between resource nodes. Example: In a CRM system, a node representing "customer" is connected to a node representing "contract" via an edge, indicating that the contract depends on the customer.

[0034] In this embodiment of the invention, the resource dependency weight of each node can be calculated using the number of resources containing the current resource as a foreign key, the number of resources in the table containing the foreign key in the current resource table, the number of current resources, and the resource's hierarchy in the relationship graph, to determine the initial, non-iterative dependency weight of each resource node. This calculation integrates four key structural and scale factors to initially quantify the value of the resources.

[0035] Resource dependency weight: This is the initial version of the node dependency weight. It is a raw score calculated based on local, direct structural and scale information.

[0036] Number of resources with the current resource as a foreign key (D): This indicates how many downstream resources depend on the current resource. The larger this value, the more important the current resource is.

[0037] The number of resources (F) in the table containing the foreign key in the current resource table: This indicates how many upstream resources the current resource depends on. This value reflects the complexity of the resource.

[0038] Current number of resources (N): refers to the number of instances or size of the resource (such as the number of records in a table), used to measure the size of the resource.

[0039] The level (L) of a resource in a relational graph refers to the depth or location of the resource in the topology. Generally, the closer to the root node, the higher the level and the greater the value.

[0040] In this embodiment of the invention, the resource dependency graph can be traversed, and the resource dependency weight of each node can be updated and iterated to the node dependency weight. By traversing the graph structure (such as Breadth-First Search), the initial weight is propagated and iterated along the dependency chain, and finally converged to a weight that has global dependency transitivity and association risk.

[0041] Traversing the resource dependency graph: This refers to systematically visiting each node according to the connection relationship of the graph, usually using algorithms such as breadth-first search (BFS) or depth-first search (DFS).

[0042] Update iteration: refers to the process of adding the weight information of the downstream node (child node) to the weight of the upstream node (parent node) in reverse during the traversal until the weight converges or the preset number of iterations is reached.

[0043] Node dependency weight: The final weight after iterative convergence. It is no longer a local T1, but a final quantitative result that can globally represent the importance, correlation degree and scale of resource nodes.

[0044] This embodiment transforms the static database table structure into a computable graph model and employs an iterative calculation method that includes correlation, importance, and resource scale. This accurately and comprehensively quantifies the inherent risks and value of resource nodes in the cloud service topology, laying a solid technical foundation for subsequent priority determination of resource recovery.

[0045] In an optional embodiment of the present invention, the database table structure includes a table name, table fields, foreign keys, and the number of table instances. The step of constructing a resource dependency graph representing the dependency relationships between resource nodes using the database table structure includes: Input the table name, table fields, table foreign keys, and number of table instances as keywords, and output a multi-level JSON format file based on natural language processing. Based on the hierarchical relationship of the JSON file, the multi-level JSON file is transformed into a resource dependency graph using visualization operations.

[0046] In practical applications, database table structure refers to the definition information of tables in a database, including table name, fields, foreign keys, and the number of table instances. Example: Table name: user, field: user_id, foreign key points to the role_id table, number of table instances: 50 million.

[0047] Foreign key: A key field in a database that establishes dependencies between tables. It is the direct basis for identifying resource dependency relationships. Example: The User ID field in the Orders table acts as a foreign key, pointing to the User table, indicating that the Order resource depends on the User resource.

[0048] This invention allows users to input the table name, table fields, foreign keys, and number of table instances as keywords. It outputs a multi-level JSON file based on Natural Language Processing (NLP) technology. This leverages NLP to preprocess and structure the raw, fragmented database metadata. Through NLP, complex hierarchical relationships between tables can be identified and summarized more efficiently and intelligently, outputting a multi-level JSON format that is easily understood by machines.

[0049] Keyword input refers to the original database metadata information, such as table names and field names.

[0050] Natural Language Processing (NLP): A technique used to enable computers to understand, interpret, and generate human language. In this context, it is used to intelligently identify and standardize the dependencies and semantic relationships inherent in table structures.

[0051] Multilevel JSON format files: A text file format with a hierarchical nested structure used to clearly represent parent-child relationships, dependencies, and hierarchical structures between resources. Example: In a JSON file, "User": { "Dependency": ["Order", "Contract"]} clearly demonstrates the hierarchical relationship.

[0052] According to the embodiments of the present invention, the multi-level JSON format file can be transformed into a resource dependency graph based on the hierarchical relationship of the JSON file and a visualization operation. The JSON file, which is recognized and structured by the machine, is used as input, and the final output is a visualized and computable resource dependency graph for subsequent weight calculation and DDQN model use.

[0053] The hierarchical relationship of a JSON file refers to the nesting relationship between data objects in the JSON structure, which directly maps the parent-child or dependency relationship between resources.

[0054] Visualization operation: refers to using a graphical interface or tool to draw an abstract data structure (JSON) as a graphical model of nodes and edges.

[0055] Resource dependency graph: The final graph structure used to represent resource nodes and their dependency relationships.

[0056] This invention utilizes natural language processing technology and multi-level JSON format to achieve efficient, intelligent structuring and visualization of metadata for complex cloud platform database table structures, laying a solid data foundation for subsequent accurate calculation of resource node dependency weights and recycling decisions.

[0057] Optionally, the multi-level JSON format file includes the number of resources containing the current resource as a foreign key, the number of resources in the table containing the foreign key in the current resource table, the current number of resources, and the level of the resource in the relationship graph. The step of calculating the resource dependency weight of each node using the number of resources containing the current resource as a foreign key, the number of resources in the table containing the foreign key in the current resource table, the current number of resources, and the level of the resource in the relationship graph includes: Input the number of resources containing the current resource as a foreign key, the number of resources in the table containing the foreign key in the current resource table, the number of current resources, and the hierarchy of the resources in the relationship graph into Formula 1 to calculate the resource dependency weight of each node; Formula 1 is:

[0058] Wherein, D is the number of resources containing the current resource as a foreign key, F is the number of resources in the table containing the foreign key in the current resource table, N is the current resource number, L is the resource level in the relational graph, i is the number or index of each resource directly associated with the current resource node when calculating the T1 value of the current resource node, and I is the total number of resources directly associated with the current resource node.

[0059] The beneficial effect of Formula 1 lies in overcoming the shortcomings of existing technologies that rely on single or partial indicators for initial valuation, achieving a precise fusion of the following objectives: Fusing structural importance and associated risk: Formula 1, by introducing the number of resources as foreign keys (D), the number of tables containing these foreign keys (F), and the hierarchy (L), for the first time incorporates the topological location, association complexity, and dependency breadth of resources into the initial weight calculation stage, accurately quantifying their inherent system risk. Fusing resource size and scale: Formula 1 also incorporates the number of resource instances (N), ensuring that the initial weight calculation considers not only the structural position of the resource but also its physical size. This avoids potential risks caused by ignoring resources with excessively large sizes. Therefore, the beneficial effect of Formula 1 is: providing a comprehensive and accurate initial weight T1 that integrates resource structural risk and physical size information, laying a solid multi-dimensional data foundation for subsequent iterative optimization (T2) and priority calculation (P).

[0060] In an optional embodiment of the present invention, the step of determining the multi-dimensional resource monitoring indicators used to characterize the rationality of resource node reclamation and business usage status includes: Identify monitoring metrics defined by users for different resources on the cloud platform, and the monitoring metrics are used to characterize the business usage status of resource nodes; Define a general dimension for characterizing the rationality of resource recycling.

[0061] This invention can identify monitoring metrics defined by users for different resources on the cloud platform. These monitoring metrics characterize the business usage status of resource nodes, thereby collecting dynamic, real-time, and business-relevant monitoring data. This data is customized by the user or business system and directly reflects the current business activity and usage status of the resource nodes.

[0062] Monitoring metrics (M) defined by users for different resources on the cloud platform: These are real-time performance metrics configured by users to monitor service operation. These metrics change dynamically with business load.

[0063] Examples include average CPU utilization, memory utilization, disk I / O rate, network latency, and service access frequency. These metrics characterize whether resources are being actually used by the business.

[0064] Business usage status of resource nodes: refers to whether the resource node is currently active, busy or idle, and the frequency of business calls and access.

[0065] This invention can define general dimensions to characterize the rationality of resource recycling, defining a set of business-independent, general, cross-resource-type dimensions. These dimensions assess the degree of resource idleness and the economic benefits of recycling from a platform management perspective, serving as a basis for the rationality of recycling decisions.

[0066] General Dimensions (H): A set of platform-level metrics used to evaluate whether a resource reclamation operation is cost-effective and low-risk. These typically do not directly reflect business load. Examples: resource idle time (e.g., unaccessed for more than 60 days), resource owner privilege level (reclaiming high-privilege resources requires caution), monthly resource cost (high-cost resources have higher reclamation priority), etc.

[0067] The rationality of resource recycling refers to the degree to which a resource should be recycled.

[0068] This invention overcomes the shortcomings of traditional recycling mechanisms, such as single indicators and lack of business awareness, by comprehensively integrating monitoring indicators that reflect business activity in real time and general management dimensions that evaluate recycling benefits. It provides a multi-dimensional, dynamic, and business-aware evaluation basis for intelligent recycling decision-making.

[0069] In an optional embodiment of the present invention, after the step of traversing the resource dependency graph and iteratively updating the resource dependency weight of each node to the node dependency weight, the method further includes: Construct a resource dependency weight relationship graph that includes resource dependency weights; Obtain the node dependency weights in the resource dependency weight relationship graph.

[0070] This invention can construct a resource dependency weight relationship graph that includes resource dependency weights, so as to formally integrate and store the precise node dependency weights T2 (i.e., resource dependency weights) obtained through iterative calculation into the original dependency graph structure. Through this operation, the originally abstract dependency graph is transformed into an operable data model with quantified weights, providing a stable and standardized input interface for subsequent decision calculation layers (such as identifying relationship subgraphs and calculating computational occupancy O).

[0071] Resource dependency weight: This is the numerical value of the node dependency weight itself. It is a quantified attribute value that represents the risk and importance of a resource node to the entire cloud platform.

[0072] Resource Dependency Weight Graph: This is the final, computationally valuable graph model. Each node in the graph is assigned its final node dependency weight, and this graph is the sole data source for all subsequent topology-based operations (such as the DDQN module).

[0073] This invention provides an interface for data reading and access by obtaining the node dependency weights in the resource dependency weight graph. It is responsible for accurately extracting the required node dependency weights from the weight graph constructed in the previous step, so that these weights can be used as one of the key features and fed into the calculation formula for the next step of recycling priority.

[0074] Obtaining the node dependency weight refers to the system calling an interface to read the node dependency weight stored on the corresponding resource node before calculating the recycling priority.

[0075] Node dependency weight: In this step, it serves as a co-factor (i.e., T2) in the priority P formula to balance the influence of dynamic indicators such as M and H.

[0076] In this embodiment of the invention, by effectively solidifying and storing the finally calculated node dependency weights in the weight relationship graph, a stable, standard and readily accessible topological feature data interface is provided for the subsequent decision calculation module and DDQN reinforcement learning model, ensuring the accuracy and traceability of data in the technical process.

[0077] In an optional embodiment of the present invention, the step of determining the reclamation priority of multiple resource nodes through the node dependency weight and the multi-dimensional resource monitoring indicators includes: Initialize the preset dimension weighting; The resource node reclamation priority is calculated by combining the monitoring metrics, the general dimensions, the node dependency weights, and the dimension weights.

[0078] In a specific implementation, the embodiments of the present invention can initialize a preset dimension weighting to provide an executable and learnable starting point and benchmark for the entire recycling decision system.

[0079] Dimension-weighted ω is an importance coefficient applied to each dynamic monitoring metric (M and H). It represents the relative influence and importance of that specific metric (e.g., CPU utilization or resource idle days) in the calculation of the final recycling priority P under the current system and business environment.

[0080] Dimensional weighting ensures that the system dynamically prioritizes certain key indicators based on current needs and risks when determining recycling priorities. Simply put, dimensional weighting assigns "voice" to each indicator. Initialization sets initial values ​​for these "voices" so that the decision-making system can be operational immediately.

[0081] Optionally, the step of calculating the resource node reclamation priority by combining the monitoring metrics, the general dimension, the node dependency weight, and the dimension weighting includes: Input the monitoring metrics, the general dimension, the node dependency weight T2, and the dimension weighted ω into Formula 2 to calculate the resource node reclamation priority; Formula 2 is as follows:

[0082] Wherein, K is the number of users who customize the monitoring metric, j is the number of all general dimensions, M is the monitoring metric, H is the general dimension, T2 is the node dependency weight, ω is the dimension weighting, and P is the resource node recycling priority.

[0083] The key to Formula 2 lies in the introduction of dimension-weighted ω. In its implementation, ω is no longer static, but is iteratively adjusted and optimized by the DDQN reinforcement learning model based on each actual recycling operation and its resulting reward. This allows the priority calculation criteria to automatically learn and adapt to changes in the cloud platform's usage environment, business model, and risk appetite, overcoming the drawbacks of rigid and unevolvable priority rules in traditional recycling mechanisms.

[0084] In an optional embodiment of the present invention, the step of determining the target resource node based on the recycling priority includes: When resources exceed the available threshold, a subgraph is identified based on the resource dependency weight relationship graph to represent the relationship between the current resource node and the leaf node. The recycling priority and number of resource nodes are determined from the relational subgraph; Using the recycling priority and the number of resource nodes, calculate the resource node occupancy in each service instance; Based on the occupancy, different relational subgraphs are arranged from high to low, and a recycling queue is created; the relational subgraph with the highest rank contains the target resource node.

[0085] In an optional embodiment of the present invention, when the system determines that a certain resource node (based on M and H indicators) meets the recyclability conditions, the system will identify the resource node and all its downstream associated leaf nodes based on the dependency graph to form an atomic recycling unit.

[0086] Exceeding the available threshold: This refers to the monitoring indicators (M and H) of a resource node reaching or exceeding the preset "reclaimable" standard, such as idle time exceeding 60 days.

[0087] Resource dependency weight graph: A topological graph with node dependency weights, which is the basic data for identifying dependency relationships.

[0088] A relational subgraph is the smallest closed set identified from the topology graph that contains a resource node to be reclaimed (the target resource node) and all its dependent child nodes (leaf nodes). It is the execution unit for atomic reclamation in the system, ensuring the integrity of the reclamation operation.

[0089] This embodiment of the invention can also determine the recycling priority and number of resource nodes for each resource node from the relational subgraph, so as to prepare data for calculating the total value of the recycling unit after locating the recycling unit (relational subgraph). It obtains the calculated priority P_i of each resource node in the subgraph and their instance count n_i.

[0090] Recycling Priority (P_i): The priority value of each resource node in the subgraph calculated using Formula 2.

[0091] Number of resource nodes (n_i): The number of specific instances owned by each resource node in the subgraph, used to measure its size.

[0092] Step 3: Using the recycling priority and the number of resource nodes, calculate the resource node occupancy of each service instance, multiply the value (P_i) of all resource nodes in the subgraph by its size (n_i), and sum them up to finally determine the comprehensive value of the entire relational subgraph, i.e., the occupancy O.

[0093] Occupancy (O): Measures the overall recycling value and volume of a relational subgraph (i.e., an atomic recycling unit). The formula is O = ∑(P_i \cdot n_i). A larger occupancy O indicates a higher value of resources released by recycling the subgraph.

[0094] Service instance: refers to the actual business service entity to which the resource node belongs and supports, such as a running web application instance.

[0095] In this embodiment of the invention, different relational subgraphs can be arranged from high to low according to the occupancy amount to create a recycling queue. Based on the occupancy O calculated in the previous step, the system sorts all atomic units (relational subgraphs) to be recycled and generates a priority execution list to guide the actual order of recycling operations.

[0096] Reclamation queue: An ordered list containing all relational subgraphs to be reclaimed, arranged from highest to lowest occupancy (O). This is the final basis for reclamation execution.

[0097] In a specific implementation, the highest-ranking subgraph of the present invention can contain the target resource node, thereby clarifying the physical object that is prioritized for recycling in this operation, and thus determining the target resource node.

[0098] The highest-ranking subgraph: The first element in the recycling queue represents the atomic unit with the highest recycling efficiency at present.

[0099] Target resource nodes: All resource nodes contained in the highest-ranking subgraph of the relation graph; these are the physical objects from which the system will perform atomic reclamation.

[0100] This invention, by introducing the calculation of occupancy O and sorting the data using relational subgraphs as atomic units, overcomes the shortcomings of traditional recycling mechanisms in quantifying the value of recycling units and ensuring data integrity, ultimately creating a recycling execution queue that is both safe and efficient.

[0101] Optionally, the step of calculating the resource node occupancy in each service instance using the recycling priority and the number of resource nodes includes: Input the recycling priority and the number of resource nodes into Formula 3 to calculate the resource node occupancy in each service instance; Formula 3 is as follows:

[0102] Wherein, Pi represents the recycling priority, ni represents the number of resource nodes, and O represents the resource node occupancy in each service instance.

[0103] Optionally, the step of reclaiming the target resource node includes: When the first initial behavior information for determining whether the user confirms the recycling of the relationship subgraph is received, a recycling operation is performed on the relationship subgraph containing the target resource node; Based on the node dependency weights, the monitoring metrics, and the general dimensions, a first environmental state is determined to characterize the current resource usage of the cloud platform. The reward function for the current action is determined by the amount of resources released or the number of service instances affected by the target resource nodes that are recycled, and the second environmental state after resource release is obtained. Using the first environmental state, the second environmental state, the first initial behavior information, and the reward function as inputs, calculate the benefit prediction value to characterize the benefits brought about by performing the recycling operation; The predicted benefit values ​​are recorded in the experience pool, and the error function of the predicted benefit values ​​is calculated using the target value network. The error function is used to adjust the dimensional weighting.

[0104] In a specific implementation, in this embodiment, when the system receives first initial behavior information to determine whether the user has confirmed the recycling of the relational subgraph, it performs a recycling operation on the relational subgraph containing the target resource node, thereby triggering and acting the recycling operation. The system receives an explicit instruction from the user (confirmation of recycling) and then performs a deletion operation on the atomic recycling unit (relational subgraph).

[0105] Initial Behavioral Information: In manual mode, this refers to the instruction information that the user confirms and executes recycling by clicking on the interface. It is the "action" in DDQN learning.

[0106] Performing a recycling operation: This refers to the system performing an atomic deletion of all resource nodes within the relational subgraph, releasing physical resources.

[0107] In this embodiment, the current resource usage of the cloud platform can be determined as the first environmental state based on the node dependency weights, the monitoring metrics, and the general dimensions to obtain the environmental state before the action. Before performing the recycling operation, the system must record the complete status of the platform at that time as a basis for model learning.

[0108] The first environment state refers to a system snapshot at the time of the recycling operation. It is a feature vector that integrates all key information, including node dependency weights, monitoring metrics M, and general dimensions H. It is the "state" in DDQN learning.

[0109] In this embodiment, the amount of resources released or the number of service instances affected by the target resource node that has been recycled can be determined as the reward function for the current action, and the second environmental state after resource release can be obtained.

[0110] In practice, after the system performs an action, it must evaluate the positive or negative results of the action and record the new state of the system after the change.

[0111] Reward function: Used to quantify the benefits of action 'a'. For example, the more resources successfully released, or the smaller the impact on business (number of service instances), the higher the reward 'r'.

[0112] The second environment state refers to a new system snapshot after the system performs a recycling operation, where resource usage has changed. It is the "next state" in DDQN learning.

[0113] In this embodiment of the invention, the observed first environmental state, second environmental state, first initial behavior information, and the reward function can be used as inputs, i.e., the experience quadruple (s,a,r,s′), and the current model's value assessment of the action can be calculated.

[0114] Benefit prediction: refers to the current Q value (Q(s,a)) calculated using the DDQN model. It predicts the long-term cumulative return that can be obtained by performing action a in state s.

[0115] In this embodiment of the invention, the predicted benefit value can be recorded in an experience pool, and the error function of the predicted benefit value can be calculated using a target value network.

[0116] In its implementation, the system can record the quadruple experience in the experience pool and use the target network to calculate the difference between the current Q value and the ideal target Q value.

[0117] Experience pool: A database used to store historical experience quadruples (s, a, r, s′), which is the data source for the DDQN model to learn offline.

[0118] Target Value Network: A backup network in the DDQN model used to provide a stable reference. It is used to calculate the ideal target Q value to avoid oscillations during training.

[0119] Error function: A numerical value that measures the difference between the current Q value and the target Q value. It is the basis for model gradient descent and weight updates.

[0120] In its implementation, the error function, used to adjust the dimension weighting, is the final step in the self-learning closed loop. The system utilizes the calculated error and, through an optimization algorithm (such as gradient descent), reverse-engineers the dimension weighting ω in the recycling priority formula.

[0121] Adjusting dimensional weighting (ω): This is the process of making Q-value predictions more accurate. It involves automatically optimizing the value of ω by learning from user experience, thereby improving the calculation formula of priority P and enabling the model to make better recycling decisions in the future.

[0122] This invention transforms users' actual recycling operations into high-quality training experience and leverages the learning capabilities of the DDQN model to effectively achieve adaptive optimization and calibration of the recycling priority formula parameters (dimension-weighted ω), ensuring continuous improvement and accuracy enhancement of the priority calculation standard.

[0123] Optionally, the method is applied to a deep double-Q learning model, which includes a current value network, and the step of reclaiming the target resource node includes: Based on the node dependency weights, the monitoring metrics, and the general dimensions, a first environmental state is determined to characterize the current resource usage of the cloud platform. The current value network is invoked to determine whether to confirm the recycling of the relational subgraph based on the first environmental state; When the second initial behavior information for determining the current value network to confirm the recycling of the relational subgraph is received, a recycling operation is performed on the relational subgraph containing the target resource node; The reward function for the current action is determined by the amount of resources released or the number of service instances affected by the target resource nodes that are recycled, and the second environmental state after resource release is obtained. Using the first environmental state, the second environmental state, the second initial behavior information, and the reward function as inputs, a benefit prediction value is calculated to characterize the benefits brought about by performing the recycling operation; The predicted benefit values ​​are recorded in the experience pool, and the error function of the predicted benefit values ​​is calculated using the target value network. The error function is used to adjust the dimensional weighting.

[0124] Deep Double Q-Learning (DDQN) is an advanced reinforcement learning (RL) algorithm that optimizes the basic Deep Q-Network (DQN) model and is specifically designed to solve decision-making and control problems.

[0125] In this embodiment of the invention, a first environmental state can be determined based on the node dependency weights, the monitoring metrics, and the general dimensions to characterize the current resource usage of the cloud platform, thus providing a complete and multi-dimensional basis for automated decision-making. By integrating static risk information (T2) and dynamic usage information (M, H), the model can make decisions based on the most comprehensive data.

[0126] In its implementation, the system integrates all key feature information reflecting the inherent risks (T2) and dynamic usage (M,H) of resources to construct the first environmental state s, which serves as the input for the DDQN model to make recycling decisions.

[0127] First environment state: The integrated feature vectors of T2, M, and H represent all relevant information of the system at the time of the decision.

[0128] In this embodiment of the invention, the current state can also be input into the current value network of DDQN. Based on the Q value (benefit prediction value) it has learned, the network automatically determines whether performing the recycling operation is the optimal action at present, so as to realize the replacement of manual judgment with AI model decision-making. By predicting the Q value through the current value network, the recycling benefits can be automatically evaluated, thereby making the optimal decision on whether to perform atomized recycling.

[0129] Current Value Network: The master decision network in a deep double-Q learning model, which is responsible for predicting the long-term cumulative benefits of performing different recovery actions in a given state s.

[0130] Determine whether to confirm recycling: that is, select the optimal behavior (recycle or not recycle) based on the model's base Q value.

[0131] In this embodiment of the invention, when receiving the second initial behavior information for determining whether the current value network has confirmed the recycling of the relational subgraph, a recycling operation can be performed on the relational subgraph containing the target resource node, so as to perform a recycling operation on the highest-ranked atomic recycling unit (relational subgraph) according to the decision result of the current value network in the previous step.

[0132] Second initial behavioral information: refers to the automated recycling decision information made by the DDQN model, which is the "action" in DDQN learning.

[0133] In this embodiment of the invention, the amount of resources released or the number of service instances affected by the target resource node that has been recycled can be determined as the reward function of the current action, and the second environmental state after resource release can be obtained to acquire real-world feedback data.

[0134] In a specific implementation, embodiments of the present invention can execute recycling according to model instructions and immediately quantify the actual effect of the action (expressed by a reward function), while observing environmental changes (expressed by a second environmental state) to provide high-quality training samples for the model's subsequent learning.

[0135] The reward function (r) quantifies the benefits of the recycling action and serves as the optimization objective for model learning.

[0136] The second environment state (s′) is a new snapshot of the system state after the recycling operation is performed, and is the "next state s′" in DDQN learning.

[0137] In this embodiment of the invention, the first environmental state s, the second environmental state s′, the second initial behavioral information a′, and the reward function r can be used as inputs to calculate a benefit prediction value that characterizes the benefits brought about by performing the recycling operation, so as to collect the observed empirical quadruple (s,a′,r,s′) and calculate the current model's value assessment (Q value) of the action.

[0138] The benefit forecast refers to the current Q value (Q (s,a′,r,s′)) calculated by the DDQN model, which predicts the long-term cumulative return of the automatic action.

[0139] In this embodiment of the invention, the predicted benefit value can be recorded in an experience pool, and the error function of the predicted benefit value can be calculated using a target value network to establish the model's memory and learning signal. Experience quadruples are recorded in the experience pool, and the error between the current Q value and the target Q value is calculated using a target value network, thereby disrupting the learning order, eliminating correlations between data, and improving training stability.

[0140] Experience pool: A database used to store DDQN experience quadruples, which is the source for the model to learn offline.

[0141] Target value network: A backup network used to provide a stable reference and calculate the ideal target Q value.

[0142] In a specific implementation, the error function of this invention can also be used to adjust the dimension weighting, so as to use the calculated error to reverse adjust the dimension weighting ω in the recycling priority formula, thereby optimizing its decision-making strategy.

[0143] The process of adjusting the dimensional weighting (ω) to make the DDQN model's decision more accurate is to automatically optimize the parameters in the priority P calculation formula by utilizing learning experience.

[0144] This invention achieves full automation and intelligence in cloud resource recycling by fully empowering the current value network of the DDQN model with recycling decision-making power. At the same time, it continuously optimizes the parameters of the priority formula using action results, ensuring that the recycling strategy can adapt to environmental changes and continuously improve the efficiency and security of recycling.

[0145] To enable those skilled in the art to better understand the embodiments of the present invention, an example is provided below. For example... Figure 2 , Figure 3 , Figure 4 , Figure 5 and Figure 6 As shown, Figure 2 This is a schematic diagram of the training logic of a decision computing layer provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the DDQN training logic provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of a hybrid cloud platform resource table structure provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the overall logic of a cloud resource adaptive recycling method provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of resource dependencies in a hybrid cloud platform provided in an embodiment of the present invention.

[0146] The overall architecture of this invention adopts a three-layer design: a relational topology perception layer, a decision calculation layer, and a decision optimization layer.

[0147] I. Relationship Topology Awareness Layer: Constructing a Resource Dependency Weighted Relationship Graph: This layer is responsible for data acquisition, topology modeling, and dependency weight calculation, and ultimately outputs a resource dependency graph containing node weights.

[0148] 1. Data Acquisition and Graph Structure Construction: 1.1 We used tools such as DeepSeek to collect the database table structure information of the cloud platform, and used table name, table fields, table foreign keys, and number of table instances as keywords for input.

[0149] 1.2 Based on Natural Language Processing (NLP) technology, the input metadata is intelligently sorted and output as a multi-level JSON format file. The single-level format includes information such as table name, foreign key name, foreign key related table structure (next level), and number of table instances.

[0150] 1.3 Based on the hierarchical relationship of the JSON file, visualize it and convert it into a resource dependency graph.

[0151] 2. Calculation of resource dependency weight (T2): 2.1 Initial weight calculation: Based on the formula (Formula 1 or a specific formula), the initial resource dependency weight of each node is calculated using the number of resources (D) containing the current resource as a foreign key, the number of resources in the table containing the foreign key in the current resource table (F), the current number of resources (N), and the resource's level in the relationship graph (L).

[0152] 2.2 Iterative Update: By using Breadth-First Search (BFS) to traverse the resource dependency graph, the resource dependency weight of each node is updated iteratively until it converges to the final node dependency weight T2.

[0153] 3. Weighted Topology Construction: 3.1 The iteratively calculated T2 value is stored as a resource dependency weight in the graph structure, constructing a resource dependency weight relationship graph containing node dependency weights. In this graph structure, the root node has the largest dependency weight, representing its highest importance and the most resources it affects; the directed edges between nodes represent dependency relationships, with child nodes depending on their parent nodes.

[0154] II. Decision Calculation Layer: Reasoning for recycling priorities and generating recycling queues: Based on the topology-aware layer's T2 and dynamic monitoring metrics M and H, this layer calculates the recycling priority P and generates a recycling queue q to be executed.

[0155] 1. Obtain feature dimensions: 1.1 Identify the monitoring metrics (M) defined by users for different resources on the cloud platform (such as memory usage, network speed, traffic, boot time, bandwidth, etc.) to characterize the service usage status of resource nodes.

[0156] 1.2 Define resource idle time, resource consumption cost, etc. as general dimensions (H) to characterize the rationality of resource recycling.

[0157] 2. Calculation of Recycling Priority (P): 2.1 Initialize the dimension weighting ω.

[0158] 2.2 Combine the node dependency weight T2 in the resource dependency graph and use formula (Formula 2) to calculate the recycling priority P of the service resource.

[0159] 3. Logic for generating the recycling queue: 3.1 When resources exceed the user-defined availability threshold, the dependency set from the current resource node to the leaf node is identified as a relational subgraph (atomic recycling unit) based on the resource dependency graph.

[0160] 3.2 Accumulate the product of the recycling priority P_i of all resources in the relational subgraph and the number of resource instances n_i to calculate the cumulative occupancy O of the relational subgraph.

[0161] 3.3 Based on the occupancy O of different relational subgraphs arranged from high to low, create a recycling queue q.

[0162] 4. Priority parameter optimization feedback: 4.1 Send the recycling queue q to the decision optimization layer.

[0163] 4.2 After the optimization layer optimizes and adjusts the recycling queue based on the reinforcement learning algorithm, it receives the optimized recycling queue q' with higher efficiency as feedback, and further adjusts the dimensional weighting value ω of the priority function in the decision calculation layer.

[0164] III. Decision Optimization Layer: Adjusting the recycling strategy based on the DDQN model: This layer uses the DDQN model to continuously optimize the recycling strategy and automate the decision-making computation layer's input recycling queue q. It is trained synchronously in both manual and managed modes.

[0165] 1. Manual Mode (Human Feedback Training): This mode is used for initial model training and experience accumulation, and a baseline strategy is quickly established through human feedback.

[0166] 1.1 Experience Collection and Execution: Under the current environment state s, the user confirms whether to reclaim the resource relationship subgraph (behavior a). The system performs atomistic reclamation of the resource subgraph.

[0167] 1.2 Rewards and State Observation: After execution, the system records the amount of resources released or the number of services affected as the reward function r, and obtains the second environment state s' after resource release.

[0168] 1.3 Model Training and Feedback: The empirical quadruple (\mathbf{s}, \mathbf{a}, \mathbf{r}, \mathbf{s'}) is used as input to calculate the current Q-value, which is recorded in the empirical pool. The error function is then calculated using the target value network. Each retrieval decision made by the model constructs a new retrieval priority queue q', which is returned to the decision computation layer to adjust the dimensional weighting ω.

[0169] 2. Managed Mode (Automated Decision Optimization): This mode is used for automated decision-making of the model.

[0170] 2.1 Automated decision-making and execution: Under the current environment state s, the current value network directly judges whether to reclaim the current queue resource subgraph, outputs and executes action a' (second initial behavior information), and the system performs atomic reclamation.

[0171] 2.2 Experience Collection and Rewards: After the recycling is performed, the reward function r is based on the amount of resources released and the impact on services, and the environmental state s' after the platform releases resources is detected.

[0172] 2.3 Model Training and Feedback: The empirical quadruple (\mathbf{s}, \mathbf{a'}, \mathbf{r}, \mathbf{s'}) is recorded in the empirical pool, and the error function is calculated through the current value network and the target value network. The decision order of the DDQN model constructs a new collection priority order q', which is fed back to the decision calculation layer for parameter optimization of dimension-weighted ω.

[0173] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0174] Reference Figure 7 The diagram shows a structural block diagram of a resource recycling device provided in an embodiment of the present invention, which may specifically include the following modules: Database table structure acquisition module 601 is used to acquire the database table structure of the cloud platform; The node dependency weight calculation module 602 is used to calculate the node dependency weight, which represents the importance of resource nodes in the cloud service dependency topology, the degree of association with other resource nodes, and the number of resource instances, through the database table structure. The multi-dimensional resource monitoring indicator determination module 603 is used to determine multi-dimensional resource monitoring indicators that characterize the rationality of resource node reclamation and business usage status. The recycling priority determination module 604 is used to determine the recycling priority of multiple resource nodes through the node dependency weight and the multi-dimensional resource monitoring indicators; The target resource node recycling module 605 is used to determine the target resource node based on the recycling priority and recycle the target resource node.

[0175] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0176] This application also provides an electronic device, which includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the steps of the method described above.

[0177] This application embodiment also provides a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described above.

[0178] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described resource recycling method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0179] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0180] It should be noted that, in this document, 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 a process, method, article, or apparatus. Without further limitations, 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. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0181] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0182] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A resource recycling method, characterized in that, include: Collect the database table structure of the cloud platform; The database table structure is used to calculate node dependency weights that characterize the importance of resource nodes in cloud service dependency topology, the degree of association with other resource nodes, and the number of resource instances. Determine multi-dimensional resource monitoring indicators to characterize the rationality of resource node reclamation and business usage status; The priority of reclaiming multiple resource nodes is determined by the node dependency weights and the multi-dimensional resource monitoring indicators. The target resource node is determined based on the recycling priority, and the target resource node is recycled.

2. The method according to claim 1, characterized in that, The step of calculating the node dependency weights, which characterize the importance of resource nodes in cloud service dependency topology, their correlation with other resource nodes, and the number of resource instances, through the database table structure, includes: A resource dependency graph is constructed using a database table structure to represent the dependency relationships between resource nodes. The resource dependency weight of each node is calculated using the number of resources containing the current resource as a foreign key, the number of resources in the table containing the foreign key in the current resource table, the number of the current resource, and the level of the resource in the relationship graph. Traverse the resource dependency graph and update the resource dependency weight of each node to the node dependency weight.

3. The method according to claim 2, characterized in that, The database table structure includes table name, table fields, foreign keys, and the number of table instances. The step of constructing a resource dependency graph representing the dependency relationships between resource nodes using the database table structure includes: Input the table name, table fields, table foreign keys, and number of table instances as keywords, and output a multi-level JSON format file based on natural language processing. Based on the hierarchical relationship of the JSON file, the multi-level JSON file is transformed into a resource dependency graph using visualization operations.

4. The method according to claim 3, characterized in that, The multi-level JSON format file includes the number of resources containing the current resource as a foreign key, the number of resources in the table containing the foreign key in the current resource table, the current resource count, and the resource's level in the relationship graph. The step of calculating the resource dependency weight of each node using the number of resources containing the current resource as a foreign key, the number of resources in the table containing the foreign key in the current resource table, the current resource count, and the resource's level in the relationship graph includes: Input the number of resources containing the current resource as a foreign key, the number of resources in the table containing the foreign key in the current resource table, the number of current resources, and the hierarchy of the resources in the relationship graph into Formula 1 to calculate the resource dependency weight of each node; Formula 1 is: Wherein, D is the number of resources containing the current resource as a foreign key, F is the number of resources in the table containing the foreign key in the current resource table, N is the current resource number, L is the resource level in the relational graph, i is the number or index of each resource directly associated with the current resource node when calculating the T1 value of the current resource node, and I is the total number of resources directly associated with the current resource node.

5. The method according to any one of claims 2-4, characterized in that, The steps for determining the multi-dimensional resource monitoring indicators used to characterize the rationality of resource node reclamation and business usage status include: Identify monitoring metrics defined by users for different resources on the cloud platform, and the monitoring metrics are used to characterize the business usage status of resource nodes; Define a general dimension for characterizing the rationality of resource recycling.

6. The method according to claim 5, characterized in that, After the step of traversing the resource dependency graph and iteratively updating the resource dependency weight of each node to the node dependency weight, the method further includes: Construct a resource dependency weight relationship graph that includes resource dependency weights; Obtain the node dependency weights in the resource dependency weight relationship graph.

7. The method according to claim 6, characterized in that, The step of determining the reclamation priority of multiple resource nodes through the node dependency weight and the multi-dimensional resource monitoring indicators includes: Initialize the preset dimension weighting; The resource node reclamation priority is calculated by combining the monitoring metrics, the general dimensions, the node dependency weights, and the dimension weights.

8. The method according to claim 7, characterized in that, The step of calculating the resource node reclamation priority by combining the monitoring metrics, the general dimensions, the node dependency weights, and the dimension weighting includes: Input the monitoring metrics, the general dimension, the node dependency weight T2, and the dimension weighted ω into Formula 2 to calculate the resource node reclamation priority; Formula 2 is as follows: Wherein, K is the number of users who customize the monitoring metric, j is the number of all general dimensions, M is the monitoring metric, H is the general dimension, T2 is the node dependency weight, ω is the dimension weighting, and P is the resource node recycling priority.

9. The method according to claim 8, characterized in that, The step of determining the target resource node based on the recycling priority includes: When resources exceed the available threshold, a subgraph is identified based on the resource dependency weight relationship graph to represent the relationship between the current resource node and the leaf node. The recycling priority and number of resource nodes are determined from the relational subgraph; Using the recycling priority and the number of resource nodes, calculate the resource node occupancy in each service instance; Based on the occupancy, different relational subgraphs are arranged from high to low to create a recycling queue; the relational subgraph with the highest rank contains the target resource node.

10. The method according to claim 9, characterized in that, The step of calculating the resource node occupancy for each service instance using the recycling priority and the number of resource nodes includes: Input the recycling priority and the number of resource nodes into Formula 3 to calculate the resource node occupancy in each service instance; Formula 3 is as follows: Wherein, Pi represents the recycling priority, ni represents the number of resource nodes, and O represents the resource node occupancy in each service instance.

11. The method according to claim 10, characterized in that, The step of reclaiming the target resource node includes: When the first initial behavior information for determining whether the user confirms the recycling of the relationship subgraph is received, a recycling operation is performed on the relationship subgraph containing the target resource node; Based on the node dependency weights, the monitoring metrics, and the general dimensions, a first environmental state is determined to characterize the current resource usage of the cloud platform. The reward function for the current action is determined by the amount of resources released or the number of service instances affected by the target resource nodes that are recycled, and the second environmental state after resource release is obtained. Using the first environmental state, the second environmental state, the first initial behavior information, and the reward function as inputs, calculate the benefit prediction value to characterize the benefits brought about by performing the recycling operation; The predicted benefit values ​​are recorded in the experience pool, and the error function of the predicted benefit values ​​is calculated using the target value network. The error function is used to adjust the dimensional weighting.

12. The method according to claim 10, characterized in that, The method is applied to a deep double-Q learning model, which includes a current value network. The step of reclaiming the target resource node includes: Based on the node dependency weights, the monitoring metrics, and the general dimensions, a first environmental state is determined to characterize the current resource usage of the cloud platform. The current value network is invoked to determine whether to confirm the recycling of the relational subgraph based on the first environmental state; When the second initial behavior information for determining the current value network to confirm the recycling of the relational subgraph is received, a recycling operation is performed on the relational subgraph containing the target resource node; The reward function for the current action is determined by the amount of resources released or the number of service instances affected by the target resource nodes that are recycled, and the second environmental state after resource release is obtained. Using the first environmental state, the second environmental state, the second initial behavior information, and the reward function as inputs, a benefit prediction value is calculated to characterize the benefits brought about by performing the recycling operation; The predicted benefit values ​​are recorded in the experience pool, and the error function of the predicted benefit values ​​is calculated using the target value network. The error function is used to adjust the dimensional weighting.

13. A resource recycling device, characterized in that, include: The database table structure acquisition module is used to collect the database table structure of the cloud platform. The node dependency weight calculation module is used to calculate node dependency weights that characterize the importance of resource nodes in the cloud service dependency topology, the degree of association with other resource nodes, and the number of resource instances through the database table structure. The multi-dimensional resource monitoring indicator determination module is used to determine multi-dimensional resource monitoring indicators that characterize the rationality of resource node reclamation and business usage status. The recycling priority determination module is used to determine the recycling priority of multiple resource nodes through the node dependency weight and the multi-dimensional resource monitoring indicators; The target resource node recycling module is used to determine the target resource node based on the recycling priority and recycle the target resource node.

14. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the method as described in claims 1-12.

15. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the method as described in claims 1-12.