Internet information service system and method based on cloud platform
By dynamically updating the server weights, combining the load synchronization coefficient, memory load coefficient and CPU load coefficient, the problem of unreasonable request allocation in the case of multi-user access by the existing cloud platform load balancing algorithm is solved, and more efficient load balancing and computing performance improvement is achieved.
Patent Information
- Application Number
- CN202510126955.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-27
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-01-27
AI Technical Summary
The load balancing algorithm of existing cloud platforms fails to fully consider the situation of multi-user access, resulting in unreasonable request allocation and reducing computing performance.
By obtaining the CPU occupancy, memory occupancy and response time of each server, as well as the sudden change in traffic data, the load synchronization coefficient, memory load coefficient and CPU load coefficient of each period are calculated, and the server weight is updated in combination with these coefficients to achieve dynamic load balancing.
It can handle burst requests in a timely manner, improve the efficiency and rationality of load allocation, and improve the computing performance of cloud platforms.
Smart Images

Figure CN120066777A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of cloud platform information services, and specifically relates to an Internet information service system and method based on a cloud platform. Background Art
[0002] The Internet information service system of a cloud platform is a network service architecture built relying on cloud computing technology. It highly virtualizes and centralizes computing resources, storage resources, network resources, etc., to provide users with various Internet-based information services. The information service system of a cloud platform is usually deployed in multiple data centers, and these data centers are connected through a high-speed and stable network to ensure that users can quickly access the service system. When there are a large number of user requests for access, the load balancing function of the cloud platform can reasonably distribute these requests to different servers, avoiding a single server from overloading and crashing due to excessive requests.
[0003] During the application process, the amount of requests received by the system and the load status of the servers are dynamically changing. Conventional load balancing algorithms do not fully consider the situation of multi-user access, resulting in unreasonable distribution of requests by the cloud platform and reducing the computing performance of the information service system. Publication No. CN113938488B discloses a load balancing method based on dynamic and static weighted round-robin. Based on the performance parameters of each node in the server cluster, node performance weights are generated, and only by combining the size of the server load parameters and the node performance weights to statically or dynamically adjust the node performance weights, ignoring the specific change characteristics of the request volume and the load status of the servers, it is difficult to process burst request traffic in a timely and efficient manner, and the accuracy of server weight adjustment is insufficient. Summary of the Invention
[0004] In order to solve the above technical problems, the purpose of this application is to provide an Internet information service system and method based on a cloud platform, and the specific technical solutions adopted are as follows:
[0005] An embodiment of this application provides an Internet information service method based on a cloud platform, including the following steps:
[0006] Obtain the CPU occupancy rate, memory occupancy rate, and response time of each server in the cloud platform at each sampling moment in each time period, and the traffic of requests received by the cloud platform at each sampling moment;
[0007] Based on the comparison result between all traffic data before each sampling moment and the average level of all traffic data in the historical time period, and the mutation situation of the traffic at each sampling moment, to judge the update time point of the server weight in each time period;
[0008] Analyze the correlation between the CPU occupancy rate, memory occupancy rate, and response time of the server during each time period respectively, so as to obtain the load synchronization coefficient of the server in each time period. Respectively, through the fluctuations and change trends of the memory occupancy rate and CPU occupancy rate of the server in each time period, obtain the memory load coefficient and CPU load coefficient of the server in each time period, and combine the load synchronization coefficient to obtain the comprehensive load coefficient of the server in each time period;
[0009] Analyze the differences in the comprehensive load coefficients of each server and other servers during each time period, construct the weight adjustment coefficient of each server in each time period, and then update the server weights of each server in the next time period of each time period.
[0010] Preferably, the determination of the update time point of the server weight in each time period includes:
[0011] Calculate the cumulative sum of all traffic before the current sampling moment, count the average value of all traffic within the historical preset time period, and determine the update time point of the server weight in each time period according to the comparison result between the cumulative sum obtained at the current sampling moment and the average value obtained within the historical preset time period, and in combination with the mutation situation of the traffic data at the current sampling moment.
[0012] Preferably, the determination of the update time point of the server weight in each time period further includes:
[0013] For each time period, if the cumulative sum obtained at the current sampling moment is greater than the average value obtained within the historical preset time period, or the traffic at the current sampling moment is at the mutation position, then use the current sampling moment as the update time point of the server weight within the time period; otherwise, use the end moment of the time period as the update time point of the server weight; where the time period is a preset time length.
[0014] Preferably, the obtaining of the load synchronization coefficient of the server in each time period includes:
[0015] Calculate the Spearman correlation coefficient between the CPU occupancy rate, memory occupancy rate of each server in each time period and the response time respectively, and use the sum value of all Spearman correlation coefficients obtained by each server in each time period as the load synchronization coefficient of each server in each time period.
[0016] Preferably, the further obtaining of the memory load coefficient and CPU load coefficient of the server in each time period includes:
[0017] For the memory occupancy rate of each server in each time period, calculate the product of the standard deviation and the average value of the memory occupancy rate of the server in each time period, and use the trend test algorithm to obtain the trend intensity of the memory occupancy rate of each server in each time period. According to the product and the trend intensity, calculate the memory load coefficient of the server in each time period;
[0018] Accordingly, for the CPU occupancy rate of each server in each time period, the calculation method of the memory load coefficient of the server in each time period is adopted to obtain the CPU load coefficient of the server in each time period.
[0019] Preferably, the calculation formula for the memory load coefficient of each server in each time period is: D i,t =B i,t ×exp(C i,t ), where exp() is the exponential function with the natural constant as the base, D i,t is the memory load coefficient of the i-th server in the t-th time period, B i,t is the product of the standard deviation and the mean of the memory occupancy rate of the i-th server in the t-th time period, and C i,t is the trend intensity of the memory occupancy rate of the i-th server in the t-th time period.
[0020] Preferably, the corresponding calculation formula for the comprehensive load coefficient of each server in each time period is: G i,t =A i,t ×(D i,t +F i,t ), where in the formula, G i,t is the comprehensive load coefficient of the i-th server in the t-th time period, A i,t is the load synchronization coefficient of the i-th server in the t-th time period, and D i,t , F i,t are respectively the memory load coefficient and the CPU load coefficient of the i-th server in the t-th time period.
[0021] Preferably, the construction of the weight adjustment coefficient of each server in each time period includes: calculating the sum of the differences between the comprehensive load coefficient of each server in each time period and the comprehensive load coefficients of other servers, and using it as the weight adjustment coefficient of each server in each time period.
[0022] Preferably, the further step of updating the server weights of each server in the next time period of each time period includes:
[0023] Statistical normalization results of the absolute values of the weight adjustment coefficients of each server in each time period, adjust the positive and negative signs of each normalization result, and use the adjusted results as the weight adjustment amounts of each server in each time period, where the positive and negative signs of each normalization result are set to the signs opposite to the signs of the weight adjustment coefficients;
[0024] Taking the sum of the server weights of each server in each time period and their weight adjustment amounts as the server weights of each server in the next time period of each time period.
[0025] The embodiment of the present application further provides an Internet information service system based on a cloud platform, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of the method described in any one of the above are implemented.
[0026] As can be seen from the above, an Internet information service system and method provided by the present application at least have the following beneficial effects:
[0027] The Internet information service system of the present application includes several parts: an infrastructure layer, a platform layer, and a software service layer. Among them, aiming at the problem of uneven load distribution that may occur during the process of allocating user requests in the platform layer, the weight update time is dynamically adjusted by analyzing the mutation characteristics of the traffic data of the received requests. Compared with the conventional fixed-duration adjustment method, its advantage is that it can process sudden requests in a timely manner and improve the efficiency of load distribution.
[0028] On the basis of dynamically adjusting the weight update time point, the status of each server in each time period is analyzed, including the correlation between the CPU usage rate and memory occupancy rate and the response time within the analysis time period, as well as the fluctuations and change trends of the CPU usage rate and memory occupancy rate data. Based on the difference relationship of the comprehensive load between servers, a weight adjustment coefficient for each server in each time period is constructed to optimize the weight of the server, and dynamically perceive the actual load situation of the server in a timely manner, which helps to improve the rationality of request allocation by the cloud platform and the computing performance of the service system. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required to be used in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0030] Figure 1 It is a flowchart of the steps of an Internet information service method based on a cloud platform provided by the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0031] In order to further elaborate on the technical means and effects adopted by the present application to achieve the intended invention purpose, the following, in combination with the accompanying drawings and preferred embodiments, details the specific implementation manners, structures, features, and effects of an Internet information service system and method based on a cloud platform proposed by the present application. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0032] Unless otherwise specified or limited, terms such as "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a circuit structure, article or device including a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the presence of additional identical elements in the article or device including the element. Additionally, the term "and / or" as used herein includes any and all combinations of one or more of the associated listed items. All technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs.
[0033] Please refer to Figure 1 , which shows a step flowchart of an Internet information service method provided by an embodiment of this application. The following specifically describes the specific solutions of an Internet information service system and method based on a cloud platform provided by this application with reference to the accompanying drawings:
[0034] First, in this embodiment, the Internet information service system based on a cloud platform consists of the following parts:
[0035] The first part, the infrastructure layer:
[0036] The infrastructure layer includes the basic hardware and system services required in the Internet information service system, including but not limited to servers, network devices, and storage facilities.
[0037] Among them, the server includes the core hardware device for the system to run, which is used to process various information service requests. When a user accesses a web application, the computing server will execute relevant code logic to generate web content and return it to the user. The performance of the server will vary according to the load requirements of the system. The storage server also includes the storage of a large amount of data, and the data includes but not limited to files uploaded by users and database information. In this embodiment, the server uses a disk array to provide data redundancy and high-performance storage.
[0038] In network devices, routers are responsible for forwarding data packets between the inside and outside of the cloud platform. They determine the data transmission path. By configuring routing policies, routers can optimize network traffic, thus ensuring the efficient transmission of information between different servers and users. Firewalls are important devices for ensuring system security. Their functions include but are not limited to blocking unauthorized network access, only allowing data packets that comply with security rules to enter or leave the system; blocking access requests from specific malicious IP addresses to prevent hacker attacks. Switches are used to connect servers and other network devices to build an internal network. They can forward data packets to the correct device ports according to the MAC address to achieve high-speed data exchange.
[0039] In storage facilities, block storage devices provide access to storage volumes and can be used to store operating systems and applications. In a virtual host environment, each virtual machine can be allocated one or more block storage volumes to install the operating system and store data.
[0040] The second part, the platform layer:
[0041] The platform layer provides developers with a complete development and running environment, which includes an operating system, a database management system, and middleware in this embodiment. The platform layer is also used to support upper-layer application programs and services. The operating system can manage the hardware resources of the server. Relational databases and non-relational databases can store various types of information for users. Application server middleware such as Tomcat and JBoss are important components of the platform layer. They can participate in allocating appropriate servers for users. And in a Web server cluster, all servers will run the operating system based on the platform layer to provide Web services.
[0042] In addition, the platform layer supports the full life-cycle management of applications. From the creation, development, testing, deployment to operation and maintenance of applications, the platform layer provides one-stop management services. Developers can quickly create application projects on the platform, use the development tools provided by the platform for coding and debugging, conduct tests through automated testing tools, then deploy the application to the production environment with one click, and use the operation and maintenance tools of the platform for monitoring and management. In addition to the basic development and running environment, the platform layer also provides a series of value-added services. The service types include but are not limited to database services, cache services, message queue services, and API management services. These services can help developers build and manage applications more efficiently, improving the performance and reliability of applications.
[0043] The third part, the software service layer:
[0044] The software service layer mainly includes providing complete software applications, meeting diverse business needs, implementing a multi-tenant architecture, and providing continuous updates and maintenance.
[0045] Users do not need to install and maintain software. They can use the software applications provided by the software service layer simply by accessing through the network. And the software service layer covers various business fields, including but not limited to office automation, financial management, human resource management, customer relationship management, and project management. Users can select appropriate software service layer applications according to their business needs to quickly achieve the digital transformation of their businesses. And during the application process, multiple users share the same set of application instances and resources, but the data and configurations of each user are isolated. This architecture can improve resource utilization, reduce operating costs, and at the same time provide users with a consistent usage experience.
[0046] The software service layer will also perform automatic software updates and maintenance, and users do not need to worry about software version upgrades and vulnerability fixes. The provider can regularly release new features and improvements, and users can automatically obtain the latest software version to ensure that they always use the latest features and the most secure software.
[0047] Through the coordinated work among the above-mentioned layers, the efficient and effective operation of the Internet information service system of the cloud platform is realized.
[0048] Furthermore, in this embodiment, the specific method for the Internet information service of the cloud platform includes the following steps at the sampling moment:
[0049] Step 1: Obtain the CPU occupancy rate, memory occupancy rate, and response time of each server in the cloud platform at each sampling moment within each time period, as well as the traffic of received requests by the cloud platform at each sampling moment.
[0050] During the process of users using the services of the cloud platform, they will continuously send requests to the server system. Due to the large and explosive growth of the number of users, higher requirements are imposed on the servers. To provide high performance and high availability of the servers, server clusters have become the preferred efficient and inexpensive solution. When discussing server clusters, the load balancing problem becomes the focus. Load balancing technology distributes requests to multiple servers by balancing the concurrent requests of backend services, efficiently utilizes all backend servers, and improves the performance of the server cluster. This embodiment uses the weighted round-robin method for load balancing processing.
[0051] In load balancing processing, different weights are usually assigned to servers according to their processing capabilities, and client requests are sequentially assigned to each server according to the weight ratio. The weight value represents the processing capability or priority of the server. The higher the priority, the stronger the processing capability of the server, and more requests should be assigned. However, the conventional service system fails to dynamically perceive the actual load situation of the server in a timely manner when allocating requests, which may result in a situation where the actual load of a certain server is already very high, and as long as its priority is high, it will still receive more requests. Moreover, the performance of the weighted round-robin method highly depends on the priority size. If the priority of a certain server is much higher than that of other servers, then this server will bear most of the requests, even if its actual processing capability is not much higher than that of other servers. In addition, the conventional load balancing processing method updates the weight value based on a fixed time, making it difficult to handle burst traffic. Therefore, in this embodiment, the weights of the servers are optimized and adjusted by comprehensively analyzing the performance status of the servers and the traffic status of the received requests.
[0052] To obtain various performance parameters of the servers, in this embodiment, the monitoring tools of the system are used to obtain the CPU occupancy rate, memory occupancy rate, and response time data of each server at each sampling moment within each time period. In this embodiment, a time period is set to 10 minutes, and the collection time interval for each item of data is set to 1 second. At the same time, in this embodiment, to obtain the traffic status of the system receiving requests, the monitoring tools can collect the traffic data of the service system received per 1 second.
[0053] Step 2: According to the comparison results between all traffic data before each sampling moment and the average level of all traffic data within the historical time period, as well as the mutation situation of the traffic at each sampling moment, to determine the update time points of the server weights for each time period.
[0054] During the operation of the information service system, burst requests may occur, which significantly increases the overall load of the system. However, the existing conventional load balancing methods usually update the server weights based on a fixed time period. During the peak period of request traffic, this fixed-time-period weight update method may have the problem that a large number of requests gather towards the servers with higher weights, and cannot handle burst requests in a timely and efficient manner, which is likely to lead to unbalanced load distribution among the servers. For this reason, this embodiment adopts a strategy of dynamically adjusting the server weight update time to optimize request allocation and improve the balance of system load.
[0055] Before the first optimization, the service system updated weights at fixed time intervals and then processed subsequent data starting from the sampling moment of the previous weight update. When there was a peak in request traffic, the collected traffic data would show the characteristic of rising rapidly in a short period, resulting in obvious mutations in the traffic data. Therefore, mutation detection was performed on all traffic data before the current sampling moment. Specifically, the Pettitt algorithm was used to implement this, with a significance level set at 0.05. The output of this algorithm was the P value of the significance test. If the P value was less than the set significance level, it was considered that a mutation had occurred in the traffic data. This mutation position might be used as the time point for server weight update. In addition, the request traffic might always be at a relatively high level without significant mutation characteristics. Therefore, the update time of the weight was set by combining the total request traffic from the starting sampling moment to the current sampling moment and the mutation position.
[0056] Therefore, the cumulative sum of all traffic before the current sampling moment was calculated. In this embodiment, the cumulative sum was compared with the mean value of all traffic data within the time length of the previous one week. The longest adjustment time length in this embodiment was set to 10 minutes, that is, every 10 minutes was taken as a time period in this embodiment. If the cumulative sum calculated at the current sampling moment was greater than the mean value, or the traffic at the current sampling moment was at the mutation position, then the current sampling moment was taken as the update time point of the server weight for the corresponding time period; otherwise, the end moment of the time period where the current sampling moment was located, that is, the moment when 10 minutes ended, was taken as the update time point of the server weight. By updating the weight of the server in this way in a timely manner, it helps to improve the balance of load distribution.
[0057] Thus, the position of the update time point of the server weight could be obtained, and continuous multiple time periods were divided based on the update time point. When sudden requests occurred, this method could be used to adjust the weight of the server in advance. Since the load status of the server was changing and there were differences in the loads of different servers, the weights of all servers in the next time period were optimized according to the load sizes and difference characteristics of each server in the previous time period, which helped the service system to allocate requests in a timely and efficient manner.
[0058] Step 3: Analyze the correlation between the CPU occupancy rate, memory occupancy rate, and response time of the server in each time period respectively to obtain the load synchronization coefficient of the server in each time period. Respectively, through the fluctuations and change trends of the memory occupancy rate and CPU occupancy rate of the server in each time period, obtain the memory load coefficient and CPU load coefficient of the server in each time period, and combine the load synchronization coefficient to obtain the comprehensive load coefficient of the server in each time period.
[0059] Further comprehensively evaluate the server performance status in the previous time period through CPU occupancy rate, memory occupancy rate, and response time. There are certain correlation characteristics among these data, which together reflect the performance of the server in processing requests. Among them, the response time refers to the total time from all requests sent by the client to the server's return of the response. The higher the CPU occupancy rate, the more computing tasks the server is executing. The higher the memory occupancy rate, the more storage space the server is occupied when processing requests. Therefore, the longer the response time, the higher the CPU occupancy rate or memory occupancy rate, all of which will lead to a decrease in the remaining data processing capacity.
[0060] Different types of requests have different degrees of occupancy of the CPU or memory. Computation-intensive requests have a relatively high occupancy rate of the CPU and a relatively low occupancy rate of the memory. I / O-intensive requests have a relatively high occupancy rate of the memory and a relatively low occupancy rate of the CPU. Moreover, there are certain differences in the performance of different servers. In addition, a certain server may be affected by network fluctuations or short-term server hardware, resulting in a relatively large response time. However, it still has sufficient performance to process requests. Therefore, it is not possible to accurately evaluate the server's ability to process subsequent requests only by the size of a single CPU occupancy rate, memory occupancy rate, or response time. If the positive correlation between the CPU occupancy rate or memory occupancy rate and the response time within a time period is stronger, it indicates that the synchronization of the operating states of each component in the server is stronger. In this embodiment, taking the i-th server as an example, calculate the correlation judgment results between the CPU occupancy rate, memory occupancy rate, and response time of the i-th server in each time period respectively. The correlation judgment results can be calculated through the Spearman correlation coefficient and Kendall rank correlation coefficient. In this embodiment, the Spearman correlation coefficient is used. Take the sum value of all Spearman correlation coefficients obtained by the i-th server in each time period as the load synchronization coefficient of the i-th server in each time period. The load synchronization coefficient of the i-th server in the t-th time period is denoted as A i,t The larger the obtained load synchronization coefficient, the more synchronous the operating states of each component in the server.
[0061] Further, combine the size and change characteristics of the server's CPU occupancy rate and memory occupancy rate to obtain its current load status. Taking the memory occupancy rate as an example, if the memory occupancy rate is more stable and its average value is larger in each time period, or the increasing trend characteristic of the memory occupancy rate is more significant, it indicates that the load of the memory is larger. Calculate the product of the standard deviation and the average value of the memory occupancy rate of each server in each time period to characterize the change of the memory occupancy rate of each server in each time period. Further, use the MK trend test algorithm to obtain the trend intensity of the memory occupancy rate of each server in each time period. The specific process is a well-known prior art and will not be elaborated in this embodiment.
[0062] Combining the variation and trend characteristics of the memory occupancy rate of each server in each time period, calculate the memory load coefficient of the i-th server. In this embodiment, the specific formula is: D i,t =B i,t ×exp(C i,t ), where exp() is the exponential function with the natural constant as the base, and its function is to avoid the interference of positive and negative signs. D i,t is the memory load coefficient of the i-th server in the t-th time period, which reflects the memory load status of the server in the t-th time period. B i,t is the product of the standard deviation and the mean of the memory occupancy rate of the i-th server in the t-th time period. C i,t is the trend intensity of the memory occupancy rate of the i-th server in the t-th time period, which is obtained through the trend test algorithm.
[0063] Correspondingly, for the CPU occupancy rate data, the CPU load coefficient can be obtained by the same steps, which reflects the CPU load status of each server in each time period.
[0064] Furthermore, combining the memory load coefficient, the CPU load coefficient, and the load synchronization coefficient, obtain the comprehensive load coefficient of each server in each time period. In this embodiment, the specific calculation formula is: G i,t =A i,t ×(D i,t +F i,t ), where in the formula, G i,t is the comprehensive load coefficient of the i-th server in the t-th time period, A i,t is the load synchronization coefficient of the i-th server in the t-th time period, D i,t , F i,t are respectively the memory load coefficient and the CPU load coefficient of the i-th server in the t-th time period. Among them, the larger the obtained comprehensive load coefficient, the greater the current load of the server.
[0065] So far, according to the above process of this embodiment, the comprehensive load coefficient of each server in the cloud platform can be obtained.
[0066] Step Four: Analyze the difference in the comprehensive load coefficient of each server and other servers in each time period, construct the weight adjustment coefficient of each server in each time period, and then update the server weight of each server in the next time period of each time period.
[0067] In a service system, if the load differences between different servers are greater, it indicates that there are significant differences in the weight distribution of the current servers. For example, the weight of a certain server is much greater than that of other servers, resulting in an excessive number of requests being allocated to it during the weighted round-robin process, with a large operating load, while other servers may be idle, thus making it difficult for the system to process requests in a timely manner. Therefore, by comparing the load statuses of each server, the difference characteristics of request allocation for each server in the system are obtained. Taking the i-th server as an example, the cumulative sum of the differences between the comprehensive load coefficients of each server during the same period and the comprehensive load coefficients of other servers is calculated as the weight adjustment coefficient for each server during the same period. The positive and negative signs of the weight adjustment coefficient are used to indicate whether the load of this server is higher or lower than the load of other servers, and the absolute value of the weight adjustment coefficient reflects the degree of load difference between this server and other servers. Thus, the load of the server is optimized based on the weight adjustment coefficient.
[0068] Specifically, first, the absolute values of the weight adjustment coefficients of all servers are normalized. Taking the i-th server as an example, the positive and negative signs of its corresponding normalization result are set to be the opposite signs of the weight adjustment coefficient, and the result after adjusting the sign is used as the final weight adjustment amount. Before the weight optimization in this embodiment, the weights of each server can be obtained according to its own hardware performance. The specific weight optimization method is as follows: The sum of the server weights of each server during each period and its weight adjustment amount is used as the server weight of each server in the next period of each period, and the server weights of each server are updated at the weight update time point of the server weights.
[0069] It can be understood that if the weight adjustment coefficient is positive, it indicates that the load of this server is higher than the load of other servers, and its ability to process subsequent requests is poor. And the weight adjustment amount after taking the opposite sign is negative, and the optimized weight becomes smaller, that is, the priority of request allocation is reduced. In this way, the weights of all servers are optimized during the weighted round-robin process of load adjustment, which helps to improve the balance of server loads.
[0070] Based on the same inventive concept as the above method, an embodiment of the present application further provides an Internet information service system based on a cloud platform, which further includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of any one of the above methods of an Internet information service method based on a cloud platform are implemented.
[0071] It can be understood that: the above sequence of embodiments of the present application is only for description and does not represent the superiority or inferiority of the embodiments. And the above specific embodiments of this specification have been described. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0072] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. The key point of each embodiment is to illustrate the differences from other embodiments.
[0073] The above content is only the implementation manner of the present application and is not used to limit the scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the protection scope of the present application.
Claims
1. A cloud platform-based Internet information service method, characterized in that: The following steps are involved: Obtain the CPU usage, memory usage, and response time of each server on the cloud platform at each sampling time in each time period, as well as the traffic volume of requests received by the cloud platform at each sampling time; Based on the comparison results of all traffic data before each sampling moment and the average level of all traffic data in the historical period, as well as the sudden changes in traffic at each sampling moment, the update time point of the server weight in each period is determined; Analyze the correlation between the CPU occupancy rate, memory occupancy rate and response time of the server in each time period to obtain the load synchronization coefficient of the server in each time period, obtain the memory load coefficient and CPU load coefficient of the server in each time period through the fluctuation and change trend of the memory occupancy rate and CPU occupancy rate of the server in each time period, and obtain the comprehensive load coefficient of the server in each time period by combining the load synchronization coefficient; Analyze the differences in comprehensive load coefficients between each server and other servers in each time period, construct the weight adjustment coefficient of each server in each time period, and then update the server weight of each server in the next time period.
2. The cloud platform-based Internet information service method according to claim 1, characterized in that: The update time points for determining the server weights in each time period include: Calculate the cumulative sum of all traffic before the current sampling moment, and count the mean of all traffic in the historical preset time period. According to the comparison result of the cumulative sum obtained at the current sampling moment and the mean obtained in the historical preset time period, and combined with the sudden change of traffic data at the current sampling moment, determine the update time point of the server weight in each time period.
3. The cloud platform-based Internet information service method according to claim 2, characterized in that: The step of determining the update time point of the server weight in each time period further includes: For each time period, if the cumulative sum obtained at the current sampling moment is greater than the average value obtained in the historical preset time period, or the traffic at the current sampling moment is a sudden change position, the current sampling moment is used as the update time point for the server weight in the time period; otherwise, the end time of the time period is used as the update time point for the server weight; wherein the time period is a preset time length.
4. The cloud platform-based Internet information service method according to claim 1, characterized in that: The acquisition of the load synchronization coefficient of the server in each time period includes: The Spearman correlation coefficients between the CPU usage and memory usage of each server in each time period and the response time are calculated, and the sum of all the Spearman correlation coefficients obtained for each server in each time period is used as the load synchronization coefficient of each server in each time period.
5. The cloud platform-based Internet information service method according to claim 1, characterized in that: The acquisition of the memory load coefficient and the CPU load coefficient of the server in each time period further includes: For the memory occupancy rate of each server in each time period, the product of the standard deviation and the mean of the memory occupancy rate of the server in each time period is calculated, and the trend inspection algorithm is used to obtain the trend strength of the memory occupancy rate of each server in each time period, and the memory load coefficient of the server in each time period is calculated according to the product and the trend strength; Accordingly, for the CPU occupancy rate of each server in each time period, the calculation method of the memory load coefficient of the server in each time period is adopted to obtain the CPU load coefficient of the server in each time period.
6. The cloud platform-based Internet information service method according to claim 5, characterized in that: The calculation formula of the memory load coefficient of the server in each period is: i,t =B i,t ×exp(C i,t ), where exp() is an exponential function with a natural constant as the base, D i,t is the memory load factor of the i-th server in the t-th period, B i,t is the product of the standard deviation and mean of the memory usage of the ith server in the tth period, C i,t is the trend strength of the memory usage of the i-th server in the t-th period.
7. The cloud platform-based Internet information service method according to claim 1, characterized in that: The corresponding calculation formula for the comprehensive load factor of the server in each period is: i,t =A i,t ×(D i,t +F i,t ), where G i,t is the comprehensive load factor of the ith server in the tth period, A i,t is the load synchronization coefficient of the i-th server in the t-th period, D i,t 、F i,t are the memory load coefficient and CPU load coefficient of the ith server in the tth period respectively.
8. The cloud platform-based Internet information service method according to claim 1, characterized in that: The construction of the weight adjustment coefficient of each server in each time period includes: calculating the cumulative sum of the difference between the comprehensive load coefficient of each server in each time period and the comprehensive load coefficient of other servers, and using it as the weight adjustment coefficient of each server in each time period.
9. The cloud platform-based Internet information service method according to claim 1, characterized in that: The updating of the server weight of each server in the next time period of each time period further includes: Count the normalized results of the absolute values of the weight adjustment coefficients of each server in each time period, adjust the signs of each normalized result, and use the results after the sign adjustment as the weight adjustment amount of each server in each time period, wherein the sign of each normalized result is set to the opposite sign of the weight adjustment coefficient; The sum of the server weight of each server in each time period and its weight adjustment amount is used as the server weight of each server in the next time period of each time period.
10. An Internet information service system based on a cloud platform, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
A load balancing method based on dynamic and static weighted round-robin
CN113938488B
Load balancing method and device, computer equipment and storage medium
CN110134513A
Web cluster load balancing method based on load data dynamic update rate
CN113377544A
Automatic weighting load balancing method and system, electronic equipment and storage medium
CN116016533A
CNN-Transform-based cloud server dynamic load optimization method and device
CN116302509A