Method and system for invoking service capabilities in application software
By using real-time monitoring and dynamic virtual machine migration technology, combined with correlation analysis to optimize load balancing strategies, the problems of service continuity and temperature control when hardware overheats are solved, and stability and efficiency are improved in high-concurrency scenarios.
Patent Information
- Application Number
- CN202510548824.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-04-28
AI Technical Summary
Existing technologies rely on passive cooling and load balancing when hardware overheats, which makes it difficult to simultaneously ensure service continuity and effectively control hardware temperature fluctuations, resulting in security and service efficiency issues.
By monitoring the temperature and load status data of the server cluster in real time, and combining it with virtual machine dynamic migration technology, service capabilities are migrated to backup server nodes. Correlation analysis is performed to optimize the load balancing strategy, and the migration trigger threshold is dynamically adjusted to control temperature fluctuations.
It enables continuous response to service requests in high-concurrency scenarios, improves fault avoidance rate and service level agreement achievement rate, reduces heat dissipation costs, extends hardware lifespan, and maintains the temperature stability of hardware resources.
Smart Images

Figure CN120315893B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of application software development, and in particular to a service capability calling method and system in application software. BACKGROUND
[0002] In a high-concurrency cloud computing environment, a server cluster needs to handle a large number of service requests at the same time, resulting in a rapid increase in hardware resource load and temperature. In order to ensure system stability and service continuity, a technical solution is needed that can monitor hardware status in real time and dynamically adjust resource allocation to cope with instantaneous request peaks and hardware overheating problems.
[0003] The load balancing strategy provided by the existing solution mainly relies on load state data to make resource allocation and migration decisions. The load balancing strategy can ensure the rationality of resource allocation to a certain extent. However, in the case of hardware overheating, the server nodes with high load still provide service capabilities in the application software, which has certain safety, service efficiency and other problems, and the existing solution adopts a passive cooling method for the hardware overheating problem. The combination of this method and the load balancing strategy is difficult to effectively constrain the temperature fluctuation range of hardware resources while ensuring service continuity. SUMMARY
[0004] The embodiments of the present application provide a service capability calling method and system in application software to solve the problem that the existing technology relies on passive cooling and load balancing when the hardware is overheated, which is difficult to ensure service continuity and effectively control hardware temperature fluctuations, and has safety and service efficiency problems.
[0005] In a first aspect, the embodiments of the present application provide a service capability calling method in application software, comprising:
[0006] Obtaining real-time temperature data and load state data of each available server node in a server cluster deployed with application software, and a preset load balancing strategy, wherein the load state data includes the number of service requests currently processed by the available server node and the resource occupancy rate;
[0007] When it is detected that the real-time temperature of any of the available server nodes exceeds a preset temperature threshold or the resource occupancy rate indicates that the capacity of the server node reaches a preset capacity upper limit, the service capability running in the available server node whose real-time temperature exceeds the preset temperature threshold or whose resource occupancy rate indicates that the capacity of the server node reaches the preset capacity upper limit is migrated to a standby server node by combining a virtual machine dynamic migration technology, wherein the standby server node is another available server node in the server cluster;
[0008] Correlation analysis is performed on the real-time temperature data, the load state data and the execution frequency of the migration operation of all available server nodes to obtain a correlation analysis result;
[0009] Based on the correlation analysis result, dynamically optimize the node screening rule in the preset load balancing strategy and the trigger threshold of the virtual machine dynamic migration technology, so that the optimized preset load balancing strategy maintains the continuous response of service requests in the high concurrency scenario, and restricts the temperature fluctuation range of the server cluster hardware resources.
[0010] Optionally, in combination with the virtual machine dynamic migration technology, the service capability running in the available server node whose real-time temperature exceeds the preset temperature threshold or whose resource occupancy rate indicates that the capacity of the server node reaches the preset capacity upper limit is migrated to a backup server node, and the backup server node is another available server node in the server cluster, comprising:
[0011] Determine the priority of the service capability running in the available server node whose real-time temperature exceeds the preset temperature threshold or whose resource occupancy rate indicates that the capacity of the server node reaches the preset capacity upper limit, and the priority is obtained based on the dynamic allocation of the resource demand characteristics and the business type of the service capability, and the resource demand characteristics include the required number of central processing unit (CPU) cores, the required memory capacity, and the required network bandwidth occupancy rate.
[0012] Based on the real-time temperature data and the load state data of all available server nodes in the server cluster, filter candidate server nodes whose temperature is lower than the preset temperature threshold and whose load does not reach the capacity upper limit;
[0013] When the number of candidate server nodes is more than one, sort the candidate server nodes according to the resource remaining capacity to generate a candidate server node list;
[0014] According to the priority of the service capability and the resource demand characteristics, match the candidate server node with the most suitable resource remaining capacity and select the candidate server node with the smallest difference value as the backup server node from the candidate server node list;
[0015] Before migration execution, perform secondary verification on the real-time temperature data and the load state data of the backup server node to ensure that the temperature fluctuation of the backup server node during the migration process is within the temperature fluctuation range, and the load state data is within the preset load state safety range;
[0016] Migrate the service capability to the backup server node through the virtual machine dynamic migration technology, and the migration process of the service capability includes migrating each service capability in order according to the priority, and updating the load state data and the temperature data of the backup server node in real time after each migration is completed.
[0017] Optionally, the service capability is migrated to the backup server node by the virtual machine dynamic migration technology, and the migration process of the service capability comprises sequentially migrating service capabilities in a priority order, comprising:
[0018] According to the priority of each service capability, all service capabilities running in the available server node whose real-time temperature exceeds a preset temperature threshold or resource occupancy rate indicates that the capacity of the server node reaches a preset upper limit of capacity are arranged in a descending order from high to low, and a migration task queue is generated;
[0019] The to-be-migrated service capability is sequentially selected from the migration task queue, and whether the resource remaining capacity of the backup server node meets the resource requirement of the to-be-migrated service capability is calculated based on the resource requirement characteristics of the to-be-migrated service capability;
[0020] If the resource requirement is met, the virtual machine dynamic migration technology is started to migrate the to-be-migrated service capability from the available server node whose real-time temperature exceeds a preset temperature threshold or resource occupancy rate indicates that the capacity of the server node reaches a preset upper limit of capacity to the backup server node;
[0021] Or, if the resource requirement is not met, the current migration task is suspended, the backup server node is reselected from the candidate server node list, and the migration target of the un-migrated task in the migration task queue is updated.
[0022] Optionally, if the resource requirement is met, the virtual machine dynamic migration technology is started to migrate the to-be-migrated service capability from the available server node to the backup server node, comprising:
[0023] According to the resource requirement characteristics of the to-be-migrated service capability, a migration configuration parameter is generated, and resources corresponding to the migration configuration parameter are pre-allocated on the backup server node;
[0024] The virtual machine dynamic migration technology is started to synchronize the memory state, central processing unit state and network connection information of the to-be-migrated service capability from the available server node whose real-time temperature exceeds a preset temperature threshold or resource occupancy rate indicates that the capacity of the server node reaches a preset upper limit of capacity to the backup server node;
[0025] During the synchronization process, the backup server node is monitored in real time, and if it is monitored that the resource occupancy rate of the backup server node exceeds a preset occupancy rate threshold or the temperature exceeds a preset temperature threshold, the synchronization process is suspended and a resource reallocation mechanism is triggered, and the pre-allocated resources are reevaluated and adjusted;
[0026] After the synchronization is completed, the running state of the service capability to be migrated is switched from the available server node whose real-time temperature exceeds a preset temperature threshold or resource occupancy rate indicates that the capacity of the server node reaches a preset capacity upper limit to the standby server node, and the corresponding resource on the available server node whose real-time temperature exceeds the preset temperature threshold or resource occupancy rate indicates that the capacity of the server node reaches the preset capacity upper limit is released;
[0027] After the switching is completed, the load state data and the temperature data of the standby server node are updated in real time, and the temperature data is periodically collected by a temperature sensor deployed on the standby server node at a preset sampling frequency.
[0028] Optionally, based on the correlation analysis result, the node screening rule in the preset load balancing strategy and the triggering threshold of the virtual machine dynamic migration technology are dynamically optimized, so that the optimized preset load balancing strategy maintains continuous response of service requests in a high-concurrency scenario and restricts the temperature fluctuation range of the hardware resources of the server cluster, including:
[0029] The coupling characteristics of temperature fluctuation and load surge are extracted from the correlation analysis result, and based on the coupling characteristics, the node screening rule in the preset load balancing strategy is optimized;
[0030] According to the execution frequency of the migration operation in the correlation analysis result, in combination with the temperature change curve and the load change curve of the available server node whose real-time temperature exceeds a preset temperature threshold or resource occupancy rate indicates that the capacity of the server node reaches a preset capacity upper limit and the standby server node during the migration process, the decay function parameters are calculated, the sensitivity of the migration triggering threshold is dynamically adjusted through the decay function parameters, and the migration triggering threshold is dynamically optimized;
[0031] Based on the optimized node screening rule and the migration triggering threshold, the optimized preset load balancing strategy is obtained, and the optimized preset load balancing strategy is applied to the server cluster to form a closed-loop feedback mechanism.
[0032] Optionally, the migration configuration parameters are generated according to the resource requirement characteristics of the service capability to be migrated, including:
[0033] Initial pre-allocation parameters are generated according to the required number of central processing unit (CPU) cores, the required memory capacity, and the required network bandwidth occupancy rate;
[0034] In combination with the real-time temperature data and the load state data of the standby server node, the initial pre-allocation parameters are dynamically adjusted to obtain adjusted pre-allocation parameters;
[0035] Based on the migration strategy constraint, corresponding fault tolerance and efficiency parameters are set, and the fault tolerance, the efficiency parameters and the adjusted pre-allocation parameters are combined to obtain migration configuration parameters.
[0036] Optionally, the optimized preset load balancing strategy is obtained based on the optimized node screening rule and the migration triggering threshold, and the method comprises:
[0037] An edge distance factor corresponding to a specified scenario is added to the optimized node screening rule, and the specified scenario comprises a high concurrency scenario and a preset high temperature sensitive scenario.
[0038] Based on the node screening rule added with the edge distance factor, the migration triggering threshold and the abnormal fuse mechanism, the optimized preset load balancing strategy is generated by using a federated learning model.
[0039] In a second aspect, an embodiment of the present application provides a service capability invocation system in application software, comprising:
[0040] An acquisition module is configured to acquire real-time temperature data and load state data of each available server node in a server cluster in which application software is deployed, and a preset load balancing strategy, wherein the load state data comprises a number of service requests currently processed by the available server node and a resource occupancy rate.
[0041] A detection migration module is configured to, when detecting that the real-time temperature of any available server node exceeds a preset temperature threshold or the resource occupancy rate indicates that the capacity of the server node reaches a preset upper limit of capacity, combine a virtual machine dynamic migration technology to migrate service capability running in the available server node whose real-time temperature exceeds the preset temperature threshold or whose resource occupancy rate indicates that the capacity of the server node reaches the preset upper limit of capacity to a backup server node, wherein the backup server node is another available server node in the server cluster.
[0042] An association analysis module is configured to perform association analysis on the real-time temperature data, the load state data and the execution frequency of the migration operation of all available server nodes to obtain an association analysis result.
[0043] An optimization module is configured to, based on the association analysis result, dynamically optimize a node screening rule in the preset load balancing strategy and a triggering threshold of the virtual machine dynamic migration technology, so that the optimized preset load balancing strategy maintains continuous response of service requests in a high concurrency scenario and restricts a temperature fluctuation range of hardware resources of the server cluster.
[0044] In a third aspect, the embodiments of the present application provide a computing device, comprising a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component, so as to realize the method for calling service capability in the application software according to any one of the first aspect.
[0045] In a fourth aspect, the embodiments of the present application provide a computer storage medium, which stores a computer program; when the computer program is executed by a computer, the method for calling service capability in the application software according to any one of the first aspect is realized.
[0046] In the embodiments of the present application, the method for calling service capability in the application software comprises the following steps: acquiring real-time temperature data and load state data of each available server node in a server cluster in which the application software is deployed, and a preset load balancing strategy; the load state data comprises a number of service requests currently processed by the available server node and a resource occupation rate; when it is detected that the real-time temperature of any available server node exceeds a preset temperature threshold or the resource occupation rate indicates that the capacity of the server node reaches a preset upper limit of capacity, the service capability running in the available server node whose real-time temperature exceeds the preset temperature threshold or whose resource occupation rate indicates that the capacity of the server node reaches the preset upper limit of capacity is migrated to a backup server node by using a virtual machine dynamic migration technology, the backup server node being another available server node in the server cluster; the real-time temperature data, the load state data and the execution frequency of the migration operation of all available server nodes are analyzed in association, so as to obtain an association analysis result; based on the association analysis result, a node screening rule in the preset load balancing strategy and a trigger threshold of the virtual machine dynamic migration technology are dynamically optimized, so that the optimized preset load balancing strategy maintains continuous response of service requests in a high-concurrency scenario, and the temperature fluctuation range of the hardware resources of the server cluster is constrained.
[0047] The embodiments of the present application acquire the temperature data and load state data of each node in the server cluster in real time, and automatically trigger the virtual machine dynamic migration mechanism before detecting that the available server node is about to reach the performance bottleneck (temperature overrun or resource full load), so as to seamlessly transfer the service request to the standby node. The mechanism can ensure that the service is switched without sensing, the failure avoidance rate is improved, the service level agreement achievement rate is improved, and the like under the high concurrent traffic impact, thereby guaranteeing the service continuity in the high concurrent scenario. Through the correlation analysis of the temperature and the load, the migration strategy is dynamically adjusted, the temperature fluctuation is inhibited, the heat dissipation cost is optimized, and the hardware life is prolonged, and the like, thereby realizing the intelligent regulation and control of the hardware resource temperature. Further, the service capability is migrated to the standby server node in combination with the virtual machine dynamic migration technology. During the migration process, the standby node is dynamically selected based on the priority of the service capability and the resource demand characteristics, and the temperature and the load state of the standby node are verified again before the migration. After the migration is completed, the load state data and the temperature data of the standby node are updated in real time, and the load balancing strategy and the migration triggering threshold are optimized through the correlation analysis, so as to maintain the continuous response of the service request and constrain the temperature fluctuation range of the hardware resource in the high concurrent scenario. Further, through the dynamic migration and the load balancing optimization, the continuous response of the service request and the temperature stability of the hardware resource are realized in the high concurrent scenario.
[0048] These aspects or other aspects of the present application will be more apparent in the following description of the embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, hereinafter, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without any creative effort.
[0050] Figure 1 A flowchart of a service capability calling method in an application software provided by the embodiments of the present application;
[0051] Figure 2 A structural schematic diagram of a service capability calling system in an application software provided by the embodiments of the present application;
[0052] Figure 3 A structural schematic diagram of a computing device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0053] In order to make the personnel in the technical field better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application.
[0054] In some of the flowcharts described in the specification and claims of the present application and in the above description of the drawings, a plurality of operations are included which occur in a particular order, but it should be clearly understood that the operations can be performed in the order in which they appear herein or in parallel, and the serial numbers of the operations such as 11, 12, etc. are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, the flowcharts can include more or fewer operations, and the operations can be performed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. herein are used to distinguish different messages, devices, modules, etc. and do not represent the order of precedence or limit the types of "first" and "second".
[0055] The technical solutions in the embodiments of the present application will be described clearly and completely in the specification of the present application in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0056] The prior art relies on passive heat dissipation and load balancing when the hardware is overheated, and it is difficult to simultaneously guarantee service continuity and effectively control hardware temperature fluctuations, resulting in safety and service efficiency problems. In order to solve the above problems, the embodiments of the present application provide a service capability calling method in application software, the specific idea includes: collecting real-time temperature data and load state data (including service request quantity and resource occupancy rate) of each available server node in the server cluster in real time through sensors or monitoring software, and combining a preset load balancing strategy for preliminary analysis. When it is detected that the temperature of a node exceeds a preset temperature threshold or the resource occupancy rate reaches the upper limit of the capacity, a virtual machine dynamic migration technology is triggered to migrate the service capability of the available server node to a backup node in the server cluster, ensuring service continuity. Correlation analysis is performed on the temperature, load data and migration frequency of all available server nodes to form an analysis result. Based on the analysis result, the node screening rules and migration triggering threshold in the load balancing strategy are dynamically optimized to maintain continuous response of the service in a high concurrency scenario, while controlling the temperature fluctuation range of the hardware resources, improving system stability and resource utilization.
[0057] Figure 1 A flowchart of a service capability calling method in application software provided by the embodiments of the present application is shown in Figure 1 The method comprises:
[0058] S11, acquire real-time temperature data and load state data of each available server node in a server cluster deployed with application software, and a preset load balancing strategy, the load state data including a number of service requests currently processed by the available server node and resource occupation rate.
[0059] In the server cluster, the server nodes can be referred to as nodes. The real-time temperature data is hardware temperature information collected by a temperature sensor deployed on the server node, and is used to reflect the heat dissipation state of the corresponding server node. The load state data includes the number of service requests currently processed by the server node and resource occupation rate, such as CPU occupation rate and memory usage rate, and is used to reflect the load condition of the node. The preset load balancing strategy is a rule defined in advance, and is used to distribute service requests to appropriate nodes according to the load state data. The number of service requests refers to the total number of service requests currently processed by the server node, and is used to reflect the load condition of the node. The resource occupation rate refers to the proportion of the hardware resources (such as CPU, memory, and network bandwidth) of the server node currently used, and is used to quantify the load state of the node.
[0060] S12, when it is detected that the real-time temperature of any available server node exceeds a preset temperature threshold or the resource occupation rate indicates that the capacity of the server node reaches an upper limit of the capacity, the service capability running in the available server node is migrated to a backup server node in combination with a virtual machine dynamic migration technology, and the backup server node is another available server node in the server cluster.
[0061] In the server cluster, the server nodes can be referred to as nodes. The real-time temperature data is hardware temperature information collected by a temperature sensor deployed on the server node, and is used to reflect the heat dissipation state of the corresponding server node. The load state data includes the number of service requests currently processed by the server node and resource occupation rate, such as CPU occupation rate and memory usage rate, and is used to reflect the load condition of the node. The preset load balancing strategy is a rule defined in advance, and is used to distribute service requests to appropriate nodes according to the load state data. The number of service requests refers to the total number of service requests currently processed by the server node, and is used to reflect the load condition of the node. The resource occupation rate refers to the proportion of the hardware resources (such as CPU, memory, and network bandwidth) of the server node currently used, and is used to quantify the load state of the node.
[0062] S13, perform correlation analysis on the real-time temperature data, the load state data, and the execution frequency of the migration operation of all available server nodes to obtain a correlation analysis result.
[0063] The correlation analysis refers to analyzing the correlation between the temperature data, the load state data and the migration frequency by the available server nodes, and is used to identify the coupling relationship between the temperature fluctuation and the load surge. The correlation analysis result includes the time difference between the temperature fluctuation peak and the load surge event, the correlation between the temperature fluctuation amplitude and the load surge intensity, and the like. The temperature data, the load state data and the migration operation execution frequency have strong correlation: the temperature fluctuation is closely related to the load surge, the load surge can cause the temperature to rise, and the temperature exceeding the standard can trigger the migration operation. The migration frequency reflects the intensity of the load fluctuation and the temperature fluctuation, and is an important basis for optimizing the load balancing strategy and the migration triggering threshold. By constructing the correlation model, the relationship among the three can be quantified, the system strategy can be dynamically optimized, so that the continuous response of service requests is maintained in the high concurrency scenario, and the temperature fluctuation range of the hardware resources is constrained.
[0064] S14, based on the correlation analysis result, dynamically optimizing the node screening rule in the preset load balancing strategy and the triggering threshold of the virtual machine dynamic migration technology, so that the optimized preset load balancing strategy maintains the continuous response of service requests in the high concurrency scenario, and constrains the temperature fluctuation range of the hardware resources of the server cluster.
[0065] The node screening rule is used to select the rule for assigning service requests to appropriate nodes, including the weighted coefficients of the temperature threshold and the load threshold. The triggering threshold refers to the critical value for determining whether to trigger an operation (such as virtual machine dynamic migration). In the embodiments of the present application, the triggering threshold includes a temperature triggering threshold and a load triggering threshold, which are respectively used to determine whether the temperature or load of the server node reaches the condition requiring migration.
[0066] The following is a specific example: Assuming that an e-commerce platform faces high concurrency access during an activity, the CPU temperature of a node in the server cluster reaches 90°C, and the resource occupancy rate reaches 95%. At this time, the migration triggering module detects the anomaly and starts the virtual machine dynamic migration to migrate the service capability of the node to the standby node. The correlation analysis module finds that the temperature anomaly of the node is closely related to the high load, and the strategy optimization module adjusts the CPU temperature threshold to 80°C and preferentially selects the low-load node to process new requests. Finally, the server cluster maintains the continuous response of service requests in the high concurrency scenario, and controls the temperature fluctuation range of the hardware resources within a reasonable range.
[0067] By performing S11-S14, the embodiment of the application realizes continuous response of service requests and temperature stability of hardware resources in a high-concurrency scenario by real-time monitoring of temperature and load data, dynamic migration of service capabilities, correlation analysis of data, and optimization of load balancing strategies. Through priority allocation and resource demand matching, critical business is prioritized for migration, improving system stability. Through real-time monitoring and secondary verification, the temperature or load of the standby node is prevented from exceeding the limit during migration, ensuring migration success rate. Correlation analysis and dynamic optimization reduce migration frequency and resource waste, maximizing resource utilization. In a closed-loop feedback mechanism, load balancing strategies and migration trigger thresholds are continuously optimized to adapt to changing loads and hardware states.
[0068] In a possible embodiment, S12, in combination with the virtual machine dynamic migration technology, migrates the service capabilities running in the available server nodes to the standby server nodes, which are another available server node in the server cluster, including:
[0069] Step 121, determining the priority of the service capabilities running in the available server nodes, the priority being dynamically assigned based on the resource demand characteristics and business types of the service capabilities, the resource demand characteristics including the required number of CPU cores, the required memory capacity, and the required network bandwidth occupancy.
[0070] The resource demand characteristics include the required number of CPU cores, the required memory capacity, and the required network bandwidth occupancy, which are used to quantify the demand of the service capabilities for hardware resources. The business type is the business category to which the service capability belongs (such as payment service, log service), which is used to dynamically assign priorities. The number of CPU cores refers to the number of cores in the CPU that can independently process tasks. Each core can execute one thread at the same time, and the more cores there are, the stronger the parallel processing capability of the CPU. The network bandwidth occupancy is the proportion of the network bandwidth currently used by the server node to the total bandwidth, which is used to reflect the network resource usage of the node.
[0071] Step 122, based on the real-time temperature data and load state data of all available server nodes in the server cluster, screening candidate server nodes whose temperature is lower than the preset temperature threshold and whose load does not reach the upper limit of the capacity.
[0072] The candidate server node is a node that meets the condition of having a temperature lower than the preset threshold and a load not reaching the upper limit of the capacity. The candidate server node can be one or more. When the candidate server node is one, the candidate server node can be used as a standby server node, otherwise step 123 is performed.
[0073] Step 123, when the number of candidate server nodes is more than one, sorting the candidate server nodes according to the remaining capacity of resources to generate a list of candidate server nodes.
[0074] wherein the resource remaining capacity refers to the number of CPU cores, memory capacity and network bandwidth currently available to the candidate server node. The candidate server node list refers to a list of nodes sorted by resource remaining capacity, used to select the most suitable backup server node. In other words, the candidate server node list refers to a set of nodes filtered from the server cluster that meet certain conditions (such as temperature below a preset threshold and load not reaching the upper limit of capacity). These nodes serve as potential targets for dynamic migration of virtual machines, used to receive service capabilities migrated from overloaded or overheated nodes.
[0075] Step 124, according to the priority of the service capability and the resource demand characteristics, match the candidate server node list with the most suitable resource remaining capacity and select the candidate server node with the smallest difference value as the backup server node.
[0076] wherein matching the most suitable resource remaining capacity refers to selecting a node from the candidate server node list whose resource remaining capacity best matches the resource demand characteristics of the service capability. Specifically, it is to select a node whose remaining CPU core number, memory capacity and network bandwidth can best meet the needs of the service capability to be migrated, while minimizing resource waste. The difference value refers to the difference between the resource demand characteristics of the service capability and the resource remaining capacity of the candidate server node. Here is an example: suppose there is a service capability that requires the following resources: CPU core number 4, core memory capacity 8 GB, network bandwidth occupancy rate 20%, and there are two candidate server nodes, node A: available CPU core number 5, available memory capacity 10 GB, available network bandwidth occupancy rate 25%, node B: available CPU core number 6, available memory capacity 12 GB, available network bandwidth occupancy rate 30%, calculate the difference value, wherein the difference value between node A and the resource demand characteristics of the service capability is as follows: CPU core number difference value is 4-5=-1, absolute value is 1, memory capacity difference value is 8-10=-2, absolute value is 2, network bandwidth occupancy rate difference value is 20-25=-5, absolute value is 5, therefore the total difference value is: 1+2+5=8, the difference value between node B and the resource demand characteristics of the service capability is as follows: CPU core number difference value is 4-6=-2, absolute value is 2, memory capacity difference value is 8-12=-4, absolute value is 4, network bandwidth occupancy rate difference value is 20-30=-10, therefore absolute value is 10, total difference value is 2+4+10=16, compare the total difference value: the total difference value between node A and the resource demand characteristics of the service capability is 8, the total difference value between node B and the resource demand characteristics of the service capability is 16, the difference value between node A and the resource demand characteristics of the service capability is smaller, therefore node A is selected as the backup server node.
[0077] Step 125, before migration execution, the real-time temperature data and load state data of the standby server node are verified again to ensure that the temperature fluctuation of the standby server node during migration is within the temperature fluctuation range, and the load state data is within the preset load state safety range.
[0078] wherein the secondary verification refers to checking the temperature and load state of the standby server node again before migration to ensure migration safety. The temperature fluctuation range includes a lower temperature limit and an upper temperature limit, wherein the lower temperature limit refers to the minimum safe temperature of the standby server node, which is usually defined by the hardware manufacturer, for example 10°C. Below this temperature may cause abnormal hardware performance. The upper temperature limit refers to the maximum safe temperature of the standby server node, which is usually defined by the hardware manufacturer, for example 80°C. Exceeding this temperature may cause hardware damage or performance degradation. The load state safety range includes a lower load limit and an upper load limit, wherein the lower load limit refers to the minimum load state of the standby server node, which is usually 0%, indicating that the node is in idle state. The upper load limit refers to the maximum load state of the standby server node, which is usually defined by the system administrator, for example 80%. Exceeding this value may cause node overload, affecting service performance.
[0079] Step 126, migrate the service capabilities to the standby server node through virtual machine dynamic migration technology, the migration process of service capabilities includes migrating each service capability in priority order in turn, and updating the load state data and temperature data of the standby server node in real time after each migration is completed.
[0080] wherein the priority order migrates each service capability in turn refers to migrating the service capabilities from the source node to the standby server node in order of importance (priority) from high to low. High priority service capabilities are migrated first to ensure that critical business is not affected during migration.
[0081] As a specific example, an online education platform faces high concurrent access during exam season, and the CPU temperature of a node in the server cluster reaches 90°C, and the resource occupancy rate reaches 95%. The platform dynamically allocates priorities according to the resource requirements of service capabilities (such as CPU core number, memory capacity, network bandwidth occupancy rate) and business types (such as real-time video, online examination). For example, the priority of real-time video service is higher than that of online examination service, because video service is more sensitive to delay. Through temperature sensors and load monitoring tools, candidate nodes with temperature below 85°C and load below 90% are selected to generate a candidate node list. The candidate nodes are sorted according to the remaining resource capacity (such as CPU, memory, bandwidth) to generate a candidate node list. According to the service capability priority and resource requirement characteristics, the backup node with the most suitable remaining resource capacity is matched from the candidate node list. For example, the node with the closest remaining CPU core number and memory capacity to the service capability requirement is selected. Before migration, the temperature and load data of the backup node are verified again to ensure that the temperature fluctuation is within the preset range (such as ±5°C) and the load state data is within the safe range (such as CPU usage <80%). Through virtual machine dynamic migration technology, the service capabilities are migrated in order of priority, and the load state data and temperature data of the backup node are updated in real time after each migration is completed. The platform successfully migrates the service capabilities to the backup node, ensuring the high concurrent access demand during the exam season, while controlling the temperature fluctuation range of the hardware resources within a reasonable range.
[0082] By performing steps 121-126, the embodiments of the present application effectively solve the resource allocation and temperature control problems of the server cluster in the high concurrency scenario by dynamically determining the service capability priority, selecting the candidate node, matching the backup node, verifying again and performing migration. The optimized strategy not only improves the stability and availability of the system, but also reduces the temperature fluctuation of the hardware resources, prolongs the service life of the equipment, and improves the user experience.
[0083] In one possible embodiment, step 126, the service capabilities are migrated to the backup server node through virtual machine dynamic migration technology, and the migration process of the service capabilities includes migrating each service capability in order of priority, including:
[0084] Step a1, according to the priority of each service capability, arrange all service capabilities running in the available server nodes in order from high to low to generate a migration task queue.
[0085] Among them, the migration task queue is the core data structure in the dynamic optimization process of the server cluster, which is used to manage and schedule the migration tasks of the service capabilities.
[0086] Step a2, sequentially select the service capability to be migrated from the migration task queue, and calculate whether the resource remaining capacity of the backup server node meets the resource requirement of the service capability to be migrated based on the resource requirement characteristics of the service capability to be migrated.
[0087] Wherein, the service capability to be migrated refers to the service instance or application that needs to be migrated from the current node to the backup node in the server cluster. These service capabilities usually include virtual machines, containers or applications running on server nodes, and their migration requirements may be triggered by various factors such as high node temperature, high load or uneven resource allocation.
[0088] Step a3, if the resource requirement is met, start the virtual machine dynamic migration technology to migrate the service capability to be migrated from the available server node to the backup server node.
[0089] Step a4, or, if the resource requirement is not met, pause the current migration task, reselect the backup server node from the candidate server node list to update the migration target of the un-migrated task in the migration task queue.
[0090] Wherein, the migration target refers to the final destination of the service capability to be migrated in the dynamic optimization process of the server cluster. Specifically, the migration target is the server node determined after screening and matching based on the resource requirement characteristics (such as CPU core number, memory capacity, network bandwidth occupancy) of the service capability to be migrated and the resource remaining capacity of the backup node. The selection of the migration target needs to ensure that the backup node can meet the resource requirement of the service capability to be migrated, and maintain the stability and continuity of the system during the migration process.
[0091] By performing steps a1-a4, the embodiments of the present application realize the continuous response of service requests and the temperature stability of hardware resources in a high-concurrency scenario through priority sorting, resource capacity verification, virtual machine dynamic migration and dynamic screening of backup nodes. Through priority allocation, critical business is prioritized for migration, improving system stability; then resource capacity verification avoids overloading the node after migration, ensuring service performance; based on the virtual machine dynamic migration technology, it ensures that the service does not interrupt, improving user experience; dynamic screening of backup nodes supports dynamic adjustment of migration tasks, ensuring migration success rate.
[0092] In one possible embodiment, step a3, if the resource requirement is met, start the virtual machine dynamic migration technology to migrate the service capability to be migrated from the available server node to the backup server node, comprising:
[0093] Step b1, generate migration configuration parameters according to the resource requirement characteristics of the service capability to be migrated, and pre-allocate resources corresponding to the migration configuration parameters on the backup server node.
[0094] The migration configuration parameter refers to configuration information generated according to the resource requirement characteristics (such as the number of CPU cores, memory capacity, network bandwidth occupancy, etc.) of the service capability to be migrated. These parameters are used to guide the migration process and ensure that the standby server node can meet the resource requirements of the service capability to be migrated. The pre-allocated resource corresponding to the migration configuration parameter refers to the resource pre-allocated on the standby server node according to the migration configuration parameter. This step ensures that the standby node has sufficient resources to carry the service capability to be migrated before the migration starts.
[0095] Step b2, start the virtual machine dynamic migration technology to synchronize the memory state, central processor state and network connection information of the service capability to be migrated from the available server node to the standby server node.
[0096] The synchronization process includes memory page replication, CPU state saving and network connection switching.
[0097] Step b3, during the synchronization process, the standby server node is monitored in real time. If it is monitored that the resource occupancy rate of the standby server node exceeds the preset occupancy rate threshold or the temperature exceeds the preset temperature threshold, the synchronization process is suspended and the resource reallocation mechanism is triggered, and the pre-allocated resource is re-evaluated and adjusted.
[0098] The resource reallocation mechanism refers to a mechanism for re-evaluating and adjusting the pre-allocated resource if the resource occupancy rate of the standby node exceeds the preset occupancy rate threshold or the temperature exceeds the preset temperature threshold during the synchronization process.
[0099] Step b4, after synchronization is completed, the running state of the service capability to be migrated is switched from the available server node to the standby server node, and the corresponding resource on the available server node is released.
[0100] The corresponding resource refers to the hardware resource pre-allocated and used on the standby server node to carry the service capability to be migrated. These resources include: CPU resources, memory resources, network bandwidth resources.
[0101] Step b5, after the switching is completed, the load state data and temperature data of the standby server node are updated in real time. The temperature data is periodically collected at a preset sampling frequency by the temperature sensor deployed on the standby server node.
[0102] The load state data and temperature data update refers to the process of updating the load state data and temperature data of the standby node in real time after the switching is completed.
[0103] As a specific example, assume that an online education platform faces high concurrent access during exam season, and the CPU temperature of a node in the server cluster reaches 90°C, and the resource occupancy rate reaches 95%. At this time, the platform generates migration configuration parameters according to the resource demand characteristics of the service capability to be migrated, including a 4-core CPU, 8 GB of memory, and 100 Mbps of network bandwidth. After pre-allocating these resources on the standby node, the virtual machine dynamic migration technology is started to migrate the service capability from the current node to the standby node. During synchronization, the resource occupancy rate and temperature data of the standby node are monitored in real time, and if the pre-set threshold is exceeded, the synchronization process is suspended and the pre-allocated resources are re-evaluated and adjusted. Finally, the platform successfully migrates the service capability to the standby node, ensuring the high concurrent access demand during the exam season.
[0104] By performing steps b1~b5, the embodiments of the present application dynamically determine migration configuration parameters, pre-allocate resources, start virtual machine dynamic migration technology, monitor standby nodes in real time, switch running states, and update load state data. The present solution effectively solves the resource allocation and temperature control problems of server clusters in high concurrency scenarios, improves the stability and availability of the system, reduces the temperature fluctuations of hardware resources, prolongs the service life of the equipment, and improves the user experience.
[0105] In one possible embodiment, S14, based on the correlation analysis result, dynamically optimizes the node screening rules in the pre-set load balancing strategy and the trigger threshold of the virtual machine dynamic migration technology, so that the optimized pre-set load balancing strategy maintains the continuous response of service requests in the high concurrency scenario, and constrains the temperature fluctuation range of the hardware resources of the server cluster, including:
[0106] Step 141, extract the coupling characteristics of temperature fluctuations and load surges from the correlation analysis result, and optimize the node screening rules in the pre-set load balancing strategy based on the coupling characteristics.
[0107] Wherein, the coupling characteristics refer to the correlation between the temperature change of the server node and the load surge. This coupling characteristic reflects the influence of load surge on the temperature of hardware resources, and is an important basis for optimizing the node screening rules. The node screening rules are rules for selecting appropriate nodes to allocate service requests, including the weighting coefficients of temperature thresholds and load thresholds.
[0108] Step 142, according to the execution frequency of the migration operation in the correlation analysis result, combining the temperature change curve and the load change curve of the available server nodes and the standby server nodes in the migration process, calculate the decay function parameters, and dynamically adjust the sensitivity of the migration trigger threshold through the decay function parameters, to dynamically optimize the migration trigger threshold.
[0109] The attenuation function parameter is a parameter for adjusting the sensitivity of the migration trigger threshold. Through this parameter, the frequency of migration operations can be dynamically controlled, avoiding resource waste or system instability caused by frequent migration. The sensitivity of the migration trigger threshold refers to the degree of system response to changes in server node resource occupancy or temperature. The higher the sensitivity, the more rapid the system response to changes in resource occupancy or temperature, and the more frequent the migration operations. The lower the sensitivity, the slower the system response to changes, and the fewer the migration operations. The migration operation execution frequency is the number of migration operations occurring per unit time, reflecting the frequency of the migration strategy.
[0110] Step 143, based on the optimized node screening rule and the migration trigger threshold, an optimized preset load balancing strategy is obtained, and the optimized preset load balancing strategy is applied to the server cluster to form a closed-loop feedback mechanism.
[0111] The optimized preset load balancing strategy refers to the load balancing strategy formed based on the optimized node screening rule and the migration trigger threshold. Through the closed-loop feedback mechanism, the strategy dynamically adjusts the resource allocation and migration operations of the server cluster, ensuring the stability and temperature control of the system in high-concurrency scenarios. The closed-loop feedback mechanism is a control mechanism that monitors system output in real time, compares it with the expected value, and adjusts the system input to achieve system stability and optimization. The closed-loop feedback mechanism includes monitoring and feedback, comparison and deviation calculation, adjustment and optimization, closed-loop cycle, optimized node screening rule, dynamic adjustment of migration trigger threshold, application and feedback. Through the closed-loop feedback mechanism, the embodiments of the present application can maintain continuous response of service requests in high-concurrency scenarios and constrain the temperature fluctuation range of hardware resources, thereby improving the stability and efficiency of the server cluster.
[0112] The following is a specific example: a certain securities trading system faces tens of thousands of transaction requests per second at the opening of the stock market, and the CPU temperature of a node in the server cluster rises to 92°C, with a load of 98%. Extract the temperature fluctuation data of the node (temperature rises from 60°C to 92°C within 5 minutes after opening) and the load surge data (request volume surges from 1000 / s to 20000 / s). Through the long short-term memory network model analysis, it is found that the temperature response delay after load surge is 30 seconds, and the temperature rises by 10°C for every 5000 requests. Optimize the node selection rule: preferentially select nodes with temperature response delay greater than 1 minute and temperature rise rate per request volume less than 5°C / 5000 as backup nodes. Statistics show that the migration frequency after opening is 10 times / hour, combined with temperature / load curve fitting, calculate the decay function parameter λ=0.15. Dynamically adjust the migration trigger threshold: the CPU temperature threshold is relaxed from 85°C to 87°C, and the migration operation frequency is reduced to 6 times / hour. After deploying the optimization strategy, the monitoring shows that the temperature fluctuation range of the backup node is reduced from ±15°C to ±8°C. Update the decay function parameter every 10 minutes, and finally λ stabilizes at 0.12, the trigger threshold is adjusted to 86.5°C, and the server cluster reaches a balanced state.
[0113] By performing steps 141-143, the embodiment of the present application realizes continuous response of service requests and temperature stability of hardware resources in a high-concurrency scenario by extracting the coupling characteristics of temperature fluctuations and load surges, dynamically adjusting the migration trigger threshold, and forming a closed-loop feedback mechanism. By optimizing the node selection rule, it ensures that the load distribution is more reasonable, avoiding node overload or hardware overheating; dynamically adjusting the migration trigger threshold reduces unnecessary migration operations and reduces system overhead; through the closed-loop feedback mechanism, continuously optimize the load balancing strategy and migration trigger threshold to adapt to changing loads and hardware states.
[0114] In a possible embodiment, step b1, according to the resource requirement characteristics of the service capability to be migrated, generates migration configuration parameters, including:
[0115] Step c1, according to the required number of central processing unit (CPU) cores, the required memory capacity, and the required network bandwidth occupancy rate, generates initial pre-allocation parameters.
[0116] CPU core number refers to the number of physical computing cores inside the processor, each of which can independently execute instructions and tasks. For example, an 8-core CPU means there are 8 independent processing units that can handle 8 threads of tasks simultaneously. The core number directly affects parallel computing capability and multitasking efficiency, and is one of the core indicators for measuring server performance. Memory capacity is the size of the random access memory used by the server for temporary storage and processing of data, measured in bytes (Byte) (such as 16GB, 64GB). The memory capacity determines the amount of data that the server can handle simultaneously, and if the memory is insufficient, it will cause frequent disk swapping, reducing performance. Initial pre-allocation parameters are resource allocation schemes set in advance based on task requirements (CPU core number, memory capacity, network bandwidth) to guide the initial deployment of virtual machines or containers. For example, the initial parameters may be "CPU core number = 4, memory = 16GB, bandwidth = 100Mbps".
[0117] Step c2, combine the real-time temperature data and load state data of the standby server node to dynamically adjust the initial pre-allocation parameters to obtain the adjusted pre-allocation parameters.
[0118] Wherein, the adjusted pre-allocation parameters refer to the resource allocation scheme dynamically optimized based on the initial resource allocation (CPU core number, memory capacity, network bandwidth) and real-time server state (temperature, load).
[0119] Step c3, based on the migration strategy constraints, set the corresponding fault tolerance and efficiency parameters, combine the fault tolerance, efficiency parameters and the adjusted pre-allocation parameters to obtain the migration configuration parameters.
[0120] Wherein, the migration strategy constraints refer to the limit conditions or rules set in the virtual machine dynamic migration process to ensure the success rate of migration and system stability. Fault tolerance and efficiency parameters refer to parameters set in the migration process to balance system stability and migration efficiency. Migration configuration parameters refer to configuration information generated to guide the migration operation according to the resource demand characteristics of the service capability to be migrated, the real-time state of the standby server node and the migration strategy constraints.
[0121] The following is a specific example: in the e-commerce promotion scene, the server cluster needs to handle the instantaneous surge of service requests. By collecting the temperature data and load state data of each node in real time, it is detected that a node is overloaded due to the surge of requests, and a migration task is immediately started. According to the CPU core number, memory capacity and network bandwidth occupancy required by service capability, the initial pre-allocation parameter "CPU core number = 4, memory = 16GB, bandwidth = 100Mbps" is generated; combined with the real-time temperature data and load state data of the standby node, the initial pre-allocation parameter is dynamically adjusted to "CPU core number = 3, memory = 12GB, bandwidth = 80Mbps"; based on the migration strategy constraints, the fault tolerance and efficiency parameters are set, for example, the retry number = 3, the migration bandwidth limit = 100Mbps, the migration configuration parameter "CPU core number = 3, memory = 12GB, bandwidth = 80Mbps, retry number = 3, migration bandwidth limit = 100Mbps" is generated; the migration configuration parameter is applied to the migration task to ensure that the migration process is efficient and reliable.
[0122] By performing steps c1-c3, the embodiment of the present application realizes seamless migration of service capability in a high-concurrency scenario by generating initial pre-allocation parameters, dynamically adjusting pre-allocation parameters, and setting fault tolerance and efficiency parameters. The initial pre-allocation parameter ensures that the resource allocation of the migration target node meets the service capability requirement; by dynamically adjusting the pre-allocation parameter, the real-time state of the standby node is adapted to avoid node overload or hardware overheating; the fault tolerance and efficiency parameters are set to balance system stability and migration efficiency to ensure that the migration process is efficient and reliable.
[0123] In one possible embodiment, step 143, based on the optimized node screening rule and the migration trigger threshold, obtains an optimized preset load balancing strategy, including:
[0124] Step d1, add an edge distance factor corresponding to a specified scene in the optimized node screening rule, the specified scene including a high-concurrency scene and a preset high-temperature sensitive scene; the preset high-temperature sensitive scene refers to a scene in which the temperature of a node in a server cluster is prone to exceed a safety threshold due to limited hardware cooling conditions, environmental temperature fluctuations, or high-load operation.
[0125] The edge distance factor is used to quantify the parameter of the physical distance and network topology relationship between nodes. The high-concurrency scene refers to a scene in which the system needs to handle a large number of user requests at the same time in a short time.
[0126] Step d2, based on the node screening rule with the added edge distance factor, the migration trigger threshold, and the abnormal fuse mechanism, an optimized preset load balancing strategy is generated using a federated learning model.
[0127] The abnormal melting mechanism refers to that if the temperature of the standby node exceeds the safe range due to 3 consecutive migration operations, the migration is suspended and manual intervention is triggered. After the alarm is resolved, the decay function parameters are reset and the optimization strategy is reloaded. The edge distance factor is a parameter for quantifying the physical distance between nodes and the network topology relationship. It reflects the influence of the physical distance between server nodes (such as rack position within the data center, distance across data centers, etc.) and the network topology structure (such as network hops, delay, etc.) on service performance. The smaller the edge distance factor, the closer the physical distance between nodes or the better the network topology relationship, the lower the communication delay, and the higher the data transmission efficiency. The node selection rule with the edge distance factor added is as follows: For example, in a high concurrency scenario, the system needs to quickly respond to a large number of user requests, so nodes with smaller edge distance factors are preferred to reduce communication delay and improve response speed. In a high temperature sensitive scenario, nodes with smaller edge distance factors are preferred to reduce the additional heat generated due to inter-node communication and reduce the additional load caused by network transmission.
[0128] In the embodiments of the present application, in a high concurrency scenario, nodes with smaller edge distance factors can reduce communication delay and improve data transmission efficiency, thereby improving the response speed and processing capacity of the system. By preferentially selecting nodes with smaller edge distance factors, the performance bottleneck caused by network delay can be avoided, and the system can still run stably under high load. In a high temperature sensitive scenario, nodes with smaller edge distance factors can reduce the additional heat caused by inter-node communication and reduce the heat dissipation pressure. By reducing the network transmission distance and the number of hops, the additional load caused by network communication can be reduced, thereby reducing the temperature fluctuation of the node and avoiding the temperature of the node exceeding the safety threshold. The introduction of the edge distance factor makes the node selection more refined, which can better match the service demand and node resources and avoid resource waste. By optimizing node selection, unnecessary network transmission and heat generation can be reduced, thereby improving the overall resource utilization efficiency. In a high concurrency and high temperature sensitive scenario, the introduction of the edge distance factor helps to select better nodes and reduce the risk of system failure. By reducing communication delay and heat generation, the stability and reliability of the system can be improved, and the continuous availability of service capacity can be ensured. The embodiments of the present application fuse the node selection rule, the migration threshold and the melting mechanism through the federated learning framework to generate a dynamic load balancing strategy.
[0129] By executing steps d1~d3, the application embodiment improves response efficiency in a high concurrency scenario through multi-dimensional fusion of edge distance factors and dynamic policy optimization driven by federated learning. Through edge node priority scheduling, cross-region network delay is reduced from 50ms to 20ms, and efficiency is improved by 40%. In a high temperature sensitive scenario, dynamic adjustment of the migration threshold effectively avoids frequent fusing caused by temperature fluctuations, and the system stability is enhanced by 50%. The federated learning model accurately predicts the load distribution, reduces the idle of computing resources, and optimizes the resource utilization rate by 30%. In addition, the fuse mechanism and federated feedback form a double protection, the system collapse risk is reduced, and the abnormal fault tolerance ability is improved by 70%. In the Double 11 scenario of e-commerce, the server cluster carrying capacity is improved by 3 times, the operation and maintenance cost is reduced by 40%, and the cross-border data privacy compliance requirements are met, realizing efficient, stable and safe load balancing optimization.
[0130] Figure 2 A structural diagram of a service capability calling system in application software provided by the application embodiment is shown in Figure 2 The system comprises:
[0131] The acquisition module 21 acquires real-time temperature data and load state data of each available server node in the server cluster deployed with the application software, and a preset load balancing strategy, and the load state data comprises the number of service requests currently processed by the available server node and the resource occupancy rate.
[0132] The detection migration module 22, when detecting that the real-time temperature of any available server node exceeds the preset temperature threshold or the resource occupancy rate indicates that the capacity of the server node reaches the capacity upper limit, combines the virtual machine dynamic migration technology to migrate the service capability running in the available server node to the standby server node, and the standby server node is another available server node in the server cluster.
[0133] The correlation analysis module 23 correlates and analyzes the real-time temperature data, load state data and migration operation execution frequency of all available server nodes to obtain a correlation analysis result.
[0134] The optimization module 24 dynamically optimizes the node screening rules in the preset load balancing strategy and the trigger threshold of the virtual machine dynamic migration technology based on the correlation analysis result, so that the optimized preset load balancing strategy maintains the continuous response of service requests in a high concurrency scenario, and restricts the temperature fluctuation range of the hardware resources of the server cluster.
[0135] Figure 2 The service capability calling system in the application software can execute Figure 1The implementation principle and technical effects of the service capability calling method in the application software according to the embodiment are not repeated. The specific operation modes of each module and unit in the service capability calling system in the application software according to the embodiment have been described in detail in the embodiment related to the method, and thus will not be described in detail here.
[0136] In one possible design, Figure 2 The service capability calling system in the application software according to the embodiment can be implemented in a computing device, such as a server. Figure 3 As shown, the computing device can include a storage component 31 and a processing component 32.
[0137] The storage component 31 stores one or more computer instructions, where the one or more computer instructions are for calling and executing by the processing component 32.
[0138] The processing component 32 is configured to: acquire real-time temperature data and load state data of each available server node in a server cluster in which an application software is deployed, and a preset load balancing strategy, where the load state data includes a number of service requests currently processed by the available server node and a resource occupation rate; when detecting that the real-time temperature of any available server node exceeds a preset temperature threshold or the resource occupation rate indicates that the capacity of the server node reaches a preset upper limit of the capacity, migrate, in combination with a virtual machine dynamic migration technology, a service capability running in the available server node to a backup server node, where the backup server node is another available server node in the server cluster; perform correlation analysis on the real-time temperature data, the load state data, and the execution frequency of the migration operation of all available server nodes to obtain a correlation analysis result; and dynamically optimize a node screening rule in the preset load balancing strategy and a trigger threshold of the virtual machine dynamic migration technology based on the correlation analysis result, so that the optimized preset load balancing strategy maintains continuous response of service requests in a high-concurrency scenario and restricts a temperature fluctuation range of hardware resources of the server cluster.
[0139] The processing component 32 can include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processing component can also be one or more Application-Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Process Device (DSPD), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components, for executing the above method.
[0140] The storage component 31 is configured to store various types of data to support the operation of the terminal. The storage component can be implemented by any type of volatile or non-volatile storage devices or their combinations, such as Random Access Memory (RAM), Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0141] Of course, the computing device can also include other components, such as an input / output interface, a display component, a communication component, etc.
[0142] The input / output interface provides an interface between the processing component and peripheral interface modules, which can be output devices, input devices, etc.
[0143] The communication component is configured to facilitate wired or wireless communication between the computing device and other devices, etc.
[0144] The computing device can be a physical device or an elastic computing host provided by a cloud computing platform, and the computing device can refer to a cloud server, and the processing component, the storage component, etc. can be basic server resources rented or purchased from the cloud computing platform.
[0145] The embodiment of the application further provides a computer storage medium, which stores a computer program, and the computer program can realize the above method when being executed by a computer. Figure 1 The application further provides a service capability calling method in an application software of the embodiment.
[0146] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system and units can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.
[0147] The system embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, that is, can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0148] Through the foregoing description of the embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and the necessary general hardware platform, and of course, can also be realized by hardware. Based on such understanding, the foregoing technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the method described in each embodiment or some parts of the embodiment.
[0149] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the application, and not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the application.
Claims
1. A method for invoking service capabilities in application software, characterized in that, The application comprises the following steps: acquiring real-time temperature data and load state data of each available server node in a server cluster deployed with application software, and a preset load balancing strategy, wherein the load state data comprises the number of service requests currently processed by the available server node and resource occupancy rate; when it is detected that the real-time temperature of any available server node exceeds a preset temperature threshold or the resource occupancy rate indicates that the capacity of the server node reaches a preset upper capacity limit, combining a virtual machine dynamic migration technology, migrating the service capability running in the available server node whose real-time temperature exceeds the preset temperature threshold or whose resource occupancy rate indicates that the capacity of the server node reaches the preset upper capacity limit to a backup server node, wherein the backup server node is another available server node in the server cluster; correlation analysis is performed on the real-time temperature data, the load state data and the execution frequency of the migration operation of all available server nodes to obtain a correlation analysis result; based on the correlation analysis result, dynamically optimizing the node screening rules in the preset load balancing strategy and the trigger threshold of the virtual machine dynamic migration technology, so that the optimized preset load balancing strategy maintains continuous response of service requests in a high concurrency scenario and restricts the temperature fluctuation range of the hardware resources of the server cluster; the trigger threshold comprises a temperature trigger threshold and a load trigger threshold, which are respectively used to determine whether the temperature or load of the server node reaches the migration condition; the dynamic optimization of the node screening rules in the preset load balancing strategy and the trigger threshold of the virtual machine dynamic migration technology based on the correlation analysis result, so that the optimized preset load balancing strategy maintains continuous response of service requests in a high concurrency scenario and restricts the temperature fluctuation range of the hardware resources of the server cluster, comprises: extracting the coupling characteristics of temperature fluctuation and load surge from the correlation analysis result, and optimizing the node screening rules in the preset load balancing strategy based on the coupling characteristics; according to the execution frequency of the migration operation in the correlation analysis result, combining the temperature change curve and the load change curve of the available server node and the backup server node whose real-time temperature exceeds the preset temperature threshold or whose resource occupancy rate indicates that the capacity of the server node reaches the preset upper capacity limit during the migration process, calculating decay function parameters, and dynamically adjusting the sensitivity of the migration trigger threshold through the decay function parameters to dynamically optimize the migration trigger threshold; based on the optimized node screening rules and migration trigger threshold, obtaining the optimized preset load balancing strategy, and applying the optimized preset load balancing strategy to the server cluster to form a closed-loop feedback mechanism.
2. The method of claim 1, wherein, the migration of the service capability running in the available server node whose real-time temperature exceeds the preset temperature threshold or whose resource occupancy rate indicates that the capacity of the server node reaches the preset upper capacity limit to the backup server node by combining the virtual machine dynamic migration technology, wherein the backup server node is another available server node in the server cluster, comprises: determining a priority of a service capability running in an available server node whose real-time temperature exceeds a preset temperature threshold or whose resource occupancy rate indicates that the capacity of the server node reaches a preset upper limit of capacity, the priority being dynamically allocated based on resource requirement characteristics of the service capability and a business type, the resource requirement characteristics including required CPU core number, required memory capacity, and required network bandwidth occupancy rate; screening candidate server nodes whose temperature is lower than the preset temperature threshold and whose load does not reach the upper limit of capacity based on real-time temperature data and load state data of all available server nodes in the server cluster; when the number of the candidate server nodes is more than one, sorting the candidate server nodes according to resource remaining capacity to generate a candidate server node list; matching resource remaining capacity that best fits the service capability and selecting a candidate server node with the smallest difference in priority as the backup server node from the candidate server node list according to the priority of the service capability and the resource requirement characteristics; before migration execution, re-verifying real-time temperature data and load state data of the backup server node to ensure that temperature fluctuation of the backup server node during migration is within the temperature fluctuation range and the load state data is within a preset load state safety range; migrating the service capability to the backup server node through the virtual machine dynamic migration technology, the migration process of the service capability including sequentially migrating each service capability in priority order and updating load state data and temperature data of the backup server node in real time after each migration is completed.
3. The method of claim 2, wherein, The migrating the service capability to the backup server node through the virtual machine dynamic migration technology, the migration process of the service capability including sequentially migrating each service capability in priority order, includes: arranging all service capabilities running in available server nodes whose real-time temperature exceeds a preset temperature threshold or whose resource occupancy rate indicates that the capacity of the server node reaches a preset upper limit of capacity in descending order of priority according to the priority of each service capability to generate a migration task queue; selecting a service capability to be migrated from the migration task queue in sequence and calculating whether resource remaining capacity of the backup server node meets resource requirement of the service capability to be migrated based on resource requirement characteristics of the service capability to be migrated; if the resource requirement is met, starting virtual machine dynamic migration technology to migrate the service capability to be migrated from the available server node whose real-time temperature exceeds a preset temperature threshold or whose resource occupancy rate indicates that the capacity of the server node reaches a preset upper limit of capacity to the backup server node; or, if the resource requirement is not met, pausing the current migration task and re-screening a backup server node from the candidate server node list to update a migration target of an un-migrated task in the migration task queue.
4. The method of claim 3, wherein, If the resource requirement is met, a virtual machine dynamic migration technology is started to migrate the service capability to be migrated from an available server node whose real-time temperature exceeds a preset temperature threshold or resource occupancy rate indicates that the capacity of the server node reaches a preset upper limit of capacity to the standby server node, including: According to the resource requirement characteristics of the service capability to be migrated, migration configuration parameters are generated, and resources corresponding to the migration configuration parameters are pre-allocated on the standby server node; The virtual machine dynamic migration technology is started to synchronize the memory state, central processing unit state, and network connection information of the service capability to be migrated from the available server node whose real-time temperature exceeds the preset temperature threshold or resource occupancy rate indicates that the capacity of the server node reaches the preset upper limit of capacity to the standby server node; During the synchronization process, the standby server node is monitored in real time, and if it is monitored that the resource occupancy rate of the standby server node exceeds a preset occupancy rate threshold or the temperature exceeds a preset temperature threshold, the synchronization process is suspended and a resource reallocation mechanism is triggered, and the pre-allocated resources are reevaluated and adjusted; After the synchronization is completed, the running state of the service capability to be migrated is switched from the available server node whose real-time temperature exceeds the preset temperature threshold or resource occupancy rate indicates that the capacity of the server node reaches the preset upper limit of capacity to the standby server node, and the corresponding resources on the available server node whose real-time temperature exceeds the preset temperature threshold or resource occupancy rate indicates that the capacity of the server node reaches the preset upper limit of capacity are released; After the switching is completed, the load state data and temperature data of the standby server node are updated in real time, and the temperature data is periodically collected at a preset sampling frequency by a temperature sensor deployed on the standby server node.
5. The method of claim 4, wherein, The generation of the migration configuration parameters according to the resource requirement characteristics of the service capability to be migrated includes: According to the required number of central processing unit (CPU) cores, the required memory capacity, and the required network bandwidth occupancy rate, initial pre-allocation parameters are generated; The initial pre-allocation parameters are dynamically adjusted in combination with real-time temperature data and load state data of the standby server node to obtain adjusted pre-allocation parameters; Based on migration strategy constraints, corresponding fault tolerance and efficiency parameters are set, the fault tolerance, the efficiency parameters, and the adjusted pre-allocation parameters are combined to obtain migration configuration parameters.
6. The method of claim 1, wherein, The preset load balancing strategy is optimized based on the optimized node screening rule and the migration trigger threshold, including: An edge distance factor corresponding to a specified scenario is added to the optimized node screening rule, and the specified scenario includes a high-concurrency scenario and a preset high-temperature sensitive scenario; Based on the node screening rule added with the edge distance factor, the migration trigger threshold, and the abnormal fuse mechanism, a federal learning model is used to generate the optimized preset load balancing strategy.
7. A system for invoking service capabilities in application software, characterized by including: An acquisition module is configured to acquire real-time temperature data and load state data of each available server node in a server cluster in which application software is deployed, and a preset load balancing strategy, wherein the load state data includes a number of service requests currently processed by the available server node and a resource occupancy rate; The detection migration module is configured to, when detecting that the real-time temperature of any of the available server nodes exceeds a preset temperature threshold or the resource occupancy rate indicates that the capacity of the server node reaches a preset capacity upper limit, migrate, in combination with a virtual machine dynamic migration technology, a service capability running in the available server node whose real-time temperature exceeds the preset temperature threshold or whose resource occupancy rate indicates that the capacity of the server node reaches the preset capacity upper limit to a backup server node, which is another available server node in the server cluster. The correlation analysis module is configured to perform correlation analysis on the real-time temperature data, the load state data and the execution frequency of the migration operation of all the available server nodes to obtain a correlation analysis result. The optimization module is configured to dynamically optimize the node screening rule in the preset load balancing strategy and the trigger threshold of the virtual machine dynamic migration technology based on the correlation analysis result, so that the optimized preset load balancing strategy maintains continuous response of service requests in a high-concurrency scenario and restricts the temperature fluctuation range of the hardware resources of the server cluster. The trigger threshold includes a temperature trigger threshold and a load trigger threshold, which are respectively used to determine whether the temperature or load of the server node reaches the condition requiring migration. The dynamic optimization of the node screening rule in the preset load balancing strategy and the trigger threshold of the virtual machine dynamic migration technology based on the correlation analysis result, so that the optimized preset load balancing strategy maintains continuous response of service requests in a high-concurrency scenario and restricts the temperature fluctuation range of the hardware resources of the server cluster, includes: extracting a coupling feature of temperature fluctuation and load surge from the correlation analysis result, and optimizing the node screening rule in the preset load balancing strategy based on the coupling feature; calculating decay function parameters according to the execution frequency of the migration operation in the correlation analysis result, in combination with the temperature change curve and the load change curve of the available server node and the backup server node respectively, and dynamically adjusting the sensitivity of the migration trigger threshold through the decay function parameters to dynamically optimize the migration trigger threshold; obtaining the optimized preset load balancing strategy based on the optimized node screening rule and the migration trigger threshold, and applying the optimized preset load balancing strategy to the server cluster to form a closed-loop feedback mechanism.
8. A computing device, comprising: The application comprises a processing component and a storage component. The storage component stores one or more computer instructions. The one or more computer instructions are used to be called and executed by the processing component to implement the service capability calling method in the application software according to any one of claims 1-6.
9. A computer storage medium, characterized in that The computer program is stored in a computer and is executed by the computer to implement the service capability calling method in the application software according to any one of claims 1-6.
Citation Information
Patent Citations
Dynamic threshold value-based cloud-computing virtual-machine migration control method
CN108170522A
Virtual machine migration method in cloud computing environment
CN115794314A