Service processing method and device during server resource depression
By building a system delay model and making server resource suppression judgments, combined with user business correlation analysis and dynamic priority adjustment, the problem of access lag in key applications caused by limited network resources in the big data platform is solved, improving user experience and reducing operation and maintenance burden.
Patent Information
- Application Number
- CN202411773802.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-02-25
AI Technical Summary
In the production environment of big data platforms, due to limited network resources, key application access is stuttered, user business experience is reduced, and internal operation and maintenance burden is increased.
By obtaining business requests within a unit time, the system delay model is built to determine whether there will be lags. If there is lag, it will determine whether the server resources are depressed, and conduct user business correlation analysis on the business requests, and dynamically adjust the execution of business requests in combination with priority to optimize resource allocation and request processing strategies.
It effectively solves the problem of access lags in key applications caused by limited network resources, improves user experience, and reduces the internal operation and maintenance burden.
Smart Images

Figure CN119520322A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a service processing method when server resources are suppressed, a service processing device when server resources are suppressed, an electronic device and a storage medium. Background Art
[0002] In the era of big data, with the rapid development of the Internet and the Internet of Things, related support systems have been implemented on operators' big data platforms and have been widely promoted and applied in users' production and living environments. However, due to the limited network resources applied for by specific support systems when deploying applications in the production environment of big data platforms, key application access problems will occur in actual applications. This will further lead to a decline in user service perception and frequent heavy workloads for internal operation and maintenance. Summary of the invention
[0003] The present invention provides a method for processing business when server resources are suppressed, a device for processing business when server resources are suppressed, an electronic device and a storage medium, which are used to solve or partially solve the problem in related technologies that when applications are deployed in a big data platform production environment, due to limited network resources, key application access is often blocked, which in turn causes a decline in user business experience and an increase in the internal operation and maintenance burden.
[0004] The present invention provides a service processing method when server resources are suppressed, the method comprising:
[0005] Obtain at least one service request received by the user logging into the system within a unit time;
[0006] Constructing a system delay model for the at least one service request, and determining whether a system lag will occur when the user logs into the system according to the system delay model;
[0007] If the user login system freezes, then determine resource suppression on the server where the user login system is located;
[0008] When server resources are suppressed, a user service relevance analysis is performed on the at least one service request, and the execution of each service request is dynamically adjusted based on the relevance analysis result and the priority.
[0009] Optionally, constructing the system delay model of the at least one service request includes:
[0010] According to queuing theory, the task calculation delay of each server and the local processing delay of each user in unit time are calculated; the task calculation delay is the delay generated when the server processes the service request; the local processing delay is the delay generated when the user performs local processing on the service request;
[0011] Calculating the data transmission delay of each of the service requests;
[0012] A system delay model for the at least one service request is constructed by summing the task calculation delay, the local processing delay and the data transmission delay; the system delay model is used to calculate the total service request delay for the at least one service request.
[0013] Optionally, judging whether a lag will occur when the user logs into the system according to the system delay model includes:
[0014] Taking minimizing the total delay of service requests as the objective function, solving the system delay model according to preset constraints, and obtaining the minimum total delay of service requests required to process the at least one service request per unit time; wherein the preset constraints include server capacity constraints, server service rate constraints, user service rate constraints, and request content cache judgment constraints;
[0015] When the minimum total service request delay is less than a preset delay threshold, it is determined that there will be no lag when the user logs into the system;
[0016] When the minimum total service request delay is greater than or equal to a preset delay threshold, it is determined that a freeze will occur when the user logs into the system.
[0017] Optionally, the determining of resource suppression on the server where the user login system is located includes:
[0018] Obtaining service performance data of the server where the user logs into the system;
[0019] Combined with big data analysis and machine learning algorithms, resource suppression prediction analysis is performed on the service performance data to obtain resource suppression prediction results; the resource suppression prediction results are used to indicate whether the server where the user logs in to the system is a suppressed server in a suppressed state.
[0020] Optionally, the service performance data includes traffic data, user quantity data, and resource utilization data; the combining of big data analysis and machine learning algorithm to perform resource suppression prediction analysis on the service performance data to obtain resource suppression prediction results includes:
[0021] The DBSCAN clustering algorithm is used to cluster the traffic data, the user quantity data and the resource utilization data respectively, and abnormal data or noise data is identified and eliminated during the clustering process to obtain a service performance clustering data set;
[0022] Inputting the service performance clustering data set into a server suppression recognition model constructed based on a support vector machine to perform resource suppression prediction analysis to obtain a resource suppression prediction result;
[0023] Wherein, when the resource suppression prediction result indicates that the server where the user login system is located is a non-suppressed server, the user request response delay corresponding to the predicted suppression point is output;
[0024] When the resource suppression prediction result indicates that the server where the user logs into the system is a suppressed server, the suppressed service request and the corresponding requesting user are output.
[0025] Optionally, performing user-service relevance analysis on the at least one service request includes:
[0026] Assuming that the at least one service request corresponds to N types of service requests, calculate the Pearson correlation coefficient between the nth service request and the mth service request among the N types of service requests; wherein n≠m;
[0027] Calculating the service distance between the nth service request and the mth service request according to the Pearson correlation coefficient;
[0028] Based on each of the service distances, a minimum spanning tree network is constructed using the Kruskal algorithm; the minimum spanning tree network is used to represent the user service association relationship between each of the N service requests, and the user service association relationship is used to predict the concurrency of the user service corresponding to any service request with other user services in the future.
[0029] Optionally, dynamically adjusting and executing each of the service requests in combination with the priority according to the correlation analysis result includes:
[0030] Selecting at least one key business request that meets a preset optimization condition from all the business requests;
[0031] For each of the key service requests, identifying, based on the minimum spanning tree network, an associated service request having a user service association relationship with the key service request;
[0032] Treat all the service requests except the key service request and the associated service request as common service requests;
[0033] The order of priority is taken as the key business request, the associated business request, and the common business request, and the execution order of each of the business requests is dynamically adjusted, and each of the business requests is executed according to the adjusted execution order.
[0034] The present invention also provides a service processing device when server resources are suppressed, comprising:
[0035] A service request acquisition module, used to acquire at least one service request received by a user logging into the system within a unit time;
[0036] A system delay model building module, used to build a system delay model for the at least one service request, and determine whether there will be a delay when the user logs into the system according to the system delay model;
[0037] A resource suppression judgment module, used to judge resource suppression of the server where the user login system is located when the user login system is stuck;
[0038] The user service relevance analysis module is used to perform user service relevance analysis on the at least one service request when server resources are suppressed, and dynamically adjust the execution of each service request based on the relevance analysis result and priority.
[0039] The present invention also provides an electronic device, the device comprising a processor and a memory:
[0040] The memory is used to store program code and transmit the program code to the processor;
[0041] The processor is used to execute the service processing method when server resources are suppressed as described in any one of the above items according to the instructions in the program code.
[0042] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program codes, and the program codes are used to execute the service processing method when server resources are suppressed as described in any one of the above items.
[0043] It can be seen from the above technical solutions that the present invention has the following advantages:
[0044] A business processing method when server resources are suppressed is provided. First, at least one business request received by the user logging into the system within a unit time is obtained; then, a system delay model of at least one business request is constructed, and whether there will be a jam in the user logging into the system is determined based on the system delay model; if there is a jam in the user logging into the system, the resource suppression judgment is made on the server where the user logging into the system is located; when the server resources are suppressed, a user business correlation analysis is performed on at least one business request, and based on the correlation analysis results, the execution of each business request is dynamically adjusted in combination with the priority. Thus, a series of means such as system delay model construction, server resource suppression judgment, user business correlation analysis, and dynamic adjustment of the priority of the execution order are combined to solve the key application access jam problem caused by limited network resources when deploying applications in the production environment of the big data platform, improve the user experience, and reduce the internal operation and maintenance burden. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 A flowchart of the steps of a service processing method when server resources are suppressed;
[0047] Figure 2 It is a schematic diagram of the overall process of a service processing method when server resources are suppressed;
[0048] Figure 3 The present invention is a structural block diagram of a service processing device when server resources are suppressed. DETAILED DESCRIPTION
[0049] The embodiments of the present invention provide a method for processing business when server resources are suppressed, a device for processing business when server resources are suppressed, an electronic device and a storage medium, which are used to solve or partially solve the problem in related technologies that when applications are deployed in a big data platform production environment, due to limited network resources, key application access is often stuck, which in turn causes a decline in user business experience and an increase in the internal operation and maintenance burden.
[0050] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] As an example, in the era of big data, with the rapid development of the Internet and the Internet of Things, related support systems have been implemented on operators' big data platforms and have been widely promoted and applied in users' production and living environments. However, due to the limited network resources applied for by specific support systems when deploying applications in the production environment of big data platforms, key application access problems will occur in actual applications. This will further lead to a decline in user business perception and frequent heavy workloads for internal operation and maintenance.
[0052] The existing detection scheme for system jams is mainly implemented by monitoring the event processing process. Specifically, when the event processing process is monitored to process an event, the event processing time is first generated, and then it is determined whether the processing time meets the preset jam condition. If so, the jam is reported to the server.
[0053] When system resource services are limited, the existing processing method is to manage system processes. However, after further research and analysis, the present invention finds that, using this method, due to the strict dependencies or associations between various business processes, it is easy to improperly handle the processes when managing system processes, so that the data dependencies of key businesses or other related businesses are processed, resulting in users being unable to use the system normally.
[0054] Therefore, one of the core invention points of the embodiment of the present invention is: to solve the problem of key application access jams caused by limited network resources when the big data platform deploys applications in the production environment, and at the same time to improve user business perception and reduce the operation and maintenance workload, a method for processing key and related businesses when server resources are suppressed is provided. First, a user business delay model is established to determine whether the user login system is jammed; when jams occur, big data analysis and machine learning algorithms are used to determine resource suppression on the server where the system is located to make a reasonable assessment of whether the server resources are suppressed; when server resource suppression occurs, the business association relationship between different businesses is obtained through intelligent analysis of user business associations; combined with user usage habits, business requests are prioritized through dynamic adjustment of business request execution priorities, and key business requests and related business requests are automatically identified, giving priority to ensuring the normal operation of value services with high user usage frequency and services closely associated with value services.
[0055] Through the technical solution of the present invention, based on the real-time service performance data of the server and the changes in business requests, it is possible to realize the mining of server suppression performance and intelligent analysis results of user business relevance, combined with priority sorting, dynamically adjust and optimize resource allocation and request processing strategies, and generate a system operation and maintenance plan to improve system performance, achieve optimal resource utilization and improve user experience.
[0056] Reference Figure 1 , shows a flow chart of the steps of a service processing method when server resources are suppressed provided by an embodiment of the present invention, which may specifically include the following steps:
[0057] Step 101, obtaining at least one service request received by a user logging into the system within a unit time;
[0058] In a specific implementation, the business requests of users received by the user login system in a unit time can be calculated according to the Poisson distribution for subsequent data processing.
[0059] Step 102, constructing a system delay model for the at least one service request, and determining whether a system lag will occur when the user logs into the system according to the system delay model;
[0060] Specifically, the process of constructing the system delay model of the at least one service request may be implemented by executing the following sub-steps S01 to S03:
[0061] Step S01: Based on queuing theory, calculate the task calculation delay of each server and the local processing delay of each user per unit time.
[0062] Assume that the request rate of user i is , is the computing task of the system that user i wants to access, represents the amount of data that user i wants to access, represents the data cache capacity of server j where the system is located. Treating each user in the system as an M / M / 1 queuing system, the service rates of user i and system server j are and .
[0063] The user sends a request, which is then processed by the application server or sent to a remote cluster for processing. This process involves transmission between the system server and the remote cluster, as well as between the user and the system server. Assume that the total number of system services is B, and the unit delay between the system application server and the remote cluster is , the unit delay in the transmission process between the user and the system application server is . Use variables Indicates whether server j has cached all the content requested by user i. If server j has cached the content requested by user i, then the variable is 1, otherwise is 0. Similarly, if the computing task generated by user i is migrated to a remote cluster server for processing, the variable is 1, otherwise if local processing is performed is 0.
[0064] The task computing delay is the delay incurred by the server when processing a business request. According to queuing theory, the delay incurred by server j processing a computing task (executing the calculation required for a business request) is for:
[0065] (1)
[0066] in, Indicates the total amount of computing tasks migrated to the server.
[0067] The above formula (1) must satisfy .
[0068] The local processing delay is the delay incurred when the user side processes the service request locally. Similarly, the delay incurred when user i performs local processing of related tasks for:
[0069] (2)
[0070] in, Represents the amount of computing tasks processed locally by the user.
[0071] The above formula (2) must satisfy .
[0072] Step S02: Calculate the data transmission delay of each service request.
[0073] Step S01 is to calculate the execution delay of the computing task generated by the user under different processing modes. As for the data transmission delay generated during the data transmission process:
[0074] If the system server caches the data requested by the user, the transmission delay between the user and the server is: To distinguish it from the transmission delay between the server and the data center below, it is defined as the first transmission delay here. The first transmission delay refers to the transmission delay between the user and the server when the server caches the data requested by the user.
[0075] If the server cache does not contain the content data requested by the user, the latency required to transmit data between the server and the data center is: To distinguish it from the above user-server transmission delay, it is defined as the second transmission delay here. The second transmission delay refers to the delay of transmitting data between the server and the data center when the server does not cache the data requested by the user.
[0076] Among them, the second transmission delay This means that the content requested by the user is cached in the server without having to access the data center.
[0077] It is understandable that for the data transmission delay of the service request, based on whether the server has the data requested by the user cached, there may be a second transmission delay (when the server does not cache the data requested by the user). There may also be no second transmission delay (when the server caches the data requested by the user). Regardless of whether there is a second transmission delay The data transmission delay of the service request must include the first transmission delay between the user and the server. .
[0078] Step S03: constructing a system delay model for at least one service request by summing up the task calculation delay, the local processing delay and the data transmission delay.
[0079] In the embodiment of the present invention, the system delay model may be used to calculate the total service request delay of at least one service request (ie, all service requests).
[0080] According to the above conditions, the total service request delay T generated by all users is the request execution delay (the task calculation delay of each server per unit time calculated in step S01). and each user's local processing latency ) and data transmission delay (the first transmission delay calculated in step S02 and the second transmission delay ), that is, the system delay model can be expressed as:
[0081] (3)
[0082] Based on the contents of the previous steps S01 to S03, further, it is determined according to the system delay model whether there will be any lag when the user logs into the system. Specifically, it can be: taking minimizing the total delay of business requests (i.e., Minimize T) as the objective function, solving the system delay model according to preset constraints, and obtaining the minimum total delay of business requests required to process at least one business request per unit time.
[0083] The preset constraints include server capacity constraints (as shown in equation (4) below), server service rate constraints (as shown in equation (5) below), user service rate constraints (as shown in equation (6) below), and request content cache judgment constraints (as shown in equations (7)-(8) below):
[0084] st , (4)
[0085] (5)
[0086] (6)
[0087] (7)
[0088] (8)
[0089] Among them, the server capacity constraint (4) limits the total amount of data cached in the server to not exceed the total capacity of the server.
[0090] After calculating the minimum total service request delay, it can be determined whether there is a lag in the user logging into the system based on the minimum total service request delay. Specifically, when the minimum total service request delay is less than a preset delay threshold (which can be set according to actual conditions), it is determined that there will be no lag in the user logging into the system. When the minimum total service request delay is greater than or equal to the preset delay threshold, it is determined that there will be a lag in the user logging into the system.
[0091] Step 103, if the user login system is stuck, then determine resource suppression on the server where the user login system is located;
[0092] Step 103 mainly implements the server suppression performance analysis when the system freezes. The general process is to extract the service performance data such as traffic, number of users, resource utilization, etc. monitored by the server, combine big data analysis and machine learning algorithms, and output the server performance suppression analysis results.
[0093] In a specific implementation, the process of determining resource suppression on the server where the user logs in to the system includes the following sub-steps S11 to S12:
[0094] Step S11: Obtain service performance data of the server where the user logs into the system.
[0095] For example, the service performance data obtained in step S11 (which can also be regarded as input data for data analysis and machine algorithm prediction) is the monitoring data of the server where the user logs into the system for nearly one month, with hourly granularity, every 24 hours. It includes indicators such as traffic, number of users, resource utilization, and single-user request system data delay. In general, service performance data can mainly include traffic data, user number data, and resource utilization data.
[0096] Step S12: Combining big data analysis and machine learning algorithms, perform resource suppression prediction analysis on the service performance data to obtain resource suppression prediction results.
[0097] When processing a large amount of service performance data from server monitoring, some abnormal or noisy data may be included, which will have a negative impact on subsequent analysis and modeling.
[0098] The DBSCAN clustering algorithm (Density-Based Spatial Clustering of Applications with Noise) can identify and remove abnormal points in the data, thereby ensuring the accuracy and reliability of subsequent data analysis as much as possible. In the embodiment of the present invention, the collected service performance data is clustered by the DBSCAN clustering algorithm to remove abnormal data.
[0099] The SVM (Support Vector Machine) algorithm is a powerful classification algorithm suitable for processing high-dimensional data and complex classification problems. In the embodiment of the present invention, the SVM support vector machine algorithm is used to identify the suppressed servers and the non-suppressed servers.
[0100] Combined with the above analysis, the specific implementation process of step S12 can be: first, the DBSCAN clustering algorithm is used to cluster the traffic data, user quantity data and resource utilization data respectively, and abnormal data or noise data is identified and eliminated during the clustering process to obtain a service performance clustering data set; then, the service performance clustering data set is input into the server suppression identification model constructed based on the support vector machine to perform resource suppression prediction analysis to obtain a resource suppression prediction result.
[0101] It is understandable that before the recognition model is officially put into use, the recognition model can be built and trained based on the support vector machine: by extracting performance data such as the average number of system users, system storage, and memory resource utilization, through training and learning modeling, fitting characteristic curves, and outputting the server suppression recognition model. The construction and training of the model can be performed with reference to relevant machine algorithm technology, which will not be elaborated here.
[0102] The resource suppression prediction result is used to indicate whether the server where the user logs into the system is a suppressed server in a suppressed state.
[0103] Among them, when the resource suppression prediction result shows that the server where the user logs in to the system is a non-suppressed server, the user request response delay corresponding to the predicted suppression point (i.e., appropriate suppression and future suppression point) is output. When the resource suppression prediction result shows that the server where the user logs in to the system is a suppressed server, the suppressed business requests and the corresponding requesting users are output.
[0104] Step 104: when server resources are suppressed, user service relevance analysis is performed on the at least one service request, and the execution of each service request is dynamically adjusted based on the relevance analysis result and combined with the priority.
[0105] Step 104 mainly implements intelligent analysis of user service relevance under the condition of server resource suppression.
[0106] In actual situations, with the continuous expansion of user services, there are more and more user services and more and more user service requests. However, various user services (corresponding to user service requests) do not exist in isolation. User usage habits, service attributes, etc. will make various user service requests closely related. In order to measure the size of the relationship between different services, the embodiment of the present invention performs intelligent analysis of user service relevance by defining the distance between various service requests.
[0107] Specifically, the process of performing user service relevance analysis on at least one service request can be implemented by executing the following sub-steps S21 to S23:
[0108] Step S21: Assuming that at least one service request corresponds to N types of service requests, calculate the Pearson correlation coefficient between the nth service request and the mth service request among the N types of service requests.
[0109] For the N types of service requests collected from users, to obtain the distance between the nth (n=1,2,3,...N, n≠m) service request and the mth (m=1,2,3,...N, m≠n) service request, we first need to calculate the Pearson correlation coefficient between the nth service request and the mth service request. The specific calculation formula is shown in the following formula (9):
[0110] (9)
[0111] In the formula, They are the time series of data traffic corresponding to the nth and mth service requests respectively; Var (*) indicates variance calculation; Cov indicates covariance calculation.
[0112] Step S22: Calculate the service distance between the nth service request and the mth service request according to the Pearson correlation coefficient.
[0113] Based on the business correlation coefficient, the distance between the nth business request and the mth business request can be calculated. The specific calculation formula is shown in formula (10):
[0114] (10)
[0115] Step S23: Based on each service distance, a minimum spanning tree network is constructed by using the Kruskal algorithm.
[0116] In order to intuitively see the business association relationship between each business request, the Kruskal algorithm (a classic algorithm for solving the minimum spanning tree (MST)) is used to build a minimum spanning tree network. The main idea of the Kruskal algorithm is to sort the edges from small to large according to their weights, and then select edges to add to the spanning tree in turn, ensuring that the edges added each time will not form a loop. The final tree is the minimum spanning tree.
[0117] For N types of business requests The set U constructed by the distances is firstly needed to find the minimum value in U. That is, the two business requests with the smallest distance. Add an undirected edge between these two business requests to connect them. Then, in the remaining Continue to search for the minimum value in the edge to connect the business request, while ensuring that the business requests are not connected in a loop until all distance values are traversed.
[0118] Therefore, for business data (corresponding to different business requests) in different systems and different time periods, a minimum spanning tree network can be constructed. The minimum spanning tree network is used to represent the user-business association relationship between various business requests in N types of business requests. The user-business association relationship can be used to predict the concurrency of the user business corresponding to any business request with other user businesses in the future.
[0119] Furthermore, according to the correlation analysis result, the process of dynamically adjusting the execution of each service request in combination with the priority can be implemented by executing the following sub-steps S31 to S34:
[0120] Step S31: screening at least one key business request that meets a preset optimization condition from all business requests.
[0121] The preset optimization condition may be: taking a service request (corresponding to a valuable service with high user usage frequency) with high user usage frequency or high request frequency (e.g., within a unit time, such as 50 user usage times within 5 minutes, or 50 request times within 5 minutes, etc., which can be set by a person skilled in the art according to actual conditions) as a key service request. The user service corresponding to the key service request is the key user service.
[0122] In a more specific embodiment, there may be multiple key business requests that meet the preset optimization conditions. For example, after screening, four key task requests may be obtained, and the corresponding request times are 55, 60, 58, and 70. Then, when executing the task requests, the key task requests may be prioritized in descending order of request frequency. For example, the key task requests with request times of 70, 60, 58, and 55 may be executed in order of priority.
[0123] It should be noted that the use of user usage frequency or request frequency as an optimization screening condition in the embodiment of the present invention is only an example. In practical applications, those skilled in the art can also set the optimization screening condition according to actual conditions. For example, it can be set according to the urgency of the task execution, or according to the priority of the user level authority, or based on other indicators or conditions that can be used for priority judgment. It is understandable that the present invention is not limited to this.
[0124] Step S32: for each key service request, identifying associated service requests having a user service association relationship with the key service request based on the minimum spanning tree network.
[0125] Then, based on the minimum spanning tree network obtained in the previous step, the node where the key service request is located can be determined from the minimum spanning tree network, and the associated service request that has a user service association relationship with the node where the key service request is located can be identified from the minimum spanning tree network. Based on the previous description, the associated service request can be understood as a service that is closely associated with a valuable service that is frequently used by users.
[0126] It is understandable that a key business request may correspond to more than one associated business request. Assuming that a key business request corresponds to multiple associated business requests, after obtaining the associated business request corresponding to the key business request, the method in the aforementioned step S31 can still be referred to, and the obtained associated business requests can be prioritized according to the degree of association with the key business request. For example, for key business request A, three associated business requests B, C, and D can be obtained, and the degree of association between each of them and key business request A is 70%, 50%, and 64%. Then when executing the task request specifically, for the associated task request, the priority can be sorted in descending order according to the degree of association, such as executing the associated business requests B, D, and C in order of priority.
[0127] Step S33: All service requests except key service requests and associated service requests are regarded as common service requests.
[0128] Step S34: taking the order of key business requests, associated business requests, and common business requests as the priority order, dynamically adjusting the execution order of each business request, and executing each business request according to the adjusted execution order.
[0129] In order to enable those skilled in the art to better understand the embodiments of the present invention, an example is used here to illustrate the dynamic adjustment and execution of the execution order of business requests. Assuming that a user logs into the system and receives 100 business requests within 1 minute, after the jam judgment, resource suppression judgment and user correlation analysis, the execution order of the business requests needs to be dynamically adjusted. First, 5 key business requests 1, 2, 3, 4, and 5 with 50 requests within 1 minute are selected from the 100 business requests, corresponding to 55, 67, 80, 60, and 70 requests respectively. The execution priority of these key business requests is key business requests 3, 5, 2, 4, and 1.
[0130] For key business requests 1, 2, 3, 4, and 5, based on the minimum spanning tree network, the corresponding associated business requests are screened out as 2 (associated business requests 1 and 2, the degree of association is 60% and 70% respectively, and the execution priority here is associated task requests 2 and 1), 1 (associated business request 3, the degree of association is 75%), 1 (associated business request 4, the degree of association is 80%), 2 (associated business requests 5 and 6, the degree of association is 85% and 80% respectively, and the execution priority here is associated task requests 5 and 6), and 1 (associated business request 7, the degree of association is 60%). A total of 7 associated business requests can be screened out, namely associated business requests 1 to 7. When executing associated task requests, they need to be sorted in accordance with the priority order of key task requests. For example, the associated task requests corresponding to key business request 1 are sorted first, and then the associated task requests corresponding to key business request 2, and so on. It can be concluded that the execution order of the business requests in this part of the associated business requests is associated task requests 2, 1, 3, 4, 5, 6, and 7.
[0131] The other 88 business requests except the key business requests 1 to 5 and the associated task requests 1 to 7 among the 100 business requests are regarded as common business requests. The execution order of common business requests can be flexibly adjusted according to the current server resources or actual operation status of the system. In this example, the final business request execution order can be: first execute the key business request part (execute key business requests 3, 5, 2, 4, 1 in sequence), the associated task request part (execute associated task requests 2, 1, 3, 4, 5, 6, 7 in sequence), and the common business request part (business requests in the non-critical part, the execution order can be flexibly adjusted).
[0132] It should be noted that, in order to enable those skilled in the art to better distinguish data of the same type but with different actual meanings, some technical features are distinguished by the first and the second in the embodiments of the present invention. The first and the second are only used for data distinction and have no other special meanings. It can be understood that the present invention is not limited to this.
[0133] In an embodiment of the present invention, a method for processing key and related services when server resources are suppressed is provided. First, a user service delay model is established to determine whether the user login system is stuck; when a stuck occurs, big data analysis and machine learning algorithms are used to determine the resource suppression of the server where the system is located, so as to reasonably evaluate whether the server resources are suppressed; when server resource suppression occurs, the business association relationship between different services is obtained through intelligent analysis of user business association; combined with the user's usage habits, the business requests are prioritized through the dynamic adjustment of the business request execution priority, and key business requests and related business requests are automatically identified, giving priority to ensuring the normal operation of value services with high user frequency and services closely associated with value services. Through the technical solution of the present invention, based on the real-time service performance data and business request changes of the server, it is possible to realize the server suppression performance mining and user business association intelligent analysis results, combined with priority sorting, dynamically adjust and optimize resource allocation and request processing strategies, and generate system operation and maintenance plans to improve system performance, achieve optimal resource utilization and improve user experience.
[0134] For better explanation, refer to Figure 2 , showing an overall flow diagram of a service processing method when server resources are suppressed provided by an embodiment of the present invention. It should be pointed out that this embodiment only briefly describes the general flow of service processing when server resources are suppressed. The specific implementation process of each step can be understood by referring to the relevant content in the aforementioned embodiment. It will not be repeated here. It can be understood that the present invention does not limit this.
[0135] Step 201: Obtain at least one service request received by a user logging into the system within a unit time;
[0136] Step 202: Construct a system delay model by combining task calculation delay and data transmission delay;
[0137] Step 203: Taking minimizing the total service request delay as the objective function, solving the system delay model according to the preset constraints to obtain the minimum total service request delay;
[0138] Step 204: when it is determined based on the minimum total service request delay that the user login system is stuck, obtain service performance data of the server where the user login system is located;
[0139] Step 205: Combining big data analysis and machine learning algorithms, perform resource suppression prediction analysis on the service performance data to obtain resource suppression prediction results;
[0140] Step 206: When server resource suppression occurs, user service relevance analysis is performed on at least one service request in combination with service distance calculation and Kruskal algorithm;
[0141] Step 207: According to the correlation analysis result, based on the preset optimization conditions and in combination with the priority, dynamically adjust and execute each service request.
[0142] Reference Figure 3 , shows a structural block diagram of a service processing device when server resources are suppressed provided by an embodiment of the present invention, which may specifically include:
[0143] The service request acquisition module 301 is used to acquire at least one service request received by a user logging into the system within a unit time;
[0144] A system delay model building module 302 is used to build a system delay model for the at least one service request, and determine whether there will be a delay when the user logs into the system according to the system delay model;
[0145] The resource suppression judgment module 303 is used to judge the resource suppression of the server where the user login system is located when the user login system is stuck;
[0146] The user service relevance analysis module 304 is used to perform user service relevance analysis on the at least one service request when server resources are suppressed, and dynamically adjust the execution of each service request according to the relevance analysis result and in combination with the priority.
[0147] In an optional embodiment, the system delay model building module 302 includes:
[0148] The task delay calculation module is used to calculate the task calculation delay of each server and the local processing delay of each user in unit time according to queuing theory; the task calculation delay is the delay generated when the server processes the service request; the local processing delay is the delay generated when the user performs local processing on the service request;
[0149] A data transmission delay calculation module, used to calculate the data transmission delay of each of the service requests;
[0150] The system delay model construction submodule is used to construct a system delay model of the at least one service request by summing the task calculation delay, the local processing delay and the data transmission delay; the system delay model is used to calculate the total service request delay of the at least one service request.
[0151] In an optional embodiment, the system delay model building module 302 includes:
[0152] A minimum service request total delay solving module is used to solve the system delay model according to preset constraints with minimizing the service request total delay as the objective function, so as to obtain the minimum service request total delay required for processing the at least one service request per unit time; wherein the preset constraints include server capacity constraints, server service rate constraints, user service rate constraints, and request content cache judgment constraints;
[0153] A first system jamming judgment module, configured to judge that there will be no jamming when the user logs into the system when the minimum total service request delay is less than a preset delay threshold;
[0154] The second system freeze judgment module is used to judge that freeze will occur when the user logs into the system when the total delay of the minimum service request is greater than or equal to a preset delay threshold.
[0155] In an optional embodiment, the resource suppression determination module 303 includes:
[0156] A service performance data acquisition module is used to acquire the service performance data of the server where the user logs into the system;
[0157] The resource suppression prediction and analysis module is used to combine big data analysis and machine learning algorithms to perform resource suppression prediction and analysis on the service performance data to obtain resource suppression prediction results; the resource suppression prediction results are used to indicate whether the server where the user logs in to the system is a suppressed server in a suppressed state.
[0158] In an optional embodiment, the service performance data includes traffic data, user quantity data and resource utilization data; and the resource suppression prediction and analysis module includes:
[0159] A clustering processing module, used to perform clustering processing on the traffic data, the user quantity data and the resource utilization data respectively using the DBSCAN clustering algorithm, and to identify and remove abnormal data or noise data in the clustering process to obtain a service performance clustering data set;
[0160] A resource suppression prediction and analysis submodule, used for inputting the service performance clustering data set into a server suppression recognition model constructed based on a support vector machine to perform resource suppression prediction and analysis to obtain a resource suppression prediction result;
[0161] A user request response delay output module is used to output the user request response delay corresponding to the predicted depression point when the resource depression prediction result indicates that the server where the user logs in to the system is a non-depression server;
[0162] The suppressed business request output module is used to output the suppressed business request and the corresponding requesting user when the resource suppression prediction result indicates that the server where the user logs into the system is a suppressed server.
[0163] In an optional embodiment, the user service relevance analysis module 304 includes:
[0164] A Pearson correlation coefficient calculation module, configured to calculate a Pearson correlation coefficient between an nth service request and an mth service request in the N service requests, assuming that the at least one service request corresponds to N service requests; wherein n≠m;
[0165] A service distance calculation module, used for calculating the service distance between the nth service request and the mth service request according to the Pearson correlation coefficient;
[0166] The minimum spanning tree network construction module is used to construct a minimum spanning tree network through the Kruskal algorithm based on each of the service distances; the minimum spanning tree network is used to represent the user service association relationship between each of the N service requests, and the user service association relationship is used to predict the concurrency of the user service corresponding to any service request with other user services in the future.
[0167] In an optional embodiment, the user service relevance analysis module 304 includes:
[0168] A key business request screening module, used to screen at least one key business request that meets a preset optimization condition from all the business requests;
[0169] An associated service request identification module, configured to identify, for each of the key service requests, an associated service request having a user service association relationship with the key service request based on the minimum spanning tree network;
[0170] A common service request determination module, used for determining all service requests except the key service request and the associated service request as common service requests;
[0171] The priority adjustment execution module is used to dynamically adjust the execution order of each business request based on the order of key business requests, related business requests, and common business requests, and execute each business request according to the adjusted execution order.
[0172] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the aforementioned method embodiment.
[0173] An embodiment of the present invention further provides an electronic device, the device comprising a processor and a memory:
[0174] The memory is used to store the program code and transmit the program code to the processor;
[0175] The processor is used to execute the service processing method when server resources are suppressed according to the instructions in the program code in any embodiment of the present invention.
[0176] An embodiment of the present invention further provides a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the service processing method when server resources are suppressed according to any embodiment of the present invention.
[0177] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0178] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0179] The units described as separate components may or may not be physically separated, and the components shown as units 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 units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0180] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or 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 software functional units.
[0181] If the integrated unit 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. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0182] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A service processing method when server resources are suppressed, characterized in that: include: Obtain at least one service request received by the user logging into the system within a unit time; Constructing a system delay model for the at least one service request, and determining whether a system lag will occur when the user logs into the system according to the system delay model; If the user login system freezes, then determine resource suppression on the server where the user login system is located; When server resources are suppressed, a user service relevance analysis is performed on the at least one service request, and the execution of each service request is dynamically adjusted based on the relevance analysis result and the priority.
2. The service processing method when server resources are suppressed according to claim 1, characterized in that: The constructing the system delay model of the at least one service request includes: According to queuing theory, the task calculation delay of each server and the local processing delay of each user in unit time are calculated; the task calculation delay is the delay generated when the server processes the service request; the local processing delay is the delay generated when the user performs local processing on the service request; Calculating the data transmission delay of each of the service requests; A system delay model for the at least one service request is constructed by summing the task calculation delay, the local processing delay and the data transmission delay; the system delay model is used to calculate the total service request delay for the at least one service request.
3. The service processing method when server resources are suppressed according to claim 2, characterized in that: The determining, according to the system delay model, whether there will be a lag when the user logs into the system, includes: Taking minimizing the total delay of service requests as the objective function, solving the system delay model according to preset constraints, and obtaining the minimum total delay of service requests required to process the at least one service request per unit time; wherein the preset constraints include server capacity constraints, server service rate constraints, user service rate constraints, and request content cache judgment constraints; When the minimum total service request delay is less than a preset delay threshold, it is determined that there will be no lag when the user logs into the system; When the minimum total service request delay is greater than or equal to a preset delay threshold, it is determined that a freeze will occur when the user logs into the system.
4. The service processing method when server resources are suppressed according to claim 1, characterized in that: The determining of resource suppression on the server where the user login system is located includes: Obtaining service performance data of the server where the user logs into the system; Combined with big data analysis and machine learning algorithms, resource suppression prediction analysis is performed on the service performance data to obtain resource suppression prediction results; the resource suppression prediction results are used to indicate whether the server where the user logs in to the system is a suppressed server in a suppressed state.
5. The service processing method when server resources are suppressed according to claim 4, characterized in that: The service performance data includes flow data, user quantity data and resource utilization data; The combining of big data analysis and machine learning algorithm to perform resource suppression prediction analysis on the service performance data to obtain resource suppression prediction results includes: The DBSCAN clustering algorithm is used to cluster the traffic data, the user quantity data and the resource utilization data respectively, and abnormal data or noise data is identified and eliminated during the clustering process to obtain a service performance clustering data set; Inputting the service performance clustering data set into a server suppression recognition model constructed based on a support vector machine to perform resource suppression prediction analysis to obtain a resource suppression prediction result; Wherein, when the resource suppression prediction result indicates that the server where the user login system is located is a non-suppressed server, the user request response delay corresponding to the predicted suppression point is output; When the resource suppression prediction result indicates that the server where the user logs into the system is a suppressed server, the suppressed service request and the corresponding requesting user are output.
6. The service processing method when server resources are suppressed according to claim 1, characterized in that: The performing user service relevance analysis on the at least one service request includes: Assuming that the at least one service request corresponds to N types of service requests, calculate the Pearson correlation coefficient between the nth service request and the mth service request among the N types of service requests; wherein n≠m; Calculating the service distance between the nth service request and the mth service request according to the Pearson correlation coefficient; Based on each of the service distances, a minimum spanning tree network is constructed using the Kruskal algorithm; the minimum spanning tree network is used to represent the user service association relationship between each of the N service requests, and the user service association relationship is used to predict the concurrency of the user service corresponding to any service request with other user services in the future.
7. The service processing method when server resources are suppressed according to claim 6, characterized in that: The dynamically adjusting and executing each of the service requests according to the correlation analysis result and combining the priority includes: Selecting at least one key business request that meets a preset optimization condition from all the business requests; For each of the key service requests, identifying, based on the minimum spanning tree network, an associated service request having a user service association relationship with the key service request; Treat all the service requests except the key service request and the associated service request as common service requests; The order of priority is taken as the key business request, the associated business request, and the common business request, and the execution order of each of the business requests is dynamically adjusted, and each of the business requests is executed according to the adjusted execution order.
8. A service processing device when server resources are suppressed, characterized in that: include: A service request acquisition module, used to acquire at least one service request received by a user logging into the system within a unit time; A system delay model building module, used to build a system delay model for the at least one service request, and determine whether there will be a delay when the user logs into the system according to the system delay model; A resource suppression judgment module, used to judge resource suppression of the server where the user login system is located when the user login system is stuck; The user service relevance analysis module is used to perform user service relevance analysis on the at least one service request when server resources are suppressed, and dynamically adjust the execution of each service request based on the relevance analysis result and priority.
9. An electronic device, characterized in that: The device comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the service processing method when server resources are suppressed according to any one of claims 1 to 7 according to the instructions in the program code.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes, and the program codes are used to execute the service processing method when server resources are suppressed as described in any one of claims 1-7.