A resource configuration method, device and equipment for CDN log back transmission
By dynamically adjusting the CDN log back resource configuration based on the historical QPS of business instances and user needs, the problem of insufficient resource configuration in traditional methods is solved, achieving efficient resource utilization and system performance improvement.
Patent Information
- Application Number
- CN202411794177.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-12-06
AI Technical Summary
Traditional CDN log back methods use fixed resource configuration schemes, which cannot effectively cope with complex and ever-changing network environments and diverse user needs, resulting in log data loss or delay, affecting user experience and system performance.
By acquiring historical QPS, service capabilities, business characteristics, and user needs of business instances, CDN log back resource configuration can be dynamically adjusted to achieve personalized resource allocation, ensuring full resource utilization and system stability.
It improves resource utilization, enhances system stability and overall performance, and can flexibly respond to changes in business instances and user needs, thereby improving user experience and service quality.
Smart Images

Figure CN119892667B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of big data, and in particular to a resource configuration method, device and equipment for CDN log back transmission. BACKGROUND
[0002] With the rapid development of the Internet, the content delivery network (CDN) has become an important means to improve the performance of websites and applications. CDN caches content through nodes distributed around the world, reduces user access delay, and improves content loading speed. However, the efficient operation of CDN not only depends on the content caching strategy, but also depends on the real-time analysis of log data and reasonable resource configuration.
[0003] The traditional CDN log back transmission method usually adopts a fixed resource configuration scheme. Assuming that a large number of users access a certain business instance at the same time during the peak period, the QPS (Queries Per Second) rises sharply, and the fixed log back transmission resource configuration may not be able to handle such a high data volume, resulting in log data loss or delay. The traditional fixed configuration method cannot effectively cope with complex and variable network environments and diversified user demands, thereby affecting user experience and system performance. SUMMARY
[0004] Therefore, the present application provides a resource configuration method, device and equipment for CDN log back transmission to solve the problem of static CDN log back transmission resource configuration affecting user experience and system performance.
[0005] In a first aspect, the present application provides a resource configuration method for CDN log back transmission, comprising:
[0006] For any one of all business instances, obtaining the initial business QPS of the business instance in a historical time period;
[0007] Based on the initial business QPS of the business instance in the historical time period, determining the service capability, the highest business QPS and the business characteristics of the business instance in the historical time period, the business characteristics being burst characteristics or non-burst characteristics;
[0008] Obtaining the user demand QPS and the user business level corresponding to the business instance;
[0009] Based on the service capability, the highest business QPS, the business characteristics, the user demand QPS and the user business level corresponding to all business instances respectively, adjusting the CDN log back transmission resource configuration of all business instances in the next preset time period, and performing CDN log back transmission for users corresponding to all business instances respectively.
[0010] The resource configuration method for CDN log return provided by the embodiment of the application can reflect the load condition of the service instance in the historical time period by obtaining the initial QPS, determine the service capability, the highest service QPS and the service characteristics of the service instance based on this, and combine the user demand and the user service level of the user served by the service instance to allocate the CDN log return resource for the user in a personalized manner, meet the personalized demand of the user, realize dynamic resource allocation, ensure that the resources are fully utilized, reduce resource waste, improve the resource utilization rate, improve the system stability, can flexibly cope with the demand change of the service instance and the user, and improve the overall system performance and service quality.
[0011] In an optional implementation, the service capability of the service instance in the historical time period is determined based on the initial service QPS of the service instance in the historical time period, and the service capability of the service instance in the historical time period is determined based on the initial service QPS of the service instance in the historical time period.
[0012] The actual service QPS greater than the preset QPS is determined from the initial service QPS.
[0013] The average value of the actual service QPS in the historical time period is determined as the service capability of the service instance.
[0014] The resource configuration method for CDN log return provided by the embodiment of the application can determine the actual service QPS greater than the preset QPS, determine the average value of the actual service QPS in the historical time period as the service capability of the service instance, can accurately reflect the real service capability of the service instance, and thus realize more efficient and reliable resource allocation, improve the overall performance and service quality of the system.
[0015] In an optional implementation, the CDN log return resource configuration of all service instances in the next preset time period is adjusted based on the service capability, the highest service QPS, the service characteristics, the user demand QPS and the user service level of all service instances respectively, and the CDN log return is performed for the users corresponding to all service instances respectively, and the CDN log return resource configuration of all service instances in the next preset time period is adjusted based on the service capability, the highest service QPS, the service characteristics, the user demand QPS and the user service level of all service instances respectively.
[0016] A first service instance set without service is determined from all service instances, and the resources of the first service instance set are recycled.
[0017] A second service instance set with the highest service QPS less than the corresponding user demand QPS is determined from all service instances, the CDN log return resource configuration of each service instance in the second service instance set in the next preset time period is adjusted, the corresponding highest service QPS is reached, and the CDN log return is performed for the users corresponding to each service instance in the second service instance set respectively.
[0018] determine a third service instance set with the highest service QPS greater than the corresponding user demand QPS from all service instances, and adjust the CDN log return resource configuration of each service instance in the third service instance set in the next preset time period based on the service capability and service characteristics of each service instance in the third service instance set and the user service level, and perform CDN log return for the users corresponding to each service instance in the third service instance set.
[0019] The resource configuration method for CDN log return provided by the embodiment of the application reduces resource waste by determining the first service instance set without service from all service instances and recycling the resources of these instances, ensures that high demand service instances can obtain sufficient resource support by determining the second service instance set with the highest service QPS less than the corresponding user demand QPS from all service instances and adjusting the resources of these instances to reach the corresponding highest service QPS, ensures user experience and system stability by determining the third service instance set with the highest service QPS greater than the corresponding user demand QPS from all service instances and adjusting the resource configuration of these instances based on the service capability and service characteristics of these instances and the user service level to prevent burst conditions, improves resource utilization by making different resource configurations based on different conditions, and improves the overall performance and service quality of the system.
[0020] In an optional embodiment, recycling the resources of the first service instance set comprises:
[0021] Recycling the resources of the first service instance set according to the user service level from small to large based on the user service level corresponding to all service instances in the first service instance set.
[0022] The resource configuration method for CDN log return provided by the embodiment of the application reduces resource waste by recycling resources according to the user service level, reduces misrecycling, and helps to maximize resource utilization.
[0023] In an optional embodiment, adjusting the CDN log return resource configuration of each service instance in the third service instance set in the next preset time period based on the service capability and service characteristics of each service instance in the third service instance set and the user service level comprises:
[0024] For any service instance in the third service instance set, determining an adjustment multiple corresponding to the service instance based on the service characteristics of the service instance and the user service level;
[0025] Taking the smaller one of the product of the user demand QPS corresponding to the service instance and the adjustment multiple and the service capability of the service instance as a target service QPS;
[0026] Based on the user service levels corresponding to all service instances in the third service instance set, the CDN log return resource configuration of each service instance in the third service instance set in the next preset time period is adjusted in the order from large to small of the user service levels, so as to reach the corresponding target service QPS.
[0027] The resource configuration method for CDN log return provided by the embodiment of the application determines the adjustment multiple of each service instance based on the service characteristics and the user service level of each service instance, so that the resource allocation is more accurate and meets the actual demand, the product of the user demand QPS corresponding to the service instance and the adjustment multiple is taken as the target service QPS, the smaller value between the product and the service capacity of the service instance is taken as the target service QPS, the actual service capacity of the service instance is ensured not to exceed the resource allocation, resource waste is avoided, the CDN log return demand of the high-priority user is ensured to be satisfied preferentially by adjusting the resources in the order from large to small of the user service levels, the user experience is optimized, and the system stability is improved.
[0028] In an optional implementation, the method further includes:
[0029] In the case that the service capacity of any service instance is less than the preset service capacity, alarm information is sent to the target terminal.
[0030] The resource configuration method for CDN log return provided by the embodiment of the application can determine whether there is an abnormal service instance in the current system by timely alarming when the service capacity of the service instance is less than the preset service capacity, so that timely adjustment is performed, and the system stability is ensured.
[0031] In an optional implementation, the total amount of resources of all service instances remains unchanged.
[0032] The resource configuration method for CDN log return provided by the embodiment of the application dynamically adjusts the resources of all service instances on the basis of keeping the total amount of resources of all service instances unchanged, so that efficient resource configuration is achieved, and resource utilization maximization is ensured.
[0033] In a second aspect, the application provides a resource configuration device for CDN log return, which comprises:
[0034] The first acquisition module is configured to acquire, for any service instance in all service instances, an initial service QPS of the service instance in a historical time period;
[0035] The determination module is configured to determine, based on the initial service QPS of the service instance in the historical time period, the service capacity, the highest service QPS and the service characteristics of the service instance in the historical time period, the service characteristics being burst characteristics or non-burst characteristics;
[0036] The second acquisition module is configured to acquire the user demand QPS and the user service level corresponding to the service instance.
[0037] The configuration module is configured to adjust CDN log return resource configurations of all service instances in a next preset time period based on the service capabilities, the maximum service QPS, the service characteristics, the user demand QPS and the user service level corresponding to all service instances respectively, and perform CDN log return for users corresponding to all service instances respectively.
[0038] In a third aspect, the present application provides a computer device, comprising a memory and a processor, the memory and the processor are connected with each other in communication, the memory stores computer instructions, and the processor executes the computer instructions to perform the resource configuration method for CDN log return of the first aspect or any of the corresponding embodiments thereof.
[0039] In a fourth aspect, the present application provides a computer readable storage medium, which stores computer instructions, and the computer instructions are used to make a computer execute the resource configuration method for CDN log return of the first aspect or any of the corresponding embodiments thereof.
[0040] In a fifth aspect, the present application provides a computer program product, which comprises computer instructions, and the computer instructions are used to make a computer execute the resource configuration method for CDN log return of the first aspect or any of the corresponding embodiments thereof. BRIEF DESCRIPTION OF DRAWINGS
[0041] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the drawings needed in the specific embodiments or the prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0042] Figure 1 is a flow chart of the resource configuration method for CDN log return according to an embodiment of the present application;
[0043] Figure 2 is a flow chart of another resource configuration method for CDN log return according to an embodiment of the present application;
[0044] Figure 3 is a structural block diagram of the resource configuration device for CDN log return according to an embodiment of the present application;
[0045] Figure 4 is a hardware structure schematic diagram of the computer device of an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.
[0047] The fixed resource configuration method is used when CDN logs are returned, which cannot effectively cope with complex and changeable network environment and diversified user demand, thereby affecting user experience and system performance. The resource configuration method for CDN log return provided in the embodiments of the present application allocates personalized CDN log return resources for users, meets the personalized demand of users, realizes dynamic resource configuration, improves resource utilization, improves system stability, can flexibly cope with the demand change of business instances and users, and improves overall system performance and service quality.
[0048] According to the embodiments of the present application, a resource configuration method for CDN log return is provided. It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a group of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from here.
[0049] In the present embodiment, a resource configuration method for CDN log return is provided, which can be used in an electronic device, Figure 1 The flowchart of the resource configuration method for CDN log return according to the embodiments of the present application is shown in FIG. 1, which includes the following steps: Figure 1
[0050] Step S101, for any one of all service instances, obtain the initial service QPS of the service instance in the historical time period. Specifically, the service instance refers to a system or application that provides a specific service to users, such as a website, an application, etc. To ensure that the CDN log can be stably returned to the user under high concurrency, burst traffic, or user receiving end capacity decline or transmission network quality fluctuation, etc., the resources of the service instance need to be dynamically adjusted, such as adjusting the CPU core number and memory resources. The embodiment of the present application is different from the traditional static resource configuration. By understanding the actual service request volume of the service instance in the historical time period, the basic data for subsequent resource adjustment is provided, and dynamic resource configuration is considered from multiple aspects. First, the CDN real-time log processing capability information of any service instance is collected, and the initial QPS of the service instance in the historical time period is extracted. Assuming that the historical time period is 24 hours, the QPS of the service instance in the past 24 hours per hour can be obtained as shown in Table 1, which is the initial service QPS. Optionally, the time granularity for obtaining the initial service QPS of the service instance can be adjusted, such as obtaining the QPS per day, the QPS per hour or the QPS per minute, and the embodiment of the present application does not limit this.
[0051] Table 1
[0052] Historical time period QPS 00:00-01:00 100 01:00-02:00 120 02:00-03:00 150 …… …… 23:00-24:00 110
[0053] Step S102, based on the initial service QPS of the service instance in the historical time period, determine the service capability, the highest service QPS and the service characteristic of the service instance in the historical time period, and the service characteristic is burst characteristic or non-burst characteristic. Specifically, based on the initial service QPS in the historical time period, the service capability, the highest service QPS and the service characteristic of the service instance are evaluated. More specifically, the highest service QPS is the highest QPS value in the QPS data in the historical time period. The service characteristic of the service instance is burst characteristic or non-burst characteristic. If the service characteristic of the service instance is burst characteristic, the service instance has a short-time traffic surge or load surge phenomenon in the historical time period; if the service characteristic of the service instance is non-burst characteristic, the traffic and load of the service instance are relatively stable in the historical time period. Since the service characteristic of the service instance has an impact on the stability and performance of the system, this factor needs to be considered when configuring resources. Optionally, the service characteristic of the service instance can be determined by existing methods such as peak detection, moving average method, threshold method or volatility analysis, which will not be repeated here.
[0054] Step S103, obtaining the user demand QPS and the user service level corresponding to the service instance. Specifically, since each service instance is for a specific user, for any service instance, understanding the actual demand of the user for the service instance can provide user perspective data for resource configuration, so the expected QPS demand of the user for the service instance can be obtained. More specifically, the user demand QPS can be obtained by user demand investigation or prediction model and the like. At the same time, the user service level of the user served by the service instance can be obtained, so that the priority of the user service level can be considered for resource configuration of the service instance. The user service level is divided into ordinary level, important level and sensitive level. Users with different user service levels have different CDN log back transmission demands. The CDN log back transmission demand of the user increases in the order of ordinary level, important level and sensitive level, and the user service level also increases in turn.
[0055] Step S104, based on the service capacity, the highest service QPS, the service characteristics, the user demand QPS and the user service level corresponding to all service instances respectively, adjusting the CDN log back transmission resource configuration of all service instances in the next preset time period, and performing CDN log back transmission for users corresponding to all service instances respectively. Specifically, in the case that the total amount of resources of all service instances is fixed, according to the performance of each service instance in the historical time period, and combining the user demand and the user service level of the user corresponding thereto, the resource configuration at the beginning of the next preset time period is dynamically adjusted to ensure that the user demand for CDN log back transmission is met, and the optimization of resource utilization is ensured.
[0056] The resource configuration method for CDN log back transmission provided by the embodiment of the application can reflect the load condition of the service instance in the historical time period by obtaining the initial QPS, determine the service capacity, the highest service QPS and the service characteristics of the service instance based thereon, and combine the user demand and the user service level of the user served by the service instance to perform personalized CDN log back transmission resource allocation for the user, meet the personalized demand of the user, realize dynamic resource configuration, ensure that the resources are fully utilized, reduce resource waste, improve the resource utilization rate, improve the system stability, flexibly cope with the demand changes of the service instance and the user, and improve the overall system performance and service quality.
[0057] In the embodiment, a resource configuration method for CDN log back transmission is provided, which can be used in the electronic device described above, Figure 2 is a flowchart of another resource configuration method for CDN log back transmission according to the embodiment of the application, as Figure 2 shown, the flow includes the following steps:
[0058] Step S201, for any service instance in all service instances, obtain the initial service QPS of the service instance in a historical time period. For details, please refer to Figure 1 Step S101 of the illustrated embodiment will not be described here again.
[0059] Step S202, based on the initial service QPS of the service instance in the historical time period, determine the service capacity, the highest service QPS and the service characteristic of the service instance in the historical time period. The service characteristic is burst characteristic or non-burst characteristic.
[0060] Specifically, the above step S202 determines the service capacity of the service instance in the historical time period based on the initial service QPS of the service instance in the historical time period, which includes:
[0061] Step S2021, determine the actual service QPS greater than the preset QPS from the initial service QPS. Specifically, assuming that the initial service QPS is the QPS obtained every hour in the past 24 hours, there are 24 QPS data in total. If two QPS data are less than the preset QPS, the two QPS data are removed, and only 22 QPS data greater than the preset QPS are reserved as the actual service QPS.
[0062] Step S2022, determine the average value of the actual service QPS in the historical time period as the service capacity of the service instance. Specifically, the sum of the remaining 22 QPS data is divided by 22, and the result is the service capacity of the service instance, so as to accurately evaluate the actual processing capacity of the service instance in the historical time period.
[0063] Step S203, in the case that the service capacity of any service instance is less than the preset service capacity, send alarm information to the target terminal. Specifically, the preset service capacity is generally the self-set minimum value of the service capacity. If the service capacity of any service instance is lower than the preset service capacity, the service instance may be abnormal, and it is necessary to send alarm information to the target terminal of the operator in time, so that the operator can coordinate to restore the service capacity of the service instance by non-expansion means, thereby ensuring the stability of the system.
[0064] Step S204, obtain the user demand QPS and the user service level corresponding to the service instance. For details, please refer to Figure 1 Step S103 of the illustrated embodiment will not be described here again.
[0065] Step S205, based on the service capacity, the highest service QPS, the service characteristic, the user demand QPS and the user service level corresponding to all service instances respectively, adjust the CDN log return resource configuration of all service instances in the next preset time period, and perform CDN log return for the users corresponding to all service instances respectively.
[0066] Specifically, the step S205 comprises:
[0067] Step S2051, determining a first service instance set without service from all service instances, and recycling resources of the first service instance set.
[0068] In some optional embodiments, the step S2051 comprises:
[0069] Step a1, recycling resources of the first service instance set according to the user service levels corresponding to all service instances in the first service instance set in the order from small to large. Specifically, the service instances without service, i.e., the service instances with the highest service QPS of 0, are taken as the first service instance set. If a service instance has no service, resource recycling can be performed to avoid resource waste. When performing resource recycling, the user service levels corresponding to the service instances are considered. Assuming that there are three service instances in the first service instance set, which provide services for user A, user B and user C respectively. The user service levels corresponding to the three users are sensitive level, important level and ordinary level respectively. When performing resource recycling, the recycling is performed in the order from small to large according to the user service levels, i.e., in the order from small to large according to the CDN log back transmission requirements. First, the resources of user C (ordinary level) are recycled, then the resources of user B (important level) are recycled, and finally the resources of user A (sensitive level) are recycled. By recycling resources according to the user service levels, the misrecycling is reduced, which helps to maximize the resource utilization.
[0070] Step S2052, from all business instances, determine a second business instance set whose highest business QPS is less than the corresponding user demand QPS, adjust the CDN log back transmission resource configuration of each business instance in the second business instance set in the next preset time period to reach the corresponding highest business QPS, and perform CDN log back transmission for the users corresponding to each business instance in the second business instance set respectively. Specifically, from all business instances, find out the second business instance set whose highest business QPS is less than the user demand QPS, and increase the resource configuration of the business instances in the set to make the highest business QPS reach the user demand QPS. Assuming that there are two business instances: business instance 1 (highest business QPS is 100, user demand QPS is 150) and business instance 2 (highest business QPS is 200, user demand QPS is 200). Since the highest business QPS of business instance 1 is less than the user demand QPS, the CPU core number and memory resource of business instance 1 need to be adjusted to make the initial QPS of business instance 1 in the next preset time period reach 150. The highest business QPS of business instance 2 is equal to the user demand QPS, and no adjustment is needed. Through resource configuration adjustment based on the highest business QPS and the user demand QPS, the user's demand for CDN log back transmission is met, so that CDN log back transmission is performed for the users corresponding to each business instance in the second business instance set.
[0071] Step S2053, from all business instances, determine a third business instance set whose highest business QPS is greater than the corresponding user demand QPS, and based on the service capability and business characteristics of each business instance in the third business instance set and the user business level, adjust the CDN log back transmission resource configuration of each business instance in the third business instance set in the next preset time period, and perform CDN log back transmission for the users corresponding to each business instance in the third business instance set respectively.
[0072] In some optional embodiments, the above step S2053 comprises:
[0073] Step b1, for any business instance in the third business instance set, based on the business characteristics of the business instance and the user business level, determine the adjustment multiple corresponding to the business instance. Specifically, since different business characteristics and different user business levels of business instances have different influences on resource configuration, the adjustment multiple corresponding to the business instance under different circumstances can be determined based on Table 2.
[0074] Table 2
[0075]
[0076] Step b2, the product of the user demand QPS corresponding to the service instance and the adjustment multiple is compared with the smaller one of the service capacity of the service instance to obtain the target service QPS. Specifically, assuming that there are two service instances in the third service instance set: service instance 3 (service capacity is 300, user demand QPS is 200, user service level is sensitive level, non-bursting characteristic) and service instance 4 (service capacity is 250, user demand QPS is 150, user service level is important level, bursting characteristic). Referring to Table 2, it can be obtained that the adjustment multiple corresponding to service instance 3 is 2.5, and the adjustment multiple corresponding to service instance 4 is 2.5. Thus, the target service QPS corresponding to service instance 3 should be min(2.5*200, 300) = min(500, 300) = 300, and the target QPS corresponding to service instance 4 should be min(2.5*150, 250) = min(375, 250) = 250.
[0077] Step b3, based on the user service levels corresponding to all service instances in the third service instance set, the CDN log back transmission resource configuration of each service instance in the third service instance set in the next preset time period is adjusted in the order from high to low according to the user service levels, so as to reach the corresponding target service QPS. Specifically, since the user of service instance 3 is of sensitive level, and the user of service instance 4 is of important level, that is, the resource configuration priority of the user of service instance 3 is higher than that of the user of service instance 4, the CPU core number and the memory resource of service instance 3 should be adjusted first to make the initial QPS in the next preset time period be 300, and then the CPU core number and the memory resource of service instance 4 are adjusted to make the initial QPS in the next preset time period be 250. By determining the adjustment multiple of each service instance based on the service characteristics and the user service level of each service instance, the resource allocation is more accurate, meets the actual demand, the product of the user demand QPS corresponding to the service instance and the adjustment multiple is compared with the smaller one of the service capacity of the service instance to obtain the target service QPS, the resource allocation is ensured not to exceed the actual service capacity of the service instance, resource waste is avoided, the CDN log back transmission demand of the high-priority user is ensured to be satisfied preferentially by adjusting the resources in the order from high to low according to the user service levels, the user experience is optimized, and the system stability is improved.
[0078] In some optional embodiments, the total amount of resources of all service instances remains unchanged. Specifically, by dynamically adjusting the resources of all service instances on the basis of keeping the total amount of resources of all service instances unchanged, efficient resource allocation is realized, which helps to ensure maximum utilization of resources.
[0079] The resource configuration method for CDN log return provided by the embodiment of the present application can reflect the load condition of the service instance in the historical time period by obtaining the initial QPS, determine the service capability, the highest service QPS and the service characteristic of the service instance based on this, and combine the user demand and the user service level of the user served by the service instance to allocate the CDN log return resource for the user in an individualized manner, meet the individualized demand of the user, realize dynamic resource configuration, ensure that the resource is fully utilized, reduce resource waste, improve the resource utilization rate, improve the system stability, can flexibly cope with the demand change of the service instance and the user, and improve the overall system performance and service quality.
[0080] In the embodiment, a resource configuration device for CDN log return is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and details are not repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware or a combination of software and hardware is also possible and is contemplated.
[0081] The embodiment provides a resource configuration device for CDN log return, as shown in the following Figure 3 , comprising:
[0082] The first obtaining module 301 is configured to obtain the initial service QPS of the service instance in the historical time period for any service instance in all service instances.
[0083] The determining module 302 is configured to determine the service capability, the highest service QPS and the service characteristic of the service instance in the historical time period based on the initial service QPS of the service instance in the historical time period, and the service characteristic is burst characteristic or non-burst characteristic.
[0084] The second obtaining module 303 is configured to obtain the user demand QPS and the user service level corresponding to the service instance.
[0085] The configuration module 304 is configured to adjust the CDN log return resource configuration of all service instances in the next preset time period based on the service capability, the highest service QPS, the service characteristic, the user demand QPS and the user service level corresponding to all service instances respectively, and perform CDN log return for the users corresponding to all service instances respectively.
[0086] In some optional embodiments, the determining module 302 comprises:
[0087] The first determining unit is configured to determine the actual service QPS greater than the preset QPS from the initial service QPS.
[0088] The second determining unit is configured to determine an average value of the actual service QPS in the historical time period as the service capacity of the service instance.
[0089] In some optional embodiments, the configuration module 304 comprises:
[0090] The recycling unit is configured to determine a first service instance set without service from all service instances, and recycle resources of the first service instance set.
[0091] The first adjusting unit is configured to determine a second service instance set with the highest service QPS less than the corresponding user demand QPS from all service instances, and adjust the CDN log return resource configuration of each service instance in the second service instance set in the next preset time period to reach the corresponding highest service QPS, and perform CDN log return for the corresponding user of each service instance in the second service instance set.
[0092] The second adjusting unit is configured to determine a third service instance set with the highest service QPS greater than the corresponding user demand QPS from all service instances, and adjust the CDN log return resource configuration of each service instance in the third service instance set in the next preset time period based on the service capacity and service characteristics and user service level corresponding to each service instance in the third service instance set, and perform CDN log return for the corresponding user of each service instance in the third service instance set.
[0093] In some optional embodiments, the recycling unit comprises:
[0094] The recycling sub-unit is configured to recycle the resources of the first service instance set based on the user service level corresponding to all service instances in the first service instance set, and in the order from small to large of the user service level.
[0095] In some optional embodiments, the second adjusting unit comprises:
[0096] The first determining sub-unit is configured to determine an adjustment multiple corresponding to the service instance based on the service characteristics and user service level of the service instance for any service instance in the third service instance set.
[0097] The second determining sub-unit is configured to determine the smaller one of the product of the user demand QPS corresponding to the service instance and the adjustment multiple and the service capacity of the service instance as the target service QPS.
[0098] The adjusting sub-unit is configured to adjust the CDN log return resource configuration of each service instance in the third service instance set in the next preset time period based on the user service level corresponding to all service instances in the third service instance set, and in the order from large to small of the user service level, to reach the corresponding target service QPS.
[0099] In some alternative embodiments, the device further includes:
[0100] The alarm module is used to send alarm information to the target terminal when the service capacity of any service instance is less than the preset service capacity.
[0101] In some alternative implementations, the total resources for all service instances remain unchanged.
[0102] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0103] In this embodiment, the resource configuration device for CDN log back is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0104] This invention also provides a computer device having the above-described features. Figure 3 The resource configuration device shown is used for CDN log back transmission.
[0105] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 4 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 4 Take a processor 10 as an example.
[0106] The processor 10 can be a central processing unit, a network processing unit, or a combination thereof. The processor 10 can further include a hardware chip. The hardware chip can be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable logic device, a general array logic, or any combination thereof.
[0107] The memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform the methods illustrated by the above embodiments.
[0108] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system, application programs required by at least one function, and the like. The data storage area can store data created according to the use of the computer device, and the like. In addition, the memory 20 can include a high-speed random access memory, and can further include a non-transitory memory such as at least one disk storage device, a flash memory device, or other non-transitory solid state memory device. In some alternative embodiments, the memory 20 can optionally include a memory disposed remotely from the processor 10, which can be connected to the computer device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0109] The memory 20 can include a volatile memory such as a random access memory, and can also include a non-volatile memory such as a flash memory, a hard disk, or a solid state disk. The memory 20 can further include a combination of the above-mentioned types of memories.
[0110] The computer device further includes a communication interface 30 for communication of the computer device with other devices or communication networks.
[0111] The embodiments of the present application also provide a computer readable storage medium. The above-mentioned method according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or stored in a remote storage medium or a non-transitory machine readable storage medium originally through network downloading and then stored in a local storage medium, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state disk, etc. Further, the storage medium can further include a combination of the above-mentioned types of memories. It can be understood that the computer, the processor, the microprocessor controller, or the programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method illustrated by the above embodiments is implemented.
[0112] Part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, can invoke or provide the method and / or technical solutions according to the present application. Those skilled in the art should understand that the form of computer program instructions in computer readable medium includes but is not limited to source files, executable files, installation package files, etc., and accordingly, the way of computer program instructions executed by computer includes but is not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.
[0113] Although the embodiments of the present application are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the appended claims.
Claims
1. A resource configuration method for CDN log backhauling, characterized in that, The method comprises: For any one of all service instances, obtaining initial service QPS of the service instance in a historical time period; Based on the initial service QPS of the service instance in the historical time period, determining the service capability, the maximum service QPS and the service characteristic of the service instance in the historical time period, the service characteristic being burst characteristic or non-burst characteristic; Obtaining the user demand QPS and the user service level corresponding to the service instance; Based on the service capability, the maximum service QPS, the service characteristic, the user demand QPS and the user service level corresponding to all service instances respectively, adjusting the CDN log back transmission resource configuration of all service instances in the next preset time period, and performing CDN log back transmission for users corresponding to all service instances respectively. Wherein, based on the service capability, the maximum service QPS, the service characteristic, the user demand QPS and the user service level corresponding to all service instances respectively, adjusting the CDN log back transmission resource configuration of all service instances in the next preset time period, and performing CDN log back transmission for users corresponding to all service instances respectively, comprises: Determining a first service instance set without service from all service instances, and recycling resources of the first service instance set; Determining a second service instance set with the maximum service QPS less than the corresponding user demand QPS from all service instances, adjusting the CDN log back transmission resource configuration of each service instance in the second service instance set in the next preset time period to reach the corresponding maximum service QPS, and performing CDN log back transmission for users corresponding to each service instance in the second service instance set respectively; Determining a third service instance set with the maximum service QPS greater than the corresponding user demand QPS from all service instances, adjusting the CDN log back transmission resource configuration of each service instance in the third service instance set in the next preset time period based on the service capability and the service characteristic corresponding to each service instance in the third service instance set and the user service level, and performing CDN log back transmission for users corresponding to each service instance in the third service instance set respectively; The CDN log back transmission resource configuration of each service instance in the third service instance set in the next preset time period is adjusted based on the service capability and the service characteristic corresponding to each service instance in the third service instance set and the user service level, comprising: For any one of the third service instance set, determining the adjustment multiple corresponding to the service instance based on the service characteristic and the user service level of the service instance; Taking the product of the user demand QPS corresponding to the service instance and the adjustment multiple as the target service QPS, and taking the smaller one of the service capability of the service instance as the target service QPS; Based on the user service level corresponding to all service instances in the third service instance set, adjusting the CDN log back transmission resource configuration of each service instance in the third service instance set in the next preset time period in the order from large to small according to the user service level, so as to reach the corresponding target service QPS.
2. The method of claim 1, wherein, The service capability of the service instance in the historical time period is determined based on the initial service QPS of the service instance in the historical time period, and the service capability of the service instance in the historical time period is determined based on the initial service QPS of the service instance in the historical time period. The actual service QPS greater than the preset QPS is determined from the initial service QPS. The average value of the actual service QPS in the historical time period is determined as the service capability of the service instance.
3. The method of claim 1, wherein, The resources of the first service instance set are recovered, and the resources of the first service instance set are recovered. The resources of the first service instance set are recovered based on the user service levels corresponding to all service instances in the first service instance set, in the order from small to large.
4. The method of claim 1, wherein, The method further comprises: In the case where the service capability of any service instance is less than the preset service capability, an alarm information is sent to the target terminal.
5. The method of claim 1, wherein, The total amount of resources of all service instances remains unchanged.
6. A resource configuration apparatus for CDN log backhauling, characterized in that, The device comprises: The first acquisition module is configured to acquire the initial service QPS of any service instance in all service instances in a historical time period. The determination module is configured to determine the service capability, the highest service QPS, and the service characteristic of the service instance in the historical time period based on the initial service QPS of the service instance in the historical time period, wherein the service characteristic is bursty or non-bursty. The second acquisition module is configured to acquire the user demand QPS and the user service level corresponding to the service instance. The configuration module is configured to adjust the CDN log return resource configuration of all service instances in the next preset time period based on the service capability, the highest service QPS, the service characteristic, the user demand QPS, and the user service level corresponding to all service instances, respectively, to perform CDN log return for users corresponding to all service instances, respectively. The configuration module is specifically configured to: Determine a first service instance set without service from all service instances, and recover the resources of the first service instance set. Determine a second service instance set with the highest service QPS less than the corresponding user demand QPS from all service instances, and adjust the CDN log return resource configuration of each service instance in the second service instance set in the next preset time period to achieve the corresponding highest service QPS, and perform CDN log return for users corresponding to each service instance in the second service instance set, respectively. Determine a third service instance set with the highest service QPS greater than the corresponding user demand QPS from all service instances, and adjust the CDN log return resource configuration of each service instance in the third service instance set in the next preset time period based on the service capability and the service characteristic corresponding to each service instance in the third service instance set and the user service level, to perform CDN log return for users corresponding to each service instance in the third service instance set, respectively. The CDN log return resource configuration of each service instance in the third service instance set in the next preset time period is adjusted based on the service capability and the service characteristic corresponding to each service instance in the third service instance set and the user service level, and the CDN log return resource configuration of each service instance in the third service instance set in the next preset time period is adjusted based on the service capability and the service characteristic corresponding to each service instance in the third service instance set and the user service level. For any service instance in the third service instance set, based on service characteristics and user service level of the service instance, a corresponding adjustment multiple of the service instance is determined; A product of the service instance corresponding user demand QPS and the adjustment multiple is compared with the service capacity of the service instance, and the smaller one is taken as a target service QPS; Based on the user service level corresponding to all service instances in the third service instance set, the CDN log return resource configuration of each service instance in the third service instance set in the next preset time period is adjusted in the order from large to small according to the user service level, so as to reach the corresponding target service QPS.
7. A computer device, comprising: Comprise: A memory and a processor, which are connected in communication with each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the resource configuration method for CDN log return of any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, which are used to make the computer execute the resource configuration method for CDN log return of any one of claims 1 to 5.
Citation Information
Patent Citations
CDN resource scheduling method and device, electronic equipment and storage medium
CN116233027A
Bi-level machine-learning-assisted management of computing resources
WO2024234126A1