CN113032142B - Resource adjusting method and device, electronic equipment and computer readable storage medium - Google Patents

Resource adjusting method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN113032142B
CN113032142B CN202110236745.8A CN202110236745A CN113032142B CN 113032142 B CN113032142 B CN 113032142B CN 202110236745 A CN202110236745 A CN 202110236745A CN 113032142 B CN113032142 B CN 113032142B
Authority
CN
China
Prior art keywords
region
area
service
value
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110236745.8A
Other languages
Chinese (zh)
Other versions
CN113032142A (en
Inventor
马铁军
郑志强
陈颖聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Huya Technology Co Ltd
Original Assignee
Guangzhou Huya Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Huya Technology Co Ltd filed Critical Guangzhou Huya Technology Co Ltd
Priority to CN202110236745.8A priority Critical patent/CN113032142B/en
Publication of CN113032142A publication Critical patent/CN113032142A/en
Application granted granted Critical
Publication of CN113032142B publication Critical patent/CN113032142B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/502Proximity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/508Monitor

Abstract

The application discloses a resource adjusting method, which comprises the following steps: acquiring each service module corresponding to a service and a corresponding first weight value thereof, and acquiring basic resources of equipment in each area and a corresponding second weight value thereof; extracting the service corresponding to each region, and the quality data and the capacity data corresponding to each region; evaluating each area based on the service corresponding to each area, the quality data and the capacity data corresponding to each area, each service module and a first weight value corresponding to each service module, basic resources of equipment in each area and a second weight value corresponding to each basic resource of equipment in each area to obtain a quality evaluation value and a capacity evaluation value of each area; and in response to the quality evaluation value/capacity evaluation value corresponding to any one area exceeding the corresponding elastic shrinkage threshold value, adjusting the basic resources in at least part of the areas in each area so that the quality evaluation value corresponding to each area after adjustment is smaller than the target threshold value. By the scheme, the basic resources in the region can be adjusted, and the stability and quality of the service in the region are improved.

Description

Resource adjusting method, device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a resource adjustment method and apparatus, an electronic device, and a computer-readable storage medium.
Background
With the advent of the information explosion era, the data transmission efficiency requirements of users for various services (such as image transmission, audio transmission, streaming media transmission, etc.) are gradually improved, and thus, an edge computing scenario arises, in which a computer cluster is as close as possible to a data source or a user, and provides computing, storage and network bandwidth at a place close to a data input or the user, so as to improve the data transmission efficiency.
However, the basic resource load of computer clusters in different areas is affected by the amount of users in different areas and the complexity of service logic, and the load of services in different areas is not equal. Therefore, in the edge calculation scenario, there is a large fluctuation in the stability and quality of the service in different areas. In view of this, how to adjust the basic resources in the area and improve the stability and quality of the service in the area becomes an urgent problem to be solved.
Disclosure of Invention
The technical problem mainly solved by the present application is to provide a resource adjustment method, device, electronic device and computer-readable storage medium, which can adjust basic resources in a region and improve stability and quality of services in the region.
In order to solve the above technical problem, a first aspect of the present application provides a resource adjustment method, where the resource adjustment method includes: acquiring each service module corresponding to a service and a corresponding first weight value thereof, and acquiring basic resources of equipment in each area and a corresponding second weight value thereof; acquiring source data, and extracting services corresponding to each region, quality data and capacity data corresponding to each region from the source data; evaluating each area based on the service corresponding to each area, the quality data and the capacity data corresponding to each area, the service modules and the first weight values corresponding to the service modules, and the basic resources of the equipment in each area and the second weight values corresponding to the basic resources to obtain a quality evaluation value and a capacity evaluation value of each area; and in response to the quality assessment value/capacity assessment value corresponding to any one of the areas exceeding the corresponding elastic shrinkage threshold value, adjusting at least part of the basic resources in each area so that the quality assessment value corresponding to each area after adjustment is smaller than a target threshold value.
In order to solve the above technical problem, a second aspect of the present application provides a resource adjusting apparatus, including: the statistical module is used for acquiring each service module corresponding to the service and a first weight value corresponding to the service module, and basic resources of equipment in each area and a second weight value corresponding to the basic resources; the extraction module is used for acquiring source data and extracting services corresponding to each region, quality data and capacity data corresponding to each region from the source data; the pre-estimation module is used for evaluating each area based on the service corresponding to each area, the quality data and the capacity data corresponding to each area, the service modules and the corresponding first weight values thereof, and the basic resources of the equipment in each area and the corresponding second weight values thereof so as to obtain a quality evaluation value and a capacity evaluation value of each area; an adjusting module, configured to adjust the basic resource in at least part of the regions in each of the regions in response to a quality assessment value/capacity assessment value corresponding to any one of the regions exceeding a corresponding shrinkage threshold, so that the quality assessment value corresponding to each region after adjustment is smaller than a target threshold.
In order to solve the above technical problem, a third aspect of the present application provides an electronic device, which includes a memory and a processor, which are coupled to each other, wherein the memory stores program instructions, and the processor is configured to execute the program instructions stored in the memory, so as to implement the resource adjustment method of the first aspect.
To solve the above technical problem, a fourth aspect of the present application provides a computer-readable storage medium, on which program instructions are stored, and the program instructions, when executed by a processor, implement the resource adjusting method of the first aspect.
The beneficial effect of this application is: the method comprises the steps of obtaining services corresponding to all areas, quality data and capacity data corresponding to all the areas, first weight values corresponding to all the service modules and basic resources of equipment in all the areas and second weight values corresponding to all the service modules, evaluating all the areas to obtain quality evaluation values and capacity evaluation values of all the areas, and adjusting at least part of basic resources in all the areas when the quality evaluation values/capacity evaluation values in any area exceed corresponding elastic shrinkage threshold values to enable the quality evaluation values in all the areas to meet preset conditions. Therefore, the quality and the capacity in each area can be evaluated and fed back in real time, and the basic resources are adjusted in time after the elastic shrinkage threshold value is exceeded, so that the quality of the service in each area is improved, and the stability and the quality of the service in the area are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts. Wherein:
FIG. 1 is a schematic flowchart illustrating a resource adjustment method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a resource adjustment method according to another embodiment of the present application;
FIG. 3 is a flowchart illustrating an embodiment corresponding to step S205 in FIG. 2;
FIG. 4 is a block diagram of an embodiment of a resource adjustment apparatus according to the present application;
FIG. 5 is a block diagram of an embodiment of an electronic device of the present application;
FIG. 6 is a block diagram of an embodiment of a computer-readable storage medium of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "system" and "network" are often used interchangeably herein. The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship. Further, the term "plurality" herein means two or more than two.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a resource adjustment method according to an embodiment of the present application. Specifically, the method may include the steps of:
step S101: and acquiring each service module corresponding to the service and a first weight value corresponding to the service module, and basic resources of equipment in each area and a second weight value corresponding to the basic resources.
Specifically, in an edge computing scenario, devices are allocated in different areas, the devices may be a computer or a computer cluster formed by multiple computers, and the devices in different areas have different device brands and models, so that different types of basic resources provided by hardware of different devices have different proportions, where the basic resources include CPU performance, bandwidth, cache space, and the like. The second weight value is used for identifying the proportion of the basic resources which can be provided by different devices.
Further, a service is cooperatively composed of a plurality of service modules, and basic resources required by different service modules are consumed differently, for example, in a streaming media transmission service for live broadcast, the streaming media transmission service includes service modules such as streaming, transcoding, distribution, streaming and the like, where basic resources consumed by streaming, transcoding, distribution, and streaming are different, for example: the ratio of CPU performance in the basic resources consumed by transcoding is the largest, the ratio of bandwidth in the basic resources consumed by streaming is the largest, and the first weighted value is used for identifying the ratio of the basic resources required to be consumed by different service modules.
In an application mode, the basic resources of the equipment in each area and the corresponding second weight values thereof, the business modules corresponding to the business and the corresponding first weight values thereof are configured in the configuration center in advance, and the business modules corresponding to the business and the corresponding first weight values thereof, and the basic resources of the equipment in each area and the corresponding second weight values thereof are obtained from the configuration center.
In a specific application scenario, the basic resources of the computer cluster and the corresponding second weight values thereof in each region, and each service module corresponding to the streaming media transmission service and the corresponding first weight values thereof are set in a configuration center in advance, the second weight values of the basic resources are set based on the hardware equipment condition corresponding to the computer cluster, and the first weight values corresponding to each service module of the streaming media transmission service are set based on the proportion of different basic resources required to be consumed by shunting, transcoding, distributing and pulling. And acquiring each service module corresponding to the streaming media transmission service and a first weight value corresponding to the service module, and basic resources of the computer cluster in each area and a second weight value corresponding to the basic resources from the configuration center.
Step S102: and acquiring source data, and extracting services corresponding to each region, quality data corresponding to each region and capacity data from the source data.
Specifically, after the source data is acquired, the service corresponding to each region, and the quality data and the capacity data of the service in each region are extracted from the source data. Wherein, different areas upload the quality data and capacity data in the area in real time.
In a specific application scenario, each area uploads quality data and capacity data of a streaming media transmission service in real time, wherein the quality data is feedback of a user on abnormal conditions such as blockage, black screen and the like, the capacity data is the total amount of the streaming media data within preset time (such as 5 minutes, 10 minutes and 30 minutes) in the current area, the quality data and the capacity data in each area are uploaded and collected to a database to form source data, and corresponding source data are obtained from the database and are analyzed to obtain the quality data and the capacity data in each area.
Step S103: and evaluating each area based on the service corresponding to each area, the quality data and the capacity data corresponding to each area, each service module and the corresponding first weight value thereof, and the basic resource of the equipment in each area and the corresponding second weight value thereof to obtain the quality evaluation value and the capacity evaluation value of each area.
Specifically, a service module corresponding to the service in the current region is acquired based on the service in the current region, the service module corresponding to the service in the current region is evaluated in combination with the quality data and the capacity data of the current region, and the current region is evaluated according to a first weight value corresponding to the service module, the basic resource in the current region and a second weight value corresponding to the basic resource in the current region, so as to obtain a quality evaluation value and a capacity evaluation value of the current region in a preset time period.
Further, the respective areas are evaluated separately to obtain quality evaluation values and capacity evaluation values of the respective areas, respectively.
In a specific application scenario, a service acquired in a current region is a streaming media transmission service, a corresponding service module is acquired based on the streaming media transmission service, and the corresponding service module of the streaming media transmission service in the current region is evaluated according to quality data and capacity data of the current region, for example, a service module in a region on an anchor side mainly corresponds to a transcoding service, and a service module in a region on a viewer side mainly corresponds to a streaming service. And after the service module corresponding to the current region is obtained, evaluating the current region, evaluating the quality data and the capacity data of the pull flow service in the current region based on a second weight value corresponding to bandwidth resources in the current region when the service module in the current region is the pull flow service, and evaluating the quality data and the capacity data of the transcoding service in the current region based on a second weight value corresponding to the performance of a CPU in the current region when the service module in the current region is the transcoding service.
Step S104: and in response to the quality evaluation value/capacity evaluation value corresponding to any one area exceeding the corresponding elastic shrinkage threshold value, adjusting the basic resources in at least part of the areas in each area so that the quality evaluation value corresponding to each area after adjustment is smaller than the target threshold value.
Specifically, when the quality assessment value/capacity assessment value corresponding to any one area exceeds the corresponding shrinkdown threshold, it indicates that the area is an area to be adjusted, and calls basic resources from at least a part of the area that does not exceed the shrinkdown threshold to the area to be adjusted to increase the basic resources of the area to be adjusted, and further evaluates the service quality in the area to be adjusted, so that the quality assessment value of the adjusted corresponding area is smaller than the target threshold.
Optionally, the basic resource with the largest consumption proportion required by the service module corresponding to the area to be adjusted is used as the first basic resource, and the first basic resource in the area where the surplus of the first basic resource exceeds the preset value is preferentially adjusted to the area to be adjusted.
Optionally, if the quality assessment value is not smaller than the target threshold after the last adjustment, the basic resources of at least part of the regions in each region are adjusted again until the adjusted quality assessment value of each region is smaller than the target threshold.
According to the scheme, after the service corresponding to each region, the quality data and the capacity data corresponding to each region, each service module and the corresponding first weight value thereof, the basic resource of the equipment in each region and the corresponding second weight value thereof are obtained, each region is evaluated to obtain the quality evaluation value and the capacity evaluation value of each region, and when the quality evaluation value/capacity evaluation value in any region exceeds the corresponding elastic shrinkage threshold value, the basic resource in at least part of regions is adjusted to enable the quality evaluation value in each region to meet the preset condition. Therefore, the quality and the capacity in each area can be evaluated and fed back in real time, and the basic resources are adjusted in time after the elastic shrinkage threshold value is exceeded, so that the quality of the service in each area is improved, and the stability and the quality of the service in the area are improved.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a resource adjustment method according to another embodiment of the present application. Specifically, the method may include the steps of:
step S201: and acquiring each service module corresponding to the service and a first weight value corresponding to the service module, and acquiring basic resources of equipment in each area and a second weight value corresponding to the basic resources.
Specifically, the service is cooperatively completed by a plurality of corresponding service modules, the device can provide a plurality of basic resources, and the proportion of the basic resources required to be consumed by different service modules is different. The first weight value corresponding to the service module is the proportion of basic resources required to be consumed by the service module, and the second weight value corresponding to the basic resources of the equipment in the region is the proportion of the basic resources which can be provided by the equipment in the region.
Further, the devices in the area may be the same service provider, or devices provided by different service providers, and the bearing capacities of the corresponding basic resources of the devices of different models of the same service provider are not the same, so that the corresponding second weight values are set for the basic resources in each area based on the attributes of the hardware devices in each area, so that the bearing capacities of the basic resources in the area are clearly distinguished, and the bearing capacities of the basic resources in the area are determined by the second weight values of the basic resources in the area.
Further, a service generally includes multiple processes, each process is completed by a different service module, and the basic resources consumed by the different service modules are different, so that the service is split into multiple service modules, and the proportion of the basic resources consumed by the service modules is used as a first weight value, so that the basic resources consumed by each service module are clearly distinguished, and further, the consumption of the basic resources corresponding to the service modules is determined by the first weight value of each service module.
Step S202: and acquiring source data, and extracting services corresponding to each region, quality data corresponding to each region and capacity data from the source data.
Specifically, the source data includes data in each region, and the data in each region is provided with a region identifier. When the data in each region are uploaded and summarized, the data in each region are provided with region identifiers for distinguishing the data corresponding to different regions, and then the data in each region are prevented from being mixed.
Further, extracting the service corresponding to each region, the quality data corresponding to each region, and the capacity data from the source data includes: classifying data in the source data according to the region identification to obtain data corresponding to each region; and extracting the service corresponding to each region, the quality data corresponding to each region and the capacity data from the data corresponding to each region.
Specifically, data in the source data is extracted according to the region identifier, so that data corresponding to each region is obtained. And the data in each area are collected into source data, and the source data are extracted from the source data, so that the real-time data in each area can be managed and compared uniformly.
Furthermore, the current service in each area and the quality data and the capacity data in each area are obtained from the data corresponding to each area. The quality data can be uploaded after being fed back by the user side, and the capacity data can be uploaded after being counted by each area.
Optionally, after the quality data and the capacity data of each region are obtained, the quality data and the capacity data in each region are cleaned to remove abnormal data, and the influence of the abnormal data on the estimated result is reduced.
Step S203: and acquiring the proportion of the service module corresponding to the service corresponding to the region based on the service corresponding to the region, the quality data corresponding to the region and the capacity data.
Specifically, a service module corresponding to the service is determined based on the service in the area, and the ratio of the service module corresponding to the service in the area is evaluated in combination with the quality data and the capacity data to obtain the ratio of the service module corresponding to the service in the area.
In a specific application scenario, when a streaming media transmission service is being performed in a region, acquiring that the service in the region is the streaming media transmission service, and further acquiring a plurality of service modules corresponding to the streaming media transmission service, and combining quality data and statistical capacity data fed back by a user, for example, mainly when a viewer feeds back a live broadcast card pause and the capacity data is greater than a preset value, it indicates that more bandwidth basic resources are required to be consumed when the current region is mainly a streaming service module, and for example, when the main broadcast feeds back a transcoding slowly and the capacity data is less than the preset value, it indicates that more CPU performance basic resources are required to be consumed when the current region is mainly a transcoding service module, and on the basis of acquiring the service in the current region and the service modules corresponding thereto, the respective corresponding proportions of the plurality of service modules corresponding to the service are acquired in combination with the quality data and the capacity data, thereby improving the accuracy and effectiveness of adjustment when resources required by the service modules are adjusted.
Step S204: and evaluating each region based on the proportion of a service module corresponding to the service corresponding to the region, a first weight value corresponding to the service module and a second weight value corresponding to the basic resource of the equipment in the region to obtain a quality evaluation value and a capacity evaluation value of each region.
Specifically, after the proportion of the service module corresponding to the service corresponding to the area is obtained, each area is evaluated by combining a first weight value corresponding to the service module and a second weight value corresponding to the basic resource of the equipment in the area.
In an application mode, because the first weight values of basic resources to be consumed corresponding to different service modules are different, and the second weight values of the basic resources provided by the equipment in the area are also different, after the proportion of the service modules corresponding to the services in the area is obtained, based on the first weight values of the service modules and the second weight values corresponding to the basic resources of the equipment in the area, whether each service module in the current area can be effectively executed or not is evaluated, and the amount of data generated by executing each service module is evaluated, so that the quality data and the capacity data of the corresponding area are obtained.
It is understood that by setting the first weight value and the second weight value, the accuracy of the quality evaluation value and the capacity evaluation value can be improved when evaluating each area.
It should be noted that, providing a basis for adjusting whether the basic resource is performed in the area further includes: and respectively setting an upper limit value and a lower limit value of the elastic shrinkage threshold value of the capacity evaluation value for each area and respectively setting an upper limit value of the elastic shrinkage threshold value of the quality evaluation value for each area based on the second weight value corresponding to the basic resource of the equipment in each area.
Specifically, since hardware in each area is different, the limit values of a plurality of types of basic resources that can be provided in each area are calculated based on the second weight values corresponding to the basic resources of the devices in each area, and the upper limit value and the lower limit value of the shrinkage threshold of the content amount evaluation data in each area are set based on the limit values of the basic resources in each area. The upper limit value is used as a critical value which needs to be expanded and adjusted in the region, and the lower limit value is used as a critical value which can be preferentially adjusted to other regions by the basic resources in the region, so that the basic resources in the region can be preferentially adjusted based on the capacity evaluation data, and the rationality of basic resource adjustment among the regions is improved.
Furthermore, an upper limit value of the quality assessment value is preset for each area, wherein the upper limit value of the quality assessment value is used as a critical value for judging poor service quality in the area, so that an adjustment basis is provided when basic resources in the area are adjusted based on the quality assessment value.
Step S205: and in response to the quality evaluation value/capacity evaluation value corresponding to any one area exceeding the corresponding elastic shrinkage threshold value, adjusting the basic resources in at least part of the areas in each area, so that the quality evaluation value corresponding to each area after adjustment is smaller than the target threshold value.
Optionally, a basic resource to be adjusted to the area to be adjusted is estimated based on the capacity estimation value, when the capacity estimation value exceeds an upper limit value of a threshold for shrinking of the capacity estimation value, a difference between the capacity estimation value and the upper limit value of the threshold for shrinking of the capacity estimation value is obtained, and then the basic resource to be adjusted to the area to be adjusted is estimated based on the difference.
In an application manner, please refer to fig. 3, where fig. 3 is a flowchart illustrating an embodiment corresponding to step S205 in fig. 2, and the method includes:
step S301: responding to the condition that the quality evaluation value/capacity evaluation value corresponding to any area exceeds the upper limit value of the corresponding elastic shrinkage threshold value.
Specifically, when the quality evaluation value corresponding to any one of the areas exceeds the upper limit value of the quality evaluation value of the current area, or the capacity evaluation value corresponding to any one of the areas exceeds the upper limit value of the capacity evaluation value of the current area, the flow proceeds to step S302.
Step S302: and judging whether the current area needing to be adjusted comprises unused basic resources or not.
Specifically, it is determined whether a situation that a part of basic resources are not utilized and a part of basic resources are overloaded exists in the area to be adjusted, if so, the step S303 is performed, otherwise, the step S304 is performed.
Step S303: the unused base resources within the current region are invoked.
Specifically, the basic resources that are not effectively used in the current region are preferentially used, so as to improve the quality of the service in the current region, reduce the movement of the basic resources across the regions, improve the adjustment efficiency, and reduce the adjustment cost.
Step S304: and judging whether the current area comprises a low-load service module with low utilization rate of the basic resource.
Specifically, it is determined whether the current area includes a service module with a low utilization rate of the basic resource, and because different service modules consume the basic resource differently, it is searched whether the current area has a service module that occupies the basic resource but has a low utilization rate, if so, step S305 is performed, otherwise, step S306 is performed.
Step S305: and shielding at least part of the underloaded service modules in the current region to call the basic resources corresponding to at least part of the underloaded service modules in the region.
Specifically, at least part of the underloaded service modules in the current region are shielded, so that the basic resources occupied by the underloaded service modules are preferentially used by the service modules with higher consumption of the corresponding basic resources, the quality of the service in the current region is improved, and meanwhile, part of the basic resources are reserved for the underloaded service modules to enable the whole service to run completely.
Step S306: at least part of the underlying resource is invoked from a region outside the current region.
Specifically, when the corresponding quality evaluation value/capacity evaluation value in any one area exceeds the corresponding threshold value of the bounce, the area is indicated as the area to be adjusted. And calling the basic resources to the area to be adjusted from other areas except the current area which never exceeds the elastic shrinkage threshold value so as to increase the basic resources of the area to be adjusted and further evaluate the service quality in the area to be adjusted, so that the quality evaluation value of the adjusted corresponding area is smaller than the target threshold value.
In an application mode, at least part of the basic resources are called from at least one area of which the capacity evaluation value is lower than the lower limit value of the corresponding elastic shrinkage threshold value. When the capacity evaluation value is lower than the lower limit value of the shrinking threshold, the utilization rate of the basic resources in the area is low, and then the basic resources in the area of which the capacity evaluation value is lower than the corresponding lower limit value of the shrinking threshold are preferentially called to the area to be adjusted, so that the quality of the service in the area to be adjusted is improved, and the influence on the quality of the service in the area for providing the basic resources is reduced.
In another application, at least part of the base resource is called from at least one region where the capacity estimate does not exceed the upper limit value of the corresponding shrinkage threshold. If the content evaluation value of the current area does not exceed the upper limit value of the shrinking threshold value of the capacity evaluation value of the current area, part of basic resources are called from the current area to the area to be adjusted so as to improve the quality of the service in the area to be adjusted, and if the area capable of providing the basic resources in each area is larger than 1, the basic resources are adjusted from a plurality of areas to the area to be adjusted so as to reduce the influence on the quality of the service of a single area.
In still another application, at least part of the basic resource is called from at least one region where the quality assessment value does not exceed the upper limit value of the corresponding shrinkage threshold. If the quality evaluation value in the current area does not exceed the upper limit value of the shrinking threshold value of the quality evaluation value of the current area, calling part of basic resources from the current area to the area to be adjusted so as to improve the quality of the service in the area to be adjusted, and if the area capable of providing the basic resources in each area is greater than 1, adjusting the basic resources from a plurality of areas to the area to be adjusted so as to reduce the influence on the quality of the service of a single area.
Further, after the adjustment of the basic resources is completed, the deployment of the basic resources in each area is issued, a verification test is carried out, and after the test is successful, the services in each area are deployed and executed according to the adjusted basic resources, so that the quality evaluation values of the services in each area are smaller than a target threshold value after the adjustment.
In this embodiment, by setting a first weight value of each service module and a second weight value of a basic resource of a device in a region, the first weight value corresponding to the service module is a proportion of the basic resource that needs to be consumed by the service module, and the second weight value corresponding to the basic resource of the device in the region is a proportion of the basic resource that can be provided by the device in the region. When each area is evaluated, the accuracy of the quality evaluation value and the accuracy of the capacity evaluation value can be improved, whether basic resource adjustment is needed or not is judged based on the quality evaluation value and the capacity evaluation value, when adjustment is needed, adjustment efficiency is improved preferentially by the adjustment in the area, and when no adjustable basic resource exists in the area, the basic resource is adjusted from other areas, so that the quality evaluation value of the service in each area is smaller than a preset target threshold, dynamic adjustment of the basic resource in each area is realized, and the quality of the service in each area is improved.
Referring to fig. 4, fig. 4 is a schematic diagram of a frame of an embodiment of a resource adjusting apparatus according to the present application. The resource adjusting apparatus 40 includes: a statistics module 400, an extraction module 402, a prediction module 404, and an adjustment module 406. The statistical module 400 is configured to obtain each service module corresponding to a service and a first weight value corresponding to the service module, and obtain a basic resource of a device in each area and a second weight value corresponding to the basic resource. The extracting module 402 is configured to obtain source data, and extract services corresponding to each region, quality data corresponding to each region, and capacity data from the source data. The pre-estimation module 404 is configured to evaluate each region based on a service corresponding to each region, quality data and capacity data corresponding to each region, a first weight value corresponding to each service module, and a basic resource of a device in each region and a second weight value corresponding to each service module, so as to obtain a quality evaluation value and a capacity evaluation value of each region. The adjusting module 406 is configured to adjust the base resource in at least a part of the regions in response to the quality assessment/capacity assessment value corresponding to any region exceeding the corresponding scaling threshold, so that the quality assessment value corresponding to each region after adjustment is smaller than the target threshold.
In the above scheme, after the statistics module 400 and the extraction module 402 obtain the services corresponding to each region, the quality data and the capacity data corresponding to each region, the first weight values corresponding to each service module and each service module, the basic resources of the devices in each region, and the second weight values corresponding to each service module and each device in each region, the estimation module 404 evaluates each region to obtain the quality evaluation value and the capacity evaluation value of each region, and when the quality evaluation value/capacity evaluation value in any region exceeds the corresponding scaling threshold, the adjustment module 406 adjusts at least some of the basic resources in the region so that the quality evaluation value in each region satisfies the preset condition. Therefore, the quality and the capacity in each area can be evaluated and fed back in real time, and the basic resources are adjusted in time after the elastic shrinkage threshold value is exceeded, so that the quality of the service in each area is improved, and the stability and the quality of the service in the area are improved.
In some embodiments, the source data includes data in each region, and the data in each region is provided with a region identifier. The extraction module 402 may also be configured to: and classifying the data in the source data according to the region identification to obtain the data corresponding to each region. The extraction module 402 may also be configured to: and extracting the service corresponding to each region, the quality data corresponding to each region and the capacity data from the data corresponding to each region.
In some embodiments, the service is cooperatively completed by a plurality of corresponding service modules, the device can provide a plurality of basic resources, and the proportion of the basic resources required to be consumed by different service modules is different. The first weight value corresponding to the service module is the proportion of basic resources required to be consumed by the service module, and the second weight value corresponding to the basic resources of the equipment in the region is the proportion of the basic resources which can be provided by the equipment in the region.
In some embodiments, predictor module 404 may also be configured to: and acquiring the proportion of the service module corresponding to the service corresponding to the region based on the service corresponding to the region, the quality data corresponding to the region and the capacity data. The estimation module 404 may also be configured to: and evaluating each area based on the proportion of the service module corresponding to the service corresponding to the area, the first weight value corresponding to the service module and the second weight value corresponding to the basic resource of the equipment in the area respectively to obtain the quality evaluation value and the capacity evaluation value of each area.
In some embodiments, the statistics module 400 may also be configured to: and respectively setting an upper limit value and a lower limit value of the elastic shrinkage threshold value of the capacity evaluation value for each area and respectively setting an upper limit value of the elastic shrinkage threshold value of the quality evaluation value for each area based on the second weight value corresponding to the basic resource of the equipment in each area.
In some embodiments, the adjustment module 406 may also be configured to: responding to the fact that the quality evaluation value/capacity evaluation value corresponding to any one area exceeds the upper limit value of the corresponding elastic shrinkage threshold value, and judging whether unused basic resources are included in the current area needing to be adjusted or not; if yes, calling unused basic resources in the current region; otherwise, judging whether the current region comprises a low-load service module with low utilization rate of basic resources; if yes, shielding at least part of low-load service modules in the current region to call basic resources corresponding to at least part of low-load service modules in the region; otherwise, at least part of the basic resources are called from the region outside the current region.
In some embodiments, the adjustment module 406 may also be configured to: calling at least part of basic resources from at least one area of which the capacity evaluation value is lower than the lower limit value of the corresponding elastic shrinkage threshold value; or calling at least part of basic resources from at least one area of which the capacity evaluation value does not exceed the upper limit value of the corresponding elastic shrinkage threshold value; or, at least part of the basic resource is called from at least one region where the quality assessment value does not exceed the upper limit value of the corresponding shrinkage threshold value.
Referring to fig. 5, fig. 5 is a schematic diagram of a frame of an embodiment of an electronic device according to the present application. The electronic device 50 comprises a memory 501 and a processor 502 coupled to each other, the memory 501 stores program instructions, and the processor 502 is configured to execute the program instructions stored in the memory 501 to implement the steps of any of the above embodiments of the resource adjusting method.
In particular, the processor 502 is configured to control itself and the memory 501 to implement the steps of any of the above embodiments of the resource adjustment method. Processor 502 may also be referred to as a CPU (Central Processing Unit). The processor 502 may be an integrated circuit chip having signal processing capabilities. The Processor 502 may also be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. Additionally, the processor 502 may be implemented collectively by an integrated circuit chip.
In the above solution, the processor 502 evaluates each region by obtaining the judged reference parameter, and continuously adjusts the basic resource in each region based on the quality evaluation value and the capacity evaluation value, the quality evaluation value/the capacity evaluation value.
Referring to fig. 6, fig. 6 is a block diagram illustrating an embodiment of a computer readable storage medium according to the present application. The computer readable storage medium 60 stores program instructions 600 capable of being executed by the processor, and the program instructions 600 are used for implementing the steps of any of the above embodiments of the resource adjusting method.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a module or a unit is merely one type of logical division, and an actual implementation may have another division, for example, a unit or a component may be combined or integrated with another system, or some features may be omitted, or not implemented. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some interfaces, indirect coupling or communication connection between devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on network elements. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

Claims (9)

1. A method for resource adjustment, comprising:
acquiring each service module corresponding to a service and a corresponding first weight value thereof, and acquiring basic resources of equipment in each area and a corresponding second weight value thereof;
acquiring source data, and extracting services corresponding to each region, quality data and capacity data corresponding to each region from the source data;
evaluating each region based on the service corresponding to each region, the quality data and the capacity data corresponding to each region, the service modules and the corresponding first weight values thereof, and the basic resources of the equipment in each region and the corresponding second weight values thereof, so as to obtain a quality evaluation value and a capacity evaluation value of each region;
in response to the fact that the quality assessment value/capacity assessment value corresponding to any one of the areas exceeds the corresponding elastic shrinkage threshold value, adjusting at least part of the basic resources in each area to enable the quality assessment value corresponding to each area after adjustment to be smaller than a target threshold value;
the service is completed by the cooperation of a plurality of corresponding service modules, the equipment can provide a plurality of basic resources, and the basic resources required to be consumed by different service modules are different in proportion;
the first weight value corresponding to the service module is the proportion of basic resources required to be consumed by the service module, and the second weight value corresponding to the basic resources of the equipment in the area is the proportion of the basic resources which can be provided by the equipment in the area.
2. The resource adjustment method according to claim 1,
the source data comprises data in each region, and the data in each region is provided with a region identifier;
the extracting the service corresponding to each region, the quality data corresponding to each region, and the capacity data from the source data includes:
classifying the data in the source data according to the area identification to obtain the data corresponding to each area;
and extracting the service corresponding to each region, the quality data and the capacity data corresponding to each region from the data corresponding to each region.
3. The method according to claim 1, wherein the evaluating each region based on the service corresponding to each region, the quality data and the capacity data corresponding to each region, the service modules and the corresponding first weight values thereof, and the basic resources of the devices in each region and the corresponding second weight values thereof to obtain the quality evaluation value and the capacity evaluation value of each region comprises:
acquiring the proportion of a service module corresponding to the service corresponding to the region based on the service corresponding to the region, the quality data corresponding to the region and the capacity data;
and evaluating each area based on the proportion of the service module corresponding to the service corresponding to the area, the first weight value corresponding to the service module and the second weight value corresponding to the basic resource of the equipment in the area respectively to obtain the quality evaluation value and the capacity evaluation value of each area.
4. The resource adjustment method according to claim 1, further comprising:
and respectively setting an upper limit value and a lower limit value of a shrinking threshold value of the capacity evaluation value for each area and setting an upper limit value of a shrinking threshold value of the quality evaluation value for each area based on a second weighted value corresponding to a basic resource of equipment in each area.
5. The method according to claim 4, wherein adjusting the basic resource in at least some of the regions in each of the regions in response to the quality/capacity assessment value corresponding to any of the regions exceeding the corresponding threshold value comprises:
responding to the fact that the quality evaluation value/capacity evaluation value corresponding to any area exceeds the upper limit value of the corresponding elastic shrinkage threshold value, and judging whether unused basic resources are included in the area needing to be adjusted currently;
if yes, calling the unused basic resources in the current region;
otherwise, judging whether the current region comprises a low-load service module with low utilization rate of the basic resource;
if yes, shielding at least part of the low-load service modules in the current region to call the basic resources corresponding to at least part of the low-load service modules in the region;
otherwise, calling at least part of the basic resources from the current region outside the region.
6. The resource adjustment method according to claim 5, wherein said invoking at least part of the base resource from a region outside the current region comprises:
calling at least part of the basic resources from at least one of the areas where the capacity assessment value is lower than a lower limit value of a corresponding elastic shrinkage threshold; alternatively, the first and second electrodes may be,
calling at least part of the basic resource from at least one of the areas where the capacity assessment value does not exceed an upper limit value of a corresponding shrinkage threshold value; alternatively, the first and second electrodes may be,
calling at least part of the base resource from at least one of the areas where the quality assessment value does not exceed the upper limit value of the corresponding shrinkage threshold.
7. A resource adjustment apparatus, comprising:
the statistical module is used for acquiring each service module corresponding to the service and a first weight value corresponding to the service module, and basic resources of equipment in each area and a second weight value corresponding to the basic resources;
the extraction module is used for acquiring source data and extracting services corresponding to each region, quality data and capacity data corresponding to each region from the source data;
the pre-estimation module is used for evaluating each area based on the service corresponding to each area, the quality data and the capacity data corresponding to each area, the first weight value corresponding to each service module, the basic resource of the equipment in each area and the second weight value corresponding to each service module, so as to obtain a quality evaluation value and a capacity evaluation value of each area;
an adjusting module, configured to adjust the basic resource in at least part of the regions in each of the regions in response to a quality assessment value/capacity assessment value corresponding to any one of the regions exceeding a corresponding scaling threshold, so that the quality assessment value corresponding to each region after adjustment is smaller than a target threshold;
the service is completed by the cooperation of a plurality of corresponding service modules, the equipment can provide a plurality of basic resources, and the basic resources required to be consumed by different service modules are different in proportion;
the first weight value corresponding to the service module is the proportion of basic resources required to be consumed by the service module, and the second weight value corresponding to the basic resources of the equipment in the area is the proportion of the basic resources which can be provided by the equipment in the area.
8. An electronic device, comprising: a memory and a processor coupled to each other, wherein the memory stores program instructions that are called by the processor to perform the resource adjustment method of any one of claims 1-6.
9. A computer-readable storage medium having stored thereon program instructions, which when executed by a processor, implement the resource adjustment method of any one of claims 1-6.
CN202110236745.8A 2021-03-03 2021-03-03 Resource adjusting method and device, electronic equipment and computer readable storage medium Active CN113032142B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110236745.8A CN113032142B (en) 2021-03-03 2021-03-03 Resource adjusting method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110236745.8A CN113032142B (en) 2021-03-03 2021-03-03 Resource adjusting method and device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113032142A CN113032142A (en) 2021-06-25
CN113032142B true CN113032142B (en) 2022-12-13

Family

ID=76466125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110236745.8A Active CN113032142B (en) 2021-03-03 2021-03-03 Resource adjusting method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113032142B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115278281A (en) * 2022-07-20 2022-11-01 上海哔哩哔哩科技有限公司 Live broadcast quality guarantee method and device, computing equipment and storage medium
CN115174411B (en) * 2022-07-29 2024-05-07 北京达佳互联信息技术有限公司 Cross-region bandwidth determination method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109005056A (en) * 2018-07-16 2018-12-14 网宿科技股份有限公司 Storage capacity evaluation method and apparatus based on CDN application
CN109167812A (en) * 2018-08-02 2019-01-08 网宿科技股份有限公司 Evaluation services quality, the method for determining adjustable strategies, server and storage medium
CN109766182A (en) * 2018-12-18 2019-05-17 平安科技(深圳)有限公司 The scalable appearance method, apparatus of system resource dynamic, computer equipment and storage medium
CN109862590A (en) * 2019-03-26 2019-06-07 中国联合网络通信集团有限公司 Network capacity appraisal procedure and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10423456B2 (en) * 2014-07-31 2019-09-24 Hewlett Packard Enterprise Development Lp Dynamic adjustment of resource utilization thresholds
CN105471649A (en) * 2015-12-03 2016-04-06 深圳市金立通信设备有限公司 Virtual network performance monitoring system and method, and related equipment
US10563497B2 (en) * 2016-02-18 2020-02-18 Halliburton Energy Services Method and system for smart resource allocation
US11121957B2 (en) * 2018-12-28 2021-09-14 Intel Corporation Dynamic quality of service in edge cloud architectures

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109005056A (en) * 2018-07-16 2018-12-14 网宿科技股份有限公司 Storage capacity evaluation method and apparatus based on CDN application
CN109167812A (en) * 2018-08-02 2019-01-08 网宿科技股份有限公司 Evaluation services quality, the method for determining adjustable strategies, server and storage medium
CN109766182A (en) * 2018-12-18 2019-05-17 平安科技(深圳)有限公司 The scalable appearance method, apparatus of system resource dynamic, computer equipment and storage medium
CN109862590A (en) * 2019-03-26 2019-06-07 中国联合网络通信集团有限公司 Network capacity appraisal procedure and device

Also Published As

Publication number Publication date
CN113032142A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
CN113032142B (en) Resource adjusting method and device, electronic equipment and computer readable storage medium
CN111614570B (en) Flow control system and method for service grid
CN110392306B (en) Data processing method and equipment
CN109062715B (en) Method and device for determining memory clock frequency and terminal
WO2019062405A1 (en) Application program processing method and apparatus, storage medium, and electronic device
US20230176929A1 (en) Resource allocation method and apparatus based on edge computing
CN112868265A (en) Network resource management method, management device, electronic device and storage medium
CN104936188A (en) Method of determining wireless network resource utilization rate and apparatus thereof
CN114650437A (en) Video publishing method, device, equipment and storage medium
EP3691261A1 (en) Method and device for locating video service fault, and storage medium
CN111385815A (en) Method, device, equipment and medium for optimizing cell network resources
CN112001563A (en) Method and device for managing phone bill amount, electronic equipment and storage medium
CN116546028A (en) Service request processing method and device, storage medium and electronic equipment
CN111278039A (en) User perception depression recognition method, device, equipment and medium
CN113079062B (en) Resource adjusting method and device, computer equipment and storage medium
CN110138985B (en) Dynamic client allocation method and device, electronic equipment and storage medium
CN114356712A (en) Data processing method, device, equipment, readable storage medium and program product
CN114116231A (en) Data loading method and device, computer equipment and storage medium
CN110795251A (en) Method and equipment for determining terminal operation parameters
CN112073327A (en) Anti-congestion software distribution method, device and storage medium
CN108279973B (en) Information statistical method and device and electronic equipment
Unuvar et al. Configuring cloud admission policies under dynamic demand
CN114374881B (en) Method and device for distributing user traffic, electronic equipment and storage medium
CN117349037B (en) Method, device, computer equipment and storage medium for eliminating interference in off-line application
CN113595921B (en) Data stream processing method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant