Resource allocation method, device and equipment for CDN (Content Delivery Network) log return
By dynamically adjusting the CDN log backload resource configuration, combining the historical load situation and user needs of the business instance, the problem that traditional fixed resource configuration solutions cannot cope with complex network environments and diversified user needs is solved, and efficient resource utilization and system performance improvement is achieved.
Patent Information
- Application Number
- CN202411794177.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-06
AI Technical Summary
The traditional CDN log backload method adopts a fixed resource configuration solution, which cannot effectively respond to complex and changeable network environments and diversified user needs, resulting in lost or delayed log data, affecting user experience and system performance.
By obtaining the initial service QPS of the business instance in the historical time period, determining its service capabilities, highest service QPS and business characteristics, and dynamically adjusting the CDN log backhaul resource configuration to realize personalized resource allocation based on user requirements QPS and user service level.
Dynamic resource allocation is realized, ensuring that resources are fully utilized, reducing resource waste, improving resource utilization, improving system stability and overall performance, and being able to flexibly respond to changes in business instances and users' needs.
Smart Images

Figure CN119892667A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a resource configuration method, device and equipment for CDN log feedback. Background Art
[0002] With the rapid development of the Internet, Content Delivery Network (CDN) has become an important means to improve the performance of websites and applications. CDN caches content in nodes distributed around the world, reducing user access delays and increasing content loading speed. However, the efficient operation of CDN depends not only on content caching strategies, but also on real-time analysis of log data and reasonable resource allocation.
[0003] Traditional CDN log return methods usually use fixed resource configuration solutions. Assume that during peak hours, a large number of users access a business instance at the same time, causing a sharp increase in QPS (Queries Per Second). Fixed log return resource configuration may not be able to handle such a high volume of data, resulting in log data loss or delay. Traditional fixed configuration methods cannot effectively cope with complex and changing network environments and diverse user needs, thus affecting user experience and system performance. Summary of the invention
[0004] In view of this, the present invention provides a resource configuration method, device and equipment for CDN log feedback to solve the problem that static CDN log feedback resource configuration affects user experience and system performance.
[0005] In a first aspect, the present invention provides a resource configuration method for CDN log transmission, the method comprising:
[0006] For any business instance among all business instances, obtain the initial business QPS of the business instance in the historical time period;
[0007] Based on the initial service QPS of the service instance in the historical time period, determine the service capacity, maximum service QPS and service characteristics of the service instance in the historical time period, where the service characteristics are burst characteristics or non-burst characteristics;
[0008] Obtain the user demand QPS and user service level corresponding to the service instance;
[0009] Based on the service capabilities, highest business QPS, business characteristics, user demand QPS and user business levels of all business instances, adjust the CDN log return resource configuration of all business instances in the next preset time period, and perform CDN log return for the users corresponding to all business instances.
[0010] The resource configuration method for CDN log return provided by the embodiment of the present invention can reflect the load situation of the business instance in the historical time period by obtaining the initial QPS, and determine the service capability, maximum business QPS and business characteristics of the business instance based on this, and combine the user needs and user business level of the user served by the business instance to perform personalized CDN log return resource allocation for the user, meet the personalized needs of the user, realize dynamic resource configuration, ensure that resources are fully utilized, reduce resource waste, improve resource utilization, enhance system stability, and can flexibly respond to changes in business instances and user needs, thereby improving overall system performance and service quality.
[0011] In an optional implementation, determining the service capability of the service instance in the historical time period based on the initial service QPS of the service instance in the historical time period includes:
[0012] Determine an actual service QPS that is greater than a preset QPS from the initial service QPS;
[0013] The average value of the actual business QPS in the historical time period is determined as the service capacity of the business instance.
[0014] The resource configuration method for CDN log backhaul provided in an embodiment of the present invention determines an actual business QPS that is greater than a preset QPS, and determines the average value of the actual business QPS in a historical time period as the service capacity of the business instance, so that the real service capacity of the business instance can be accurately reflected, thereby achieving more efficient and reliable resource allocation and improving the overall performance and service quality of the system.
[0015] In an optional implementation, based on the service capabilities, highest service QPS, service characteristics, user demand QPS, and user service levels respectively corresponding to all service instances, CDN log return resource configurations for all service instances in the next preset time period are adjusted, and CDN logs are returned for users respectively corresponding to all service instances, including:
[0016] Determine a first service instance set without services from all service instances, and reclaim resources of the first service instance set;
[0017] Determine a second service instance set whose highest service QPS is less than the corresponding user demand QPS from all service instances, 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 each user corresponding to each service instance in the second service instance set;
[0018] Determine a third business instance set whose highest business QPS is greater than the corresponding user demand QPS from all business instances; based on the service capabilities and business characteristics corresponding to each business instance in the third business instance set and the user business level, adjust the CDN log return resource configuration for each business instance in the third business instance set in the next preset time period; and perform CDN log return for each user corresponding to each business instance in the third business instance set.
[0019] The resource configuration method for CDN log backhaul provided by the embodiment of the present invention reduces resource waste by determining a first business instance set with no business from all business instances and reclaiming resources of these instances, and by determining a second business instance set with a highest business QPS less than a corresponding user demand QPS from all business instances, and adjusting resources of these instances to achieve the corresponding highest business QPS, thereby ensuring that high-demand business instances can obtain sufficient resource support, and by determining a third business instance set with a highest business QPS greater than a corresponding user demand QPS from all business instances, and based on the service capabilities and business characteristics of these instances and user business levels, adjusting their resource configuration to prevent emergencies, ensuring user experience and system stability, and by performing different resource configurations based on different situations, improving resource utilization, and enhancing the overall performance and service quality of the system.
[0020] In an optional implementation, reclaiming resources of the first service instance set includes:
[0021] Based on the user service levels corresponding to all the service instances in the first service instance set, resources of the first service instance set are reclaimed in ascending order of the user service levels.
[0022] The resource configuration method for CDN log backhaul provided by the embodiment of the present invention reduces erroneous recycling by recycling resources according to user service levels, thereby maximizing resource utilization.
[0023] In an optional implementation, based on the service capability and service characteristics corresponding to each service instance in the third service instance set and the user service level, adjusting the CDN log return resource configuration for each service instance in the third service instance set in the next preset time period includes:
[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] The smaller of the product of the user demand QPS corresponding to the business instance and the adjustment multiple and the service capacity of the business instance is taken as the target business 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 descending order of the user service levels to achieve the corresponding target service QPS.
[0027] The resource configuration method for CDN log transmission provided by the embodiment of the present invention determines the adjustment multiple of each business instance based on the business characteristics and user business level of each business instance, so that resource allocation is more accurate and meets actual needs. The smaller value of the product of the user demand QPS corresponding to the business instance and the adjustment multiple and the service capacity of the business instance is used as the target business QPS to ensure that resource allocation does not exceed the actual service capacity of the business instance and avoid resource waste. By adjusting resources in order from large to small according to the user business level, it is ensured that the CDN log transmission needs of high-priority users are met first, thereby optimizing user experience and improving system stability.
[0028] In an optional embodiment, the method further includes:
[0029] When the service capacity of any business instance is less than the preset service capacity, an alarm message is sent to the target terminal.
[0030] The resource configuration method for CDN log transmission provided in the embodiment of the present invention can clearly determine whether there are abnormal business instances in the current system by timely issuing an alarm when the service capacity of a business instance is less than the preset service capacity, so as to make timely adjustments and ensure system stability.
[0031] In an optional implementation, the total amount of resources of all service instances remains unchanged.
[0032] The resource configuration method for CDN log backhaul provided by the embodiment of the present invention realizes efficient resource configuration by dynamically adjusting the resources of all business instances on the basis of keeping the total amount of resources of all business instances unchanged, which helps to ensure maximum resource utilization.
[0033] In a second aspect, the present invention provides a resource configuration device for CDN log transmission, the device comprising:
[0034] A first acquisition module is used to acquire, for any service instance among all service instances, an initial service QPS of the service instance in a historical time period;
[0035] A determination module, used to determine the service capacity, the highest service QPS and the service characteristics of the service instance in the historical time period based on the initial service QPS of the service instance in the historical time period, where the service characteristics are burst characteristics or non-burst characteristics;
[0036] The second acquisition module is used to obtain the user demand QPS and user service level corresponding to the service instance;
[0037] The configuration module is used to adjust the CDN log return resource configuration of all business instances in the next preset time period based on the service capabilities, maximum business QPS, business characteristics, user demand QPS and user business levels corresponding to all business instances, and perform CDN log return for users corresponding to all business instances.
[0038] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the resource configuration method for CDN log feedback of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0039] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the resource configuration method for CDN log transmission according to the first aspect or any corresponding embodiment thereof.
[0040] In a fifth aspect, the present invention provides a computer program product, including computer instructions, which are used to enable a computer to execute the resource configuration method for CDN log backhaul according to the above-mentioned first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 is a flow chart of a resource configuration method for CDN log transmission according to an embodiment of the present invention;
[0043] Figure 2 is a flowchart of another resource configuration method for CDN log transmission according to an embodiment of the present invention;
[0044] Figure 3 is a structural block diagram of a resource configuration device for CDN log transmission according to an embodiment of the present invention;
[0045] Figure 4 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0047] When CDN logs are transmitted back, a fixed resource configuration method is used, which cannot effectively cope with complex and changeable network environments and diverse user needs, thereby affecting user experience and system performance. The resource configuration method for CDN log transmission provided by the embodiment of the present invention performs personalized CDN log transmission resource allocation for users, meets the personalized needs of users, realizes dynamic resource configuration, improves resource utilization, improves system stability, can flexibly respond to changes in business instances and user needs, and improves overall system performance and service quality.
[0048] According to an embodiment of the present invention, an embodiment of a resource configuration method for CDN log backhaul is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0049] In this embodiment, a resource configuration method for CDN log transmission is provided, which can be used in electronic devices. Figure 1 is a flow chart of a resource configuration method for CDN log transmission according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0050] Step S101, for any business instance among all business instances, obtain the initial business QPS of the business instance in the historical time period. Specifically, a business instance refers to a system or application that provides specific services to users, such as a website, an application, etc. In order to ensure that CDN logs can be stably transmitted back to users under high concurrency, burst traffic, or reduced user receiving end capacity or fluctuations in transmission network quality, it is necessary to dynamically adjust the resources of the business instance, such as adjusting the number of CPU cores and memory resources. The embodiment of the present invention is different from the traditional static resource configuration. By understanding the actual business request volume of the business instance in the historical time period, it provides basic data for subsequent resource adjustment, and considers multiple factors for dynamic resource configuration. First, collect the CDN real-time log processing capacity information of any business instance, and extract the initial QPS of the business instance in the historical time period. Assuming that the historical time period is 24 hours, the QPS of the business instance per hour in the past 24 hours as shown in Table 1 below can be obtained as the initial business QPS. Optionally, the time granularity for obtaining the initial service QPS of the service instance may be adjusted, for example, obtaining the QPS per day, the QPS per hour, or the QPS per minute, which is not limited in this embodiment of the present invention.
[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 business QPS of the business instance in the historical time period, determine the service capacity, the highest business QPS and the business characteristics of the business instance in the historical time period, and the business characteristics are burst characteristics or non-burst characteristics. Specifically, based on the initial business QPS in the historical time period, the service capacity, the highest business QPS and the business characteristics of the business instance are evaluated. More specifically, the highest business QPS is the highest QPS value in the QPS data in the historical time period. The business characteristics of the business instance are burst characteristics or non-burst characteristics. If the business characteristics of the business instance are burst characteristics, the business instance has a short-term surge in traffic or a sudden increase in load in the historical time period; if the business characteristics of the business instance are non-burst characteristics, the traffic and load of the business instance are relatively stable in the historical time period. Since the business characteristics of the business instance have an impact on the stability and performance of the system, this factor needs to be considered when performing resource configuration. Optionally, the business characteristics of the business 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, obtain the user demand QPS and user service level corresponding to the business instance. Specifically, since each business instance serves a specific user, for any business instance, understanding the user's actual demand for the business instance can provide data from the user's perspective for resource allocation, so the user's expected QPS demand for the business instance can be obtained. More specifically, the user demand QPS can be obtained through methods such as user demand surveys or prediction models. At the same time, the user service level of the user served by the business instance can be obtained, so that the resource allocation of the business instance can be considered based on the priority of the user service level. The user service level is divided into ordinary, important and sensitive levels. Users with different user service levels have different requirements for CDN log return. The user's CDN log return demand increases in the order of ordinary, important and sensitive levels, and the user service level also increases in sequence.
[0055] Step S104, based on the service capabilities, highest service QPS, service characteristics, user demand QPS and user service level corresponding to all service instances, 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. Specifically, when the total amount of resources of all service instances is fixed, according to the performance of each service instance in the historical time period, combined with the user demand and user service level of its corresponding user, the resource configuration at the beginning of the next preset time period is dynamically adjusted to ensure that the user's demand for CDN log return is met, while ensuring the optimization of resource utilization.
[0056] The resource configuration method for CDN log return provided by the embodiment of the present invention can reflect the load situation of the business instance in the historical time period by obtaining the initial QPS, and determine the service capability, maximum business QPS and business characteristics of the business instance based on this, and combine the user needs and user business level of the user served by the business instance to perform personalized CDN log return resource allocation for the user, meet the personalized needs of the user, realize dynamic resource configuration, ensure that resources are fully utilized, reduce resource waste, improve resource utilization, enhance system stability, and can flexibly respond to changes in business instances and user needs, thereby improving overall system performance and service quality.
[0057] In this embodiment, a resource configuration method for CDN log transmission is provided, which can be used in the above electronic device. Figure 2 FIG. 4 is a flowchart of another resource configuration method for CDN log transmission according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0058] Step S201: For any service instance among all service instances, obtain the initial service QPS of the service instance in the historical time period. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[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 characteristics of the service instance in the historical time period, where the service characteristics are burst characteristics or non-burst characteristics.
[0060] Specifically, the above step S202 determines the service capability of the service instance in the historical time period based on the initial service QPS of the service instance in the historical time period, including:
[0061] Step S2021, determine the actual business QPS greater than the preset QPS from the initial business QPS. Specifically, assume that the initial business QPS is the QPS obtained every hour in the past 24 hours, a total of 24 QPS data. If two QPS data are less than the preset QPS, these two QPS data are removed, and only 22 QPS data greater than the preset QPS are retained as the actual business QPS.
[0062] Step S2022: The average value of the actual business QPS in the historical time period is determined as the service capacity of the business instance. Specifically, the sum of the remaining 22 QPS data is divided by 22, which is used as the service capacity of the business instance, so as to accurately evaluate the actual processing capacity of the business instance in the historical time period.
[0063] Step S203, when the service capacity of any business instance is less than the preset service capacity, an alarm message is sent to the target terminal. Specifically, the preset service capacity is generally the lowest value of the service capacity set by the user. If the service capacity of any business instance is lower than the preset service capacity, the business instance may be abnormal, and an alarm message needs to be sent to the target terminal of the operator in time, so that the operator can coordinate to restore the service capacity of the business instance through non-expansion means, thereby ensuring the stability of the system.
[0064] Step S204: Obtain the user required QPS and user service level corresponding to the service instance. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0065] Step S205, based on the service capabilities, highest service QPS, service characteristics, user demand QPS and user service levels corresponding to all service instances, adjust the CDN log return resource configuration for all service instances in the next preset time period, and perform CDN log return for the users corresponding to all service instances.
[0066] Specifically, the above step S205 includes:
[0067] Step S2051: determining a first service instance set without services from all service instances, and reclaiming resources of the first service instance set.
[0068] In some optional implementations, the above step S2051 includes:
[0069] Step a1, based on the user service levels corresponding to all service instances in the first service instance set, reclaim the resources of the first service instance set in the order of user service levels from small to large. Specifically, service instances with no service, that is, service instances with the highest service QPS of 0, are taken as the first service instance set. If the service instance has no service, resource recycling can be performed to avoid resource waste. When recycling resources, the user service level corresponding to the service instance is considered. Assume that there are 3 service instances in the first service instance set, which provide services to user A, user B and user C respectively. The user service levels corresponding to these three users are sensitive level, important level and ordinary level respectively. When recycling resources, recycling is performed in the order of user service level from small to large, that is, recycling is performed in the order of CDN log backhaul requirements from small to large. First, the resources of user C (ordinary level) are recycled, followed by the resources of user B (important level), and finally the resources of user A (sensitive level). By recycling resources according to user service level, it is possible to reduce erroneous recycling and help maximize resource utilization.
[0070] Step S2052, determine the second business instance set whose highest business QPS is less than the corresponding user demand QPS from all business instances, adjust the CDN log return resource configuration of each business instance in the second business instance set in the next preset time period to achieve the corresponding highest business QPS, and perform CDN log return for the user corresponding to each business instance in the second business instance set. Specifically, from all business instances, find the second business instance set whose highest business QPS is less than the user demand QPS, increase resource configuration for the business instances in the set so that their highest business QPS reaches the user demand QPS. Assume 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, it is necessary to adjust the number of CPU cores and memory resources of business instance 1 so that its initial QPS in the next preset time period reaches 150. The highest business QPS of business instance 2 is equal to the user demand QPS, and no adjustment is required. By adjusting resource configuration based on the highest service QPS and user demand QPS, the user's demand for CDN log return is met, and CDN log return is performed for the user corresponding to each service instance in the second service instance set.
[0071] Step S2053, determine from all business instances a third business instance set whose highest business QPS is greater than the corresponding user demand QPS, and based on the service capabilities and business characteristics corresponding to each business instance in the third business instance set and the user business level, adjust the CDN log return resource configuration of each business instance in the third business instance set in the next preset time period, and perform CDN log return for each user corresponding to each business instance in the third business instance set.
[0072] In some optional implementations, the above step S2053 includes:
[0073] Step b1, for any service instance in the third service instance set, based on the service characteristics of the service instance and the user service level, determine the adjustment multiple corresponding to the service instance. Specifically, since different service characteristics of the service instance and different user service levels have different effects on resource allocation, the adjustment multiple corresponding to the service instance in different situations can be determined based on the following Table 2.
[0074] Table 2
[0075]
[0076] Step b2, the smaller 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 is used as the target service QPS. Specifically, it is assumed 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-burst characteristics) and service instance 4 (service capacity is 250, user demand QPS is 150, user service level is important level, burst characteristics). Referring to Table 2 above, 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. It can be obtained that 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, in descending order of user service levels, adjust the CDN log backhaul resource configuration of each service instance in the third service instance set in the next preset time period to achieve the corresponding target service QPS. Specifically, since the user of service instance 3 is at a sensitive level, and the user of service instance 4 is at an 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 number of CPU cores and memory resources of service instance 3 should be adjusted first so that the initial QPS in the next preset time period is 300, and then the number of CPU cores and memory resources of service instance 4 should be adjusted so that the initial QPS in the next preset time period is 250. By determining the adjustment multiple of each business instance based on the business characteristics and user business level of each business instance, resource allocation is made more accurate and in line with actual needs. The smaller value of the product of the user demand QPS corresponding to the business instance and the adjustment multiple and the service capacity of the business instance is used as the target business QPS to ensure that resource allocation does not exceed the actual service capacity of the business instance and avoid resource waste. By adjusting resources in order from large to small according to user business levels, the CDN log backhaul needs of high-priority users are ensured to be met first, thereby optimizing user experience and improving system stability.
[0078] In some optional implementations, the total amount of resources of all service instances remains unchanged. Specifically, by dynamically adjusting the resources of all service instances while keeping the total amount of resources of all service instances unchanged, efficient resource allocation is achieved, which helps to ensure maximum resource utilization.
[0079] The resource configuration method for CDN log return provided by the embodiment of the present invention can reflect the load situation of the business instance in the historical time period by obtaining the initial QPS, and determine the service capability, maximum business QPS and business characteristics of the business instance based on this, and combine the user needs and user business level of the user served by the business instance to perform personalized CDN log return resource allocation for the user, meet the personalized needs of the user, realize dynamic resource configuration, ensure that resources are fully utilized, reduce resource waste, improve resource utilization, enhance system stability, and can flexibly respond to changes in business instances and user needs, thereby improving overall system performance and service quality.
[0080] In this embodiment, a resource configuration device for CDN log transmission is also provided, which is used to implement the above embodiments and preferred implementations, and will not be repeated here. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0081] This embodiment provides a resource configuration device for CDN log transmission. Figure 3 As shown, including:
[0082] The first acquisition module 301 is used to acquire, for any service instance among all service instances, an initial service QPS of the service instance in a historical time period.
[0083] The determination module 302 is used to determine the service capacity, the highest service QPS and the service characteristics of the service instance in the historical time period based on the initial service QPS of the service instance in the historical time period, where the service characteristics are burst characteristics or non-burst characteristics.
[0084] The second acquisition module 303 is used to acquire the user demand QPS and user service level corresponding to the service instance.
[0085] Configuration module 304 is used to adjust the CDN log return resource configuration of all business instances in the next preset time period based on the service capabilities, maximum business QPS, business characteristics, user demand QPS and user business levels corresponding to all business instances, and perform CDN log return for users corresponding to all business instances.
[0086] In some optional implementations, the determination module 302 includes:
[0087] The first determining unit is configured to determine an actual service QPS that is greater than a preset QPS from an initial service QPS.
[0088] The second determining unit is used to determine an average value of the actual service QPS in a historical time period as the service capacity of the service instance.
[0089] In some optional implementations, the configuration module 304 includes:
[0090] The recycling unit is used to determine a first service instance set without services from all service instances, and recycle resources of the first service instance set.
[0091] The first adjustment unit is used to determine a second business instance set whose highest business QPS is less than the corresponding user demand QPS from all business instances, adjust the CDN log return resource configuration of each business instance in the second business instance set in the next preset time period to achieve the corresponding highest business QPS, and perform CDN log return for each user corresponding to each business instance in the second business instance set.
[0092] The second adjustment unit is used to determine a third business instance set whose highest business QPS is greater than the corresponding user demand QPS from all business instances, and adjust the CDN log return resource configuration of each business instance in the third business instance set in the next preset time period based on the service capability and business characteristics corresponding to each business instance in the third business instance set and the user business level, so as to perform CDN log return for the users corresponding to each business instance in the third business instance set.
[0093] In some optional embodiments, the recovery unit comprises:
[0094] The recycling subunit is used to recycle the resources of the first service instance set based on the user service levels corresponding to all service instances in the first service instance set and in the order of user service levels from small to large.
[0095] In some optional implementations, the second adjustment unit includes:
[0096] The first determining subunit is used to determine, for any service instance in the third service instance set, an adjustment multiple corresponding to the service instance based on the service characteristics of the service instance and the user service level.
[0097] The second determining subunit is used to take the smaller 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 adjustment subunit is used to adjust the CDN log return resource configuration of each business instance in the third business instance set in the next preset time period based on the user business levels corresponding to all business instances in the third business instance set, in descending order of user business levels, so as to achieve the corresponding target business QPS.
[0099] In some optional embodiments, the device further comprises:
[0100] The alarm module is used to send an alarm message to the target terminal when the service capacity of any business instance is less than the preset service capacity.
[0101] In some optional implementations, the total amount of resources for all service instances remains unchanged.
[0102] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0103] The resource configuration device for CDN log transmission in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0104] The embodiment of the present invention also provides a computer device having the above Figure 3 The resource configuration device for CDN log feedback is shown.
[0105] See also Figure 4 , Figure 4 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 4 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.
[0106] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0107] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0108] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0109] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0110] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0111] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or 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 a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0112] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0113] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A resource configuration method for CDN log transmission, characterized in that: The method comprises: For any service instance among all service instances, obtain the initial service QPS of the service instance in the historical time period; Based on the initial service QPS of the service instance in the historical time period, determining the service capability, the highest service QPS and service characteristics of the service instance in the historical time period, wherein the service characteristics are burst characteristics or non-burst characteristics; Obtain the user demand QPS and user service level corresponding to the service instance; Based on the service capabilities, highest business QPS, business characteristics, user demand QPS and user business levels of all business instances, adjust the CDN log return resource configuration of all business instances in the next preset time period, and perform CDN log return for the users corresponding to all business instances.
2. The method according to claim 1, characterized in that The determining, based on the initial service QPS of the service instance in the historical time period, the service capability of the service instance in the historical time period includes: Determine an actual service QPS that is greater than a preset QPS from the initial service QPS; An average value of the actual business QPS in a historical time period is determined as the service capacity of the business instance.
3. The method according to claim 1, characterized in that: The CDN log transmission resource configuration of all business instances in the next preset time period is adjusted based on the service capabilities, highest business QPS, business characteristics, user demand QPS and user business level corresponding to all business instances, and CDN log transmission is performed for users corresponding to all business instances, including: Determine a first set of service instances with no services from all service instances, and reclaim resources of the first set of service instances; Determine a second service instance set whose highest service QPS is less than the corresponding user demand QPS from all service instances, 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 each user corresponding to each service instance in the second service instance set; Determine a third business instance set whose highest business QPS is greater than the corresponding user demand QPS from all business instances, and based on the service capabilities and business characteristics corresponding to each business instance in the third business instance set and the user business level, adjust the CDN log return resource configuration of each business instance in the third business instance set in the next preset time period, and perform CDN log return for each user corresponding to each business instance in the third business instance set.
4. The method according to claim 3, characterized in that The reclaiming the resources of the first service instance set includes: Based on the user service levels corresponding to all the service instances in the first service instance set, resources of the first service instance set are reclaimed in ascending order of the user service levels.
5. The method according to claim 3, characterized in that: The 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 corresponding to each service instance in the third service instance set and the user service level includes: 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; The smaller 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 is used as the target service QPS; 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 descending order of the user service levels to achieve the corresponding target service QPS.
6. The method according to claim 1, characterized in that The method further comprises: When the service capacity of any business instance is less than the preset service capacity, an alarm message is sent to the target terminal.
7. The method according to claim 1, characterized in that The total amount of resources for all business instances remains unchanged.
8. A resource configuration device for CDN log return, characterized in that: The device comprises: A first acquisition module is used to acquire, for any service instance among all service instances, an initial service QPS of the service instance in a historical time period; A determination module, configured to determine, based on an initial service QPS of the service instance in the historical time period, a service capability, a maximum service QPS, and service characteristics of the service instance in the historical time period, wherein the service characteristics are burst characteristics or non-burst characteristics; The second acquisition module is used to obtain the user demand QPS and user service level corresponding to the service instance; The configuration module is used to adjust the CDN log return resource configuration of all business instances in the next preset time period based on the service capabilities, maximum business QPS, business characteristics, user demand QPS and user business levels corresponding to all business instances, and perform CDN log return for users corresponding to all business instances.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the resource configuration method for CDN log backhaul according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the resource configuration method for CDN log backhaul according to any one of claims 1 to 7.
Citation Information
Patent Citations
QPS statistical method and device for distributed system, computer equipment and medium
CN115237984A
CDN resource scheduling method and device, electronic equipment and storage medium
CN116233027A
Bi-level machine-learning-assisted management of computing resources
WO2024234126A1