Service node capacity expansion method and device, electronic equipment and storage medium
By obtaining and aligning business monitoring information, extracting timing characteristics, and making intelligent expansion decisions, the problem of the existing technology's inadequate expansion in complex environments is solved, and efficient and intelligent resource utilization is achieved.
Patent Information
- Application Number
- CN202510368930.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-07-04
AI Technical Summary
When facing a complex and changing business production environment, existing automatic scaling technology is difficult to meet the needs of system performance and resource utilization. The static scaling strategy cannot adapt to dynamic changes. The dynamic scaling system relies on manual intervention and is poor in real time. Machine learning-driven scaling decisions require a large amount of historical data to train, and the real-time and accuracy are insufficient.
By obtaining business monitoring information, performing time alignment operations, extracting information timing characteristics, making expansion decisions based on timing encoding, and using predefined processes to expand capacity, reducing manual intervention and improving the timeliness and adaptability of expansion.
It realizes accurate identification of expansion requirements in complex business environments, improves the intelligence level and resource utilization efficiency of dynamic expansion systems, and ensures stable and efficient operation of the system.
Smart Images

Figure CN120263654A_ABST
Abstract
Description
Background Art
[0002] In the current context of the rapid development of cloud computing and microservices architectures, auto-scaling technology is crucial for improving system performance and resource utilization. However, in the face of complex and ever-changing business production environments, related technologies have exposed many deficiencies in auto-scaling and are difficult to meet actual needs.
[0003] Currently, the main auto-scaling solutions include: static scaling strategies based on thresholds, dynamic scaling systems based on rules, and scaling decisions driven by machine learning. Among them:
[0004] Static scaling strategies based on thresholds can only judge whether to scale based on fixed resource utilization thresholds, cannot adapt to the dynamic changes of business loads, and are prone to over-expansion or insufficiency of resources.
[0005] Although dynamic scaling systems based on rules introduce rule judgments and improve flexibility, they rely on manually set rules, lack intelligence and self-adaptive capabilities, and the formulation and adjustment of rules require continuous intervention by operation and maintenance personnel, resulting in complex management.
[0006] Although scaling decisions driven by machine learning predict resource requirements through training models, they require a large amount of historical data for training, and the real-time performance and accuracy are poor.
[0007] In summary, how to improve the intelligence level and resource utilization efficiency of dynamic scaling systems and ensure the stable and efficient operation of the system in complex business environments is an urgent problem to be solved. Summary of the Invention
[0008] The embodiments of this application provide a service node scaling method, device, electronic device, and storage medium to improve the intelligence level and resource utilization efficiency of dynamic scaling systems.
[0009] A service node scaling method provided by the embodiments of this application includes:
[0010] When it is determined that there is a backlog of business requests for target-class services, obtain various types of business monitoring information collected within a preset time period; the various types of business monitoring information at least include: at least one type of request description information of the target-class services, and at least one type of service status information of the service nodes related to the target-class services;
[0011] Perform at least one time alignment operation on the various types of business monitoring information until a specified alignment effect is achieved, and obtain the aligned various types of business monitoring information;
[0012] For the aligned various types of business monitoring information, respectively extract features through the method of temporal encoding to obtain corresponding information temporal features; the information temporal features represent: the time change trend of the corresponding business monitoring information within the preset time period;
[0013] Based on the obtained temporal characteristics of each piece of information, determine the capacity expansion decision result of the service node;
[0014] When the capacity expansion decision result indicates that capacity expansion is required, use a predefined capacity expansion process to expand the service node.
[0015] An apparatus for expanding the capacity of a service node provided by an embodiment of the present application includes:
[0016] An acquisition unit, configured to acquire various types of service monitoring information collected within a preset time period when it is determined that there is a backlog of service requests for a target type of service; the various types of service monitoring information at least include: at least one type of request description information of the target type of service, and at least one type of service status information of the service node related to the target type of service;
[0017] An alignment unit, configured to perform at least one time alignment operation on the various types of service monitoring information until a specified alignment effect is achieved, to obtain the aligned various types of service monitoring information;
[0018] A feature extraction unit, configured to respectively perform feature extraction on the aligned various types of service monitoring information in a temporal encoding manner to obtain corresponding temporal characteristics of the information; the temporal characteristics of the information characterize: the temporal change trend of the corresponding service monitoring information within the preset time period;
[0019] A decision unit, configured to determine the capacity expansion decision result of the service node based on the obtained temporal characteristics of each piece of information;
[0020] An expansion unit, configured to use a predefined capacity expansion process to expand the service node when the capacity expansion decision result indicates that capacity expansion is required.
[0021] Optionally, each type of service monitoring information is collected through a sliding window mechanism; within the same sliding window, at least two different sampling rates are used for information collection, and each type of service monitoring information corresponds to one sampling rate; then the alignment unit is configured to:
[0022] In each time alignment operation, within each sliding window in the preset time period, respectively perform the following processes:
[0023] Respectively determine the sampling points of each type of service monitoring information obtained based on the corresponding sampling rate;
[0024] Through the sampling point supplementation method specified by the current alignment strategy, perform time alignment on the sampling points between the various types of service monitoring information, and determine the alignment quality of this time;
[0025] If the current alignment quality does not reach the specified alignment effect, adjust the alignment strategy to perform the next time alignment operation according to the adjusted alignment strategy.
[0026] Optionally, the alignment unit is further configured to determine the current alignment quality in the following manner:
[0027] For each two types of service monitoring information after the current alignment, obtain corresponding correlation parameters by analyzing the correlation between the two types of service monitoring information;
[0028] Determine the current alignment quality by analyzing the distribution information of the obtained correlation parameters.
[0029] Optionally, each correlation parameter is the covariance between the corresponding two types of service monitoring information; the alignment unit is configured to:
[0030] Determine the covariance matrix composed of the obtained correlation parameters;
[0031] Obtain a plurality of eigenvalues by performing eigenvalue decomposition on the covariance matrix;
[0032] Determine the standard deviation between the eigenvalues; wherein, the standard deviation characterizes the current alignment quality.
[0033] Optionally, the alignment unit is further configured to:
[0034] If the standard deviation is greater than a preset standard deviation threshold, determine that the current alignment quality does not reach the specified alignment effect;
[0035] If the standard deviation is not greater than the preset standard deviation threshold, determine that the current alignment quality reaches the specified alignment effect.
[0036] Optionally, the alignment unit is configured to:
[0037] Re - perform the alignment operation on the various types of service monitoring information by adjusting the alignment strategy; wherein, the adjustment method of the alignment strategy includes at least one of the following:
[0038] Adjust the sampling point supplement method;
[0039] Adjust the size of the sliding window, and re - collect the various types of service monitoring information according to the adjusted sliding window;
[0040] Adjust the sliding step of the sliding window, and re - collect the various types of service monitoring information according to the adjusted sliding window.
[0041] Optionally, the feature extraction unit is configured to:
[0042] Perform the following operations on the various types of service monitoring information respectively:
[0043] Form a time series from the service monitoring information of one type collected within the preset time period in chronological order, and determine the data type to which the service monitoring information of this type belongs;
[0044] Adopt the high-order time series coding strategy corresponding to the data type to quantify the time change trend of each data point in the time series within the preset time period, and obtain the information time series characteristics corresponding to the service monitoring information of this type.
[0045] Optionally, if the data type is a numerical type, the feature extraction unit is used to:
[0046] For each data point in the time series, determine the M-order difference between every two adjacent data points respectively to obtain the corresponding M-order difference value; where M is a positive integer; for the first data point in the time series, the previous data point adjacent to this data point is determined based on historical data;
[0047] Form the information time series characteristics corresponding to the service monitoring information of this type with the obtained M-order difference values.
[0048] Optionally, if the data type is a string type, the feature extraction unit is used to:
[0049] Divide the preset time period into multiple sub-intervals according to a specified time interval;
[0050] For each type of string in the time series, obtain the corresponding frequency series by counting the frequency of occurrence of the string in each sub-interval;
[0051] Determine the N-order difference between every two adjacent frequency points in the frequency series respectively to obtain the corresponding N-order difference value; where N is a positive integer; for the first frequency point in the frequency series, the previous frequency point adjacent to this frequency point is determined based on historical data;
[0052] Form the information time series characteristics corresponding to the service monitoring information of this type with the obtained N-order difference values.
[0053] Optionally, before obtaining the corresponding frequency series by counting the frequency of occurrence of the string in each sub-interval, the feature extraction unit is further used to:
[0054] Encode the string to convert the string into the form of a numerical vector;
[0055] The feature extraction unit is used to:
[0056] By counting the number of the numerical vectors in each sub - interval, the frequency of occurrence of the string in each sub - interval is determined to obtain the corresponding frequency sequence.
[0057] Optionally, the decision - making unit is used for:
[0058] Inputting the obtained respective information time - series features and the preset prompt information into a pre - trained decision model to obtain the expansion decision result for the service node output by the decision model; wherein, the preset prompt information is used to guide the decision model to execute a specific expansion decision task.
[0059] And, the expansion unit is used for:
[0060] When the expansion decision result indicates that expansion is required, sending an expansion trigger instruction to a target expansion tool, so that the target expansion tool sends an expansion request to a target service platform according to the expansion trigger instruction. The target service platform locates the service node according to the expansion request, configures new service instances for the service node, and updates the resource status of the new service instances.
[0061] Optionally, the device further includes:
[0062] A feedback unit, which is used to call an information callback plugin in the target expansion tool to obtain feedback data after the expansion of the service node in the target service platform; the feedback data is used to describe the expansion effect of the service node this time.
[0063] Constructing an annotated training sample set based on the feedback data;
[0064] Fine - tuning the decision model according to the annotated training sample set.
[0065] Optionally, the expansion unit is further used for:
[0066] The target expansion tool generates the expansion request in the following manner:
[0067] After establishing communication with the target service platform by calling a target expansion plugin, obtaining the current first resource configuration parameters of the service node in the target service platform;
[0068] Generating the expansion request according to the first resource configuration parameters and the expansion trigger instruction, and sending the expansion request to the target service platform.
[0069] Optionally, the expansion trigger instruction includes: the identification information of the service node and the corresponding expansion quantity; the expansion quantity represents the number of the new service instances; the expansion unit is used for:
[0070] Determine second resource configuration parameters according to the first resource configuration parameters and the scaling-up quantity; the second resource configuration parameters represent the resource status of the new service instance.
[0071] Generate the scaling-up request according to the scaling-up trigger instruction and the second resource configuration parameters.
[0072] An electronic device provided by an embodiment of the present application includes a processor and a memory. Among them, the memory stores a computer program. When the computer program is executed by the processor, the processor executes the steps of any of the above service node scaling-up methods.
[0073] An embodiment of the present application provides a computer-readable storage medium, which includes a computer program. When the computer program runs on an electronic device, the computer program is used to make the electronic device execute the steps of any of the above service node scaling-up methods.
[0074] An embodiment of the present application provides a computer program product, which includes a computer program. The computer program is stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device executes the steps of any of the above service node scaling-up methods.
[0075] The beneficial effects of the present application are as follows:
[0076] An embodiment of the present application provides a service node scaling-up method, device, electronic device, and storage medium. Specifically, when detecting that business requests are backlogged, the method first obtains business monitoring information collected within a preset period. These data include the specific situation of business requests and the running status of the current service node, ensuring that the system can timely identify changes in business pressure, avoid system performance degradation caused by response delays, and improve the timeliness of scaling up.
[0077] Next, perform at least one time alignment operation on the collected various types of business monitoring information to make the different types of business monitoring information consistent in the time dimension, ensuring the accuracy and comparability of subsequent feature extraction and analysis.
[0078] Then, for the aligned business monitoring information, extract the time series features of each type of information respectively in a time series coding manner, so as to quantitatively express the time change trend of each type of business data, providing a more dynamic feature input for scaling-up judgment.
[0079] Then, based on the extracted temporal features of each piece of information, a capacity expansion decision result for the corresponding service node is made, effectively avoiding the limitations of relying on fixed thresholds or static rules to judge capacity expansion, and improving the real-time performance and adaptability of the capacity expansion decision.
[0080] Finally, when the capacity expansion decision result indicates that capacity expansion is required, a predefined capacity expansion process is adopted to expand the service node, ensuring the efficiency and executability of the capacity expansion operation, and improving stability and response speed. The predefined capacity expansion process enables the capacity expansion operation to be executed quickly, reduces manual intervention, and improves the automation ability of the system.
[0081] In summary, the capacity expansion method provided by this application can accurately identify capacity expansion requirements, improve the intelligent level and resource utilization efficiency of the dynamic capacity expansion system, and ensure the stable and efficient operation of the system in a complex business environment.
[0082] Other features and advantages of this application will be described in the subsequent specification, and part of them will become obvious from the specification, or will be understood by implementing this application. The objectives and other advantages of this application can be realized and obtained through the structures specifically pointed out in the written specification, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] The drawings described herein are used to provide a further understanding of this application, and constitute a part of this application. The schematic embodiments of this application and their descriptions are used to explain this application, and do not constitute an improper limitation to this application. In the drawings:
[0084] Figure 1 is a schematic diagram of the application scenario of the embodiment of this application;
[0085] Figure 2 is a schematic diagram of the service node capacity expansion system provided by the embodiment of this application;
[0086] Figure 3 is a flowchart of the implementation of a service node capacity expansion method provided by the embodiment of this application;
[0087] Figure 4A is a schematic diagram of collecting business monitoring information provided by the embodiment of this application;
[0088] Figure 4B is a schematic diagram of the business monitoring information processing flow provided by the embodiment of this application;
[0089] Figure 5 is a schematic diagram of a unified data structure provided by the embodiment of this application;
[0090] Figure 6 is a schematic diagram before time alignment of data with different sampling rates provided by the embodiment of this application;
[0091] Figure 7 A schematic diagram of time alignment after supplementing low-frequency data sampling points provided by an embodiment of the present application;
[0092] Figure 8 A schematic diagram of the process for evaluating alignment quality provided by an embodiment of the present application;
[0093] Figure 9 A schematic diagram of a decision-making model based on a large language model provided by an embodiment of the present application;
[0094] Figure 10 A schematic diagram of decision control provided by an embodiment of the present application;
[0095] Figure 11 A flowchart for generating an expansion request provided by an embodiment of the present application;
[0096] Figure 12 A general schematic diagram of a method for expanding a service node provided by an embodiment of the present application;
[0097] Figure 13 A schematic diagram for comparing experimental results provided by an embodiment of the present application;
[0098] Figure 14 A schematic diagram of the structure of an expansion device for a service node provided by an embodiment of the present application;
[0099] Figure 15 A schematic diagram of the composition structure of an electronic device in an embodiment of the present application. Detailed implementation manners
[0100] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the technical solutions of the present application, rather than all the embodiments. Based on the embodiments described in this application document, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the technical solutions of the present application.
[0101] Some concepts involved in the embodiments of the present application will be introduced below.
[0102] 1. Target business: It refers to a specific type of business that requires computing, storage, or data processing, usually corresponding to a specific business logic or functional module, such as transaction processing, data calculation, log analysis, user request scheduling, etc. The load of the target business may vary over time, with fluctuations in traffic, or due to external events. Therefore, it is necessary to adjust computing resources according to the real-time state of the business to ensure the continuous and stable operation of the business, so as not to cause processing delays due to insufficient resources, nor to increase unnecessary costs due to resource waste. In the embodiments of the present application, the target business is a business processing task bound to a specific service node, which can specifically be any type of business in actual applications. When the backlog of requests for this business reaches a certain level, an expansion operation will be triggered.
[0103] 2. Business request backlog: It refers to the situation where the number of business requests within a short period exceeds the processing capacity of the available computing resources, resulting in requests that have not been processed in a timely manner waiting in the request queue. The business request backlog may be caused by various factors such as sudden traffic, a decline in the processing capacity of computing tasks, and insufficient resources. The longer the backlog time, the higher the request timeout rate may be, affecting business continuity. In the embodiments of the present application, the business request backlog can be measured by monitoring indicators such as the length of the request queue, request response time, and timeout rate, and analyzing trends by combining historical data to predict possible future request backlog situations, so as to expand capacity in advance, reduce business processing delays, and avoid request failures or a decline in user experience caused by resource shortages.
[0104] 3. Business monitoring information: It is a data set used to describe the operating state of a business, including but not limited to the characteristics of business requests, the usage of computing resources, and the trend of load changes. The role of business monitoring information is to provide a basis for the expansion decision, making the expansion operation more accurate and capable of dynamically adapting to business needs. In the embodiments of the present application, the business monitoring information at least includes: request description information related to the business party and service status information related to the service party. By continuously collecting and analyzing these data, the change pattern of business load can be identified, and combined with the state of business processing capacity, it can be determined whether expansion is required.
[0105] 4. Request description information: It is the key information used to describe the characteristics of business requests, usually used to measure the operating state, load situation of business requests, and the processing capacity of computing resources for requests. In the embodiments of the present application, the request description information includes but is not limited to: service node name, plugin name, pipeline ID, current business request volume, average delay in request processing, business request backlog information, etc. The request description information is used to analyze the trend of business load changes to ensure that the expansion can be triggered at the appropriate time, neither causing resource waste by expanding too early nor resulting in a business request backlog due to delayed expansion.
[0106] 5. Service status information: Used to describe the current usage of computing resources, including but not limited to: key metrics such as the utilization rate of the Central Processing Unit (CPU), memory utilization rate, and storage occupancy rate. These information can reflect whether the service provider's business processing capacity is approaching the resource limit and whether there are potential computing bottlenecks. In the embodiments of the present application, the service status information is used in combination with the request description information to more comprehensively evaluate the business load situation, and according to the scaling decision logic, reasonably add new computing resources to ensure that the business can operate efficiently after scaling.
[0107] 6. Information time series characteristics: Key characteristics extracted from time series data, reflecting the changing trends of business loads, such as growth rate, periodic fluctuations, instantaneous burst traffic, etc. Time series characteristics analysis can improve the accuracy of scaling decisions, enabling scaling to not only respond based on the current business status but also predict future load changes in advance, thereby optimizing the resource allocation strategy. In the embodiments of the present application, the extraction methods of information time series characteristics include but are not limited to: trend analysis, periodic analysis, volatility analysis, etc. Combining these time series characteristics can more accurately determine whether scaling is needed, as well as the appropriate timing and scale of scaling.
[0108] 7. Scaling decision result: It is the scaling plan obtained by the scaling decision module in the present application after comprehensively analyzing business monitoring information, time series characteristics, and computing resource status, including whether scaling is needed. In addition, it can also include but is not limited to: the specific quantity of scaling, resource allocation strategy, etc. The scaling decision result determines the generation method of the scaling request and directly affects the execution effect of the scaling operation. In the embodiments of the present application, the scaling decision result is calculated based on various business monitoring information, and the target scaling tool in the present application triggers the scaling operation according to the scaling decision result to ensure that the computing resources can meet the business requirements in a timely manner.
[0109] 8. Target service platform: It is the platform responsible for executing the scaling request, receiving the scaling request sent by the target scaling tool, and completing the creation and allocation of service instances according to the resource scheduling strategy. In the embodiments of the present application, the target service platform accurately locates the service nodes that need to be scaled according to the scaling request and adds new service instances to it to meet the business growth needs. The target service platform also needs to ensure that the newly added service instances can correctly join the business processing process to improve the stability and availability of the scaling execution.
[0110] 9. Service Node: A service node is a computing unit that runs specific business logic. Generally, one type of target business corresponds to one service node, and one service node can contain multiple service instances to support the efficient parallel processing of the business. A service node consumes resources such as computing, storage, and network during the business processing. When the load exceeds a certain threshold, the scaling decision will allocate new service instances to this service node. In the embodiments of this application, the service node is the target of scaling, and the purpose of the scaling operation is to add new computing resources to the service node to ensure the stable operation of the business.
[0111] 10. Service Instance: It is a computing instance running on a service node. Each service node can contain multiple service instances to support the processing of high-concurrency business requests. In the embodiments of this application, the essence of scaling is to increase the number of service instances on the service node to ensure that the business processing capacity can meet the load requirements and avoid request backlogs or resource shortages.
[0112] 11. Sliding Window: It is a method for dynamically monitoring time series data. Within a fixed time interval, the data samples are continuously updated to capture the latest change trend of the data. The sliding window can avoid making scaling decisions relying only on data at a single time point. Instead, by analyzing the data changes over a period of time, it improves the stability and accuracy of the decision. In the embodiments of this application, the sliding window is used to collect business monitoring information and perform data alignment to ensure the continuity and consistency of data analysis and make the scaling decision more intelligent.
[0113] 12. Time Alignment Operation: It refers to adopting a preset sampling point supplementation method (such as interpolation) between datasets with different sampling frequencies to align the data points in the time dimension for subsequent analysis. In the embodiments of this application, the time alignment operation is used to handle the synchronization problem of high-frequency and low-frequency data, ensure that data from different sources can maintain time consistency during the scaling decision process, and improve the accuracy of scaling calculations.
[0114] 13. Specified Alignment Effect: It is an index to measure the time alignment effect. The accuracy of alignment can be evaluated by calculating the correlation between different data sources. In the embodiments of this application, the specified alignment effect is used to judge the precision of time alignment. If the specified alignment effect is low, it may lead to misjudgments in scaling calculations. Therefore, it is necessary to dynamically adjust the data alignment strategy to optimize the reliability of the scaling decision.
[0115] 14. M - order Difference and N - order Difference: M - order difference and N - order difference are used to analyze the change trend of time series data. Among them, M - order difference is applicable to numerical data, and N - order difference is applicable to character data.
[0116] The M-order difference is used to calculate the degree of change between a certain data point and another data point, which can reflect the change rate and acceleration of numerical data. It can be used to analyze key indicators such as computing resource utilization rate, request volume, and response time to identify resource consumption trends or business load growth patterns. The N-order difference is used to analyze the change frequency of character-type data, such as the occurrence frequency of specific plugins or business identifiers, to reveal the fluctuations of certain specific business models and assist in optimizing the capacity expansion decision-making logic.
[0117] In the embodiments of the present application, the M-order difference can be used to analyze the dynamic changes of numerical indicators such as CPU utilization rate, memory occupancy rate, and request backlog. The N-order difference can be used to analyze the changes in business request patterns, such as the change in the invocation frequency of a specific service within a specific time period. Through the extraction of these difference features, the capacity expansion decision becomes more predictive and targeted, improving the rationality of resource allocation.
[0118] 15. Capacity expansion decision result: It is the capacity expansion plan obtained by the capacity expansion decision module after comprehensively analyzing various types of business monitoring information, based on the current business load situation and computing resource status. The capacity expansion decision result determines whether the capacity expansion operation needs to be executed and can further describe the specific scale of the capacity expansion to ensure the rationality and accuracy of the capacity expansion. In the embodiments of the present application, the capacity expansion decision module analyzes the collected various types of business monitoring information to determine whether the current business requests have reached the capacity expansion trigger condition. On this basis, it can calculate the specific quantity of the capacity expansion in combination with the usage of computing resources, enabling the capacity expansion decision to dynamically adapt to the changes in business requirements.
[0119] 16. First resource configuration parameter: It is the current resource status of each service instance in the service node before capacity expansion. The first resource configuration parameter is used to evaluate the current load situation and serves as the input data for capacity expansion calculation. In the embodiments of the present application, the first resource configuration parameter is an important basis for generating capacity expansion requests.
[0120] 17. Second resource configuration parameter: It is the resource status of the newly added service instances after capacity expansion to ensure the reasonable use of computing resources after capacity expansion. In the embodiments of the present application, the second resource configuration parameter is calculated by the target capacity expansion tool and submitted to the target service platform as part of the capacity expansion request to complete resource allocation.
[0121] 18. Correlation parameter: The correlation parameter is used to measure the degree of synchronous change of two types of business monitoring information in the time dimension, that is, to determine whether different business monitoring information shows similar or consistent change trends over time. In the embodiments of the present application, the correlation parameter is mainly used to evaluate the quality of data alignment. For example, when two types of business monitoring data have a strong positive correlation, it indicates that their behavior change trends are consistent within the same time window, which helps to construct high-quality time series features and improve the accuracy of capacity expansion decisions.
[0122] 19. High - order Temporal Encoding Strategy: The high - order temporal encoding strategy refers to a specific processing method based on the type of data for time - series data, extracting features that reflect its dynamic change trend. In the embodiments of this application, for numerical data, the M - order difference method is used to quantify the amplitude and rate of data change; for string - type data, frequency statistics combined with the N - order difference is used to reveal the fluctuation pattern of a certain type of event or feature over time. Through the high - order temporal encoding strategy, the original monitoring data can be transformed into analyzable information - time series features, enhancing the decision - making model's perception ability of business trend changes and improving the forward - looking and intelligent level of capacity expansion decisions.
[0123] The following briefly introduces the design concept of the embodiments of this application:
[0124] In the current rapid development of cloud computing and microservices architecture, automatic capacity expansion technology is crucial for improving system performance and resource utilization. However, in the face of complex and changing business production environments, related technologies have exposed many deficiencies in automatic capacity expansion and are difficult to meet actual needs.
[0125] Currently, the main automatic capacity expansion solutions include: static capacity expansion strategies based on thresholds, rule - based dynamic capacity expansion systems, and machine - learning - driven capacity expansion decisions. Among them:
[0126] The static capacity expansion strategy based on thresholds can only judge whether to expand capacity according to a fixed resource utilization threshold, unable to adapt to the dynamic changes of business load, and prone to over - expansion or insufficiency of resources.
[0127] Although the rule - based dynamic capacity expansion system introduces rule judgment and improves flexibility, it relies on manually set rules, lacks intelligence and self - adaptation ability, and the rule formulation and adjustment require continuous intervention from operation and maintenance personnel, with complex management.
[0128] Although the machine - learning - driven capacity expansion decision predicts resource requirements through training models, it requires a large amount of historical data for training, with poor real - time performance and accuracy, and lacks effective methods in dealing with the comprehensive analysis of multi - dimensional resource utilization and business feedback signals.
[0129] In view of this, the embodiments of this application provide a service node capacity expansion method, device, electronic device, and storage medium. Specifically, when detecting the backlog of business requests, the method first obtains the business monitoring information collected within a preset period, including the specific situation of business requests and the running state of the current service node, ensuring that the system can timely identify changes in business pressure, avoid system performance degradation caused by response delays, and improve the timeliness of capacity expansion.
[0130] Next, perform at least one time alignment operation on the collected various types of business monitoring information to make the different types of business monitoring information consistent in the time dimension, ensuring the accuracy and comparability of subsequent feature extraction and analysis.
[0131] Then, for the aligned business monitoring information, extract the time series features of each type of information through time series coding respectively, so as to quantitatively express the time change trend of various types of business data and provide a more dynamic feature input for capacity expansion judgment.
[0132] Then, based on the extracted time series features of each information, make the capacity expansion decision result of the corresponding service node, effectively avoiding the limitations of relying on fixed thresholds or static rules to judge capacity expansion, and improving the real-time performance and adaptability of the capacity expansion decision.
[0133] Finally, when the capacity expansion decision result indicates that capacity expansion is required, adopt a predefined capacity expansion process to expand the service node, ensuring the efficiency and executability of the capacity expansion operation, and improving the stability and response speed. The predefined capacity expansion process enables the capacity expansion operation to be executed quickly, reduces manual intervention, and improves the automation ability of the system.
[0134] In summary, the capacity expansion method provided by this application can accurately identify the capacity expansion requirements, improve the intelligent level and resource utilization efficiency of the dynamic capacity expansion system, and ensure the stable and efficient operation of the system in a complex business environment.
[0135] The following describes the preferred embodiments of this application with reference to the accompanying drawings of the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain this application, and are not used to limit this application. And without conflict, the embodiments in this application and the features in the embodiments can be combined with each other.
[0136] As Figure 1 shown, it is a schematic diagram of the application scenario of the embodiment of this application. The application scenario diagram includes a terminal device 110 and a server 120.
[0137] In the embodiments of the present application, the terminal device 110 includes, but is not limited to, devices such as mobile phones, tablet computers, laptop computers, desktop computers, e-reader devices, intelligent voice interaction devices, intelligent home appliances, vehicle-mounted terminals, etc.; a client related to business processing can be installed on the terminal device, and the client can be software (such as a browser, shopping software, office software, etc.), or a web page, a small program, etc. The server 120 is the background server corresponding to the software, web page, small program, etc., or a server specifically used for expanding service nodes. The present application does not make specific limitations. The server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.
[0138] It should be noted that the service node expansion method in each embodiment of the present application can be executed by an electronic device, and the electronic device can be the terminal device 110 or the server 120, that is, the method can be executed independently by the terminal device 110 or the server 120, or jointly executed by the terminal device 110 and the server 120.
[0139] For example, when the terminal device 110 and the server 120 jointly execute, the client installed on the terminal device 110 can be used to initiate a business request. For example, a user accesses a service, submits a request, performs an interaction, etc. through the client. The terminal device 110 sends a business request to the server 120, and then, the server 120 executes the following process:
[0140] After receiving the business request from the terminal device 110, the server 120 detects the business load situation, and when it determines that the business requests are backlogged, it obtains various types of business monitoring information within a preset time period, including the description information of the business requests and the running status information of the current relevant service nodes. The server 120 extracts features from these business monitoring information to form corresponding information time series features, which characterize the time change trend of the business load, and makes an expansion decision based on this time series feature to determine whether expansion is required. When the expansion decision result indicates that expansion is required, the server 120 executes an expansion operation according to a predefined expansion process, enables the newly added service instances to be put into use, and updates the status of relevant resources to ensure the stable operation of the business.
[0141] In an alternative embodiment, the terminal device 110 and the server 120 can communicate with each other through a communication network.
[0142] In an alternative embodiment, the communication network is a wired network or a wireless network.
[0143] It should be noted that Figure 1 The above is only an example. In fact, the number of terminal devices and servers is not limited and is not specifically defined in the embodiments of the present application.
[0144] In the embodiments of the present application, when the number of servers is multiple, the multiple servers can form a blockchain, and the servers are nodes on the blockchain; as the service node expansion method disclosed in the embodiments of the present application, the business monitoring information involved can be stored on the blockchain. For example, business request data, resource usage, expansion decision records, etc.
[0145] In addition, the embodiments of the present application can be applied to various scenarios, including not only distributed computing environment scenarios, but also including but not limited to scenarios such as cloud technology, artificial intelligence, intelligent transportation, and assisted driving. Specifically, it can be applied to the application scenarios of service node expansion in these fields. The following briefly lists several specific application scenarios:
[0146] (1) Expansion in the business content pipeline.
[0147] In the business processing of modern enterprises, content pipelines are widely used to manage and process various types of business processes, such as data processing, content review, log analysis, task scheduling, event-driven processing, etc. Such pipelines usually involve multiple service nodes working together, including task reception, preprocessing, calculation, storage, and final output. When business demands fluctuate or the number of concurrent tasks rises sharply, fixed resource allocation may lead to task backlogs, processing delays, or even task failures. Therefore, how to intelligently expand service nodes to ensure the stable operation of the pipeline while avoiding resource waste has become an important technical challenge.
[0148] The service node expansion method provided by the embodiments of the present application can monitor the task execution situation in the business content pipeline in real time, and make intelligent decisions on whether to expand in combination with key indicators such as task queue length, processing rate, task waiting time, CPU / memory occupancy rate, etc. For example, in the content review pipeline, when the review tasks surge, the service node expansion method provided by the embodiments of the present application can dynamically expand the review service nodes to speed up the processing speed and prevent content review backlogs. In data processing pipelines (such as log analysis, report calculation), the embodiments of the present application can automatically expand computing resources according to the task inflow rate to ensure that tasks can be completed on time without affecting the execution of subsequent processes. In addition, in an event-driven architecture (such as message queue processing), when the message backlog is severe, consumer instances can be intelligently increased to improve the consumption rate and prevent timeouts or request losses.
[0149] Taking Xinghang as an example, Xinghang is a task processing pipeline of Tencent, responsible for managing and executing the business content pipeline. Through the automatic scaling solution of the embodiments of the present application, the Xinghang system can automatically expand processing nodes when business requests surge, optimize task scheduling, improve the throughput capacity of task processing, and ensure the continuity and stability of the overall business process. Similarly, the scaling solution of the embodiments of the present application is also applicable to other business content pipelines, such as video transcoding pipelines, AI inference task scheduling, order processing links, financial transaction processing, etc., and the present application does not make specific limitations in this regard.
[0150] (2) Scaling in modern microservice architectures.
[0151] In the business architectures of modern enterprises, the microservice system is widely adopted to achieve high availability and flexibility of applications. The microservice architecture usually consists of multiple independently deployed service components, each service is responsible for a specific business function, and they interact through APIs or message queues. When business traffic fluctuates greatly or requests surge, a single service node may face the risk of overload, resulting in increased response latency and even service unavailability. Therefore, in the microservice architecture, how to intelligently adjust the number of service instances and dynamically expand computing resources has become a key issue in improving service quality and user experience.
[0152] The service node scaling method provided by the embodiments of the present application can monitor the running status of each service node in the microservice architecture in real time, and based on time series feature extraction and trend analysis, determine whether it is necessary to scale a specific service instance. For example, in the e-commerce business scenario, when a promotion activity causes a surge in order placement requests, the service node scaling method provided by the embodiments of the present application can automatically expand the order processing microservice nodes to reduce order processing latency and improve the overall transaction success rate. Another example is in the payment service, when the payment requests increase significantly in a short period of time, the embodiments of the present application can intelligently expand the payment gateway microservice to prevent payment interface timeouts and improve the payment success rate. Another example is in the video streaming service, the embodiments of the present application can dynamically scale the streaming transcoding and distribution nodes according to the real-time user access situation to ensure that users can still obtain a smooth video playback experience during peak viewing periods.
[0153] It should be noted here that the above examples are only used to illustrate the applicability of the embodiments of the present application in different business scenarios, and do not limit the scope of application of the present application. The service node expansion method of the embodiments of the present application is applicable to various business environments with dynamic load changes, including but not limited to scenarios such as online education, intelligent customer service, social platforms, online collaboration tools, and real-time data analysis. For example, in the online education scenario, the service node expansion method provided by the embodiments of the present application can dynamically expand the online classroom server according to the course registration situation to ensure the teaching experience when a large number of students are online at the same time; in the intelligent customer service scenario, the service node expansion method provided by the embodiments of the present application can dynamically expand the AI customer service nodes based on the user consultation volume to improve the response efficiency; in the social platform, the service node expansion method provided by the embodiments of the present application can dynamically expand the content recommendation and message push services according to the change of user activity to enhance the user experience.
[0154] In addition, the embodiments of the present application are not only applicable to traditional microservice architectures, but also can combine load balancing and scheduling strategies in cloud-native environments to dynamically adjust computing resources, improve resource utilization, and at the same time reduce the operation and maintenance costs caused by over-expansion, making the microservice architecture more flexible, intelligent, and efficient in dealing with sudden traffic. The present application does not limit specific business scenarios. Any application environment involving dynamic expansion of computing resources, optimization of service stability, and improvement of elasticity capabilities can apply the service node expansion method of the embodiments of the present application.
[0155] (3) Expansion in container orchestration.
[0156] In modern microservice architectures and containerized deployment environments, container orchestration platforms play a key role in the unified management and automatic scheduling of service resources. Especially in dealing with high-concurrency and large-traffic business scenarios, how to achieve automatic expansion at the container level has become one of the core technologies to improve resource utilization efficiency and service stability.
[0157] The service node expansion method in the embodiments of the present application can be seamlessly integrated into container orchestration platforms, such as infrastructure represented by container orchestration platforms (Kubernetes, K8s). Specifically, when the expansion decision module generates an expansion decision result and issues an expansion trigger instruction, the target expansion tool can call the orchestration interface docked with the Kubernetes platform, that is, the application programming interface, to initiate an expansion request to the Kubernetes control plane.
[0158] After receiving a scaling-up request, the Kubernetes control plane first selects eligible host nodes from the node resource pool according to the scheduling policy, then starts new service instances, and dynamically allocates computing resources according to the parameters defined in the API and adds the new service instances to the service set. In this way, the scaling-up operation can achieve fine-grained control at the container level, ensuring that the service can quickly obtain supplementary support for computing resources when business surges or performance bottlenecks occur.
[0159] It should be noted that the above-listed application scenarios are only simple examples, and other application scenarios are also applicable to the embodiments of this application, which will not be elaborated here one by one.
[0160] Before introducing the method provided by the embodiments of this application, first introduce the system for scaling up service nodes in the embodiments of this application. Please refer to Figure 2 As shown in the figure, it is a schematic diagram of the service node scaling-up system provided by the embodiments of this application. The service node scaling-up system 200 includes: a service information collection module 201, a decision analysis module 202, a target scaling-up tool 203, and a target service platform 204.
[0161] Among them, the service information collection module 201 is used to collect various monitoring information of target types of services and transmit the collected service monitoring information to the decision analysis module 202.
[0162] The decision analysis module 202 is used to analyze the service monitoring information and generate a scaling-up decision result based on feature extraction. When the decision analysis module 202 determines that scaling up is required, it sends a scaling-up instruction to the target scaling-up tool 203.
[0163] After receiving the scaling-up instruction, the target scaling-up tool 203 calls a predefined scaling-up process to scale up the service nodes in the target service platform 204. Still taking Figure 2 as an example, the target service platform 204 includes multiple service nodes. Among them, each service node may contain multiple service instances. The service node is used to carry specific business services and provide resource support such as computing, storage, and network for the business.
[0164] The service instance can be a specific service container running on the service node, and the number of service instances can be dynamically adjusted to cope with changes in business load. When the target scaling-up tool 203 sends a scaling-up request to the target service platform 204, the target service platform 204 will select an appropriate service node according to the request content and create a new service instance on it to meet the scaling-up requirements.
[0165] Through the automated scaling decision-making and execution mechanism in the embodiments of this application, the intelligent level of resource management can be effectively improved, resource waste can be reduced, and at the same time, the stability and elasticity of the business system can be enhanced to ensure that the service can still operate efficiently when the load fluctuates.
[0166] It should be noted here that the above content is the overall overview of the service node scaling system. Next, each part of the service node scaling system will be described separately.
[0167] Next, in combination with the above-described application scenarios, the service node scaling method provided by the exemplary embodiments of this application will be described with reference to the accompanying drawings. It should be noted that the above application scenarios are only shown for the convenience of understanding the spirit and principle of this application, and the embodiments of this application are not limited in this regard.
[0168] Refer to Figure 3 As shown, it is the implementation flowchart of a service node scaling method provided by the embodiments of this application. Taking the decision analysis module in the service node scaling system as the execution subject as an example, the specific implementation process of this method is as follows, including steps S31 to S35:
[0169] S31: When it is determined that there is a backlog of business requests for the target type of business, obtain various types of business monitoring information collected within a preset time period; the various types of business monitoring information at least include: at least one type of request description information of the target type of business, and at least one type of service status information of the service nodes related to the target type of business.
[0170] In the embodiments of this application, when the decision analysis module in the service node scaling system determines that there is a backlog of business requests for the target type of business, it obtains various types of business monitoring information collected by the business information collection module in the service node scaling system within a preset time period.
[0171] In the embodiments of this application, determining that there is a backlog of business requests for the target type of business can be the real-time monitoring of the business request traffic and identifying whether there is a backlog situation.
[0172] Among them, an optional method is to monitor the business request backlog signal. When the business request backlog signal (backlog_signal) collected by the business information collection module exceeds the set threshold, it indicates that the current degree of business request backlog has reached the scaling trigger standard. For example, if the length of the request queue continues to increase, or the queuing time of the requests exceeds the normal range, the system can determine that there is a business backlog situation.
[0173] In addition, it can also be monitored through the average latency of request processing (request_latency). If this value continues to rise and exceeds the historical baseline, it may indicate that request backlog is occurring. Another alternative is to analyze based on the sudden increase in the current business request volume (request_count). If the request volume increases significantly within a short period and the utilization rates of resources such as CPU, GPU, and memory are close to the upper limit, it may mean that the system cannot process all requests in a timely manner, resulting in backlog.
[0174] In addition, multiple monitoring signals can be combined for joint judgment. For example, calculating the decline rate of request success rate, the fluctuation of business processing time, and the comparative analysis of historical load patterns, etc., to improve the accuracy and robustness of identifying backlog. Through the above methods, the system can detect the business request backlog situation in a timely manner and trigger corresponding scaling decisions to ensure the efficient operation and stability of the business.
[0175] Among them, the target class of services refers to the services that need to be monitored and scaled. Generally, it refers to the business requests initiated by users and requiring computing resource support in a specific scenario. For example, in an e-commerce platform, order processing, payment settlement, etc. can be used as target class of services; in an online video platform, video on demand, live stream push, recommendation algorithm calculation, etc. can be used as target class of services; in a financial system, transaction matching, risk assessment, real-time settlement, etc. can be used as target class of services; in a cloud computing environment, elastic computing resource allocation, big data processing tasks, AI inference services, etc. can also be used as target class of services. These are just simple examples and are not specifically limited in this article.
[0176] Request description information refers to the information related to business requests, which is used to reflect the operating load of the target class of services, including but not limited to service node name, plugin name, pipeline ID, current business request volume, average latency of request processing, business request backlog information, etc. The following will introduce them specifically:
[0177] Pipeline ID (pipeline_id): It refers to the unique identifier of the task processing pipeline to which the business request belongs, and is used to determine the execution situation of the business. In the embodiments of this application, a target class of service corresponds to a pipeline ID, that is, the pipeline ID represents the complete processing flow of this service. For example, in a news management system, "news_pipeline_001" may represent the editing and publishing process of news; another example is that in an intelligent recommendation system, "recommendation_pipeline_002" may be used to process pipeline data and generate personalized recommendation results.
[0178] Plugin Name (plugin_id): It refers to the computing plugin that executes specific tasks within the pipeline. In the embodiments of the present application, a target type of business usually consists of multiple tasks, and these tasks are collaboratively processed by multiple plugins to ensure the smooth execution of business requests. The main function of the plugin is to execute specific computing tasks or business logics, such as data processing, task scheduling, resource management, etc.
[0179] For example, in a news management system, the news editing and publishing process may include multiple plugins: "news_view_plugin" (news viewing plugin): used to manage user requests for viewing news and perform reading statistics. "news_edit_plugin" (news editing plugin): used to support news editing functions, including text modification, picture uploading, etc. "news_publish_plugin" (news publishing plugin): used to control the news review and publishing process.
[0180] Another example is that in an e-commerce order system, the order processing business may include multiple plugins: "order_validation_plugin" (order verification plugin): checks the integrity of order information and payment status. "order_payment_plugin" (order payment plugin): executes the payment process and updates the order status. "order_shipping_plugin" (order logistics plugin): processes order shipping information and interacts with the logistics system. These plugins are scheduled according to the pipeline ID, each responsible for different computing tasks to ensure the complete execution of business logic.
[0181] Service Node Name (service_node): It refers to the unique identifier of each service node in the target service platform 204, which is used to carry and execute the computing tasks of the target type of business. In the embodiments of the present application, the plugin corresponds to the service node one by one, that is, each plugin executes on a specific service node, and a service node can run multiple service instances to improve the computing concurrency.
[0182] For example, in a news management system: news-processing-node-01 may be used to process the text analysis of news and run "news_edit_plugin" to support news editing functions. news-storage-node-02 may be used to store news data and run "news_view_plugin" to process user access requests.
[0183] For another example, in an e-commerce order system: order-processing-node may be used for order verification and run "order_validation_plugin". order-payment-node may be used for order payment and run "order_payment_plugin". order-shipping-node may be used for logistics processing and run "order_shipping_plugin".
[0184] Current business request volume (request_count): It refers to the number of requests for the target type of business within a unit of time, and is used to measure the real-time change of business traffic. For example, in a news management system, request_count may represent the number of news editing or publishing requests currently in progress; in an online trading system, request_count may represent the number of transactions matched per second.
[0185] Average latency of request processing (request_latency): It refers to the time (unit: millisecond or second) required for a business request to enter the system until the request is completed, and is used to measure the response ability of the system. For example, in a news management system, the latency of news publishing should be as low as possible, usually less than 500ms, otherwise it may affect the editing work efficiency; in a financial system, if the latency of matching transactions exceeds 10ms, it may cause market liquidity problems, so it is necessary to expand computing resources to reduce latency.
[0186] Business request backlog information: It refers to the number of requests that have not been processed in time, and is usually used to measure the load of the system. Specifically, it can be in the form of a backlog signal (backlog_signal) or other data forms, which are not specifically defined in this article. In the following text, the backlog signal is taken as an example to ensure that the expansion system expands before the backlog signal reaches the threshold. For example, in a news management system, backlog_signal may represent the number of news articles waiting for review. If it exceeds the set threshold (such as 1000 articles), it may be necessary to expand the review server; in a cloud storage system, backlog_signal may represent the number of file upload tasks waiting to be processed. If the tasks are severely backlogged, it may be necessary to expand the storage nodes.
[0187] It should be noted here that the above request description information is only a simple example. In addition, other request description information is also applicable to the embodiments of this application.
[0188] The embodiments of this application realize the real-time perception of the target type of business through the request description information, lay a foundation for the subsequent system to dynamically adjust computing resources based on this information, and ensure the efficient and stable operation of the business process.
[0189] The service status information refers to the data related to the service nodes associated with the target type of business, which is used to describe the occupancy of computing resources of the current service node, including but not limited to CPU utilization rate, GPU utilization rate, memory utilization rate, etc. The following will introduce them specifically respectively:
[0190] CPU utilization rate: It refers to the occupancy of CPU resources of the service node, usually expressed as a percentage (%), and is used to measure the usage pressure of the current computing resources. For example, in a microservices architecture, if the CPU utilization rate exceeds 80% for a long time, it indicates that the computing resources may be approaching the bottleneck and new instances need to be expanded; in an AI inference task, the high load of the CPU computing node may affect the inference efficiency, and it is necessary to increase computing instances or migrate tasks to GPU nodes; during an e-commerce promotion event, the CPU utilization rate of the order service may increase sharply in a short time, and the system needs to expand CPU resources in advance to ensure transaction stability.
[0191] GPU utilization rate: It refers to the occupancy of GPU computing resources of the service node, which is usually applicable to tasks such as deep learning inference, image processing, and high-performance computing, and is expressed as a percentage (%). For example, in an AI computing task, when the GPU utilization rate is higher than 90%, it may be necessary to expand new GPU instances to ensure the computing power of the inference or training task; in a video streaming media platform, if the load of the GPU encoding node is too high, it is necessary to expand GPU computing resources to support high-definition video processing; in a large-scale 3D rendering task, if the GPU resources are in a full-load state for a long time, it may affect the rendering speed, and it is necessary to dynamically expand GPU instances.
[0192] Memory utilization rate refers to the occupancy of RAM resources of the service node, usually expressed as a percentage (%) or the amount of used memory (MB / GB), and is used to measure the usage of memory by computing tasks. For example, in a database service, if the memory utilization rates of MySQL and Redis are higher than 90% for a long time, it may lead to slow queries or even OOM (Out of Memory) exceptions, and it is necessary to expand memory resources; in a web server, if the memory occupancy of the web service instance continues to increase, it may be due to a memory leak problem, and it is necessary to optimize or increase the number of instances; in a big data computing task, if the Executor memory is insufficient during the execution of a Spark task, it may cause the task to fail, and at this time, the memory resources can be expanded.
[0193] It should be noted here that the above service status information is only a simple example. In addition, other service status information is also applicable to the embodiments of this application, and this application does not make specific limitations on this.
[0194] The embodiments of this application achieve comprehensive monitoring of the computing resources of service nodes through service status information.
[0195] See Figure 4A As shown, it is a schematic diagram of collecting business monitoring information provided by an embodiment of the present application. In the embodiment of the present application, the business information collection module is used to obtain business monitoring information from multiple services (such as Service 1, Service 2, Service 3, Service 4, etc.), and interact with the target service platform to collect service status information related to each service node, so as to form a complete set of business monitoring data and provide data support for capacity expansion decisions.
[0196] Specifically, the business information collection module receives request description information from each business, including information such as the source, target, request volume, and response time of the business request, to reflect the business traffic situation and its demand for computing resources. For example, in Figure 4A , Service 1 is the target service. The request description information related to this service will be collected and used for subsequent capacity expansion decision analysis. At the same time, the business information collection module also interacts with the target service platform to collect the service status information of each service node (such as Service Node 1, Service Node 2, Service Node 3, etc.) in the target service platform, such as CPU utilization rate, GPU utilization rate, memory occupancy rate, etc., to ensure comprehensive monitoring of the usage of computing resources.
[0197] Among them, in Figure 4A , the service node related to the target service is Service Node 1, that is, Service Node 1 is the computing resource bearing node of Service 1. Therefore, the business information collection module focuses on collecting the status information of Service Node 1 to evaluate its current load situation and provide a reference for capacity expansion decisions.
[0198] Through the above data collection process, the business information collection module can realize real-time monitoring of the entire business operation situation and form complete business monitoring data, enabling capacity expansion decisions to be calculated based on accurate business load information and ensuring that the capacity expansion plan can accurately adapt to the current business needs.
[0199] See Figure 4B As shown, it is a schematic diagram of the business monitoring information processing flow provided by an embodiment of the present application. The real-time monitoring module in the business information collection module is used to receive business monitoring information from the business side and the computing node side, and integrate and process the data to ensure the accuracy of capacity expansion decisions and the efficiency of resource scheduling. Specifically, the real-time monitoring module receives data inputs from the business side, including pipeline ID, plugin ID, business request backlog information, etc. These data reflect the request processing status and computing resource demand situation of the target service.
[0200] Meanwhile, the real-time monitoring module also receives the monitoring data of the computing nodes, including CPU utilization, GPU utilization, memory utilization, etc., to measure the computing resource usage of the service nodes in the target service platform. In terms of the data processing flow, the real-time monitoring module first aggregates, time-aligns, and preprocesses the service-side data and the computing node data. Subsequently, the data is transmitted to the data integration module in the service information collection module. The data integration module in the service information collection module performs matching, deduplication, and structuring on the received data to make it computable and analyzable.
[0201] Finally, the integrated data is transmitted to the decision analysis module. The decision analysis module calculates whether scaling is needed and the specific quantity of scaling based on historical data and real-time monitoring data, combined with a preset decision model, and transmits the scaling decision result to the target scaling tool to trigger the scaling process. Through the above data processing flow, the real-time monitoring module can ensure the comprehensiveness and timeliness of business monitoring information, provide accurate data support for scaling decisions, and improve the execution efficiency and resource utilization rate of scaling.
[0202] During the process of collecting business monitoring information through the service information collection module, various types of business monitoring information are obtained, including request description information and service status information. These information constitute the basis for scaling decisions to support subsequent scaling judgment, resource allocation, and scaling execution, ensuring that scaling decisions can accurately adapt to current business load requirements and improving the execution efficiency and stability of scaling.
[0203] In addition, in the embodiments of the present application, the business monitoring information also includes the timestamp of data collection, which is used to record the specific collection time of the business monitoring information, enabling the scaling decision module to perform data analysis in combination with the time dimension, identify the changing trend of business load, and improve the accuracy of scaling. For example, in a high-concurrency business scenario, the business request volume may vary significantly at different time periods. Through the timestamp information, the business peak period and trough period can be accurately identified, thereby optimizing the scaling strategy and avoiding resource waste or insufficient scaling.
[0204] Then, by integrating the above business monitoring information, a unified data structure is constructed to support the intelligent analysis of the scaling decision module. This data structure can effectively organize and manage business monitoring data, enabling the scaling decision to comprehensively analyze historical business load, resource occupancy, and business growth trend, improving the accuracy of scaling prediction, and ensuring the efficiency and stability of the scaling execution process.
[0205] See Figure 5 shown, which is a schematic diagram of a unified data structure provided by the embodiments of the present application. Figure 5It shows the fields, data types and their meanings of various business monitoring information collected by the business information collection module, including core metrics such as timestamp, service name, plugin name, resource utilization rate, request volume, request latency, backlog signal, etc. These data provide support for real-time business status feedback and historical trend analysis in the capacity expansion decision-making, ensuring that the capacity expansion process can accurately adapt to business requirements and improve the utilization efficiency of computing resources and the execution stability of capacity expansion.
[0206] Optionally, for the business information collection module, the collection of business monitoring information can be triggered periodically or by events to adapt to different business requirements and system load conditions.
[0207] In an optional implementation manner, the business information collection module performs periodic collection of business monitoring information at fixed time intervals and actively reports it to the decision analysis module regularly, so that the decision analysis module can continuously grasp the global resource status in the service node capacity expansion system. Specifically, the time intervals for regular collection can be divided into short cycles, medium cycles and long cycles to adapt to different business characteristics and resource monitoring requirements.
[0208] Short-cycle regular collection is applicable to business scenarios with high dynamic changes, such as high-concurrency request processing, real-time trading systems, video streaming media load monitoring, etc. In these scenarios, the business load changes relatively fast, and the collection interval is usually set to 1 - 5 seconds to ensure that the capacity expansion system can quickly perceive traffic fluctuations and respond in a timely manner.
[0209] Medium-cycle regular collection is applicable to business scenarios with medium-frequency changes, such as microservice health monitoring, database query load analysis, edge computing node resource management, etc. The load changes in these scenarios are not as drastic as those in high-concurrency systems, so the collection interval is usually set to 10 - 30 seconds to provide stable system monitoring data.
[0210] Long-cycle regular collection is applicable to business scenarios with low dynamic changes, such as background task scheduling, offline data processing, batch task execution, etc. In these scenarios, the business load changes relatively smoothly, so the collection interval is usually set to 1 - 5 minutes to reduce the overhead of the monitoring system and optimize resource utilization. For example, in a log analysis platform, long-cycle monitoring can be used to count the hourly log storage volume to determine whether it is necessary to expand the log storage cluster; in an automated operation and maintenance system, long-cycle monitoring can be used to regularly check the health status of server resources and perform pre-capacity expansion when the resources are about to reach the upper limit.
[0211] In another alternative embodiment, the service information collection module may collect resource information at variable time intervals, that is, dynamically adjust the reporting interval according to the service load in different periods. For example, during the peak daytime period, since the volume of service requests is large and the system load is high, the reporting interval is short (e.g., 5 - 10 seconds) to ensure that the scaling - out system can promptly obtain service load information and make scaling - out decisions. While during the off - peak nighttime period, since the volume of service requests decreases and the system load is low, the reporting interval can be appropriately extended (e.g., 12 minutes) to reduce system resource overhead. Specifically, the service information collection module can adopt a time - period adaptive reporting strategy by combining historical resource usage data, that is, dynamically adjust the collection interval according to the resource usage trend in the past period of time, increasing the collection frequency during the business peak period to ensure the accuracy of scaling - out decisions, and reducing the collection frequency during the business trough period to reduce system monitoring overhead.
[0212] It should be noted here that the above - mentioned fixed time intervals are just simple examples, and the specific reporting intervals can be flexibly configured according to actual service requirements and system load conditions. In addition, the above - mentioned short cycle, medium cycle, and long cycle are also just simple examples, and the specific time intervals are not limited and can be flexibly configured according to actual service characteristics. For example, in some scenarios of sudden traffic, the short - cycle monitoring may need to be further shortened to the millisecond level, while in the batch - processing scenario with stable load, the long - cycle monitoring may be extended to more than 10 minutes.
[0213] Optionally, in combination with the dynamic adjustment strategy, adaptively adjust the reporting interval according to real - time service load, resource usage, and prediction models, so that data collection can not only ensure the real - time nature of monitoring, but also reduce system overhead and improve the efficiency of the overall monitoring system. Specifically, the dynamic adjustment strategy can analyze the volume of service requests, resource occupancy rate, task execution status, etc. based on historical operation data, and combine with a machine - learning prediction model to predict future service load, thereby dynamically adjusting the reporting frequency. For example, in an intelligent operation and maintenance system, historical CPU load data can be used to predict the CPU occupancy trend within the next 5 minutes. If it is predicted that the load will soon exceed the threshold, the monitoring frequency is automatically increased to trigger a scaling - out decision faster, while if it is predicted that the load remains stable, the monitoring frequency is reduced to reduce the resource consumption of the monitoring system.
[0214] In yet another alternative implementation, the business information collection module can also perform data collection by event triggering, that is, when the system detects that a specific event occurs, it immediately triggers the collection and reporting of business monitoring information. For example, in a microservices architecture, when the CPU usage rate of a certain service node exceeds 80%, a detailed collection of resource usage is triggered to determine whether scaling up is needed; in an API gateway, when the request failure rate of a certain interface exceeds a certain threshold, an abnormal status report is triggered so that the system can take timely fault recovery measures. In addition, the business information collection module can also perform event triggering based on the task life cycle. For example, at key stages such as task startup, execution, and completion, it automatically collects resource usage and task execution status for subsequent analysis and optimization of the scaling strategy.
[0215] It should be noted here that the conditions and strategies for event triggering can be configured according to different business scenarios. For example, in high-real-time services, the event-triggering threshold can be set lower to ensure that the system can respond quickly, while in a business scenario with stable load, the triggering threshold can be appropriately increased to reduce unnecessary monitoring overhead. Through the above process, the business information collection module can achieve efficient and accurate resource monitoring, and combined with the prediction model and dynamic adjustment strategy, ensure that the scaling system can make a scaling decision at the most appropriate time, improving the stability of the system and the utilization rate of computing resources.
[0216] Through the above process, various types of business monitoring information collected within the preset time period have been obtained, including the request description information of the target type of business and the service status information of the relevant service nodes, providing comprehensive data support for the scaling decision. These business monitoring information can not only reflect the current business load situation, but also combine historical data to analyze the business growth trend, thus ensuring the accuracy and timeliness of the scaling decision.
[0217] On this basis, how to perform feature extraction on the obtained business monitoring information will be specifically introduced below to further explore the time variation law of the data and provide more intelligent support for the scaling decision.
[0218] S32: Perform at least one time alignment operation on various types of business monitoring information until the specified alignment effect is achieved, and obtain the aligned various types of business monitoring information.
[0219] In the embodiments of the present application, to ensure the consistency of different business monitoring information in the time dimension and improve the accuracy and reliability of data analysis, it is also necessary to preprocess the collected business monitoring information. For example, perform time alignment operations on data with different sampling rates to ensure that various types of data can be compared and analyzed at the same time scale. In addition, preprocessing operations such as removing outliers, filling missing values, unifying time formats, and normalizing processing can also be performed on various types of business monitoring information to eliminate noise and abnormal interference in data fluctuations, improve the stability and effectiveness of subsequent feature extraction and decision-making analysis, and thus ensure more accurate identification of the change trend of business load and provide a more reliable data basis for capacity expansion decisions.
[0220] Considering that the change speed of data such as business request volume and request latency is relatively fast, while the change speed of data such as CPU and GPU utilization is relatively slow, in practical applications, different sampling rates need to be used to collect these data to better capture the dynamic changes of business load. For example, high-frequency data is collected every 5 seconds, while low-frequency data is collected every 30 seconds. If all business monitoring information is collected at the same sampling rate, it may cause the change trends of some key business indicators to be ignored or time misalignment to occur during data analysis.
[0221] Therefore, in order to improve the time resolution and accuracy of business monitoring data, so that various indicators can reflect their own change characteristics during the collection process and maintain good time consistency with other monitoring information during the analysis stage, the present application proposes a data collection method based on a sliding window mechanism with multiple sampling rates. An optional implementation manner is that each type of business monitoring information is collected through a sliding window mechanism; within the same sliding window, at least two different sampling rates are used for information collection, and each type of business monitoring information corresponds to one sampling rate; then in each time alignment operation, within each sliding window in the preset time period, the following processes are respectively executed:
[0222] First, determine the sampling points obtained for each type of business monitoring information based on the corresponding sampling rate respectively.
[0223] In the embodiments of the present application, a sliding window refers to a way of dynamically collecting data within a fixed time interval. The sliding window slides with a certain step size, so that the data collected each time contains historical information within a certain time range, thereby reflecting the short-term trend and overall change of the data. In the embodiments of the present application, the sliding window can continuously monitor the business status within a certain time range to ensure the stability and continuity of data collection, and at the same time reduce the impact of sudden anomalies or short-term fluctuations on capacity expansion decisions.
[0224] In an alternative embodiment, the sliding window can be set as a fixed window or a rolling window to adapt to different business monitoring requirements and ensure the stability and accuracy of the collection of business monitoring information.
[0225] A fixed window means that the collection of business monitoring information is carried out within a preset time period (such as 1 minute, 5 minutes, or 30 minutes). After each window ends, new monitoring data is recalculated without overlapping with the data of the previous period. Fixed windows are usually applicable to periodic monitoring tasks, such as counting CPU utilization, GPU utilization, memory utilization, business request backlog signals, etc., for identifying long-term trends or phased business load changes. For example, when regularly evaluating the resource consumption of a certain business, a 5-minute fixed window can be used to count the average values of CPU, GPU, and memory usage of service nodes to identify the change trend of business load, so as to adjust the scaling strategy. However, due to the relatively long data collection period of the fixed window, sudden traffic changes may not be captured in time, resulting in a response delay in triggering scaling.
[0226] A rolling window means that the window slides forward at a certain step size. For example, the window length is 60 seconds and it slides every 10 seconds, that is, the data of the current window will partially overlap with the previous window, which can ensure the continuity and real-time nature of the data. Rolling windows are applicable to scenarios that require real-time monitoring of business load changes, such as the volume of business requests, the average latency of request processing, CPU / GPU / memory utilization, business request backlog signals, etc. Through the rolling window, the scaling decision can capture the changes in business pressure within a short period of time in real time, improving the sensitivity and response speed of scaling. For example, in a high-concurrency business scenario, if the volume of business requests suddenly increases by 50% within 30 seconds, the fixed window may not trigger scaling until the window ends, while the rolling window can detect the change in the volume of business requests within a 10-second time step and combine it with the CPU / GPU load conditions to predict the scaling requirements in advance, preventing business request backlogs and ensuring the smooth operation of the business.
[0227] In addition, fixed windows and rolling windows can be used in combination to complement each other in different business monitoring dimensions. For example, fixed windows are used in long-term trend analysis to count the periodic changes in CPU / GPU / memory utilization and business request backlog signals; rolling windows are used in short-term real-time monitoring to ensure that the scaling decision can respond in a timely manner to dynamic changes such as the volume of business requests and the average latency of request processing. By reasonably selecting the sliding window strategy, the embodiments of the present application can improve the accuracy of the collection of business monitoring information, reduce misjudgment, and make the scaling strategy more adaptable and forward-looking.
[0228] Within the same sliding window, in order to more accurately reflect the time-varying characteristics of different business monitoring information, different sampling rates are used for data collection according to the change frequencies of various business monitoring information.
[0229] When determining the sampling points obtained for each type of service monitoring information based on the corresponding sampling rate, optionally, high-frequency service monitoring information collected at the first sampling rate, and low-frequency service monitoring information collected at the second sampling rate, where the first sampling rate is greater than the second sampling rate.
[0230] High-frequency service monitoring information is applicable to those business metrics that change relatively quickly, such as API request volume, user access count, queue backlog volume, request processing latency, etc. These data usually require a higher sampling rate (e.g., 1 - 5 seconds) to capture the fluctuations in business traffic in a timely manner, ensuring that the scaling system can quickly respond to business growth in high-concurrency scenarios. For example, in a second-level trading system, a sharp increase in API request volume may trigger resource bottlenecks in a short period, so high-frequency sampling is required for accurate monitoring.
[0231] Low-frequency service monitoring information is applicable to those system metrics that change relatively smoothly, such as CPU utilization, GPU utilization, disk I / O load, memory usage, etc. The changes in these data are usually slower, so a lower sampling rate (e.g., 10 - 30 seconds) is adopted to reduce the computational overhead of the monitoring system while ensuring the representativeness of the data. For example, in cloud computing resource management, the change in CPU utilization usually does not fluctuate violently in a very short period, so low-frequency sampling can be used for monitoring without affecting the accuracy of scaling decisions.
[0232] Through the above method, within the sliding window, different sampling strategies are adopted for different types of service monitoring information, which can not only ensure the timeliness of monitoring data but also optimize the consumption of computing resources, enabling the scaling system to more accurately identify changes in business load and make efficient and reasonable scaling decisions.
[0233] After introducing the sliding window, the process of obtaining sampling points will be introduced below.
[0234] Within each sliding window in the preset period, the sampling points obtained for each type of service monitoring information based on the corresponding sampling rate are determined respectively.
[0235] Since the backlog signal, current request count, and average request latency are high-frequency collected data, while the average CPU usage and average GPU usage are low-frequency collected data. To achieve temporal alignment of the data, we first determine the average collection interval of the high-frequency data. For example, the high-frequency data is collected every 5 seconds, while the low-frequency data is collected every 20 seconds. Within a dynamic window, we hope to include a sufficient number of low-frequency data points to accurately reflect its changing trend while being temporally aligned with the high-frequency data.
[0236] See Figure 6 As shown, it is a schematic diagram before temporal alignment of data with different sampling rates provided by an embodiment of the present application.
[0237] In Figure 6 , the high-frequency data sampling points (black solid circles) are collected every 5 seconds, while the low-frequency data sampling points (black hollow circles) are collected every 20 seconds. Therefore, at the 0s, 20s, and 40s moments, the low-frequency data sampling points coincide with the high-frequency data sampling points. However, at the 5s, 10s, 15s, 25s, 30s, and 35s moments, there is only high-frequency data, and the time interval of the low-frequency data is relatively large, and it cannot accurately reflect its changing trend over time, thus affecting the accuracy of the capacity expansion decision.
[0238] If the dynamic window size is set to 40 seconds, within this time window, the high-frequency data will collect 9 data points, while the low-frequency data will only collect 3 data points. Therefore, a temporal alignment strategy needs to be adopted to make the low-frequency data consistent with the high-frequency data and improve the comparability and reliability of data analysis.
[0239] By clarifying the sampling frequencies adopted for different types of business monitoring information, the distribution characteristics of various types of data in the time dimension can be fully reflected, making data collection closer to the actual operation rhythm of the business, and reducing unnecessary data redundancy or omission of key data. Especially in scenarios with high-frequency business changes, sudden behaviors can be captured in a timely manner through high-frequency sampling, while low-frequency sampling for slowly changing resource status data helps to reduce the computing and storage pressure, thereby improving the monitoring efficiency and data processing performance.
[0240] To ensure that the business monitoring information collected at different sampling rates can maintain temporal consistency and be comparable during data analysis, the introduced data alignment mechanism will be introduced below to reduce the impact of data loss or time offset caused by different sampling frequencies on the capacity expansion decision.
[0241] Second, through the sampling point supplementation method specified by the current alignment strategy, the sampling points among various types of service monitoring information are time-aligned, and the alignment quality of this time is determined.
[0242] In the embodiments of the present application, to ensure that service monitoring information collected at different sampling rates can maintain time consistency and be comparable during data analysis, the embodiments of the present application perform a time alignment operation within each sliding window. This alignment process includes two main steps: sampling point determination and sampling point supplementation. The sampling point determination has been introduced and completed in step S321. The process of sampling point supplementation will be introduced below.
[0243] In the embodiments of the present application, through the sampling point supplementation method specified by the current alignment strategy, the sampling points among various types of service monitoring information are time-aligned.
[0244] See Figure 7 As shown, it is a schematic diagram of time alignment after supplementing sampling points of low-frequency data provided by the embodiments of the present application.
[0245] In Figure 7 In addition to the original high-frequency data sampling points (black solid circles) and low-frequency data sampling points (black hollow circles), supplementary sampling points (black hollow dotted circles) are also added.
[0246] These supplementary sampling points are used to fill the gaps in low-frequency data, so that there is a corresponding estimated value at each high-frequency acquisition moment, ensuring the alignment of high- and low-frequency data in the time dimension and avoiding affecting data analysis and expansion decision-making due to inconsistent sampling frequencies.
[0247] To achieve time alignment, this embodiment can use a sampling point supplementation method for time alignment. The sampling point supplementation method includes but is not limited to nearest neighbor filling, linear interpolation, time-weighted average, spline interpolation, etc., which will be briefly introduced below.
[0248] Sampling point supplementation method 1: Nearest neighbor filling. Nearest neighbor filling is suitable for service monitoring information with relatively stable data changes in a short period of time. For example, for CPU utilization, if there is no sampled data at a certain time point, the nearest historical data can be used for filling. For example, if the CPU load data is sampled at 60% at 10:00:00 and 70% at 10:00:30, and the sampling point needs to be aligned at 10:00:10, then 60% at 10:00:00 is used for filling.
[0249] Sampling point supplementation method 2: Linear interpolation. Linear interpolation is applicable to business monitoring information with an obvious data change trend, such as CPU utilization, GPU utilization, memory utilization, etc. These metrics usually have a certain change trend in a short period of time and are not completely static. Therefore, the data at missing time points can be estimated through linear interpolation to make the data smoother and reduce the impact of mutations.
[0250] Suppose the sampled data at 10:00:00 is 1000 and the sampled data at 10:00:30 is 1300. When aligning the data at 10:00:10, the following formula can be used for calculation:
[0251]
[0252] Among them, Xt is the data value of the interpolation point to be calculated, X1 is the data value of the previous low-frequency sampling point, that is, the business monitoring information data value collected at 10:00:00; X2 is the data value of the next low-frequency sampling point, that is, the business monitoring information data value collected at 10:00:30; t1 is the time of the previous low-frequency sampling point, that is, 10:00:00; t2 is the time of the next low-frequency sampling point, that is, 10:00:30; t is the moment for which interpolation needs to be calculated, that is, 10:00:10.
[0253] Substitute into the above formula 1 for calculation:
[0254]
[0255] Sampling point supplementation method 2: Time-weighted average. Time-weighted average is applicable to scenarios where the traffic trend changes greatly but still requires smoothing, such as user access volume, video view volume, etc. This method calculates the data at the target time point based on the weights of multiple past time points. For example:
[0256]
[0257] Among them, the weight W i can be dynamically adjusted according to the proximity of time, and the weight of the data closer to the current time point is higher.
[0258] Sampling point supplementation method 4: Spline interpolation. Spline interpolation is applicable to situations with large business fluctuations, such as the GPU load of AI inference tasks and the sudden increase in order transaction volume in a short period of time. Compared with linear interpolation, spline interpolation can better fit the non-linear data change curve.
[0259] It should be noted here that the above sampling point supplementation method is only a simple example, and is not limited to the above method specifically. In practical applications, a suitable supplementation method can be selected according to the characteristics of business monitoring information, data distribution, and calculation requirements to ensure the consistency of data with different sampling rates in the time dimension and improve the accuracy and reliability of data analysis. The embodiments of the present application do not make specific limitations in this regard.
[0260] By introducing a sampling point supplementation method to achieve time alignment between data with different sampling rates, all business monitoring data can be compared and analyzed on a unified time axis, improving the comparability and accuracy of data fusion.
[0261] Through the above implementation method, a sliding window mechanism is introduced in the collection of business monitoring information, and at least two different sampling rates are used for information collection within the same sliding window, enabling the system to flexibly adjust the data collection frequency for business indicators with different change rates, ensuring the real-time nature of high-dynamic business data while avoiding excessive collection of low-frequency change indicators, and improving the efficiency of data collection and the utilization rate of computing resources. At the same time, before feature extraction for various business monitoring information, time alignment is performed through the sampling point supplementation method to ensure that high-frequency data and low-frequency data can be compared and analyzed in the same time dimension, avoiding feature extraction errors caused by data time misalignment, and providing a consistent time basis for subsequent feature extraction and model decision-making.
[0262] In order to more accurately determine the time alignment quality of different business monitoring information and ensure good temporal consistency of data during the capacity expansion decision-making process, the present application further proposes a method for determining the alignment quality in this time alignment operation, as follows:
[0263] See Figure 8 As shown, it is a schematic diagram of a process for determining alignment quality provided by an embodiment of the present application. The alignment quality of this time is determined through the following steps S81 to S82:
[0264] S81: For each two types of business monitoring information after this alignment, by analyzing the correlation between each two types of business monitoring information, the corresponding correlation parameter is obtained.
[0265] Among them, the correlation parameter is used to measure the degree of synchronous change of business monitoring information in the time dimension, that is, whether different business monitoring data have similar change trends, so as to judge the time consistency of the data.
[0266] In an alternative embodiment, the covariance value between each two types of data after the current alignment can be calculated as the correlation parameter between them to measure the degree of synchronous change in the time dimension, so as to determine whether they have similar change trends. In addition to covariance, in another alternative embodiment of the present application, the correlation parameter may include but is not limited to Pearson correlation coefficient, Spearman rank correlation coefficient, mutual information, cosine similarity, dynamic time warping distance, etc., and the present application does not make specific limitations thereto.
[0267] S82: Determine the quality of the current alignment by analyzing the distribution information of each obtained correlation parameter.
[0268] In the embodiments of the present application, by quantifying and analyzing the correlation between all business monitoring information after each alignment and further statistically analyzing the overall distribution of the correlation parameters, the time consistency and synchronization degree after the current data alignment are effectively evaluated.
[0269] Through the above embodiments, the limitation of the traditional alignment method that only makes a rough judgment based on the time interval is broken through, and accurate evaluation can be made based on the inherent correlation of the data change trend, thereby significantly improving the scientificity and automation degree of the alignment operation and providing a more stable and accurate time series data basis for the capacity expansion decision.
[0270] In order to more systematically evaluate the time alignment quality between various types of business monitoring information, in an alternative embodiment, each correlation parameter is the covariance between the corresponding two types of business monitoring information; an alternative embodiment of S82 is as follows: S8201 to S8203:
[0271] S8201: Determine the covariance matrix composed of each obtained correlation parameter.
[0272] In the embodiments of the present application, to determine the correlation between different types of business monitoring information and obtain the corresponding correlation parameter, the covariance matrix analysis method may be used, and the correlation parameter may be covariance.
[0273] The covariance matrix analysis method is used to measure the linear correlation between multiple business monitoring data and determine their alignment quality in the time dimension. Covariance measures the degree of joint variation of two variables, is used to judge the synchronous change situation between different business monitoring information, and analyzes the data alignment quality by means of eigenvalue.
[0274] Suppose there are m types of business monitoring information in total, which are respectively represented as: X1, X2, X3,....... Xm
[0275] When the sliding window is n (the number of time-aligned business monitoring data points is also n), the information sequence of each business monitoring information obtained after time alignment of various business monitoring information is:
[0276] Xi = {(Xi, 1), (Xi, 2),......, (Xi, k),......, (Xi, n)} (Formula 3)
[0277] Among them, i is the category index of business monitoring information, representing different types of business monitoring information, such as CPU utilization rate, GPU utilization rate, memory utilization rate, current business request volume, average latency of request processing, etc. Each i represents a type of business monitoring information.
[0278] k is the time point index, representing the specific time sampling points within the sliding window. For example, at moments such as 0s, 5s, 10s, 15s, each k corresponds to a specific time point.
[0279] (Xi, k) represents the data value of the i-th type of business monitoring information at the k-th time point, that is, at the k-th time sampling point of the sliding window, the actual value collected corresponding to business monitoring information i.
[0280] For example: i = 1 represents CPU utilization rate, and (X1, 10) represents the collected value of CPU utilization rate at the 10th second; i = 2 represents business request volume, and (X2, 30) represents the collected value of business request volume at the 30th second.
[0281] Then, calculate the covariance of two types of business monitoring data Xi and Xj. The calculation formula of covariance is as follows, Formula 4:
[0282]
[0283] Among them, and respectively represent the means of business monitoring information Xi and Xj within the sliding window. For example, the mean of business monitoring information Xi within the sliding window The calculation formula is as follows:
[0284]
[0285] C(X i , X j ) reflects the change relationship between two types of business monitoring information, that is, by calculating the covariance, the degree of synchronous change of different business monitoring data in the time dimension can be measured, so as to judge the correlation between data.
[0286] For a single pair of business monitoring information (such as CPU utilization and business request volume), covariance can indicate whether they show consistent or opposite change trends within the same time interval. However, in the process of capacity expansion decision-making, it is not enough to only analyze the correlation between two types of business monitoring information. It is also necessary to comprehensively consider the overall change situation of all business monitoring information to ensure that the data alignment quality meets the global consistency requirements.
[0287] Therefore, further calculate the covariance relationship between all business monitoring information and construct a complete covariance matrix to quantify the overall alignment quality of different business monitoring data in the time dimension.
[0288] All covariances of the covariance matrix are calculated according to this formula, and finally an m×m covariance matrix is formed:
[0289]
[0290] Among them, the diagonal element C(Xi, Xi) is the variance of the business monitoring information Xi, indicating the degree of its own fluctuation:
[0291] The off-diagonal element C(Xi, Xj) represents the correlation between two types of business monitoring information Xi and Xj:
[0292] If C(Xi, Xj)>0, it means that the business monitoring information Xi and Xj are positively correlated, that is, their change trends are consistent.
[0293] If C(Xi, Xj)<0, it means that the business monitoring information Xi and Xj are negatively correlated, that is, when one increases, the other decreases.
[0294] If C(Xi, Xj)≈0, it means that the business monitoring information Xi and Xj are uncorrelated, that is, their change trends are independent of each other.
[0295] By analyzing the covariance matrix, the degree of synchronous change of various business monitoring data within the same time window can be evaluated, thereby judging the data alignment quality. The covariance matrix can not only measure the correlation between business monitoring information, but also be used to further extract key features and analyze the main change patterns of the data, so as to optimize the data alignment strategy and improve the reliability of the capacity expansion decision.
[0296] S8202: Obtain multiple eigenvalues by performing eigenvalue decomposition on the covariance matrix.
[0297] In the embodiments of the present application, the covariance matrix can be further subjected to eigenvalue decomposition, that is, the characteristic equation is solved through the following formula 7:
[0298] der(Cov - λI) = 0 (Formula 7)
[0299] Among them, det is used to determine whether the matrix is invertible and is the standard operator when solving eigenvalues; Cov is the covariance matrix; λ is the eigenvalue; I is the identity matrix, which has the same dimension as the covariance matrix.
[0300] Through Formula 7, m eigenvalues λ1, λ2,......, λm are calculated. The eigenvalues measure the main change directions of the data, that is, the main influencing factors of the business monitoring data in the time dimension.
[0301] In an alternative implementation, to determine the correlation between different types of business monitoring information and obtain the corresponding eigenvalues, the above covariance matrix decomposition can be used, that is, using the eigenvalues and eigenvectors of the covariance matrix to analyze the data alignment situation, and optimizing the time alignment strategy based on this information to improve data consistency.
[0302] In another alternative implementation, to determine the correlation between different types of business monitoring information and obtain the corresponding eigenvalues, it can also be Principal Component Analysis (PCA). PCA is a dimensionality reduction method that extracts the main feature dimensions that best represent the data structure through linear transformation, reduces redundant information, and improves the analysis efficiency of the data. Through PCA, the key features of the business monitoring information can be further extracted, and the capacity expansion decision model can be optimized to make it more accurate.
[0303] In yet another alternative implementation, to determine the correlation between different types of business monitoring information and obtain the corresponding eigenvalues, it can also be Singular Value Decomposition (SVD). SVD is suitable for processing large-scale data matrices. By decomposing the data matrix into multiple orthogonal bases, the main change patterns in the data can be more clearly identified, which is suitable for the analysis of complex business monitoring information. Through SVD, the correlation between different business monitoring information can be evaluated more efficiently, and the accuracy of data alignment can be improved.
[0304] It should be noted here that the above methods for determining the correlation between different types of business monitoring information and obtaining the corresponding eigenvalues are only simple examples. The specific method can be selected according to the business scenario, data distribution characteristics, and calculation requirements. For example, in a scenario where the business monitoring data is relatively complex, SVD can be used for dimensionality reduction analysis, while in a scenario with high real-time requirements, covariance matrix decomposition or PCA can be used for rapid evaluation. This application does not make specific limitations on this.
[0305] By performing the above step S8202, each eigenvalue is determined. The eigenvalues measure the main change directions of the data, and further analyzing the distribution of these eigenvalues can be used to evaluate the quality of data alignment.
[0306] Optionally, if the distribution of eigenvalue is relatively concentrated and the eigenvalue value is large, it indicates that the change trend of the data is relatively consistent, the business monitoring variables have strong correlation in the time dimension, and the data alignment is good;
[0307] If the distribution of eigenvalue is relatively dispersed, especially when there are multiple eigenvalues that are small and close to each other, it indicates that the data is evenly distributed in multiple directions, which may mean that the data alignment is poor or the correlation between variables is weak.
[0308] S8203: By performing eigenvalue decomposition on the covariance matrix, multiple eigenvalues are obtained.
[0309] To determine the standard deviation between each eigenvalue, it is first necessary to calculate the mean of the eigenvalues. The calculation formula for the eigenvalue mean is as follows in Formula 8:
[0310]
[0311] where, is the mean of all eigenvalues, representing the average degree of the main change direction of the data. M is the total number of eigenvalues, corresponding to the dimension of the business monitoring information, that is, the order of the covariance matrix. λ i represents the i-th eigenvalue, and its size reflects the dominant degree of the business monitoring information in this eigen direction.
[0312] After calculating the mean of the eigenvalues, further calculate the standard deviation of the eigenvalues. The calculation formula is as follows in Formula 9:
[0313]
[0314] where, σ λ represents the standard deviation of the eigenvalues, measuring the degree of dispersion of the data in the main change direction.
[0315] The smaller the standard deviation, the more concentrated the distribution of eigenvalues, the more consistent the change trend of the data, indicating that the alignment quality between business monitoring information is good.
[0316] The larger the standard deviation, the more discrete the distribution of eigenvalues, and the poorer the matching degree of different business monitoring information in the time dimension. It may be necessary to readjust the data alignment strategy to ensure the time consistency of business monitoring data and improve the reliability of the capacity expansion decision.
[0317] If the standard deviation is large, it may indicate that the alignment quality of this time does not reach the specified alignment effect. The following will specifically introduce the process when the alignment quality of this time does not reach the specified alignment effect.
[0318] In the embodiments of the present application, if the standard deviation of the eigenvalue is large, it indicates that the correlation between different business monitoring information in the time dimension is low, and the effect of data alignment is not ideal. To improve the data quality, it is necessary to re - execute the alignment operation so that different business monitoring information has better synchronization in the same time dimension.
[0319] Through the above - mentioned implementation manner, by constructing each correlation parameter into a covariance matrix and further performing eigenvalue decomposition, not only can the dominant change direction of business monitoring information in the time dimension be revealed, but also the degree of synchronous fluctuation between different business indicators can be quantified. On this basis, calculating the standard deviation between all eigenvalues as the judgment index of alignment quality can more precisely measure the overall consistency of different business monitoring information after time alignment, making the evaluation of the alignment effect more mathematically based and stable.
[0320] Optionally, if the alignment quality of this time does not reach the specified alignment effect, re - execute the alignment operation on various types of business monitoring information until the alignment times reach the specified alignment effect or the upper limit, so as to ensure the stability and rationality of data alignment, and avoid unlimited execution of alignment adjustments, resulting in excessive consumption of computing resources or data delay.
[0321] Specifically, the maximum number of adjustments N can be set. If the data still does not reach the expected alignment standard after executing the alignment operation N times, stop further adjustment and take other optimization measures, such as recording the current data alignment error and compensating it during the capacity expansion decision - making, or triggering a data anomaly warning to remind relevant modules to perform further data optimization to ensure that the data quality reaches an acceptable range and reduce the misjudgment of capacity expansion caused by unstable data alignment.
[0322] In addition, during the alignment adjustment process, a dynamic adjustment strategy can also be introduced. For example, according to the change trend of the alignment error, adaptively adjust the alignment step size, optimize the interpolation method, or adjust the sliding window size to improve the convergence speed of data alignment, reduce unnecessary repeated calculations, improve the efficiency of data alignment, and ultimately ensure that business monitoring information maintains a high degree of consistency in the time dimension, improving the accuracy and stability of capacity expansion decisions.
[0323] Through the above - mentioned implementation manner, after the present application completes the preliminary time alignment, a correlation analysis method is introduced to evaluate the correlation between every two types of business monitoring information, and the alignment quality is calculated based on eigenvalues. Compared with the traditional alignment method based on a fixed time interval, this method can dynamically judge the matching degree of data on the time axis, ensure that the time alignment results of different business monitoring information are more in line with the actual business needs, reduce the capacity expansion decision - making error caused by data asynchrony, and improve the accuracy and stability of data analysis.
[0324] To more accurately measure the matching degree of business monitoring information in the time dimension and ensure that the data alignment quality can meet the requirements of the capacity expansion decision, the embodiments of this application provide an automated evaluation mechanism based on the standard deviation. By calculating the standard deviation of the eigenvalue, it is possible to quantify whether the time change trends of different business monitoring information are consistent, thereby judging the stability of data alignment. Therefore, an optional implementation is as follows:
[0325] If the standard deviation is greater than the preset standard deviation threshold, it is determined that the alignment quality of this time does not reach the specified alignment effect. If the standard deviation is not greater than the preset standard deviation threshold, it is determined that the alignment quality of this time reaches the specified alignment effect.
[0326] In the embodiments of this application, a threshold a can be set to measure the eigenvalue distribution of the covariance matrix. If the standard deviation σ of the eigenvalue λ exceeds this threshold a, it indicates that the main change directions of the data are too concentrated, that is, the alignment quality of the data may be unstable. The change trends of some variables dominate the characteristics of the overall data, while the alignment of other variables is poor or the correlation is weak, thus affecting the overall consistency of the data.
[0327] By setting the standard deviation threshold, a mechanism for quantitatively judging whether the alignment quality meets the standard is further introduced, making the evaluation of the alignment effect have a clear judgment basis and operability. By comparing the standard deviation of the aligned eigenvalue with the preset threshold, the synchronization degree between various types of business monitoring information in the time dimension can be objectively evaluated, avoiding relying on subjective experience or manual intervention in the judgment of alignment quality, thereby improving the automation and intelligence level of the data preprocessing process.
[0328] Finally, if the alignment quality of this time does not reach the specified alignment effect, the alignment strategy is adjusted to perform the next time alignment operation according to the adjusted alignment strategy.
[0329] By setting the quality evaluation and dynamically adjusting the alignment strategy when it does not meet the standard, the adaptive optimization of the data alignment process is realized, ensuring that the final alignment result meets the analysis requirements. It enhances the adaptability to complex or dynamic business environments, thereby further improving the data foundation quality and intelligence level of the overall capacity expansion plan.
[0330] To more efficiently optimize the data alignment quality and ensure that the alignment strategy can be quickly adjusted in the case where the alignment quality does not reach the specified alignment effect, an optional implementation is that the adjustment methods of the alignment strategy include at least one of the following:
[0331] Adjustment method 1: Adjust the sampling point supplement method.
[0332] There may be significant differences in the sampling frequencies of different business monitoring data. To reduce errors on the data time axis, the method of supplementing sampling points can be optimized. For example, linear interpolation is applicable to scenarios where data changes are relatively stable. Data is completed based on the trend of adjacent data points. Spline interpolation is applicable to non-linearly changing data and can provide a smoother interpolation result, reducing sudden change errors. Time-weighted interpolation is applicable to situations where data has time trend characteristics, and historical data is weighted for interpolation to improve the accuracy of data completion.
[0333] In addition, nearest-neighbor interpolation can also be used, which is applicable to scenarios with high real-time requirements but slow data changes. Missing data is completed by copying the nearest known data point to reduce computational overhead and improve data synchronization.
[0334] Adjustment method two: Adjust the size of the sliding window, and based on the adjusted sliding window, re-collect various types of business monitoring information.
[0335] The size of the sliding window determines the time consistency of the data. If the window is too large, it may lead to an increase in the time matching error between high-frequency and low-frequency data. If the window is too small, it may cause the data to be overly sensitive to fluctuations, affecting the stability of the capacity expansion decision. Therefore, through dynamic window adjustment, the size of the sliding window can be dynamically adjusted according to the data change trend to make the time dimensions of different business monitoring data more matched. For example, a smaller window (such as 5 seconds) is used during peak business periods to improve the accuracy of data collection, while a larger window (such as 30 seconds) is used during low business loads to reduce computational resource consumption. Or fixed window optimization can be adopted, and the optimal sliding window size is selected through experiments in specific business scenarios to minimize the data alignment error and improve the stability of the capacity expansion decision. The multi-window fusion method can also be used, where different sliding window sizes are used for different types of business monitoring data respectively to ensure that the data sampling of each can be completed within the most suitable window range, thereby improving the data alignment accuracy.
[0336] Adjustment method three: Adjust the sliding step of the sliding window, and based on the adjusted sliding window, re-collect various types of business monitoring information.
[0337] The step size of the sliding window determines the time interval for data alignment. If the step size is too large, some data points may be missed, affecting the integrity of data alignment. If the step size is too small, it may increase computational redundancy and cause an excessive computational burden on the system. Therefore, through adaptive step size adjustment, the step size can be dynamically adjusted according to the data change rate. For example, when the business load fluctuates greatly, the step size can be shortened (such as 2 seconds) to improve the data alignment accuracy. When the load is stable, the step size can be increased (such as 10 seconds) to reduce computational resource consumption. Or, fixed step size optimization can be adopted. By analyzing historical data, the optimal sliding step size can be selected to minimize the data alignment error while ensuring computational efficiency. The multi-level step size combination method can also be used, adopting different step size strategies for data of different business types. For example, a smaller step size (such as 1 second) is used for high-priority services, and a larger step size (such as 30 seconds) is used for low-priority services to optimize the data synchronization effect. Through the above adjustment strategies, the time alignment quality of data can be effectively optimized, the time synchronization of business monitoring data can be improved, and the capacity expansion decision can be based on more accurate data for judgment, improving the rationality of the capacity expansion strategy and resource utilization efficiency.
[0338] In addition, it should be noted that the adjustment methods of the alignment strategy are not limited to the above adjustment methods. It can also be to optimize the sampling point supplementation strategy, such as introducing more advanced interpolation methods or adaptive supplementation algorithms to reduce the time deviation of low-frequency data. The size of the time window for data alignment can also be adjusted to make the window range more adaptable to the change characteristics of business data, further improving the accuracy of time alignment and ensuring that business monitoring information can more accurately reflect the change of business load.
[0339] Through the above implementation methods, when it is detected that the data alignment quality does not meet the standard, a method for dynamically adjusting the alignment strategy is further provided. This adaptive adjustment mechanism can flexibly optimize the data alignment strategy for different business scenarios to ensure that the data matching degree is always in the optimal state. Compared with the traditional fixed alignment strategy, this method has stronger adaptability and intelligence level, can automatically optimize data alignment according to the business load characteristics, improve data consistency, and provide more reliable basic data support for capacity expansion decisions.
[0340] S33: For various types of business monitoring information after alignment, feature extraction is respectively performed through the method of sequential encoding to obtain the corresponding information sequential features; the information sequential features represent the time change trend of the corresponding business monitoring information within a preset time period.
[0341] In the embodiment of the present application, after obtaining various types of business monitoring information after alignment, it is necessary to perform feature extraction on various types of business monitoring information to obtain information sequential features.
[0342] In order to more accurately depict the time-varying trend of business monitoring information and ensure that different types of data can be effectively subjected to feature extraction, the present application further proposes a high-order time-series coding strategy for various types of business monitoring information. Specifically, the data types of business monitoring information are obtained, and by matching and adapting high-order time-series coding strategies for different data types, the information time-series features of business detection information for different data types are extracted.
[0343] Therefore, an optional implementation manner is that S33 can be implemented according to the following process, and the following operations S331 to S332 are respectively performed on various types of business monitoring information:
[0344] S331: A type of business monitoring information collected within a preset time period is formed into a time series in chronological order, and the data type to which the type of business monitoring information belongs is determined.
[0345] In the embodiments of the present application, in order to form a type of business monitoring information collected within a preset time period into a time series in chronological order and determine the data type to which the type of business monitoring information belongs, the collected data is first sorted by timestamp to ensure the orderliness of the data in the time dimension and ensure that the data can be analyzed in chronological order in subsequent calculations.
[0346] Assume that this type of business monitoring information includes the current business request volume, CPU utilization rate, and GPU utilization rate. Among them, the previous business request volume is high-frequency data, which is collected every 5 seconds, while the CPU utilization rate and GPU utilization rate are low-frequency data, which are collected every 30 seconds. During the construction of the time series, first sort the current business request volume data according to the timestamp. For example, the request volume at 10:00:00 is 1000, the request volume at 10:00:05 is 1100, the request volume at 10:00:10 is 1200, and so on until 10:05:00. At the same time, insert the low-frequency data of the CPU utilization rate and GPU utilization rate, and supplement the missing time points by using the above time alignment operation to align them with the high-frequency data in the time dimension. Specifically, refer to the above implementation manner, and the present application will not repeat it here.
[0347] After completing the time serialization, it is necessary to determine the data type to which a type of business monitoring information belongs in order to perform subsequent feature extraction and analysis. Different data types have different roles in the expansion decision analysis. Generally, they can be divided into numerical data and text data. For different types of data, corresponding feature extraction methods need to be adopted to accurately depict their time-varying trends and improve the accuracy of the expansion decision.
[0348] Based on this, the following will specifically introduce how to adopt a high-order temporal coding strategy corresponding to the data type to extract the time series features of business monitoring information, so as to more accurately reflect the dynamic changes of business load and support the optimization of the capacity expansion strategy.
[0349] S332: Adopt a high-order temporal coding strategy corresponding to the data type to quantify the time change trend of each data point in the time series within a preset period, and obtain the information temporal features corresponding to a type of business monitoring information.
[0350] In the embodiment of the present application, step S332 mainly involves feature extraction of business monitoring information to obtain information temporal features reflecting the time change trend of the data. Since business monitoring information can include different types of data, such as numerical data and text data, corresponding high-order temporal coding strategies need to be adopted for feature extraction.
[0351] In step S332, for a certain type of business monitoring information (corresponding to the original data collected by the business information collection module), first form a time series in chronological order within a preset period, and then according to its data type (such as numerical type or string type), adopt a high-order temporal coding strategy corresponding to this type to process each data point in this time series, and convert the original time change process into quantifiable trend features. These quantified trend features are the information temporal features corresponding to this type of business monitoring information, which can reflect the change pattern and trend of this business monitoring information in the time dimension, thus providing a structured and computable input for subsequent capacity expansion decision analysis.
[0352] Through the above implementation method, not only the dynamic change information of the time series is retained, but also the sensitivity and discriminability of feature expression are improved through high-order coding, enabling the model to more accurately identify the change trend of business load.
[0353] Through the above implementation method, the present application provides a feature extraction mechanism based on data type, which can perform differential processing on different types of business monitoring information, thereby improving the accuracy of temporal features. Compared with the traditional unified high-order temporal coding strategy, this method makes the time change characteristics of different types of data be more accurately quantified by matching the high-order temporal coding strategy corresponding to the data type, enhances the ability to identify the business load trend, and provides a more accurate feature input for subsequent capacity expansion decisions.
[0354] Considering that there are differences in the feature expression methods of different types of data, in order to achieve targeted feature extraction through high-order temporal coding strategies, an optional implementation method of S332 is the following steps S3321 - S3322 ( Figure 3 not shown):
[0355] S3321: If the data type is a numerical type, then adopt the high-order temporal encoding strategy corresponding to the numerical type.
[0356] In an alternative embodiment, if the data type of the service monitoring information is a numerical type, such as CPU utilization or request processing latency, then the first-order or multi-order difference method can be adopted as the high-order temporal encoding strategy to calculate the data difference between adjacent time points, so as to extract the information temporal features reflecting its change rate and trend.
[0357] To more accurately extract the time variation characteristics of numerical type service monitoring information, an alternative embodiment of S3321 is the following steps S33211 to S3322 ( Figure 3 not shown):
[0358] S33211: For each data point in the time series, respectively determine the M-order difference between every two adjacent data points to obtain the corresponding M-order difference value; where M is a positive integer; for the first data point in the time series, the previous data point adjacent to this data point is determined based on historical data;
[0359] In the embodiments of the present application, in order to more accurately extract the time variation trend of numerical type service monitoring information, the M-order difference method is used to process the time series data. The M-order difference is used to eliminate the trend in the data, making the fluctuation characteristics of the service monitoring information more obvious, so that the capacity expansion decision can accurately identify the change pattern of the service load.
[0360] For example, assume that the service monitoring information is CPU utilization (avg_cpu_usage), the sampling period is 10 seconds, and the sampling points are as follows:
[0361] X = {20%, 25%, 30%, 35%, 40%};
[0362] Perform the first-order difference (M = 1) on this sequence, and the calculation formula is as follows:
[0363] ΔX1 = X t - X t-1 ;
[0364] The calculation result is:
[0365] {5%, 5%, 5%, 5%}.
[0366] This indicates that the CPU utilization increases steadily in each sampling period. If it continues to increase to a certain threshold, capacity expansion may be required.
[0367] If the second-order difference (M = 2) is further calculated, the calculation formula is as follows:
[0368] ΔX2 = ΔX1 - ΔX 1,t-1 ;
[0369] The calculation result is:
[0370] {0%, 0%, 0%}
[0371] This indicates that the growth rate of CPU utilization is stable and there is no sudden change. If the second-order difference value is large, it indicates that there are large fluctuations in the utilization change, and capacity expansion may need to be triggered in advance.
[0372] For another example, if the service monitoring information is the service request volume (request_count), the sampling points are successively:
[0373] X = {1000, 1200, 1400, 1800, 2500};
[0374] First-order difference:
[0375] {200, 200, 400, 700};
[0376] Second-order difference:
[0377] {0, 200, 300}
[0378] If it is found that the second-order difference value increases significantly (such as suddenly rising from 200 to 300), it indicates that the service request volume shows a trend of accelerating growth, which can be used as a basis for triggering capacity expansion. By extracting the dynamic change trend of numerical data through M-order differences, the growth pattern of service load can be more accurately identified, thereby optimizing the capacity expansion strategy and improving the rationality of resource allocation.
[0379] It should be noted here that when performing M-order difference calculation, the difference operation needs to calculate the change value based on two adjacent data points. However, for the first data point in the current time window, since there is no sampling point from the current time period in front of it, the difference calculation cannot be directly performed.
[0380] To solve this problem, the embodiment of the present application needs to introduce a "supplementary sampling point" to complete the difference calculation. The supplementary sampling point can be based on the real data collected during the historical sampling period, or the statistical results of multiple historical sampling points, such as the average value, median value, or weighted moving average value of the historical time period, etc., to construct a reasonable reference point. In this way, even when there is a lack of direct pre-sampling points at the starting position of the time series, the continuity and accuracy of the difference calculation can be ensured, thereby improving the integrity of time series feature extraction and the ability of the model to perceive trend changes. This supplementary strategy is flexible and applicable to various different service monitoring data sampling scenarios.
[0381] S33212: Compose the obtained M-order difference values into the information time series features corresponding to a type of service monitoring information.
[0382] In the embodiment of the present application, assume that the service monitoring information is the average delay of request processing, and its sampling period is 10 seconds. The sampled point data are successively: [200ms, 220ms, 260ms, 300ms, 330ms]. Perform a first-order difference (M = 1) on this time series, and the obtained difference value sequence is: [20ms, 40ms, 40ms, 30ms]. Arrange these difference values in chronological order to form a new sequence, which is the information time series feature corresponding to the service monitoring information of request processing delay. This information time series feature can be used to depict the delay change trend and serve as the basis for subsequent capacity expansion judgment.
[0383] It should be noted here that the above is an example with M = 1. In actual applications, there are many types of service monitoring information, and the time series feature change patterns and data structures of each type may be different. Therefore, the differential order M adopted can also be flexibly adjusted, and the present application does not make specific limitations on this.
[0384] Through the above implementation manner, the present application provides a numerical feature extraction method based on M-order difference, which can effectively capture the change trend of time series data and remove the possible influence of long-term trends, making the capacity expansion decision pay more attention to short-term fluctuations. Compared with directly using the original numerical values as features, this method makes the features more stable by calculating the differences between adjacent data points, and can adapt to the load changes in different service scenarios, improving the system's response ability to dynamic service environments.
[0385] S3322: If the data type is string type, then adopt the high-order time series encoding strategy corresponding to the string type.
[0386] In order to more accurately extract the time change features of string type service monitoring information, an optional implementation manner is as follows in steps S33221 to S33224 ( Figure 3 not shown):
[0387] S33221: Divide the preset time period into multiple sub-intervals according to a specified time interval.
[0388] In the embodiment of the present application, assume that the preset time period is 10 minutes. Divide it into 10 sub-intervals at a rate of one minute per sub-interval for subsequent statistics of the changes of string type service monitoring information in each time period.
[0389] S33222: For each string in the time series, obtain the corresponding frequency sequence by counting the frequency of the string appearing in each sub-interval.
[0390] To improve the statistical efficiency and analysis accuracy of business monitoring information of string type, before obtaining the corresponding frequency sequence by counting the frequency of occurrence of a string in each sub-interval, an optional implementation is as follows: By encoding the string, the string is converted into the form of a numerical vector; By counting the number of numerical vectors in each sub-interval, the frequency of occurrence of the string in each sub-interval is determined to obtain the corresponding frequency sequence.
[0391] In an optional implementation, the conversion of the string into the form of a numerical vector can be performed through one-hot encoding. The purpose of one-hot encoding is to convert categorical data into a numerical form so that it can be applied to calculations and modeling. For business monitoring information of string type, a vocabulary containing all possible string values can be constructed first, and a unique binary vector is assigned to each string, where only one position has a value of 1 and the remaining positions are 0. For example, if the possible string values of a certain business monitoring information are {"normal", "warning", "fault"}, then "normal" can be encoded as [1, 0, 0], "warning" can be encoded as [0, 1, 0], and "fault" can be encoded as [0, 0, 1]. Through one-hot encoding, string data can be converted into a numerical vector of a fixed length, which can facilitate frequency statistics, difference calculations, and further time series analysis, ensuring that the time characteristics of business monitoring information of string type can be effectively extracted and utilized.
[0392] In addition, it should be noted that the above one-hot encoding is only simple and specific. Encoding methods such as label encoding can also be used to convert the string into the form of a numerical vector, and the present application does not make specific limitations on this.
[0393] Through the above implementation, the business monitoring information of string type is first converted into a unified numerical vector form, making the unstructured text information computable and quantifiable, which is convenient for subsequent statistics and analysis. By counting the number of encoded numerical vectors in each sub-interval to determine the frequency of occurrence of the string, the construction efficiency and accuracy of the frequency sequence can be improved, and statistical deviations caused by inconsistent string formats or semantic repetitions can be avoided.
[0394] S33223: Determine the Nth-order differences between every two adjacent frequency points in the frequency sequence respectively to obtain the corresponding Nth-order difference values; where N is a positive integer; for the first frequency point in the frequency sequence, the previous frequency point adjacent to this frequency point is determined based on historical data.
[0395] In the embodiments of the present application, in order to more accurately extract the time-varying characteristics of string-type service monitoring information, the method of counting the number of numerical vectors in each sub-interval, determining the frequency of occurrence of the string in each sub-interval to obtain the corresponding frequency sequence, and calculating the Nth-order difference of the frequency sequence can be used to extract the time-series characteristics of the service monitoring information.
[0396] In the embodiments of the present application, assume that a certain type of string-type service monitoring information is "plugin name", and its possible values are {"plugin A", "plugin B", "plugin C"}. In a window with a preset time period of 5 minutes, this time period is divided into 5 sub-intervals, each sub-interval being 1 minute. By means of one-hot encoding, "plugin A", "plugin B", and "plugin C" are encoded as [1, 0, 0], [0, 1, 0], and [0, 0, 1] respectively.
[0397] During the statistical process, assume that the number of calls of "plugin A" in each sub-interval is: [10, 15, 20, 35, 30], that is, the frequency sequence corresponding to "plugin A" is constructed as the above values. Then, perform a first-order difference (N = 1) on this frequency sequence, that is: the difference between the second frequency point and the first frequency point: 15 - 10 = 5; the difference between the third frequency point and the second frequency point: 20 - 15 = 5; the difference between the fourth frequency point and the third frequency point: 35 - 20 = 15; the difference between the fifth frequency point and the fourth frequency point: 30 - 35 = -5.
[0398] Since the first frequency point lacks the actual value of its previous time point, in the embodiments of the present application, the average value of historical frequencies can be used as a reference point. For example, if according to historical data statistics, the average number of calls of "plugin A" in the previous acquisition cycle in the same time period is 8, then this value can be used as the "virtual previous value" of the first frequency point. Accordingly, calculate the first-order difference of the first frequency point as: 10 - 8 = 2.
[0399] By introducing the historical average value as a supplementary point, not only the problem of the missing previous value of the first sampling point in the difference calculation is made up for, but also the continuity of the time series is enhanced, making the difference analysis of the entire frequency sequence more complete, and improving the accuracy and practicality of extracting the time-varying trend of string-type service monitoring information.
[0400] Finally, the obtained Nth-order difference sequence is: [2, 5, 5, 15, -5], which is the first-order difference result of the call frequency of "plugin A" in the time change, used to depict the trend of its call behavior changing with time. This sequence can be used as the information time-series characteristics corresponding to this type of string-type service monitoring information of "plugin A", and is used to support subsequent capacity expansion judgment and model analysis.
[0401] In addition, it should be noted here that N = 1 is only an example. In actual applications, the difference order N can be flexibly set according to the fluctuation characteristics of specific business monitoring information and analysis requirements. For example, when it is necessary to capture higher-order trend changes or identify non-linear growth patterns in the frequency sequence, a difference operation with N = 2 or a higher order can be adopted to extract deeper time-varying features, so as to provide richer feature support for subsequent capacity expansion judgment and model analysis. This application does not make specific limitations in this regard.
[0402] S33224: Combine the obtained N-order difference values to form the information time series features corresponding to a type of business monitoring information.
[0403] In the embodiment of this application, the obtained N-order difference values are arranged in chronological order to form the information time series features used to characterize the time change trend of this type of string-type business monitoring information.
[0404] By extracting the change pattern of the string-type business monitoring information through the N-order difference, the change trend of the business load can be more accurately identified, so as to optimize the capacity expansion decision and improve the automation level of business resource management.
[0405] Optionally, before performing frequency statistics, the string-type data can be encoded (this application does not make specific limitations on the encoding method) to facilitate more effective calculation and analysis.
[0406] Through the above implementation manner, this application provides a string feature extraction method based on frequency sequence and N-order difference, which can effectively convert discrete string information into numerical time series features, so that the string-type business monitoring information can be more intuitively reflected in time series analysis. Compared with simple frequency statistics, this method further calculates the difference values of the string frequency sequence, enabling the system to accurately identify the changes in business request patterns, improve the intelligence level of capacity expansion decisions, and enhance the system's adaptability to complex business scenarios.
[0407] In the embodiment of this application, optionally, for the situation where some businesses have obvious seasonal fluctuations, in order to more accurately extract the time change features of business monitoring information and optimize the capacity expansion and contraction decisions, the seasonal decomposition (SeasonalDecomposition) method can be combined to decompose the time series data, separating the long-term trend (Trend), seasonal fluctuation (Seasonal), and residual (Residual), so as to more clearly analyze the change pattern of the data and improve the foresight and pertinence of the capacity expansion strategy.
[0408] In an alternative embodiment, if the data type is a numerical type, before extracting the information time series features by taking the M-th order difference, the time series data can be seasonally decomposed first to eliminate the periodic influence, so that the M-th order difference can more accurately reflect the changing trend of the business load. For example, in API request volume monitoring, if it is found that the request volume is relatively high from Monday to Friday every week and relatively low on weekends, this fixed periodic influence can be eliminated through the seasonal decomposition method, so that the data after the difference calculation can better reflect the sudden changes in the business, improving the accuracy of the scaling decision. Similarly, for key metrics such as GPU resource utilization and database query pressure, the seasonal decomposition method can also be used to extract the long-term trend part, and then calculate the difference to ensure that the data for the scaling decision is more stable.
[0409] In another alternative embodiment, if the data type is a string type, when counting the frequency changes of the string in different time periods, the seasonal decomposition method can be combined to enable the N-th order difference calculation to better capture the true fluctuations of the service monitoring information of the string type. For example, in the call statistics of a certain microservice, assuming that the number of calls of a certain plugin name (pluginid) increases during the business peak period (such as from 9 am to 11 am every day) and decreases during the low peak period (such as late at night), this fixed time periodic influence can be eliminated through the seasonal decomposition method, so that the N-th order difference can accurately depict the sudden business growth or abnormal call situation, thereby optimizing the trigger logic of the scaling strategy.
[0410] In addition, by combining seasonal decomposition, the scaling decision module can predict the business peak in advance and adjust the resource allocation strategy based on the historical periodic trend. For example, actively scale out before the business peak arrives to avoid request backlogs caused by insufficient resources, or appropriately scale in during the business low peak period to reduce resource waste. Compared with the traditional scaling method based on fixed thresholds or rules, the method of the present application can more accurately capture the changing trend of the business load, ensure the adaptability and accuracy of the scaling strategy, improve resource utilization efficiency, and enhance business stability and scalability.
[0411] S34: Determine the scaling decision result of the service node based on the obtained information time series features.
[0412] In the embodiment of the present application, in order to more accurately judge the changing trend of the business load and determine the scaling decision based on the obtained time series features, an alternative embodiment is: input the obtained information time series features and preset prompt information into a pre-trained decision model to obtain the scaling decision result for the service node output by the decision model; wherein the preset prompt information is used to guide the decision model to execute a specific scaling decision task.
[0413] The input of the decision-making model is the processed information time series features, including but not limited to key business monitoring information such as CPU utilization, GPU utilization, memory usage, business request backlog signal (backlog_signal), business request volume (request_count), average latency of request processing (request_latency), etc. The input can also include preset prompt information, which is used to guide the pre-trained decision-making model to complete specific task understanding and context modeling in the form of natural language or structured description. After data preprocessing, feature extraction, and time alignment operations on these input data, the feature vectors of the model are formed. The output of the model includes a binary classification result (Yes / No) indicating whether expansion is required, and the specific quantity of expansion, which is used to guide the subsequent expansion execution.
[0414] After the input information time series features and preset prompt information pass through the calculation logic of the decision-making model, an expansion decision result is generated. For example, when the business request backlog signal continues to rise, the CPU utilization is close to the upper limit, and the request processing delay increases significantly, the decision-making model may output "expansion is required" and give the number of recommended new service instances, and then transmit this decision result to the target expansion tool to trigger the automatic expansion process.
[0415] Optionally, the decision-making model can be a large language model (Large Language Model, LLM), a rule-based decision-making system, a machine learning model, etc. Specifically, a suitable method can be selected according to business requirements and data characteristics for expansion decision-making.
[0416] In an alternative embodiment, the decision-making model can make expansion decisions based on a large language model (which can be abbreviated as: large model). The large language model can be the Large Language Model Architecture 3B (LLAMA3B). This model can convert the processed time series feature data into text input and combine it with preset prompt information, such as preset prompts (Prompt), to guide the large model to make scaling decisions.
[0417] See Figure 9 shown, which is a schematic diagram of making expansion decisions based on a large language model provided by an embodiment of this application.
[0418] Figure 9The input of the decision-making model in [model name] consists of time series data, which includes multiple information time series features. Each information time series feature is used to characterize the change trend of business monitoring information in the time dimension. To improve the intelligence level of the scaling decision, in the embodiments of this application, based on the input time series data, corresponding prompts are constructed. The prompts are used to guide the large language model to make scaling decisions. The content of the prompts can include: "Based on the following five-minute time series data, determine whether scaling is required, and if so, the specific quantity of scaling: [specific content of time series data]." After receiving the prompts, the large language model combines the input time series data for scaling analysis and finally outputs the scaling decision result.
[0419] In Figure 9 the process shown, the input of the large language model includes prompts and time series features. After analysis, the large language model outputs the scaling decision result. The scaling decision result includes two parts. One part is the judgment of whether scaling is required, and the other part is the specific quantity of scaling required when scaling is needed. Among them, the judgment of whether scaling is required can be calculated through a logistic regression model or the Sigmoid activation function in a neural network, and the specific quantity of scaling can be calculated through linear regression or the linear output layer in a neural network. In this way, the embodiments of this application can combine the time series change trend of business load, dynamically adjust the scaling strategy, and improve the accuracy of the scaling decision.
[0420] In addition, the decision-making model is not limited to LLAMA3B, and can also be other large language models with time series prediction capabilities, such as Generative Pre-trained Transformer 4 (GPT-4), Pathways Language Model (PaLM), Bidirectional Encoder Representations from Transformers (BERT), etc. Even a hybrid model that combines multiple algorithms can be adopted, combining rule-based decision-making methods, traditional machine learning models, and large language models to make full use of the advantages of different models and improve the accuracy and robustness of the scaling decision.
[0421] In another alternative implementation, the decision-making model can also be a rule-based decision-making system. The rule-based decision-making system can quickly determine whether to trigger the scaling operation according to the historical data of business monitoring information and in combination with a preset scaling trigger threshold. The preset prompt information can be a structured rule condition set for instructing the model to identify typical business overload patterns. For example, the preset prompt information can be: "If the average CPU utilization rate continuously exceeds 80% and the request backlog signal (backlog_signal) continuously rises", it is considered that there is a potential performance bottleneck in the current system and the scaling operation needs to be triggered. This method is applicable to scenarios where the business load is relatively stable and the scaling requirements are predictable. Its advantages lie in simple implementation logic, low computing overhead, fast execution speed, and convenience for operation and maintenance personnel to configure and adjust. However, due to its lack of dynamic learning ability, in the face of scenarios with rapid business load changes and complex associated factors, there may be limitations such as rigid policies and lagging responses.
[0422] In yet another alternative implementation, the decision-making model can also be a machine learning-based scaling decision-making model. This model can use algorithms such as decision trees, random forests, XGBoost, or neural networks to learn and model time series features, so as to predict the scaling requirements and scaling scale. The preset prompt information can be task descriptive text or label vectors for guiding the model to focus on the feature expression of the scaling scenario. For example: "Please predict whether scaling is required based on the CPU utilization rate, request latency, and request backlog signal in the past 10 minutes". These prompt information can be used as part of the context input during both the model training and inference stages to enhance the model's understanding of the scaling trigger logic. Compared with the rule-based method, the machine learning model can automatically learn the optimal scaling strategy through a large amount of historical data without explicit rule configuration, and has higher prediction accuracy and generalization ability, and is applicable to complex business environments with frequent business fluctuations and drastic changes in resource pressure.
[0423] It should be noted here that the above implementation methods of the decision-making model are only examples, and the present application does not make specific limitations on this. In actual applications, the optimal scaling decision-making scheme can be selected according to business requirements, computing resources, data characteristics, etc. to ensure the accuracy, scalability, and efficiency of the scaling strategy.
[0424] S35: When the scaling decision result indicates that scaling is required, use a predefined scaling process to scale the service nodes.
[0425] To perform the capacity expansion operation more efficiently and ensure that the capacity expansion process can be completed quickly and stably in a complex business environment, this application further proposes an automated capacity expansion process based on the collaborative work of a target capacity expansion tool and a target service platform. This method not only considers the triggering mechanism of capacity expansion, but also realizes the accurate positioning and resource allocation of service nodes through the interaction between the capacity expansion tool and the target service platform, thereby improving the execution efficiency of capacity expansion and reducing the risk of resource mismatch or capacity expansion failure that may occur during the capacity expansion process.
[0426] Therefore, an optional implementation is as follows:
[0427] When the capacity expansion decision result of the decision analysis module indicates that capacity expansion is required, a capacity expansion trigger instruction is sent to the target capacity expansion tool, so that the target capacity expansion tool sends a capacity expansion request to the target service platform according to the capacity expansion trigger instruction. The target service platform locates the service nodes in the target service platform according to the capacity expansion request, configures new service instances for the service nodes in the target service platform, and updates the resource status of the new service instances.
[0428] In the embodiment of this application, when the capacity expansion decision result of the decision analysis module indicates that capacity expansion is required, the decision analysis module generates a capacity expansion decision result and sends a capacity expansion trigger instruction to the target capacity expansion tool to trigger the capacity expansion operation. After receiving the capacity expansion trigger instruction, the target capacity expansion tool parses the instruction content and calls the target capacity expansion tool according to the current capacity expansion strategy, and the target capacity expansion tool sends a capacity expansion request to the target service platform.
[0429] In an optional implementation, the target capacity expansion tool can be BlueKing DevOps Pipeline. BlueKing DevOps Pipeline is a continuous integration and continuous deployment platform (Continuous Integration and Continuous Deployment, CI / CD), which can be used for automated capacity expansion. After the capacity expansion trigger instruction is sent to BlueKing DevOps Pipeline, the pipeline can call the application programming interface (Application Programming Interface, API) of the container orchestration system (Kubernetes, K8s) to dynamically adjust the number of service instances of the target service node to adapt to the change of business load.
[0430] In another optional implementation, the target capacity expansion tool can be the Horizontal Pod Autoscaler (HPA) of Kubernetes. HPA is an autoscaling mechanism provided by Kubernetes to dynamically adjust the number of service instances.
[0431] In yet another alternative embodiment, the target scaling tool may be a serverless computing-based automatic scaling platform, such as Amazon Web Services Lambda (AWS Lambda). AWS Lambda is an event-driven serverless computing platform that can automatically allocate and release computing resources according to changes in business traffic. When the system traffic surges, AWS Lambda automatically increases computing instances to ensure service stability, and when requests decrease, it automatically releases excess resources, thereby reducing operating costs. This solution is suitable for short-term high-concurrency business scenarios and can provide on-demand scaling capabilities.
[0432] It should be noted that the above examples of the target scaling tool are only for illustration, and the present application does not specifically limit this. In actual applications, the target scaling tool can be flexibly selected according to business requirements, system architecture, and resource scheduling strategies. In the embodiments of the present application, Blue Shield Pipeline will be used as an example of the target scaling tool for illustration.
[0433] Optionally, the target scaling tool receives a scaling trigger instruction from the scaling decision module through a preset communication interface to ensure that the scaling instruction can be transmitted to the target scaling tool efficiently and stably, and trigger the subsequent scaling execution process.
[0434] In an alternative embodiment, the communication interface may be a Representational State Transfer (REST) application programming interface based on the Hypertext Transfer Protocol, a communication interface based on the Remote Procedure Call Protocol, or an event-driven interface based on a message queue. It should be noted that the above examples of the communication interface are only for illustration, and the present application does not specifically limit this. In actual applications, the most suitable communication method can be selected according to business requirements, system architecture, and network environment.
[0435] Optionally, the target scaling tool verifies the integrity and legality of the scaling trigger instruction to ensure the accuracy and executability of the scaling instruction, thereby avoiding scaling failures or resource waste caused by missing parameters, incorrect formats, or abnormal requests.
[0436] In an alternative embodiment, after receiving the scaling trigger instruction, the target scaling tool may first perform data integrity verification to ensure that the scaling trigger instruction contains instruction information, including but not limited to the scaling target service node, the scaling quantity, resource allocation parameters, and the scaling priority, which will be specifically introduced below and will not be elaborated here. If it is detected that the information in the scaling trigger instruction is missing or the format is abnormal, the target scaling tool may return an error message and reject the execution of the scaling request to avoid the impact of incorrect scaling instructions on system stability.
[0437] In addition, the target scaling tool can also perform instruction legality verification, including but not limited to permission verification (ensuring the legitimacy of the request source and preventing unauthorized scaling operations), parameter range verification (avoiding scaling beyond the system-set resource upper limit), idempotency check (preventing repeated triggering of the same scaling operation), etc. Through this series of verification measures, it can be ensured that the scaling instructions are complete, accurate, meet the business requirements and the system resource scheduling strategy, and further improve the security and reliability of the scaling process.
[0438] Through the above steps, the target scaling tool has successfully received the scaling trigger instruction, ensuring that the scaling instruction can be correctly transmitted. Next, the specific preparation of the target scaling tool for performing the specific scaling task will be introduced.
[0439] During the interaction process among the decision analysis module, the target scaling tool, and the target service platform, the decision analysis module is responsible for analyzing the system load based on business monitoring data, evaluating the scaling requirements in combination with temporal characteristics, and finally forming a scaling decision result. When it is determined that scaling is needed, the decision analysis module will send a scaling trigger instruction to the target scaling tool according to the scaling decision result. This instruction contains key information such as the scaling target, the scaling quantity, and the resource allocation strategy. After parsing the instruction, the target scaling tool further sends a scaling request to the target service platform. After receiving the request, the target service platform will perform the scaling operation according to the scaling requirements and return the scaling execution result to the target scaling tool after the scaling is completed, thus forming a complete closed-loop for the execution of the scaling decision.
[0440] The target service platform, as the execution entity of the scaling operation, is responsible for parsing the scaling request and specifically implementing the scaling task. After receiving the scaling request, the target service platform will first check the resource usage of the current service node to determine whether there are available computing resources required for scaling.
[0441] In the embodiments of the present application, the service instance can be a Pod in a container orchestration system (Kubernetes, K8s), or a lightweight computing instance based on a virtualized environment, such as a virtual machine (Virtual Machine, VM) or a function-as-a-service (FaaS) instance. The present application does not make any limitations in this regard.
[0442] When the resources meet the expansion requirements, the target service platform will create new service instances on the target service nodes according to the parameters in the expansion request, and reasonably allocate computing resources such as CPU, memory, GPU computing units, etc. for these service instances. Subsequently, the target service platform will adjust the business traffic scheduling strategy to enable the newly expanded service instances to smoothly join the existing business processing process, ensuring that the expanded resources can be fully utilized to meet the needs of business traffic growth. In addition, the target service platform will also update the resource status of the newly created service instances and return the expansion execution result to the target expansion tool to ensure the correct execution of the expansion task, ultimately realizing dynamic resource expansion and improving the availability of the system and the business carrying capacity.
[0443] Through the above implementation manner, the present application provides an automated expansion mechanism based on the collaborative control of an expansion tool and a target service platform, which can quickly trigger an expansion instruction after the expansion decision is generated, and the target expansion tool is responsible for docking with the target service platform, thereby ensuring the efficient execution of the expansion process. Compared with the traditional manual-triggered expansion or direct expansion at the application layer, this method realizes the standardization and automation of the expansion process through a multi-layer collaborative manner, improving the reliability of the expansion process and the accuracy of resource scheduling. In addition, through the interaction between the target expansion tool and the target service platform, the expansion operation is not limited to the resource allocation at a single level, but covers the accurate positioning of service nodes, the creation and configuration of service instances, and the synchronous update of resource status. This full-link expansion process design ensures that the newly added service nodes can quickly join the system and immediately participate in business processing, thereby reducing expansion latency and improving the scalability and business continuity of the system.
[0444] To further optimize the accuracy of the expansion decision and the adaptive ability of the system, the present application also proposes a decision model optimization mechanism based on expansion feedback data. An optional implementation manner is as follows:
[0445] Call the information callback plugin in the target expansion tool to obtain the feedback data after expanding the service nodes in the target service platform; the feedback data is used to describe the expansion effect of this expansion of the service nodes; construct a labeled training sample set based on the feedback data; and fine-tune the decision model according to the labeled training sample set.
[0446] In the embodiments of the present application, the target expansion tool call information callback plugin can collect expansion effect data in real time after the expansion is completed, including but not limited to the startup time, running status, changes in business request processing capabilities, adjustments in system resource utilization, traffic distribution after the load balancing policy is adjusted, and the impact of expansion on business request latency, etc. After receiving this feedback data, the target expansion tool transmits it to the decision analysis module, which analyzes the data and extracts features in combination with historical expansion decisions, thereby optimizing the expansion strategy and improving the prediction accuracy of the model.
[0447] For example, if the feedback data indicates that the resource utilization rate of the system after expansion is significantly lower than expected, the decision analysis module can adjust the expansion trigger threshold or optimize the expansion quantity in subsequent decisions to reduce resource waste and improve the utilization rate of computing resources, ensuring that the expansion decision better meets the business requirements and system performance goals.
[0448] In the embodiments of the present application, assuming that the feedback data returned by the target service platform includes the running status of the newly added service instance, the change trend of CPU utilization rate, and the business request processing delay, the expansion control module associates this feedback data with the expansion decision result, constructs a labeled training sample set, and uses it to fine-tune the original decision model to improve its expansion prediction accuracy for subsequent similar scenarios.
[0449] See Figure 10 As shown, it is a decision control schematic diagram provided by the embodiments of the present application.
[0450] As Figure 10 As shown, the target expansion tool, as the core component for expansion execution and feedback, interacts with the decision analysis module and the target service platform to achieve a closed-loop management of expansion decision-making, execution, and optimization. The target expansion tool includes an expansion plugin and an information callback plugin, which are responsible for controlling the expansion process and collecting feedback on the expansion effect, respectively.
[0451] Specifically, when the decision analysis module determines that the target type of business needs to be expanded based on business monitoring information and time series feature analysis, it sends an expansion trigger instruction to the target expansion tool. The target expansion tool parses the instruction and further calls the expansion plugin to send the expansion request to the target service platform. After receiving the expansion request, the target service platform deploys new service instances on the corresponding service nodes, completes the expansion operation, and adjusts the resource allocation to ensure that the newly added service instances can run normally.
[0452] After the expansion is completed, the information callback plugin is responsible for obtaining the feedback data of the expansion execution from the target service platform, including the running status of the newly added service instances, the changes in the business request processing capabilities, the adjustment of the service node resource utilization rates, etc., and returning this feedback data to the target expansion tool. After receiving the expansion feedback, the target expansion tool analyzes the execution of the expansion process, determines whether the expansion target has been achieved, and passes the analysis result to the decision-making analysis module for optimizing the subsequent expansion strategy. For example, if it is found that the backlog of business requests remains unresolved after a certain expansion, the decision-making analysis module can adjust the triggering conditions of the expansion and optimize the expansion parameters during the next decision-making, making the expansion plan more accurate and efficient.
[0453] In addition, Figure 10 also shows the structure of the target service platform, which contains multiple service nodes, and each service node can run multiple service instances. The deployment and management of the service instances are controlled by the target expansion tool in coordination with the target service platform to ensure reasonable resource allocation, improve the business's bearing capacity and stability. At the same time, the service instances in the target service platform can provide real-time status information to the target expansion tool through the information callback plugin, enabling the expansion plan to be dynamically adjusted according to the actual situation of the business load, improving resource utilization, reducing the expansion cost, and enhancing the overall stability of the system.
[0454] In summary, Figure 10 shows a decision control process optimized based on expansion feedback. Through the information callback mechanism and dynamic expansion strategy, the expansion process can adapt to the changes in different business environments, continuously optimize the decision-making plan after the expansion execution, thereby ensuring business stability, improving resource scheduling efficiency, and enhancing the accuracy of the expansion decision.
[0455] Through the above implementation method, after completing the expansion operation of the service node, the method further calls the information callback plugin in the target expansion tool to obtain the expansion effect data feedback by the target service platform in real time, thereby providing a basis for the subsequent optimization of the expansion strategy. By annotating these feedback data with the corresponding expansion behaviors, a labeled training sample set is constructed, enabling the decision-making model to continuously learn and update the strategy based on the existing expansion experience. Further, fine-tuning the decision-making model based on this training sample set helps to improve the generalization ability and prediction accuracy of the model in the actual business scenario, making the expansion judgment more accurate and the response more timely, effectively enhancing the system's adaptability to complex business load changes, and achieving a higher level of intelligent resource scheduling and service stability guarantee.
[0456] In summary, by introducing the collaborative scaling mechanism of the scaling tool and the target service platform, the present application effectively solves the deficiencies of traditional scaling solutions in terms of execution efficiency, resource scheduling accuracy, and system stability, making the scaling process more intelligent, efficient, and more suitable for the elastic scaling requirements under cloud computing and microservices architectures.
[0457] In the above process, although the decision analysis module can accurately determine whether scaling is required and provide corresponding scaling suggestions, an efficient and stable control mechanism is still needed to execute the scaling operation and ensure the smooth progress of the scaling process. The next step will introduce the process of scaling requests and specific scaling operations.
[0458] Refer to Figure 11 As shown, it is the flowchart for generating a scaling request provided by an embodiment of the present application. The scaling request is generated by the target scaling tool in the following manner, and the specific implementation process is as follows: S111 - S112:
[0459] S111: After establishing communication with the target service platform by invoking the target scaling plugin, obtain the current first resource configuration parameters of the service nodes in the target service platform.
[0460] Among them, the target scaling plugin is an interface component or tool for communicating with the target service platform and executing scaling requests. The main functions of the target scaling plugin are to parse scaling requests, query the current resource status, trigger scaling operations, and feedback scaling results.
[0461] In an alternative embodiment, the target scaling plugin can be a scaling controller based on the container orchestration system Kubernetes, which interacts with the target service platform through an extended application programming interface, invokes the horizontal pod autoscaler or a custom scaling controller, and dynamically adjusts the number of service instances according to the cluster load.
[0462] In another alternative embodiment, the target scaling plugin can be a scaling plugin based on the development and operations integrated pipeline, such as the scaling task plugin of the Blue Shield pipeline. This plugin can integrate the scaling task into the continuous integration and continuous deployment process to achieve automated execution of scaling and synchronous updates of environment variables, configurations, etc.
[0463] In addition, in yet another alternative embodiment, the target scaling plugin can be an elastic scaling plugin based on the cloud computing platform. The elastic scaling plugin based on the cloud computing platform can call the application programming interface of the cloud platform to dynamically adjust the number of computing instances and achieve on - demand resource scaling.
[0464] It should be noted that the above examples of the target scaling plugin are only for illustration, and the present application does not make specific limitations on this. Suitable scaling plugins can be selected according to business requirements, system architecture, and resource management strategies.
[0465] The first resource configuration parameter is a configuration parameter regarding the current resource usage of service nodes in the target service platform.
[0466] In an alternative implementation, the first resource configuration parameter includes, but is not limited to, current service instance information, CPU resource usage, memory resource usage, storage resource status, network resource status, service node health status, and scaling limit policies, etc.
[0467] Among them, the current service instance information includes the number of deployed service instances, the affiliated service nodes, the running status (such as normal running, failure, restarting, etc.), the number of service replicas, the computing nodes where they are located, etc., to ensure that new service instances can be correctly allocated during scaling;
[0468] The CPU resource usage includes the CPU application amount, CPU limit amount, and current actual CPU usage rate of each service instance, ensuring that performance degradation or impact on the operation of other services will not occur due to insufficient CPU resources during scaling, and at the same time avoiding affecting system stability due to CPU overload;
[0469] The memory resource usage includes the memory application amount, memory limit amount, and current memory usage rate of each service instance, ensuring that newly scaled service instances can run stably in the existing resource environment and avoiding application crashes due to uneven memory resource allocation;
[0470] The storage resource status includes information such as whether the current service instance mounts persistent storage, disk space usage rate, storage I / O rate, etc., ensuring that the scaled service instances have the necessary storage support and preventing storage resource bottlenecks from affecting business operations after scaling;
[0471] The network resource status includes the current network bandwidth usage rate, connection number, load balancing policy, etc., to evaluate whether network congestion may occur after scaling and ensure that newly scaled service instances can correctly join the existing traffic distribution system to ensure network stability;
[0472] The service node health status includes whether the service nodes on the target service platform are in a schedulable state, whether there are resource overloading, hardware failures, network anomalies, etc., ensuring that new containers can be allocated to healthy service nodes for running during scaling and improving the reliability of scaling;
[0473] The scaling limit policy includes the maximum available capacity of the current resource pool, the maximum number of service instances for each scaling, the scaling rate limit, etc., ensuring that scaling will not exceed the resource upper limit set by the system, affecting the stability of the overall cluster, and avoiding resource waste or competition caused by over-scaling.
[0474] The acquisition of the first resource configuration parameter is an important basis for the scaling decision, ensuring that the scaling operation can be optimized based on the current system resource status, enabling newly created service instances to be reasonably allocated resources, and improving the system stability and resource utilization efficiency. Through the acquisition of the first resource configuration parameter, the target scaling tool can not only determine whether the scaling conditions are met, but also further optimize the scaling plan to achieve more reasonable resource allocation and more efficient scaling execution. On this basis, the target scaling tool proceeds to the next operation, which will be specifically introduced below.
[0475] S112: Generate a scaling request according to the first resource configuration parameter and the scaling trigger instruction, and send the scaling request to the target service platform.
[0476] In the embodiment of the present application, S112 mainly involves how the target scaling tool, after completing the acquisition of the first resource configuration parameter, combines the scaling trigger instruction to generate a scaling request applicable to the target service platform and finally submit it to the target service platform to officially initiate the scaling operation. The core purpose of this step is to ensure that the scaling request can accurately match the current system resource status, optimize resource allocation, and improve the reliability and stability of scaling execution.
[0477] Through the above implementation manner, the present application provides a communication method based on a scaling plug-in, enabling the scaling tool to efficiently interact with the target service platform and obtain the resource configuration of the current service node in real time. Compared with the method of directly sending a scaling request to the target service platform, this method enables the generation of the scaling request to be more accurate through the adaptation ability of the scaling plug-in and can adapt to different types of computing environments, improving the stability and compatibility of the scaling process.
[0478] In the embodiment of the present application, before entering S112, the target scaling tool has obtained the current first resource configuration parameter of the target service platform through S111, that is, the resource usage of the service node in the current target service platform. At the same time, the target scaling tool has also received a scaling trigger instruction from the scaling decision module.
[0479] Optionally, the scaling trigger instruction includes: the identification information of the service node and the corresponding scaling quantity; the scaling quantity represents the number of new service instances.
[0480] Among them, the identification information of the service node refers to the unique identification of the service node related to the target type of business, which is used to ensure that the scaling operation can accurately locate the service node to be scaled and enable the newly added service instances to be correctly deployed to this node.
[0481] The expansion quantity refers to the number of service instances that need to be added in this expansion. This quantity is determined by the expansion decision module after extracting the characteristics of various business monitoring information. For the specific process, please refer to the above embodiments, and this application will not repeat it here.
[0482] To improve the accuracy of expansion, enable the newly created service instances to be reasonably matched with the existing resource environment, and ensure the overall system load balance, this application also provides a resource calculation mechanism. An optional implementation method is that S112 can be implemented according to the following process, including the following steps S1121 to S1122:
[0483] S1121: Determine the second resource configuration parameter according to the first resource configuration parameter and the expansion quantity; the second resource configuration parameter represents the resource status of the new service instance.
[0484] In this step, the target expansion tool needs to calculate the second resource configuration parameter applicable to the newly added service instance, that is, the resource status that the newly created service instance should have, based on the first resource configuration parameter, that is, the resource usage of the current service node, and in combination with the expansion quantity in the expansion trigger instruction.
[0485] In an optional implementation method, if the first resource configuration parameter indicates that the CPU resource utilization rate of the current service node is close to the upper limit, and this service has high requirements for computing power, then when calculating the second resource configuration parameter, the target expansion tool can ensure that the newly created service instance applies for appropriate CPU resources to ensure computing performance, while avoiding excessive CPU resource competition caused by expansion from affecting the computing power of existing containers. For example, if the CPU resources are limited, the target expansion tool can dynamically adjust the CPU application strategy of the service instance to ensure balanced resource allocation and improve the overall computing efficiency.
[0486] The computing resources can be 8-core CPUs and 16GB of memory, or 1 GPU and 32GB of GPU video memory, etc. The specific resource configuration can be dynamically adjusted according to business requirements.
[0487] S1122: Generate an expansion request according to the expansion trigger instruction and the second resource configuration parameter.
[0488] In this step, the target expansion tool needs to generate an expansion request by combining the expansion target, expansion quantity of the expansion trigger instruction, and the resource allocation information provided by the second resource configuration parameter, and submit it to the target service platform to ensure that the expansion operation can be correctly executed according to the system's preset resource management strategy.
[0489] In an alternative embodiment, when generating an expansion request, the target expansion tool combines the network traffic information in the first resource configuration parameter to determine the network load of the current service node. If it is found that the traffic pressure on some service nodes is relatively high, a new load balancing strategy is specified in the expansion request, so that the newly added service instances can appropriately allocate business traffic, avoiding the problem of traffic concentration caused by unbalanced expansion of some service nodes.
[0490] In another alternative embodiment, the target expansion tool can add a health check mechanism to the expansion request to ensure that after the expansion operation is completed, the newly added service instances can successfully join the existing business cluster and receive traffic normally. If it is found that some service instances have abnormalities during the initialization phase of the expansion process (such as resource allocation failure, health check not passed, etc.), the target expansion tool can trigger an automatic rollback mechanism to avoid unstable instances affecting business stability and ensure that the system remains highly available during the expansion process.
[0491] Through the above embodiments, more precise resource allocation can be achieved, improving the stability and resource utilization rate of system expansion. Before generating an expansion request, the target expansion tool calculates the optimal expansion plan based on the first resource configuration parameter to ensure that the newly added service instances will not cause resource competition or load imbalance, improving the overall stability of the system. The target expansion tool combines the expansion quantity in the expansion trigger instruction and dynamically calculates the second resource configuration parameter according to the resource situation of the service node to ensure reasonable matching of resources after expansion, improving the computing efficiency and resource utilization rate of the system. The generation and submission process of the expansion request can be fully automated without manual intervention, greatly improving the response speed of expansion, ensuring that the system can quickly adjust resource allocation when the business load fluctuates, and improving the execution efficiency and reliability of expansion. The expansion method can adapt to different types of target service platforms, ensuring that the expansion plan can run stably in different computing environments and improving the scalability of the system.
[0492] In summary, through the intelligent calculation mechanism based on the first resource configuration parameter, this application optimizes the expansion decision, ensures that the expansion request reasonably matches the current system resources, improves the execution efficiency and stability of expansion, and provides strong support for the high availability of the business system.
[0493] In addition, it should be noted that in an optional implementation manner, in order to manage and isolate business resources more precisely, the target scaling tool supports scaling management based on Sets. A Set, as the basic unit of business operation, can be regarded as a logical grouping of service instances. The service instances within each Set share the same resource configuration and scheduling policy, while different Sets are isolated from each other to avoid resource competition and business conflicts. For example, in a microservices architecture, a service node can host multiple services simultaneously, and each service consists of multiple Sets. The number of instances within a Set can be dynamically adjusted according to the business load, and the resources between Sets will not affect each other. This not only improves resource utilization but also enhances the stability of the service and the flexibility of scaling, enabling the target scaling tool to manage resource scheduling in different business scenarios more precisely and achieve efficient expansion and stable operation of the business.
[0494] See Figure 12 As shown, it is a general schematic diagram of a service node scaling method provided by an embodiment of the present application, showing the complete process from the collection and analysis of business monitoring information to the final scaling execution and feedback optimization.
[0495] As Figure 12 shown, this method involves multiple key modules, including a business information collection module, a decision analysis module, a target scaling tool, and a target service platform. They cooperate with each other to ensure the accuracy of scaling decisions, the efficiency of scaling execution, and the continuous optimization of scaling strategies.
[0496] First, the business information collection module (left part) is responsible for collecting business monitoring information in real time and transmitting it to the decision analysis module. Business monitoring information includes various data types, such as business request volume, CPU utilization rate, memory occupancy rate, GPU load, network traffic, etc. After multi-level collection of these data (such as business monitoring information 1, business monitoring information 2,....), a complete business status data set is formed, providing a basis for subsequent scaling decisions.
[0497] After the data collection is completed, the decision analysis module performs feature extraction and time series analysis on the business monitoring data, obtains information time series features, and makes scaling decisions based on these features. This module uses methods such as rule judgment, machine learning, or large language models (LLMs) to analyze the change trend of business load, predict future resource requirements, and generate scaling decision results. If the analysis result indicates that scaling is required, the decision analysis module sends a scaling trigger instruction to the target scaling tool.
[0498] After receiving the scaling trigger instruction, the target scaling tool is responsible for the specific scaling execution logic, sending a scaling request to the target service platform through a scaling plugin, instructing the target service platform to deploy new service instances on appropriate service nodes.Figure 12 The hierarchical structure of the target service platform is shown, including multiple service nodes, and each service node may contain multiple service instances. During the scaling process, the target scaling tool needs to calculate the second resource configuration parameter (resource requirements of new service instances) based on the current first resource configuration parameter (current system resource status) to ensure that the newly created service instances meet the business requirements and can run stably.
[0499] After the scaling is completed, the target service platform will provide feedback data on the scaling execution to the target scaling tool through the information callback plugin, such as the running status of the newly added service instances and the changes in resource usage of the service nodes. The target scaling tool analyzes this feedback data and further transmits it to the decision analysis module for optimizing the scaling strategy. For example, if the feedback data indicates that the effect of a certain scaling is not ideal (such as uneven resource allocation of service instances or unrelieved business pressure), the decision analysis module can adjust the trigger threshold and optimize the resource allocation method in subsequent scaling decisions, thereby improving the accuracy and execution efficiency of scaling.
[0500] In summary, Figure 12 A complete service node scaling method is shown. This method combines multiple links such as business monitoring, data analysis, intelligent decision-making, scaling execution, and feedback optimization, realizes the automation and intelligence of the scaling process, makes the scaling decision more accurate, the scaling execution more efficient, and ultimately improves the resource utilization rate and business carrying capacity of the system, ensuring that the business can run stably under different load conditions.
[0501] Through the above process, this application realizes the high automation of service node scaling by integrating the large language model (LLM) (such as LLAMA3B) in the decision analysis module and combining the automated execution process of the target scaling tool and the target service platform (such as the Kubernetes platform). This automation feature significantly reduces the need for manual intervention and improves the timeliness and accuracy of scaling responses.
[0502] From the perspective of efficiency improvement, the automated scaling process converts the links that rely on manual execution in the traditional scaling process (such as manually configuring resources and starting service instances one by one) into fast and accurate automatic execution, greatly shortening the time interval from business load growth to resource expansion completion, enabling the target service platform to quickly adjust resource configuration when the business peak arrives and ensuring business continuity and stability.
[0503] With the real-time data collection of the service information collection module and the intelligent analysis ability of the decision analysis module, the scaling method of this application can accurately perceive the dynamic changes of the service load and quickly make scaling decisions based on the information time series characteristics. This real-time service perception ability enables the target scaling tool to quickly adjust the resource supply when facing complex situations such as sudden traffic and service peaks, ensuring that the service nodes and service instances of the target service platform always maintain a stable and efficient operating state.
[0504] In addition, the decision analysis module can continuously monitor and analyze service metrics (such as request volume, latency, etc.), and combine time series prediction to proactively judge the service growth trend in advance, trigger the target scaling tool to perform scaling before the system performance significantly degrades, effectively avoiding service interruptions or service quality degradation caused by insufficient resources, further enhancing the forward-looking and accuracy of the scaling decision, and ensuring the stable operation and sustainable development of the service.
[0505] See Figure 13 shown in the figure, which is a schematic diagram of the experimental result comparison provided by the embodiment of this application.
[0506] Figure 13 It shows the changing trends of key performance indicators before and after applying the service node scaling method of the embodiment of this application. Specifically, after applying this method, the average scaling response time is shortened from 20 minutes to 5 minutes, indicating a significant improvement in the scaling execution efficiency; the frequency of manual intervention is reduced from 8 times per month to 2 times, indicating an increase in automation and a reduction in manual operation costs; the service backlog duration is decreased from 180 minutes to 60 minutes, indicating that this method can respond faster to the growth of service load and relieve the resource bottleneck; the resource idle rate is reduced from 50% to 10%, indicating that this method can dynamically adjust the resource supply and improve resource utilization. Overall, the embodiment of this application can effectively optimize the scaling process, improve resource utilization efficiency, and reduce operation and maintenance costs, ensuring the stability and continuity of the service.
[0507] In terms of resource stability and cost optimization, this application realizes a dynamic scaling decision mechanism through the collaborative effect of the decision analysis module and the target scaling tool, ensuring that the resource allocation and utilization of the target service platform are more accurate and efficient. Compared with traditional fixed resource allocation or scaling strategies based on empirical rules, the scaling method of this application can dynamically adjust the resource scale based on real-time service monitoring data, avoiding problems of excessive resource idleness or shortage. When the service load is low, the target scaling tool can timely release redundant service instances, reducing energy consumption and computing resource costs; when the service traffic grows, the target scaling tool can intelligently expand resources to ensure sufficient resource supply and avoid service losses caused by insufficient resources. This precise resource management mechanism enables the scaling cost to remain relatively stable under different service load conditions.
[0508] Since the scaling decision is based on data-driven dynamic analysis, the present application has achieved remarkable results in cost control. Compared with traditional indiscriminate scaling or experience-based scaling methods, it effectively reduces unnecessary resource waste. For example, through the business information collection module and the decision analysis module, in-depth analysis is carried out on historical business data and real-time monitoring indicators (such as request volume, response time, resource utilization, etc.), and combined with the prediction ability of large language models (such as LLAMA3B), the required resource increment can be accurately evaluated, avoiding the waste of computing resources and unnecessary cost expenditure caused by over-scaling.
[0509] In practical applications, the scaling method of the present application can avoid blindly increasing too many service instances through intelligent scaling decisions, reduce resource idleness and energy consumption caused by excessive allocation of computing resources, thereby reducing the operation and maintenance costs of the target service platform, including expenditures in aspects such as computing resource procurement, energy consumption, and operation and maintenance management, achieving the maximization of resource utilization and the optimization of cost-effectiveness, and thus bringing direct economic benefit improvement to the enterprise.
[0510] Based on the same inventive concept, the embodiments of the present application also provide a scaling device for service nodes. As Figure 14 shown, it is a schematic structural diagram of a scaling device 1400 for service nodes provided by the embodiments of the present application, and may include:
[0511] An acquisition unit 1401, configured to acquire various types of business monitoring information collected within a preset time period when it is determined that there is a backlog of business requests for target-class services; the various types of business monitoring information at least include: at least one type of request description information of the target-class service, and at least one type of service status information of the service node related to the target-class service;
[0512] An alignment unit 1402, configured to perform at least one time alignment operation on the various types of business monitoring information until a specified alignment effect is achieved, and obtain the aligned various types of business monitoring information;
[0513] A feature extraction unit 1403, configured to perform feature extraction on the aligned various types of business monitoring information respectively in a time series coding manner to obtain corresponding information time series features; the information time series features characterize: the time change trend of the corresponding business monitoring information within a preset time period;
[0514] A decision unit 1404, configured to determine a scaling decision result of the service node based on the obtained respective information time series features;
[0515] A scaling unit 1405, configured to scale the service node by using a predefined scaling process when the scaling decision result indicates that scaling is required.
[0516] Optionally, each type of service monitoring information is collected through a sliding window mechanism; within the same sliding window, at least two different sampling rates are used for information collection, and each type of service monitoring information corresponds to one sampling rate; then the alignment unit 1402 is used for:
[0517] In each time alignment operation, within each sliding window in the preset time period, the following processes are respectively executed:
[0518] Respectively determine the sampling points obtained for each type of service monitoring information based on the corresponding sampling rate;
[0519] Through the sampling point supplementation method specified by the current alignment strategy, time-align the sampling points between various types of service monitoring information, and determine the quality of this alignment;
[0520] If the quality of this alignment does not reach the specified alignment effect, adjust the alignment strategy to perform the next time alignment operation according to the adjusted alignment strategy.
[0521] Optionally, the alignment unit 1402 is further used to determine the quality of this alignment in the following manner:
[0522] For every two types of service monitoring information after this alignment, by analyzing the correlation between every two types of service monitoring information, obtain the corresponding correlation parameters;
[0523] Determine the quality of this alignment by analyzing the distribution information of the obtained correlation parameters.
[0524] Optionally, each correlation parameter is the covariance between the corresponding two types of service monitoring information; the alignment unit 1402 is used for:
[0525] Determine the covariance matrix composed of the obtained correlation parameters;
[0526] Through eigenvalue decomposition of the covariance matrix, obtain multiple eigenvalues;
[0527] Determine the standard deviation between each eigenvalue; among them, the standard deviation characterizes the quality of this alignment.
[0528] Optionally, the alignment unit 1402 is further used for:
[0529] If the standard deviation is greater than the preset standard deviation threshold, determine that the quality of this alignment does not reach the specified alignment effect;
[0530] If the standard deviation is not greater than the preset standard deviation threshold, determine that the quality of this alignment reaches the specified alignment effect.
[0531] Optionally, the alignment unit 1402 is used for:
[0532] Re - execute the alignment operation on various types of service monitoring information by adjusting the alignment strategy; among them, the adjustment methods of the alignment strategy include at least one of the following:
[0533] Adjust the sampling point supplement method;
[0534] Adjust the size of the sliding window, and re - collect various types of service monitoring information according to the adjusted sliding window;
[0535] Adjust the sliding step of the sliding window, and re - collect various types of service monitoring information according to the adjusted sliding window.
[0536] Optionally, the feature extraction unit 1403 is used for:
[0537] Perform the following operations on various types of service monitoring information respectively:
[0538] Form a time series of a certain type of service monitoring information collected within a preset time period in chronological order, and determine the data type to which the service monitoring information belongs;
[0539] Adopt the high - order time - series coding strategy corresponding to the data type to quantify the time - changing trend of each data point in the time series within the preset time period, and obtain the information time - series features corresponding to a certain type of service monitoring information.
[0540] Optionally, if the data type is a numerical type, the feature extraction unit 1403 is used for:
[0541] For each data point in the time series, respectively determine the M - th order difference between every two adjacent data points to obtain the corresponding M - th order difference value; where M is a positive integer; for the first data point in the time series, the previous data point adjacent to this data point is determined based on historical data;
[0542] Form the information time - series features corresponding to a certain type of service monitoring information with the obtained M - th order difference values.
[0543] Optionally, if the data type is a string type, the feature extraction unit 1403 is used for:
[0544] Divide the preset time period into multiple sub - intervals according to a specified time interval;
[0545] For each type of string in the time series, obtain the corresponding frequency series by counting the frequency of the string appearance in each sub - interval;
[0546] Respectively determine the N - th order difference between every two adjacent frequency points in the frequency series to obtain the corresponding N - th order difference value; where N is a positive integer; for the first frequency point in the frequency series, the previous frequency point adjacent to this frequency point is determined based on historical data;
[0547] The obtained N - order difference values are combined to form the information time - series characteristics corresponding to a class of service monitoring information.
[0548] Optionally, before obtaining the corresponding frequency sequence by counting the frequency of the string appearance in each sub - interval, the feature extraction unit 1403 is further configured to:
[0549] Convert the string into the form of a numerical vector by encoding the string.
[0550] The feature extraction unit 1403 is configured to:
[0551] Determine the frequency of the string appearance in each sub - interval by counting the number of numerical vectors in each sub - interval, so as to obtain the corresponding frequency sequence.
[0552] Optionally, the decision - making unit 1404 is configured to:
[0553] Input the obtained information time - series characteristics and preset prompt information into a pre - trained decision model, so as to obtain the expansion decision result for the service node output by the decision model; wherein, the preset prompt information is used to guide the decision model to execute a specific expansion decision task.
[0554] And, the expansion unit 1405 is configured to:
[0555] When the expansion decision result indicates that expansion is required, send an expansion trigger instruction to the target expansion tool, so that the target expansion tool sends an expansion request to the target service platform according to the expansion trigger instruction. The target service platform locates the service node according to the expansion request, configures a new service instance for the service node, and updates the resource status of the new service instance.
[0556] Optionally, the apparatus 1400 further includes:
[0557] The feedback unit 1406 is configured to call the information callback plugin in the target expansion tool to obtain the feedback data after expanding the service node in the target service platform; the feedback data is used to describe the expansion effect of the service node this time.
[0558] Construct a labeled training sample set based on the feedback data.
[0559] Fine - tune the decision model according to the labeled training sample set.
[0560] Optionally, the expansion unit 1405 is further configured to:
[0561] The target expansion tool generates an expansion request in the following manner:
[0562] After establishing communication with the target service platform by invoking the target expansion plugin, obtain the current first resource configuration parameters of the service nodes in the target service platform;
[0563] Generate an expansion request according to the first resource configuration parameters and the expansion trigger instruction, and send the expansion request to the target service platform.
[0564] Optionally, the expansion trigger instruction includes: the identification information of the service node and the corresponding expansion quantity; the expansion quantity represents the number of new service instances; the expansion unit 1405 is used for:
[0565] Determine the second resource configuration parameters according to the first resource configuration parameters and the expansion quantity; the second resource configuration parameters represent the resource status of the new service instances;
[0566] Generate an expansion request according to the expansion trigger instruction and the second resource configuration parameters.
[0567] For the convenience of description, the above parts are divided into various modules (or units) according to functions and described separately. Of course, when implementing this application, the functions of the various modules (or units) can be implemented in the same or multiple software or hardware.
[0568] In the embodiments of the present application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of the overall module or unit that includes the function of the module or unit.
[0569] After introducing the service node expansion method and device of the exemplary embodiment of the present application, next, an electronic device according to another exemplary embodiment of the present application is introduced.
[0570] Those skilled in the art can understand that various aspects of the present application can be implemented as a system, a method, or a program product. Therefore, various aspects of the present application can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuit", "module" or "system" here.
[0571] Based on the same inventive concept as the above method embodiment, an electronic device is also provided in the embodiments of the present application. In one embodiment, the electronic device can be a server, such as Figure 1 the server 120 shown. In this embodiment, the structure of the electronic device can be asFigure 15 As shown, it includes a memory 1501, a communication module 1503, and one or more processors 1502.
[0572] The memory 1501 is used to store computer programs executed by the processor 1502. The memory 1501 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system and programs required to run the instant messaging function, etc.; the data storage area can store various instant messaging information and operation instruction sets, etc.
[0573] The memory 1501 can be a volatile memory, such as a random-access memory (RAM); the memory 1501 can also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); or the memory 1501 is any other medium that can be used to carry or store a desired computer program in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1501 can be a combination of the above memories.
[0574] The processor 1502 can include one or more central processing units (CPUs) or be a digital processing unit, etc. The processor 1502 is used to implement the above service node expansion method when calling the computer program stored in the memory 1501.
[0575] The communication module 1503 is used to communicate with terminal devices and other servers.
[0576] In the embodiments of the present application, the specific connection medium between the above-mentioned memory 1501, communication module 1503, and processor 1502 is not limited. In the embodiments of the present application Figure 15 it is described that the memory 1501 and the processor 1502 are connected through a bus 1504, and the bus 1504 is described in thick lines in Figure 15 For the connection manners between other components, only a schematic description is given, and it is not limited thereto. The bus 1504 can be divided into an address bus, a data bus, a control bus, etc. For the convenience of description, Figure 15 only a thick line is used to describe it in
[0577] The computer storage medium is stored in the memory 1501. The computer - executable instructions are stored in the computer storage medium, and the computer - executable instructions are used to implement the service node expansion method of the embodiments of the present application. The processor 1502 is used to execute the above - mentioned service node expansion method, as Figure 3 shown.
[0578] In some possible implementation manners, each aspect of the service node expansion method provided by the present application can also be implemented in the form of a program product, which includes a computer program. When the program product runs on an electronic device, the computer program is used to cause the electronic device to execute the steps in the service node expansion method according to various exemplary embodiments of the present application described above in this specification. For example, the electronic device can execute the steps as Figure 3 shown in.
[0579] The program product can adopt any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non - exhaustive list) of the readable storage medium include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read - only memory (ROM), an erasable programmable read - only memory (EPROM or flash memory), an optical fiber, a portable compact disk read - only memory (CD - ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0580] The program product of the embodiments of the present application can adopt a portable compact disk read - only memory (CD - ROM) and include a computer program, and can run on an electronic device. However, the program product of the present application is not limited to this. In this document, the readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with a command - executing system, apparatus, or device.
[0581] The readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which a readable computer program is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium can also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with a command - executing system, apparatus, or device.
[0582] The computer program included on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination of the above.
[0583] The computer program for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages. The computer program can be executed entirely on the user's electronic device, partially on the user's electronic device, executed as an independent software package, partially on the user's electronic device and partially on a remote electronic device, or entirely on the remote electronic device or server. In the case of a remote electronic device, the remote electronic device can be connected to the user's electronic device through any type of network, including a local area network (LAN) or a wide area network (WAN).
[0584] It should be noted that although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more of the above-described units can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.
[0585] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the shown operations must be performed to achieve the desired result. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution.
[0586] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable computer programs.
[0587] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing device generate for implementing in the process Figure 1 one process or multiple processes and / or blocksFigure 1 means for the functions specified in one or more boxes.
[0588] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the functions specified in one or more of the flowchart Figure 1 one or more of the flowcharts and / or Figure 1 boxes.
[0589] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, whereby the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in one or more of the flowchart Figure 1 one or more of the flowcharts and / or Figure 1 boxes.
[0590] Although the preferred embodiments of the present application have been described, additional changes and modifications can be made by those skilled in the art once they learn of the basic inventive concept. Therefore, the appended claims are intended to be construed to cover the preferred embodiments as well as all changes and modifications falling within the scope of the present application.
[0591] It is obvious that those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.
Claims
1. A method for expanding service nodes, characterized in that, The method includes: When it is determined that there is a backlog of service requests for the target type of service, obtaining various types of service monitoring information collected within a preset time period; the various types of service monitoring information at least include: at least one type of request description information of the target type of service, and at least one type of service status information of service nodes related to the target type of service; Performing at least one time alignment operation on the various types of service monitoring information until a specified alignment effect is achieved, obtaining the aligned various types of service monitoring information; For the aligned various types of service monitoring information, respectively extracting features in a time series coding manner to obtain corresponding information time series features; the information time series features characterize: the time change trend of the corresponding service monitoring information within the preset time period; Based on the obtained information time series features, determining the expansion decision result of the service node; When the expansion decision result indicates that expansion is required, adopting a predefined expansion process to expand the service node.
2. The method according to claim 1, characterized in that Each type of service monitoring information is collected through a sliding window mechanism; within the same sliding window, information is collected using at least two different sampling rates, and each type of service monitoring information corresponds to one sampling rate; Then, in each time alignment operation, within each sliding window in the preset time period, the following processes are respectively executed: Respectively determining the sampling points obtained by each type of service monitoring information based on the corresponding sampling rate; Through the sampling point supplementation method specified by the current alignment strategy, aligning the sampling points between the various types of service monitoring information in terms of time, and determining the alignment quality of this time; If the alignment quality of this time does not reach the specified alignment effect, adjusting the alignment strategy to perform the next time alignment operation according to the adjusted alignment strategy.
3. The method according to claim 2, characterized in that, Determining the alignment quality of this time in the following manner: For every two types of service monitoring information after alignment this time, by analyzing the correlation between the every two types of service monitoring information, obtaining the corresponding correlation parameter; Determining the alignment quality of this time by analyzing the distribution information of the obtained correlation parameters.
4. The method according to claim 3, characterized in that, Each correlation parameter is the covariance between the corresponding two types of service monitoring information; The determining the alignment quality of this time by analyzing the distribution information of the obtained correlation parameters includes: Determining the covariance matrix composed of the obtained correlation parameters; By performing eigenvalue decomposition on the covariance matrix, obtaining multiple eigenvalues; Determining the standard deviation between the eigenvalues; wherein, the standard deviation characterizes the alignment quality of this time.
5. The method according to claim 4, wherein The method further includes: If the standard deviation is greater than a preset standard deviation threshold, determining that the alignment quality of this time does not reach the specified alignment effect; If the standard deviation is not greater than a preset standard deviation threshold, determining that the alignment quality of this time reaches the specified alignment effect.
6. The method according to claim 2, wherein The adjustment methods of the alignment strategy include at least one of the following: Adjusting the sampling point supplementation method; Adjusting the size of the sliding window, and re - collecting the various types of service monitoring information according to the adjusted sliding window; Adjusting the sliding step of the sliding window, and re - collecting the various types of service monitoring information according to the adjusted sliding window.
7. The method according to any one of claims 1 to 6, characterized in that For the aligned various types of service monitoring information, feature extraction is respectively performed by means of sequential coding to obtain corresponding information sequential features, including: For the various types of service monitoring information, the following operations are respectively performed: Form a time series of a type of service monitoring information collected within the preset time period in chronological order, and determine the data type to which the type of service monitoring information belongs; Adopt the high-order sequential coding strategy corresponding to the data type to quantify the time change trend of each data point in the time series within the preset time period, and obtain the information sequential feature corresponding to the type of service monitoring information.
8. The method according to claim 7, wherein If the data type is a numerical type, adopt the high-order sequential coding strategy corresponding to the numerical type to quantify the time change trend of each data point in the time series within the preset time period, and obtain the information sequential feature corresponding to the type of service monitoring information, including: For each data point in the time series, respectively determine the M-order difference between every two adjacent data points to obtain the corresponding M-order difference value; where M is a positive integer; for the first data point in the time series, the previous data point adjacent to this data point is determined based on historical data; Form the information sequential feature corresponding to the type of service monitoring information with the obtained M-order difference values.
9. The method according to claim 7, wherein If the data type is a string type, adopt the high-order sequential coding strategy corresponding to the string type to quantify the time change trend of each data point in the time series within the preset time period, and obtain the information sequential feature corresponding to the type of service monitoring information, including: Divide the preset time period into multiple sub-intervals according to a specified time interval; For each string in the time series, obtain the corresponding frequency sequence by counting the frequency of occurrence of the string in each sub-interval; Respectively determine the N-order difference between every two adjacent frequency points in the frequency sequence to obtain the corresponding N-order difference value; where N is a positive integer; for the first frequency point in the frequency sequence, the previous frequency point adjacent to this frequency point is determined based on historical data; Form the information sequential feature corresponding to the type of service monitoring information with the obtained N-order difference values.
10. The method according to claim 9, characterized in that Before obtaining the corresponding frequency sequence by counting the frequency of occurrence of the string in each sub-interval, it further includes: Encode the string to convert the string into the form of a numerical vector; The obtaining of the corresponding frequency sequence by counting the frequency of occurrence of the string in each sub-interval includes: Determine the frequency of occurrence of the string in each sub-interval by counting the number of the numerical vectors in each sub-interval to obtain the corresponding frequency sequence.
11. The method according to any one of claims 1 to 6, characterized in that, Determining the capacity expansion decision result of the service node based on the obtained various information sequential features includes: Input the obtained various information sequential features and preset prompt information into a pre-trained decision model to obtain the capacity expansion decision result of the service node output by the decision model; where the preset prompt information is used to guide the decision model to execute a specific capacity expansion decision task; And when the capacity expansion decision result indicates that capacity expansion is required, a predefined capacity expansion process is adopted to expand the service node, including: When the capacity expansion decision result indicates that capacity expansion is required, a capacity expansion trigger instruction is sent to a target capacity expansion tool, so that the target capacity expansion tool sends a capacity expansion request to a target service platform according to the capacity expansion trigger instruction. The target service platform locates the service node according to the capacity expansion request, configures a new service instance for the service node, and updates the resource status of the new service instance.
12. The method according to claim 11, wherein The method further includes: Invoking an information callback plugin in the target capacity expansion tool to obtain feedback data after the service node is expanded in the target service platform; the feedback data is used to describe the capacity expansion effect of the service node this time; Constructing an annotated training sample set based on the feedback data; Fine-tuning the decision model according to the annotated training sample set.
13. The method according to claim 11, wherein The capacity expansion request is generated by the target capacity expansion tool in the following manner: After establishing communication with the target service platform by invoking a target capacity expansion plugin, obtaining the current first resource configuration parameter of the service node in the target service platform; Generating the capacity expansion request according to the first resource configuration parameter and the capacity expansion trigger instruction.
14. The method according to claim 13, wherein The capacity expansion trigger instruction includes: the identification information of the service node and the corresponding capacity expansion quantity; the capacity expansion quantity represents the number of the new service instances; The generating the capacity expansion request according to the first resource configuration parameter and the capacity expansion trigger instruction includes: Determining a second resource configuration parameter according to the first resource configuration parameter and the capacity expansion quantity; the second resource configuration parameter represents the resource status of the new service instance; Generating the capacity expansion request according to the capacity expansion trigger instruction and the second resource configuration parameter.
15. An expansion device for a service node, characterized in that, The device includes: An acquisition unit, configured to acquire various service monitoring information collected within a preset period when it is determined that there is a backlog of service requests for a target type of service; the various service monitoring information at least includes: at least one type of request description information of the target type of service, and at least one type of service status information of the service node related to the target type of service; An alignment unit, configured to perform at least one time alignment operation on the various service monitoring information until a specified alignment effect is achieved, and obtain the aligned various service monitoring information; A feature extraction unit, configured to perform feature extraction on the aligned various service monitoring information respectively in a time series coding manner to obtain corresponding information time series features; the information time series features characterize the time change trend of the corresponding service monitoring information within the preset period; A decision-making unit, configured to determine the capacity expansion decision result of the service node based on the obtained respective information time series features; A capacity expansion unit, configured to adopt a predefined capacity expansion process to expand the service node when the capacity expansion decision result indicates that capacity expansion is required.
16. An electronic device, characterized in that, It includes a processor and a memory. Among them, the memory stores a computer program. When the computer program is executed by the processor, the processor is caused to execute the steps of any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that, It includes a computer program. When the computer program runs on an electronic device, the computer program is used to cause the electronic device to execute the steps of any one of claims 1 to 14.
18. A computer program product, characterized in that, It includes a computer program, and the computer program is stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, causing the electronic device to execute the steps of any one of claims 1 to 14.
Citation Information
Cited By
Node role correction method and device, electronic equipment and storage medium
CN120811891A
Capacity expansion and contraction method and device, electronic equipment, storage medium and program product
CN121000601A
Network capacity expansion and resource allocation intelligent decision-making system based on communication big data
CN121841988A
Network expansion and resource allocation intelligent decision system based on communication big data
CN121841988B
