Service overload intelligent protection method and device, equipment and storage medium

By acquiring and analyzing historical server response time data, building prediction models, judging and optimizing server performance, the problem of service overload in high concurrency scenarios is solved, traffic optimization efficiency is improved, and system stability and user experience are ensured.

CN119254758APending Publication Date: 2025-01-03CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411362756.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In high concurrency scenarios, traffic optimization efficiency is low when service is overloaded, resulting in unavailability of application servers, affecting business promotion activities and user operating quality.

Method used

By obtaining historical server response time data, standardizing processing and building a response time prediction model, analyzing server performance indicators, determining whether the server is overloaded, and performing traffic scheduling and scaling optimization based on the analysis results.

Benefits of technology

Improve the efficiency of traffic optimization in high concurrency scenarios, ensure that the server response time is lower than the threshold, prevent service interruption, improve system stability and user experience, and support the smooth operation of the business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119254758A_ABST
    Figure CN119254758A_ABST
Patent Text Reader

Abstract

The invention relates to the field of flow optimization, and discloses a service overload intelligent protection method, which comprises the following steps of: acquiring historical server response time data arranged according to a time sequence, standardizing the historical server response time data to obtain standard time data, constructing a server response time prediction model by utilizing the standard time data, and predicting the server response time according to the server response time prediction model. The server response time prediction model is used for analyzing the response time data of the multiple servers obtained again, an analysis result about whether the response time of the multiple servers is smaller than a response time threshold value or not is obtained, and performance indexes of the multiple servers are obtained. And performing flow analysis on the plurality of servers according to the analysis result and the performance indexes to obtain a final result of whether the plurality of servers are overloaded or not. According to the invention, the efficiency of flow optimization during service overload in a high-concurrency scene can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of traffic optimization, and in particular to a service overload intelligent protection method, device, electronic device and computer-readable storage medium. Background Art

[0002] With the development of the Internet, auto insurance services have gradually turned to diversification and onlineization. Auto insurance companies will also carry out many flash sales and rush sales promotion activities. The demand brought by the huge Internet user group is difficult to accurately estimate, which also makes the service overload problem in high-concurrency scenarios more and more prominent during business promotion activities. If an emergency occurs when the application server is unavailable during business promotion activities, it will cause huge losses to the insurance company's business promotion activities, and even affect the normal development of sales business and user business quality. Therefore, coping with the service overload problem in high-concurrency scenarios when large insurance companies carry out business activities is a difficult problem that insurance companies urgently need to solve.

[0003] The existing technology has the problem of low traffic optimization efficiency when the service is overloaded in high-concurrency scenarios. Summary of the invention

[0004] The present invention provides a service overload intelligent protection method, device and computer-readable storage medium, the main purpose of which is to solve the problem of low traffic optimization efficiency when the service is overloaded in high-concurrency scenarios.

[0005] To achieve the above object, the present invention provides a service overload intelligent protection method, comprising:

[0006] Get historical server response time data in chronological order;

[0007] Standardizing the historical server response time data to obtain standard time data;

[0008] Constructing a server response time prediction model using the standard time data;

[0009] Analyzing the re-acquired server response time data using the server response time prediction model to obtain an analysis result of whether the response times of the servers are all less than a response time threshold;

[0010] Obtaining performance indicators of the plurality of servers;

[0011] Traffic analysis is performed on the servers according to the analysis results and the performance indicators to obtain a final result of whether the servers are overloaded.

[0012] In some embodiments, the step of normalizing the historical server response time data to obtain standard time data includes:

[0013] Filter out abnormal values ​​of the historical server response time data;

[0014] Calculate the average value of the historical server response time data remaining after removing the abnormal value from the historical server response time data;

[0015] Replacing the abnormal value in the historical server response time data with the average value to obtain first time data;

[0016] Performing multiple interpolation on the first time data to obtain second time data;

[0017] The second time data is converted into a standard normal distribution by using Z-score standardization to obtain standard time data.

[0018] In some embodiments, performing multiple interpolation on the first time data to obtain the second time data includes:

[0019] Analyzing the missing values ​​of the first time data using a preset interpolation model to generate a plurality of interpolation values;

[0020] Collecting the plurality of interpolation values ​​to obtain an interpolation data set;

[0021] Performing regression analysis on the interpolation data set to obtain several analysis results;

[0022] Averaging the plurality of analysis results to obtain an average result;

[0023] The missing values ​​of the first time data are filled using the average result to obtain second time data.

[0024] In some embodiments, the converting the second time data into a standard normal distribution by using Z-score standardization to obtain standard time data includes:

[0025] Calculate the mean and standard deviation of the second time data;

[0026] Subtract the second time data from the average value of the second time data to obtain a subtraction result;

[0027] The standard time data is obtained by dividing the difference result by the standard deviation of the second time data.

[0028] In some embodiments, the use of the server response time prediction model to analyze the re-acquired server response time data to obtain an analysis result of whether the server response times are all less than the response time threshold includes:

[0029] Convert the retrieved server response time data into an input matrix;

[0030] Acquiring an initial cell state in the server response time prediction model;

[0031] Using the input matrix to update the initial cell state to obtain a first cell state;

[0032] Removing the historical server response time data in the initial cell state through a preset forget gate to obtain a second cell state;

[0033] Obtaining an updated cell state according to the first cell state and the second cell state;

[0034] Calculating an output matrix using a preset output gate and the updated cell state;

[0035] An analysis result is generated based on the elements in the output matrix to determine whether the response times of several servers are all less than the response time threshold.

[0036] In some embodiments, performing traffic analysis on the plurality of servers according to the analysis result and the performance indicator to obtain a final result of whether the plurality of servers are overloaded includes:

[0037] If the analysis result is that there are servers whose response time is greater than or equal to a preset response time threshold among the plurality of servers, then the number of overloaded servers whose response time is greater than or equal to the response time threshold is counted;

[0038] When the number of the overloaded servers is 1, the service request of the overloaded server is dispatched to a server whose response time is less than the response time threshold;

[0039] When the number of overloaded servers is greater than 1 and less than a preset server number threshold, the number of servers is expanded according to a preset expansion rule;

[0040] When the number of overloaded servers reaches the server number threshold, the service requests in the overloaded servers are marked and graded, and responses are made according to the importance levels of the service requests from high to low;

[0041] If the analysis result is that the response times of the several servers are all less than the response time threshold, the performance indicators of the several servers are detected to determine whether there is an overloaded server among the several servers.

[0042] In some embodiments, the detecting the performance indicators of the plurality of servers to determine whether there is an overloaded server among the plurality of servers includes:

[0043] Determine whether the performance indicator values ​​of the plurality of servers are all less than a preset performance indicator value threshold;

[0044] If the performance index values ​​of the plurality of servers are all less than the preset performance index value threshold, there is no overloaded server, and the response time data of the plurality of servers that are re-acquired are continuously analyzed;

[0045] If the performance indicator values ​​of the several servers are greater than or equal to the preset performance indicator value threshold, and the duration of the performance indicator value exceeds the preset duration threshold, there are overloaded servers among the several servers, and traffic optimization is performed on the overloaded servers.

[0046] In order to solve the above problem, the present invention also provides a service overload intelligent protection device, the device comprising:

[0047] A data acquisition module, used to acquire historical server response time data arranged in chronological order;

[0048] A data processing module, used for standardizing the historical server response time data to obtain standard time data;

[0049] A model building module, used to build a server response time prediction model using the standard time data;

[0050] A data prediction module, used to analyze the re-acquired server response time data using the server response time prediction model to obtain an analysis result of whether the response times of the servers are all less than a response time threshold;

[0051] A performance indicator acquisition module, used to acquire the performance indicators of the plurality of servers;

[0052] The traffic optimization module is used to perform traffic analysis on the plurality of servers according to the analysis result and the performance index to obtain a final result of whether the plurality of servers are overloaded.

[0053] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0054] at least one processor; and,

[0055] a memory communicatively connected to the at least one processor; wherein,

[0056] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the service overload intelligent protection method described above.

[0057] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned service overload intelligent protection method.

[0058] The embodiment of the present invention obtains historical server response time data arranged in chronological order, standardizes the historical server response time data, obtains standard time data, uses the standard time data to build a server response time prediction model, uses the server response time prediction model to analyze the re-acquired server response time data, obtains an analysis result of whether the response time of the servers is less than the response time threshold, obtains the performance indicators of the servers, performs traffic analysis on the servers according to the analysis results and the performance indicators, and obtains the final result of whether the servers are overloaded. The present invention can solve the problem of low traffic optimization efficiency when the service is overloaded in a high-concurrency scenario. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 A flow chart of a service overload intelligent protection method provided by an embodiment of the present invention;

[0060] Figure 2 A functional module diagram of a service overload intelligent protection device provided by an embodiment of the present invention;

[0061] Figure 3 A schematic diagram of the structure of an electronic device for implementing the service overload intelligent protection method provided by an embodiment of the present invention.

[0062] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0063] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0064] An embodiment of the present invention provides a service overload intelligent protection method. The execution subject of the service overload intelligent protection method includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the service overload intelligent protection method provided by the embodiment of the present invention. In other words, the service overload intelligent protection method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides 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 networks (CDN), and big data and artificial intelligence platforms.

[0065] Reference Figure 1 FIG. 1 is a flow chart of a service overload intelligent protection method provided by an embodiment of the present invention. In this embodiment, the service overload intelligent protection method includes:

[0066] S1. Obtain historical server response time data arranged in chronological order.

[0067] In an embodiment of the present invention, historical server response time data, including timestamps, server loads, etc., are collected from a database, and the collected historical server response time data are sorted according to timestamps to obtain historical server response time data arranged in chronological order.

[0068] The historical server response time data reflects the performance of the historical server at different time points. The original historical server response time data may have problems such as outliers and missing values. Direct use may affect the accuracy of subsequent analysis. Therefore, the present invention introduces a data standardization processing step to obtain more standardized and reliable standard time data by cleaning, interpolating and standardizing the historical data.

[0069] S2. Standardize the historical server response time data to obtain standard time data.

[0070] In the embodiment of the present invention, the step of standardizing the historical server response time data to obtain standard time data includes:

[0071] Filter out abnormal values ​​of the historical server response time data;

[0072] Calculate the average value of the historical server response time data remaining after removing the abnormal value from the historical server response time data;

[0073] Replacing the abnormal value in the historical server response time data with the average value to obtain first time data;

[0074] Performing multiple interpolation on the first time data to obtain second time data;

[0075] The second time data is converted into a standard normal distribution by using Z-score standardization to obtain standard time data.

[0076] In detail, performing multiple interpolation on the first time data to obtain the second time data includes:

[0077] Analyzing the missing values ​​of the first time data using a preset interpolation model to generate a plurality of interpolation values;

[0078] Collecting the plurality of interpolation values ​​to obtain an interpolation data set;

[0079] Performing regression analysis on the interpolation data set to obtain several analysis results;

[0080] Averaging the plurality of analysis results to obtain an average result;

[0081] The missing values ​​of the first time data are filled using the average result to obtain second time data.

[0082] Multiple Imputation (MI) handles missing data by generating multiple imputation data sets, thereby providing a comprehensive assessment of the uncertainty of missing data and effectively reducing the bias and inaccuracy that may be caused by a single imputation method. By analyzing each imputation data set separately and combining the results, parameters can be estimated more accurately, which not only improves the accuracy of data analysis, but also better reflects the uncertainty of missing data.

[0083] In detail, the converting the second time data into a standard normal distribution by using Z-score standardization to obtain standard time data includes:

[0084] Calculate the mean and standard deviation of the second time data;

[0085] The second time data is subtracted from the average value of the second time data to obtain a subtraction result; the subtraction result is divided by the standard deviation of the second time data to obtain standard time data.

[0086] In detail, the calculation formula using Z-score standardization is as follows:

[0087]

[0088] Among them, Zi Indicates standard time data, x i represents the second time data obtained after multiple interpolation of the historical server response time data, μ represents the mean of the second time data, and σ represents the standard deviation of the second time data.

[0089] In an embodiment of the present invention, it is assumed that there is a set of historical server response time data (in milliseconds): [100, 150, 200, 180, 120]. First, the average value of the historical server response time data is calculated to be 150 milliseconds, and the standard deviation is approximately 41.83 milliseconds. Then, each data in the historical server response time data is standardized. For example, for the first data point 100 milliseconds, the standardized value is (100-150) / 41.83≈-1.20, and the standardized values ​​of other data points are 0, 1.20, 0.72, and -0.72, respectively. The historical server response time data is converted into a standard normal distribution with a mean of 0 and a standard deviation of 1.

[0090] In detail, Z-score standardization can not only effectively eliminate the influence of noise and outliers in the data, but also maintain the relative distribution characteristics of the data. By converting the data to a standard normal distribution, it provides a unified data foundation for subsequent model construction and analysis, helps to improve the accuracy and stability of the prediction model, and can more accurately capture the changing trend of server response time, thereby providing strong support for the intelligent prevention and management of service overload.

[0091] The historical server response time data is standardized. The standardization process makes the response time data at different time points have the same scale, eliminating the deviation caused by different data ranges. It not only supplements the missing values ​​of the historical server response time data and removes outliers, but also provides accurate data for the subsequent improvement of the model's prediction ability, making the model more stable and reliable when processing response time data.

[0092] S3. Construct a server response time prediction model using the standard time data.

[0093] In an embodiment of the present invention, the step of constructing a server response time prediction model using the standard time data includes:

[0094] Obtaining training labels for the standard time data;

[0095] Using a preset server response time training model to predict the response time of the standard time data to obtain a prediction label;

[0096] Calculate the loss value of the server response time training model according to the training label and the predicted label;

[0097] Parameters of the server response time training model are optimized according to the loss value to obtain a server response time prediction model.

[0098] In detail, the loss value measures the gap between the response time predicted by the server response time training model and the actual response time. The calculation formula is as follows:

[0099]

[0100] Among them, y i is the training label, y i ' is the predicted label, and N is the number of server response time samples.

[0101] Building a server response time prediction model can predict server response time and optimize resource management. Through accurate prediction and timely adjustment, it can better cope with different load conditions and improve server efficiency and utilization.

[0102] S4. Analyze the re-acquired server response time data using the server response time prediction model to obtain an analysis result of whether the response times of the servers are all less than a response time threshold.

[0103] In the embodiment of the present invention, the server response time prediction model is used to analyze the re-acquired server response time data to obtain an analysis result of whether the response times of the servers are all less than the response time threshold, including:

[0104] Convert the retrieved server response time data into an input matrix;

[0105] Acquiring an initial cell state in the server response time prediction model;

[0106] Using the input matrix to update the initial cell state to obtain a first cell state;

[0107] Removing the historical server response time data in the initial cell state through a preset forget gate to obtain a second cell state;

[0108] Obtaining an updated cell state according to the first cell state and the second cell state;

[0109] Calculating an output matrix using a preset output gate and the updated cell state;

[0110] An analysis result is generated based on the elements in the output matrix to determine whether the response times of several servers are all less than the response time threshold.

[0111] The prediction and analysis of server response time is a complex process that requires consideration of multiple factors and historical data. The method proposed in the present invention achieves accurate prediction and analysis of server response time by using a variant of the long short-term memory network (LSTM).

[0112] Specifically, the acquired server response time data is converted into a matrix form to obtain an input matrix; an initial cell state is extracted from the server response time prediction model, and the initial cell state is a default state at the beginning of the model or a state transferred from the output of the previous moment.

[0113] This involves the internal mechanism of the LSTM server response time prediction model, including the operation of the input gate, forget gate, and output gate: the input matrix is ​​input into the LSTM server response time prediction model through the input gate to update the initial cell state and calculate the first cell state; the forget gate is used to decide how much historical server response time data to discard and calculate the second cell state; this is a key step for the LSTM server response time prediction model to process long sequences, preventing excessive interference of historical information with current predictions. Combining the first cell state and the second cell state, the updated cell state is obtained through the calculation rules of the LSTM server response time prediction model; the output gate and the updated cell state are used to calculate the final output matrix, which contains the predicted values ​​of future server response times. Finally, based on the elements in the output matrix, it is determined whether the response times of several servers are less than the set response time threshold, thereby obtaining the analysis results.

[0114] In detail, the output matrix is ​​calculated using the preset output gate and the updated cell state. The output gate controls which information in the updated cell state should be output to the hidden state at the current moment. The output matrix contains the model's prediction results for future server response times. Based on the elements in the output matrix, the analysis results of whether the response times of several servers are all less than the response time threshold are generated, providing a decision basis for subsequent server load management.

[0115] The input matrix can be constructed by using the sliding window method to split the continuous time series data into sequences of fixed length. The acquisition of the initial cell state can be achieved by loading the parameters of the pre-trained model. The forget gate can use the sigmoid function to control the degree of information forgetting, while the output gate can use the tanh function to adjust the intensity of the output information.

[0116] The server response time prediction model is used to analyze the retrieved response time data and determine whether these response times are all less than the set threshold. This can provide important performance monitoring information and enable timely optimization and adjustment of server performance. By ensuring that all server response times are below the response time threshold, the user experience can be improved, the device failure rate can be reduced, and the overall device stability and reliability can be improved, thereby supporting the smooth operation of the business.

[0117] S5. Obtain performance indicators of the plurality of servers.

[0118] In an embodiment of the present invention, the historical server performance indicators extracted at each time point in the log file include: CPU utilization, memory utilization, disk IO utilization, network bandwidth utilization, etc., ensuring the consistency of performance indicator timestamps, which helps to deeply analyze the performance trends of historical servers, thereby identifying whether the server is overloaded and providing a data basis for subsequent traffic analysis.

[0119] Obtaining server performance indicators helps to gain a deeper understanding of the server's operating conditions, thereby optimizing resource allocation and improving system stability and performance. By analyzing these indicators, we can ultimately ensure that the server operates efficiently, meets business needs, and improves the overall system reliability and user experience.

[0120] S6. Performing traffic analysis on the servers according to the analysis results and the performance indicators to obtain a final result of whether the servers are overloaded.

[0121] In the embodiment of the present invention, the performing traffic analysis on the plurality of servers according to the analysis result and the performance indicator to obtain a final result of whether the plurality of servers are overloaded includes:

[0122] If the analysis result is that there are servers whose response time is greater than or equal to a preset response time threshold among the plurality of servers, then the number of overloaded servers whose response time is greater than or equal to the response time threshold is counted;

[0123] When the number of the overloaded servers is 1, the service request of the overloaded server is dispatched to a server whose response time is less than the response time threshold;

[0124] When the number of overloaded servers is greater than 1 and less than a preset server number threshold, the number of servers is expanded according to a preset expansion rule;

[0125] When the number of overloaded servers reaches the server number threshold, the service requests in the overloaded servers are marked and graded, and responses are made according to the importance levels of the service requests from high to low;

[0126] If the analysis result is that the response times of the several servers are all less than the response time threshold, the performance indicators of the several servers are detected to determine whether there is an overloaded server among the several servers.

[0127] In detail, the detecting the performance indicators of the plurality of servers to determine whether there is an overloaded server among the plurality of servers includes:

[0128] Determine whether the performance indicator values ​​of the plurality of servers are all less than a preset performance indicator value threshold;

[0129] If the performance index values ​​of the plurality of servers are all less than the preset performance index value threshold, there is no overloaded server, and the response time data of the plurality of servers are re-acquired for analysis;

[0130] If the performance indicator values ​​of the several servers are greater than or equal to the preset performance indicator value threshold, and the duration of the performance indicator value exceeds the preset duration threshold, there are overloaded servers among the several servers, and traffic optimization is performed on the overloaded servers.

[0131] In detail, when it is detected that the number of overloaded servers is greater than 1 and less than the preset server number threshold, and the server cluster is overloaded, the standard is usually to expand the server resources by 20%. For example, when it is detected that the system cluster load of 10 servers is high, automatic expansion of 2 servers is triggered.

[0132] In an embodiment of the present invention, in the case of a single server overload, a load balancing algorithm can be used to dynamically dispatch service requests to other servers. The algorithm can be based on strategies such as polling, minimum number of connections, or weighted polling. In the case of multiple servers being overloaded at the same time, elastic scaling technology can be used to automatically expand the server capacity, and the expansion operation can be triggered based on preset rules, such as CPU usage, memory occupancy, or request queue length. For attribute labeling and grading of service requests, a machine learning algorithm can be used to classify requests in real time, and its importance level can be determined based on the characteristics of the request and historical data.

[0133] In detail, suppose an e-commerce platform faces a surge in traffic during a promotional event. If the response time of three servers is monitored to exceed the preset threshold of 200 milliseconds, the number of overloaded servers will be counted immediately, and it will be found that the overload of a single server has been exceeded, but the preset threshold of 5 servers has not been reached. According to the method of the present invention, the expansion rules will be automatically triggered, such as immediately starting two standby servers and allocating new requests to these new servers. At the same time, the system will continue to monitor the performance indicators of all servers, such as CPU usage, memory usage, etc., to ensure that the expanded system can run stably.

[0134] Assuming that the number of overloaded servers is 7 servers that are overloaded at the same time, exceeding the preset threshold of 5 servers, the attribute tagging and grading mechanism of business requests will be activated. For example, the user's order payment request will be marked as the highest priority, and the product browsing request will be marked as a low priority. The system will give priority to high-priority requests to ensure the normal operation of core businesses, and may temporarily delay or reject low-priority requests to relieve system pressure.

[0135] Furthermore, for the huge amount of business requests, in order to cope with overload situations, business requests are graded from high to low according to the importance of the business, namely level I, level II, level III, etc., and the business request levels are manually labeled according to business attributes. For example, the priority of payment business requests will be higher than that of message browsing business requests; the business request content is labeled and distinguished according to system functions, and business functions are classified according to attributes. Different categories of service requests are labeled in the interface. For example, the conventional business system includes account login, product browsing, order payment, product evaluation and other functions. The request URLs of these functions are marked during the system development process. After marking, the system can identify which type of business the received request URL belongs to. According to the pre-classified business importance levels, when flow limiting is required in the future, low-level requests will be limited first to ensure the normal processing of high-level businesses.

[0136] When solving the problem of server overload, the technical solution of the present invention can more accurately judge the load status of the server by first comprehensively analyzing the response time and performance indicators, avoiding the misjudgment that may be caused by a single indicator. Different processing strategies are adopted according to the number of overloaded servers, so as to realize the dynamic allocation and optimal utilization of system resources. When only a single server is overloaded, the request can be redistributed through load balancing technology, which can quickly alleviate the pressure on the single point. When multiple servers are overloaded at the same time but have not reached the critical value, the system can increase the processing capacity in time to cope with sudden traffic through the automatic expansion mechanism. When the preset server number threshold is exceeded, the continuity of key businesses is ensured through intelligent classification and priority processing of business requests, while maximizing the use of existing resources.

[0137] This multi-level processing mechanism not only improves the reliability and stability of the system, but also greatly enhances the scalability and flexibility of the system. Compared with traditional static thresholds or simple statistical analysis methods, the solution of the present invention can better adapt to complex and changing network environments and business needs. For example, during promotional activities on e-commerce platforms, the system can predict traffic surges and adjust resource allocation in advance to avoid service interruptions. At the same time, through continuous monitoring and dynamic adjustment, the system can optimize resource utilization and reduce operating costs while ensuring service quality.

[0138] Optimizing traffic and load balancing the servers based on the analysis results can significantly improve the overall performance and stability of the system. By properly distributing traffic to each server, it is possible to prevent certain servers from being overloaded, reduce response time fluctuations, and improve processing capacity. This optimization not only improves user experience and ensures high availability of services, but also effectively reduces the risk of system failures and optimizes resource utilization, thereby supporting more efficient and reliable business operations.

[0139] Through comprehensive analysis, hierarchical processing and dynamic adjustment, accurate management of server load is achieved. This method can not only effectively prevent and alleviate service overload problems, but also provide new ideas and methods for intelligent management of infrastructure. By flexibly responding to different degrees of overload, the stability and reliability of the system can be significantly improved, while optimizing resource allocation and improving user experience. This intelligent load management strategy provides strong support for building efficient and reliable large-scale distributed systems.

[0140] like Figure 2 , which is a functional module diagram of a service overload intelligent protection device provided in one embodiment of the present invention.

[0141] The service overload intelligent protection device 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the service overload intelligent protection device 100 may include a data acquisition module 101, a data processing module 102, a model building module 103, a data prediction module 104, a performance indicator acquisition module 105 and a traffic optimization module 106. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0142] In this embodiment, the functions of each module / unit are as follows:

[0143] The data acquisition module 101 is used to acquire historical server response time data arranged in chronological order;

[0144] The data processing module 102 is used to standardize the historical server response time data to obtain standard time data;

[0145] A model building module 103, used to build a server response time prediction model using the standard time data;

[0146] The data prediction module 104 is used to analyze the re-acquired server response time data using the server response time prediction model to obtain an analysis result of whether the response times of the servers are all less than the response time threshold;

[0147] The performance indicator acquisition module 105 is used to acquire the performance indicators of the plurality of servers;

[0148] The traffic optimization module 106 is used to perform traffic analysis on the plurality of servers according to the analysis result and the performance index to obtain a final result of whether the plurality of servers are overloaded.

[0149] In detail, each module described in the service overload intelligent protection device 100 in the embodiment of the present invention is used in the same manner as described above. Figures 1 to 3 The service overload intelligent protection method described in the present invention is the same technical means and can produce the same technical effects.

[0150] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing a service overload intelligent protection method provided by an embodiment of the present invention.

[0151] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a service overload intelligent protection program.

[0152] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, executing a service overload intelligent protection program, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device and process data.

[0153] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can be used not only to store application software and various types of data installed in the electronic device, such as the code of the service overload intelligent protection program, but also to temporarily store data that has been output or is to be output.

[0154] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0155] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0156] The figure only shows an electronic device with components. Those skilled in the art will understand that the structure shown in the figure does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0157] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0158] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0159] The service overload intelligent protection program stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve: obtaining historical server response time data arranged in chronological order; standardizing the historical server response time data to obtain standard time data; using the standard time data to build a server response time prediction model; using the server response time prediction model to analyze several re-acquired server response time data to obtain an analysis result of whether the response times of several servers are all less than a response time threshold; obtaining performance indicators of the several servers; performing traffic analysis on the several servers based on the analysis results and the performance indicators of the several servers to obtain a final result of whether the several servers are overloaded.

[0160] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.

[0161] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0162] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor of an electronic device, it can achieve: obtaining historical server response time data arranged in chronological order; standardizing the historical server response time data to obtain standard time data; using the standard time data to build a server response time prediction model; using the server response time prediction model to analyze several re-acquired server response time data to obtain an analysis result of whether the response times of several servers are all less than a response time threshold; obtaining performance indicators of the several servers; performing traffic analysis on the several servers based on the analysis results and the performance indicators of the several servers to obtain a final result of whether the several servers are overloaded.

[0163] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0164] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0165] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0166] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0167] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is not limited only according to the above description, and it is intended that all changes within the meaning and scope of equivalent elements within the scope of protection are included in the present invention.

[0168] The embodiment of the present invention can acquire and process relevant data based on traffic optimization, wherein traffic optimization refers to checking errors, loopholes or problems that do not meet coding standards in the code through tools, mainly used to improve code quality and ensure software reliability and security.

[0169] It should be noted that if software tools or components other than those of our company appear in the embodiments of the present application, they are only used for illustrative purposes and do not represent actual use.

[0170] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A service overload intelligent protection method, characterized in that: The method comprises: Get historical server response time data in chronological order; Standardizing the historical server response time data to obtain standard time data; Constructing a server response time prediction model using the standard time data; Analyzing the re-acquired server response time data using the server response time prediction model to obtain an analysis result of whether the response times of the servers are all less than a response time threshold; Obtaining performance indicators of the plurality of servers; Traffic analysis is performed on the servers according to the analysis results and the performance indicators to obtain a final result of whether the servers are overloaded.

2. The service overload intelligent protection method according to claim 1, characterized in that: The step of normalizing the historical server response time data to obtain standard time data includes: Filter out abnormal values ​​of the historical server response time data; Calculate the average value of the historical server response time data remaining after removing the abnormal value from the historical server response time data; Replacing the abnormal value in the historical server response time data with the average value to obtain first time data; Performing multiple interpolation on the first time data to obtain second time data; The second time data is converted into a standard normal distribution by using Z-score standardization to obtain standard time data.

3. The service overload intelligent protection method according to claim 2, characterized in that: The performing multiple interpolation on the first time data to obtain second time data includes: Analyzing the missing values ​​of the first time data using a preset interpolation model to generate a plurality of interpolation values; Collecting the plurality of interpolation values ​​to obtain an interpolation data set; Performing regression analysis on the interpolation data set to obtain several analysis results; Averaging the plurality of analysis results to obtain an average result; The missing values ​​of the first time data are filled using the average result to obtain second time data.

4. The service overload intelligent protection method according to claim 2, characterized in that: The step of converting the second time data into a standard normal distribution by using Z-score standardization to obtain standard time data includes: Calculate the mean and standard deviation of the second time data; Subtract the second time data from the average value of the second time data to obtain a subtraction result; The standard time data is obtained by dividing the difference result by the standard deviation of the second time data.

5. The service overload intelligent protection method according to claim 1, characterized in that: The server response time prediction model is used to analyze the re-acquired server response time data to obtain analysis results of whether the server response times are all less than the response time threshold, including: Convert the retrieved server response time data into an input matrix; Acquiring an initial cell state in the server response time prediction model; Using the input matrix to update the initial cell state to obtain a first cell state; Removing the historical server response time data in the initial cell state through a preset forget gate to obtain a second cell state; Obtaining an updated cell state according to the first cell state and the second cell state; Calculating an output matrix using a preset output gate and the updated cell state; An analysis result is generated based on the elements in the output matrix to determine whether the response times of several servers are all less than the response time threshold.

6. The service overload intelligent protection method according to claim 1, characterized in that: The performing traffic analysis on the plurality of servers according to the analysis result and the performance indicator to obtain a final result of whether the plurality of servers are overloaded includes: If the analysis result is that there are servers whose response time is greater than or equal to a preset response time threshold among the plurality of servers, then the number of overloaded servers whose response time is greater than or equal to the response time threshold is counted; When the number of the overloaded servers is 1, the service request of the overloaded server is dispatched to a server whose response time is less than the response time threshold; When the number of overloaded servers is greater than 1 and less than a preset server number threshold, the number of servers is expanded according to a preset expansion rule; When the number of overloaded servers reaches the server number threshold, the service requests in the overloaded servers are marked and graded, and responses are made according to the importance levels of the service requests from high to low; If the analysis result is that the response times of the several servers are all less than the response time threshold, the performance indicators of the several servers are detected to determine whether there is an overloaded server among the several servers.

7. The service overload intelligent protection method according to claim 6, characterized in that: The detecting the performance indicators of the plurality of servers to determine whether there is an overloaded server among the plurality of servers includes: Determine whether the performance indicator values ​​of the plurality of servers are all less than a preset performance indicator value threshold; If the performance index values ​​of the plurality of servers are all less than the preset performance index value threshold, there is no overloaded server, and the response time data of the plurality of servers that are re-acquired are continuously analyzed; If the performance indicator values ​​of the several servers are greater than or equal to the preset performance indicator value threshold, and the duration of the performance indicator value exceeds the preset duration threshold, there are overloaded servers among the several servers, and traffic optimization is performed on the overloaded servers.

8. A service overload intelligent protection device, characterized in that: The device comprises: A data acquisition module, used to acquire historical server response time data arranged in chronological order; A data processing module, used for standardizing the historical server response time data to obtain standard time data; A model building module, used to build a server response time prediction model using the standard time data; A data prediction module, used to analyze the re-acquired server response time data using the server response time prediction model to obtain an analysis result of whether the response times of the servers are all less than a response time threshold; A performance indicator acquisition module, used to acquire the performance indicators of the plurality of servers; The traffic optimization module is used to perform traffic analysis on the plurality of servers according to the analysis result and the performance index to obtain a final result of whether the plurality of servers are overloaded.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the service overload intelligent protection method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the service overload intelligent protection method as described in any one of claims 1 to 7 is implemented.