CN111858015B - Method, device and gateway for configuring running resources of application program - Google Patents

Method, device and gateway for configuring running resources of application program Download PDF

Info

Publication number
CN111858015B
CN111858015B CN201910339073.6A CN201910339073A CN111858015B CN 111858015 B CN111858015 B CN 111858015B CN 201910339073 A CN201910339073 A CN 201910339073A CN 111858015 B CN111858015 B CN 111858015B
Authority
CN
China
Prior art keywords
resources
application program
resource
access
running
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
CN201910339073.6A
Other languages
Chinese (zh)
Other versions
CN111858015A (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.)
China Mobile Communications Group Co Ltd
China Mobile Group Hebei Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Hebei 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 China Mobile Communications Group Co Ltd, China Mobile Group Hebei Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201910339073.6A priority Critical patent/CN111858015B/en
Publication of CN111858015A publication Critical patent/CN111858015A/en
Application granted granted Critical
Publication of CN111858015B publication Critical patent/CN111858015B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5011Pool
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention relates to the technical field of Internet, and discloses a method, a device and a gateway for configuring operation resources of an application program, wherein the method comprises the following steps: acquiring access variation of accessing the application program within a preset duration; according to a preset resource matching model, calculating resources to be configured required for meeting the access variable quantity; and adjusting the running resources of the application program according to the resources to be configured. By the method, the embodiment of the invention realizes the dynamic adjustment of the running resources of the application program according to the access variation of the application program, and well avoids the situation of running resource configuration delay or running resource waste caused by excessive running resources configured for the application program.

Description

Method, device and gateway for configuring running resources of application program
Technical Field
The embodiment of the invention relates to the technical field of Internet, in particular to a method, a device and a gateway for configuring operation resources of an application program.
Background
The Web application is a program which is deployed at a server end and can be accessed through the Web, and is more popular with users because the Web application can be accessed through a browser without locally installing software by the users.
In carrying out embodiments of the present invention, the inventors found that: currently, maintenance for Web applications is performed manually by development and maintenance personnel, for example: the development and maintenance personnel judge the operation resources required by the Web application program according to own experience, then the corresponding operation resources are configured for the Web application program, when the operation resources occupied by the Web application program reach the alarm threshold value, the development and maintenance personnel analyze according to the current situation and reconfigure new operation resources for the Web application program, but the maintenance mode is easy to cause the delay of the operation resource configuration along with the increase of the demand of people on timely response of the Web application program, and the mode of manually judging and manually distributing the operation resources affects the user experience.
Disclosure of Invention
In view of the foregoing, embodiments of the present invention provide a method of configuring an operating resource of an application, which overcomes or at least partially solves the foregoing problems.
According to an aspect of an embodiment of the present invention, there is provided a method of configuring a running resource of an application, the method including: acquiring access variation of accessing the application program within a preset duration; according to a preset resource matching model, calculating resources to be configured required for meeting the access variable quantity; and adjusting the running resources of the application program according to the resources to be configured.
In an optional manner, when the access variable amount is an access increment amount, the adjusting, according to the resource to be configured, the running resource of the application program further includes: extracting the resources to be configured from the configurable resources in the resource pool; and configuring the extracted resources to be configured to the application program.
In an alternative manner, before the extracting the resource to be configured from the allocable resources of the resource pool, the method further comprises: judging whether the configurable resources of the resource pool are smaller than the resources to be configured or not; if yes, outputting alarm information of insufficient configurable resources of the resource pool; and if the resource is greater than or equal to the resource, executing the step of extracting the resource to be configured from the configurable resources in the resource pool.
In an alternative manner, before the step of extracting the resources to be configured from the configurable resources in the resource pool, the method further comprises: acquiring the total access amount of the current access to the application program; judging whether the total access amount is larger than or equal to a preset minimum access amount; and if the resource is greater than or equal to the resource, executing the step of extracting the resource to be configured from the configurable resources in the resource pool.
In an optional manner, when the access variation is the access reduction amount, the adjusting, according to the resource to be configured, the running resource of the application program further includes: and recovering the resources to be configured from the operation resources occupied by the application program.
In an alternative manner, the method further comprises: acquiring operation resources occupied by the application program; calculating the difference between the running resource and the resource to be configured to obtain a residual resource; judging whether the residual resources are smaller than a preset minimum resource or not; if yes, adjusting the operation resources occupied by the application program to the preset minimum resources; and if not, executing the recovery of the resources to be configured from the operation resources occupied by the application program.
According to another aspect of the embodiment of the present invention, there is provided an apparatus for configuring an operating resource of an application program, including: the acquisition module is used for acquiring the access variation of the application program within a preset duration; the calculation module is used for calculating resources to be configured required by meeting the access variation according to a preset resource matching model; and the adjusting module is used for adjusting the running resources of the application program according to the resources to be configured.
According to another aspect of an embodiment of the present invention, there is provided a gateway including: the communication module is used for communicating with the application program and the user side; the processor is used for acquiring the access variation of the user side to the application program within a preset time period, and calculating resources to be configured required for meeting the access variation according to a preset resource matching model; and adjusting the running resources of the application program according to the resources to be configured.
In an optional manner, when the access variable amount is an access increment amount, the processor adjusts the running resource of the application program according to the resource to be configured, and further includes: extracting the resources to be configured from the configurable resources in the resource pool; and configuring the extracted resources to be configured to the application program.
In an alternative manner, before the processor extracts the resources to be configured from the allocable resources in the resource pool, the method further includes: judging whether the configurable resources of the resource pool are smaller than the resources to be configured or not; if yes, outputting alarm information of insufficient configurable resources of the resource pool; and if the resource is greater than or equal to the resource, executing the step of extracting the resource to be configured from the configurable resources in the resource pool.
In an alternative manner, before the step of extracting the resources to be configured from the configurable resources in the resource pool, the processor further includes: acquiring the total access amount of the current access to the application program; judging whether the total access amount is larger than a preset minimum access amount or not; and if the resource is larger than the preset resource, executing the step of extracting the resource to be configured from the configurable resources in the resource pool.
In an optional manner, when the access variation is the access reduction amount, the processor adjusts the running resource of the application program according to the resource to be configured, and further includes: and recovering the resources to be configured from the operation resources occupied by the application program.
In an alternative, the processor is further configured to: acquiring operation resources occupied by the application program; calculating the difference between the running resource and the resource to be configured to obtain a residual resource; judging whether the residual resources are smaller than a preset minimum resource or not; if yes, adjusting the operation resources occupied by the application program to the preset minimum resources; and if not, executing the recovery of the resources to be configured from the operation resources occupied by the application program.
According to still another aspect of an embodiment of the present invention, there is provided a gateway including: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operations of the method.
According to yet another aspect of an embodiment of the present invention, there is provided a computer storage medium having stored therein at least one executable instruction for causing a processor to perform the operations of the above method.
In the embodiment of the invention, the running resources of the application program are dynamically configured by adjusting the running resources of the application program according to the access variation of the access application program, so that the running resources required by the application program are ensured to be configured in time, the situation that the application program is blocked and the user experience is influenced is avoided, and the situation that the running resources are wasted due to excessive allocation of the running resources to the application program is avoided.
The foregoing description is only an overview of the technical solutions of the embodiments of the present invention, and may be implemented according to the content of the specification, so that the technical means of the embodiments of the present invention can be more clearly understood, and the following specific embodiments of the present invention are given for clarity and understanding.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 illustrates a schematic diagram of an application environment of the method of configuring the operating resources of an application of the present invention;
FIG. 2 illustrates a flow chart of an embodiment of a method of the present invention for configuring a running resource of an application;
FIG. 3 is a flow chart illustrating one manner in which the operating resources of an application may be adjusted in an embodiment of a method of configuring the operating resources of an application in accordance with the present invention;
FIG. 4 is a flow chart illustrating another manner in which the operating resources of an application may be adjusted in an embodiment of a method of configuring the operating resources of an application in accordance with the present invention;
FIG. 5 is a schematic diagram illustrating an embodiment of an apparatus for configuring the operating resources of an application of the present invention;
FIG. 6 shows a schematic diagram of an embodiment of a gateway of the present invention;
fig. 7 shows a schematic structural diagram of another embodiment of the gateway of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Referring to fig. 1, fig. 1 is a schematic diagram of an application environment of a method for configuring an operation resource of an application program according to the present invention, and an application environment 10 includes a client 11, a gateway 12, and a server 13. The application runs on the server 13, the server 13 being provided with a resource pool 131, the resource pool 131 being used for allocating running resources to the application running on the server 13, for example: memory resources, CPU (Central ProcessingUnit ) resources, storage resources, network bandwidth resources, storage resources, and the like. The server 13 may be a distributed cluster server or an independent server.
The user terminal 11 is a terminal device for a user to access the application program, for example: personal computers, smart phones, smart watches, etc. The client 11 and the server 13 are connected through a network, so that the client 11 can access the application program on the server 13 as long as the client 11 accesses the network, and the client 11 is not limited by the geographic location.
The gateway 12 is disposed on the network, and is used for transferring data transmitted between the server 13 and the client 11. Also, since the data interacted between the server 13 and the client 11 is transferred through the gateway 12, information such as the user amount accessing the application program on the server 13, the operation performed by the user on the application program, and the like can be analyzed according to the data of the gateway 12.
Referring to fig. 2, fig. 2 is a flowchart illustrating an embodiment of a method for configuring an operating resource of an application program according to the present invention, where the method is applied to the gateway 12. The method comprises the following steps:
step 101: acquiring access variation of accessing the application program within a preset duration;
the access variable quantity refers to the variable quantity of the connection of the user to the application program through the gateway, and when the connection of the access application program is increased, the user is increased or the operation of the user on the application program is increased, and the operation resource cost required by the application program for responding to the operation of the user is correspondingly increased. When the connection to access the application is reduced, it means that the user is reduced or the operation of the application by the user is reduced, and the running resources required by the application are reduced.
The preset duration is a preset value, and specific numerical values of the preset duration are not limited and can be set according to actual conditions, for example: 1 minute, 2 minutes, 30 seconds, etc.
Step 102: according to a preset resource matching model, calculating resources to be configured required for meeting the access variable quantity;
the preset resource matching model is preset and is used for calculating an algorithm between required operation resources according to the access amount, and in some embodiments, the preset resource matching model can be obtained by training a deep learning algorithm of a multi-level matrix based on a large amount of historical data of a gateway and historical overhead data of the operation resources of an application program on a server. The training process of the preset resource matching model can be as follows: setting an error threshold, predicting the prediction cost of the running resources of the application program according to the data of the gateway through a preset resource matching model, acquiring the actual cost of the application program from a server, and adjusting parameters in the preset resource matching model when the difference between the prediction cost and the actual cost is larger than the error threshold until the difference between the prediction cost and the actual cost is smaller than or equal to the error threshold.
For the reader to more easily understand the training process of the preset resource matching model, the following is given by way of example:
the access amount of the user is r= { R 1 ,r 2 ,r 3 ,....,r v The running resources within the resource pool include: CPU resource set C= { C 1 ,c 2 ,c 3 ,....,c p Memory resource set m= { M } 1 ,m 2 ,m 3 ,....,m t Network bandwidth resource set n= { N } 1 ,n 2 ,n 3 ,....,n z Storage resource set s= { S } 1 ,s 2 ,s 3 ,....,s u Etc., at time t1, the access amount R of the application program t1 Operating resource Q occupied by application program t1 =∑(c t1 ,m t1 ,n t1 ,s t1 ...), at time t2, the access amount R of the application program t2 Operating resource Q occupied by application program t2 =∑(c t2 ,m t2 ,n t2 ,s t2 ...), from time t1 to time t2, the access change is: r is R t2 -R t1 The running resource variation of the application program is as follows: Δq=q t2 -Q t1 And when the difference epsilon is larger than an error threshold, adjusting parameters of the preset resource matching model, and continuing training until the error epsilon is smaller than or equal to the error threshold.
It will be appreciated that: in some embodiments, after the error between the operation resource predicted by the preset resource matching model and the operation resource actually required is smaller than the error threshold, the value of the statistical error epsilon in unit time may be further calculated, that is:after obtaining the resource to be configured according to the access variation, the resource with error can be used as the running resource configured to the application program, so that the running resource configured to the application program is more accurate, for example: at a preset time period t k In, the access variation is R k The running resources that need to be added are: /> And (3) operating resources which are predicted to be increased for the preset resource matching model.
Step 103: and adjusting the running resources of the application program according to the resources to be configured.
When the access amount of the application program changes, the running resources of the application program are dynamically adjusted according to the access change amount of the access application program, so that the dynamic balance of the running resources occupied by the application program and the access amount is realized, the smooth running of the application program can be ensured, and the situation that the running resources are wasted due to the fact that the application program occupies too many running resources can be avoided.
The access variable quantity of the application program may be an access increment quantity or an access decrement quantity, and when the access variable quantity of the application program is the access increment quantity, as shown in fig. 3, the adjusting the running resource of the application program according to the resource to be configured may further include:
step 1031a: judging whether the configurable resource of the resource pool is smaller than the resource to be configured, if so, executing a step 1032a, and if so, executing a step 1034a;
step 1032a: extracting the resources to be configured from the configurable resources in the resource pool;
step 1033a: and configuring the extracted resources to be configured to the application program.
Step 1034a: and outputting the alarm information of insufficient configurable resources of the resource pool.
When the configurable resources in the resource pool are sufficient, the resources to be configured are increased from the resource pool for the application program, so that the running resources owned by the application program can meet the cost of the current access amount, and the running fluency of the application program is ensured. When the configurable resources in the resource pool are insufficient, the staff is notified through an alarm, so that the staff can timely know that the resources in the resource pool are insufficient, and the operation resources in the resource pool are timely expanded.
It will be appreciated that: in other embodiments, the total amount of the operating resources in the resource pool can be monitored in real time, and when the total amount of the operating resources is lower than the alarm threshold value, alarm information is sent out so that the staff can expand the capacity of the resource pool in time.
In some embodiments, when the application program is started, a preset minimum resource is generally configured for the application program, where the preset minimum resource not only meets the running of the application program, but also enables the application program to meet the processing requirement of the preset minimum access amount, so when the increase of the access amount of the application program is detected, the total access amount of the application program can be obtained, whether the total access amount is greater than or equal to the preset minimum access amount is determined, if so, the steps 1031-1034 are executed, otherwise, the running resource of the application program is kept unchanged.
When the access amount of the application program is reduced, the operation resources of the application program are reduced, so as to avoid the situation that the application program occupies excessive operation resources and causes the operation resource waste, step 103 may be: and when the access variation is the access reduction amount, recovering the resources to be configured from the operation resources occupied by the application program.
In some embodiments, since the preset minimum resource is configured for the application program when the application program is started to ensure the normal operation of the application program and meet the processing requirement of the preset minimum access amount, when the processing resource of the application program is reduced, to avoid that the operation resource of the application program is smaller than the preset minimum resource and affects the normal operation of the application program, as shown in fig. 4, step S103 may further include:
step 1031b: acquiring operation resources occupied by the application program;
step 1032b: calculating the difference between the running resource and the resource to be configured to obtain a residual resource;
step 1033b: judging whether the residual resources are smaller than a preset minimum resource, if yes, executing a step 1034b, otherwise executing a step 1035b;
step 1034b: adjusting the operation resources occupied by the application program to the preset minimum resources;
step 1035b: and recovering the resources to be configured from the operation resources occupied by the application program.
In the embodiment of the invention, the running resources of the application program are adjusted according to the access variation of the access application program, so that the running resources of the application program are dynamically configured according to the access variation of the application program, the sufficient running resources required by the application program are ensured, the situation that the application program is blocked is avoided, and the situation that the running resources are excessively distributed to the application program to cause waste of the running resources is avoided.
Referring to fig. 5, fig. 5 is a schematic diagram of an embodiment of an apparatus for configuring an operation resource of an application according to the present invention, where an apparatus 30 for configuring an operation resource of an application includes an obtaining module 31, a calculating module 32, and an adjusting module 33.
The obtaining module 31 is configured to obtain an access variation of accessing the application program in a preset duration. And the calculating module 32 is configured to calculate the resources to be configured required for satisfying the access variation according to a preset resource matching model. And the adjusting module 33 is configured to adjust the running resource of the application program according to the resource to be configured.
By dynamically adjusting the operation resources of the application program according to the access variation of the access application program, the dynamic balance of the operation resources occupied by the application program and the access amount is realized, so that the smooth operation of the application program can be ensured, and the operation resource waste caused by the excessive occupation of the operation resources by the application program can be avoided.
Specifically, the adjustment module 33 includes an extraction unit 331, a configuration unit 332, a first determination unit 333, and an output unit 334.
When the access variation is an access increment, the first determining unit 332 is configured to determine whether the configurable resource of the resource pool is smaller than the resource to be configured. The extracting unit 331 is configured to extract the resource to be configured from the configurable resource in the resource pool when the first judging unit judges that the configurable resource in the resource pool is greater than or equal to the resource to be configured. The configuration unit 332 is configured to configure the extracted resource to be configured to the application program. The output unit 334 is configured to output alarm information of insufficient configurable resources in the resource pool when the first judging unit judges that the configurable resources in the resource pool are smaller than the resources to be configured. When the resources of the resource pool are insufficient, the staff can be reminded of timely expanding the resource pool by outputting alarm information.
In some embodiments, the adjustment module 33 may further include a first obtaining unit 335 and a second judging unit 336. The first obtaining unit 335 is configured to obtain a total amount of access currently accessing the application program. The second determining unit 336 is configured to determine whether the total access amount is greater than a preset minimum access amount. The extracting unit 331 is specifically configured to extract the resource to be configured from the configurable resources in the resource pool when the second judging unit 336 judges that the total access amount is greater than or equal to the preset minimum access amount, and when the total access amount is less than the preset minimum access amount, keep the running resources of the application program unchanged.
Further, the adjustment module 33 further includes a second acquisition unit 337, a calculation unit 338, a third judgment unit 339, and an adjustment unit 340.
When the access variation is the access reduction amount, the second obtaining unit 337 obtains the running resource occupied by the application program. The calculating unit 338 calculates the difference between the running resource and the resource to be configured, to obtain the remaining resource. The third judging unit 339 judges whether the remaining resources are less than a preset minimum resource. The adjusting unit 340 is configured to adjust the operation resources occupied by the application program to the preset minimum resources when the third judging unit 339 judges that the remaining resources are smaller than the preset minimum resources, and recover the resources to be configured from the operation resources occupied by the application program when the third judging unit 339 judges that the remaining resources are greater than or equal to the preset minimum resources, so that the operation resources occupied by the application program reduce the resources to be configured.
In the embodiment of the invention, the adjusting module 33 adjusts the running resources of the application program according to the access variation of the access application program, thereby realizing the dynamic configuration of the running resources of the application program according to the access of the application program, ensuring the sufficient running resources required by the application program, avoiding the condition that the application program is blocked, and avoiding the condition that the running resources are wasted due to excessive allocation of the running resources to the application program.
Embodiments of the present invention provide a non-volatile computer storage medium storing at least one executable instruction that may perform the operations of the method of configuring the operating resources of an application in any of the method embodiments described above.
Embodiments of the present invention provide a computer program product comprising a computer program stored on a computer storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the operations of the method of configuring the execution resources of an application program in any of the method embodiments described above.
Fig. 6 shows a schematic structural diagram of an embodiment of the gateway according to the present invention, which is not limited to the specific implementation of the gateway.
As shown in fig. 6, the gateway may include: a processor 402, a communication interface (Communications Interface) 404, a memory 406, and a communication bus 408.
Wherein: processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408. A communication interface 404 for communicating with network elements of other devices, such as clients or other servers. The processor 402 is configured to execute the program 410, and may specifically perform relevant steps in the embodiment of the graphics rendering method for a gateway described above.
In particular, program 410 may include program code including computer-operating instructions.
The processor 402 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present invention. The gateway comprises one or more processors, which may be the same type of processor, such as one or more CPUs; but may also be different types of processors such as one or more CPUs and one or more ASICs.
Memory 406 for storing programs 410. Memory 406 may comprise high-speed RAM memory or may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
Program 410 may be specifically operable to cause processor 402 to:
acquiring access variation of accessing the application program within a preset duration;
according to a preset resource matching model, calculating resources to be configured required for meeting the access variable quantity;
and adjusting the running resources of the application program according to the resources to be configured.
In an alternative manner, when the access variation is the access increment, the program 410 causes the processor to perform an operation of adjusting the running resource of the application program according to the resource to be configured, and further includes:
extracting the resources to be configured from the configurable resources in the resource pool;
and configuring the extracted resources to be configured to the application program.
In an alternative manner, program 410 causes the processor to perform the following operations, before the extracting the resource to be configured from the allocatable resources of the resource pool:
judging whether the configurable resources of the resource pool are smaller than the resources to be configured or not;
if yes, outputting alarm information of insufficient configurable resources of the resource pool;
and if the resource is greater than or equal to the resource, executing the step of extracting the resource to be configured from the configurable resources in the resource pool.
In an alternative manner, the program 410 causes the processor to perform the following operations, before the operation of extracting the resource to be configured from the configurable resources in the resource pool:
acquiring the total access amount of the current access to the application program;
judging whether the total access amount is larger than or equal to a preset minimum access amount;
and if the resource is greater than or equal to the resource, executing the step of extracting the resource to be configured from the configurable resources in the resource pool.
In an alternative manner, when the access variation is the access reduction amount, the program 410 causes the processor to perform an operation of adjusting the running resource of the application program according to the resource to be configured, and further includes:
and recovering the resources to be configured from the operation resources occupied by the application program.
In an alternative, the program 410 causes the processor to:
acquiring operation resources occupied by the application program;
calculating the difference between the running resource and the resource to be configured to obtain a residual resource;
judging whether the residual resources are smaller than a preset minimum resource or not;
if yes, adjusting the operation resources occupied by the application program to the preset minimum resources;
and if not, executing the recovery of the resources to be configured from the operation resources occupied by the application program.
In the embodiment of the invention, the running resources of the application program are adjusted according to the access variation of the access application program, so that the running resources of the application program are dynamically configured according to the access of the application program, the sufficient running resources required by the application program are ensured, the situation that the application program is blocked is avoided, and the situation that the running resources are excessively allocated to the application program to cause waste of the running resources is avoided.
Referring to fig. 7, fig. 7 is a schematic diagram of a gateway according to another embodiment of the present invention, and gateway 50 includes a communication module 501 and a processor 502.
The communication module 501 is used for communicating with the application program and the user terminal. The processor 502 is configured to obtain an access variation of the user terminal for accessing the application program within a preset duration, and calculate a resource to be configured required for meeting the access variation according to a preset resource matching model; and adjusting the running resources of the application program according to the resources to be configured.
Specifically, when the access variable amount is an access increment amount, the processor 502 adjusts, according to the resource to be configured, a running resource of the application program, and further includes: judging whether the configurable resources of the resource pool are smaller than the resources to be configured or not; if yes, outputting alarm information of insufficient configurable resources of the resource pool; if the resource is greater than or equal to the resource, extracting the resource to be configured from the configurable resources in the resource pool; and configuring the extracted resources to be configured to the application program.
In some embodiments, before the step of extracting the resource to be configured from the configurable resources in the resource pool, the processor 502 further includes: acquiring the total access amount of the current access to the application program; judging whether the total access amount is larger than a preset minimum access amount or not; and if the resource is larger than the preset resource, executing the step of extracting the resource to be configured from the configurable resources in the resource pool.
When the access variation is the access reduction amount, the processor 502 adjusts the running resource of the application program according to the resource to be configured, and further includes: acquiring operation resources occupied by the application program; calculating the difference between the running resource and the resource to be configured to obtain a residual resource; judging whether the residual resources are smaller than a preset minimum resource or not; if yes, adjusting the operation resources occupied by the application program to the preset minimum resources; and if not, recovering the resources to be configured from the operation resources occupied by the application program.
In the embodiment of the invention, the running resources of the application program are adjusted according to the access variation of the access application program, so that the running resources of the application program are dynamically configured according to the access of the application program, the sufficient running resources required by the application program are ensured, the situation that the application program is blocked is avoided, and the situation that the running resources are excessively allocated to the application program to cause waste of the running resources is avoided.
The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with the teachings herein. The required structure for a construction of such a system is apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It will be appreciated that the teachings of the present invention described herein may be implemented in a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the present invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the above description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specifically stated.

Claims (11)

1. A method for configuring an operating resource of an application program, applied to a gateway, the method comprising:
acquiring access variation of accessing the application program within a preset duration;
according to a preset resource matching model, calculating resources to be configured required for meeting the access variable quantity;
according to the resources to be configured, adjusting the running resources of the application program; when the access variation is an access increment, the adjusting the running resource of the application program according to the resource to be configured further includes:
extracting the resources to be configured from the configurable resources in the resource pool; before the step of extracting the resources to be configured from the configurable resources of the resource pool, the method further comprises:
acquiring the total access amount of the current access to the application program;
judging whether the total access amount is larger than or equal to a preset minimum access amount;
if yes, executing the step of extracting the resources to be configured from the configurable resources in the resource pool;
and configuring the extracted resources to be configured to the application program.
2. The method of claim 1, wherein prior to said extracting the resource to be configured from the allocatable resources of the resource pool, the method further comprises:
judging whether the configurable resources of the resource pool are smaller than the resources to be configured or not;
if yes, outputting alarm information of insufficient configurable resources of the resource pool;
and if not, executing the step of extracting the resources to be configured from the configurable resources in the resource pool.
3. The method of claim 1, wherein when the access variation is an access reduction amount, the adjusting the running resource of the application program according to the resource to be configured further comprises:
and recovering the resources to be configured from the operation resources occupied by the application program.
4. A method according to claim 3, characterized in that the method further comprises:
acquiring operation resources occupied by the application program;
calculating the difference between the running resource and the resource to be configured to obtain a residual resource;
judging whether the residual resources are smaller than a preset minimum resource or not;
if yes, adjusting the operation resources occupied by the application program to the preset minimum resources;
and if not, executing the recovery of the resources to be configured from the operation resources occupied by the application program.
5. An apparatus for configuring an operating resource of an application program, the apparatus comprising:
the acquisition module is used for acquiring the access variation of the application program within a preset duration;
the calculation module is used for calculating resources to be configured required by meeting the access variation according to a preset resource matching model;
the adjustment module is used for adjusting the running resources of the application program according to the resources to be configured; when the access variation is an access increment, the adjusting the running resource of the application program according to the resource to be configured further includes:
extracting the resources to be configured from the configurable resources in the resource pool; before the step of extracting the resources to be configured from the configurable resources in the resource pool, the method further comprises:
acquiring the total access amount of the current access to the application program;
judging whether the total access amount is larger than or equal to a preset minimum access amount;
if yes, executing the step of extracting the resources to be configured from the configurable resources in the resource pool;
and configuring the extracted resources to be configured to the application program.
6. A gateway, comprising:
the communication module is used for communicating with the application program and the user side;
the processor is used for acquiring the access variation of the user side to the application program within a preset time period, and calculating resources to be configured required for meeting the access variation according to a preset resource matching model; according to the resources to be configured, adjusting the running resources of the application program; when the access variation is an access increment, the adjusting the running resource of the application program according to the resource to be configured further includes:
extracting the resources to be configured from the configurable resources in the resource pool; before the step of extracting the resources to be configured from the configurable resources in the resource pool, the method further comprises:
acquiring the total access amount of the current access to the application program;
judging whether the total access amount is larger than or equal to a preset minimum access amount;
if yes, executing the step of extracting the resources to be configured from the configurable resources in the resource pool;
and configuring the extracted resources to be configured to the application program.
7. The gateway of claim 6, wherein the gateway is configured to,
before the processor extracts the resources to be configured from the allocable resources of the resource pool, further comprising:
judging whether the configurable resources of the resource pool are smaller than the resources to be configured or not;
if yes, outputting alarm information of insufficient configurable resources of the resource pool;
and if not, executing the step of extracting the resources to be configured from the configurable resources in the resource pool.
8. The gateway of claim 6, wherein the gateway is configured to,
when the access variation is the access reduction amount, the processor adjusts the running resource of the application program according to the resource to be configured, and the method further comprises the following steps:
and recovering the resources to be configured from the operation resources occupied by the application program.
9. The gateway of claim 8, wherein the processor is further configured to:
acquiring operation resources occupied by the application program;
calculating the difference between the running resource and the resource to be configured to obtain a residual resource;
judging whether the residual resources are smaller than a preset minimum resource or not;
if yes, adjusting the operation resources occupied by the application program to the preset minimum resources;
and if not, executing the recovery of the resources to be configured from the operation resources occupied by the application program.
10. A gateway, comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
the memory is configured to hold at least one executable instruction that causes the processor to perform the operations of the method of any one of claims 1-4.
11. A computer storage medium having stored therein at least one executable instruction for causing a processor to perform the operations of the method of any one of claims 1-4.
CN201910339073.6A 2019-04-25 2019-04-25 Method, device and gateway for configuring running resources of application program Active CN111858015B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910339073.6A CN111858015B (en) 2019-04-25 2019-04-25 Method, device and gateway for configuring running resources of application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910339073.6A CN111858015B (en) 2019-04-25 2019-04-25 Method, device and gateway for configuring running resources of application program

Publications (2)

Publication Number Publication Date
CN111858015A CN111858015A (en) 2020-10-30
CN111858015B true CN111858015B (en) 2024-01-12

Family

ID=72952440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910339073.6A Active CN111858015B (en) 2019-04-25 2019-04-25 Method, device and gateway for configuring running resources of application program

Country Status (1)

Country Link
CN (1) CN111858015B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115865670B (en) * 2023-02-27 2023-06-16 灵长智能科技(杭州)有限公司 Method and device for adjusting concurrency performance of WEB security gateway based on kernel tuning

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1936849A (en) * 2005-09-19 2007-03-28 国际商业机器公司 Resource dynamic regulation method and apparatus
CN103152389A (en) * 2013-02-01 2013-06-12 华南师范大学 Method and system of responding peak access in cloud computer system
CN103971170A (en) * 2014-04-17 2014-08-06 北京百度网讯科技有限公司 Method and device for forecasting changes of feature information
CN104820630A (en) * 2015-05-22 2015-08-05 上海新炬网络信息技术有限公司 System resource monitoring device based on business variable quantity
CN105519075A (en) * 2014-06-05 2016-04-20 华为技术有限公司 Resource scheduling method and apparatus
CN107315636A (en) * 2016-04-26 2017-11-03 中国移动通信集团河北有限公司 A kind of resource availability method for early warning and device
CN108664321A (en) * 2017-03-29 2018-10-16 广东神马搜索科技有限公司 System resource allocation method of adjustment and device
CN108874502A (en) * 2018-05-31 2018-11-23 北京奇艺世纪科技有限公司 Method for managing resource, device and the equipment of cloud computing cluster

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9378066B2 (en) * 2008-02-25 2016-06-28 Sap Se Dynamic resizing of applications running on virtual machines
US9165425B2 (en) * 2013-04-08 2015-10-20 Steelseries Aps Method and apparatus for configuring a computing environment
CN104580524A (en) * 2015-01-30 2015-04-29 华为技术有限公司 Resource scaling method and cloud platform with same
CN109213597A (en) * 2018-08-01 2019-01-15 平安科技(深圳)有限公司 Resource allocation methods, device, computer equipment and computer readable storage medium
CN109240822A (en) * 2018-08-07 2019-01-18 东软集团股份有限公司 The method, apparatus and storage medium and electronic equipment of application program elastic telescopic
CN109412829B (en) * 2018-08-30 2020-11-17 华为技术有限公司 Resource allocation prediction method and equipment
CN109284871A (en) * 2018-09-30 2019-01-29 北京金山云网络技术有限公司 Resource adjusting method, device and cloud platform
CN109412874B (en) * 2018-12-21 2021-11-02 腾讯科技(深圳)有限公司 Equipment resource configuration method, device, server and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1936849A (en) * 2005-09-19 2007-03-28 国际商业机器公司 Resource dynamic regulation method and apparatus
CN103152389A (en) * 2013-02-01 2013-06-12 华南师范大学 Method and system of responding peak access in cloud computer system
CN103971170A (en) * 2014-04-17 2014-08-06 北京百度网讯科技有限公司 Method and device for forecasting changes of feature information
CN105519075A (en) * 2014-06-05 2016-04-20 华为技术有限公司 Resource scheduling method and apparatus
CN104820630A (en) * 2015-05-22 2015-08-05 上海新炬网络信息技术有限公司 System resource monitoring device based on business variable quantity
CN107315636A (en) * 2016-04-26 2017-11-03 中国移动通信集团河北有限公司 A kind of resource availability method for early warning and device
CN108664321A (en) * 2017-03-29 2018-10-16 广东神马搜索科技有限公司 System resource allocation method of adjustment and device
CN108874502A (en) * 2018-05-31 2018-11-23 北京奇艺世纪科技有限公司 Method for managing resource, device and the equipment of cloud computing cluster

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于OpenStack的云资源管理技术研究;安天镇;《中国优秀硕士学位论文全文数据库》(第2017年06期);I140-6 *
面向web应用的云资源自适应配置方法;倪春泉;《中国优秀硕士学位论文全文数据库》(第2018年12期);I139-113 *

Also Published As

Publication number Publication date
CN111858015A (en) 2020-10-30

Similar Documents

Publication Publication Date Title
JP6457447B2 (en) Data center network traffic scheduling method and apparatus
JP7020616B2 (en) Methods and systems for resource scheduling
US20170201574A1 (en) Method, system, and device for allocating resources in a server
US9454407B2 (en) Service resource allocation
EP2261845A1 (en) Data center batch job quality of service control
CN107295090B (en) Resource scheduling method and device
EP2972857A1 (en) Managing computer server capacity
CN109783157B (en) Method and related device for loading algorithm program
US20110131579A1 (en) Batch job multiplex processing method
CN111858015B (en) Method, device and gateway for configuring running resources of application program
CN111381957A (en) Service instance fine scheduling method and system for distributed platform
CN107203256B (en) Energy-saving distribution method and device under network function virtualization scene
CN106407013B (en) Method and device for dynamically scheduling resources, resource scheduling server and system
CN111930505B (en) Data resource management method and system for big data platform, server and medium
CN113220452A (en) Resource allocation method, model training method, device and electronic equipment
CN108900865B (en) Server, and scheduling method and execution method of transcoding task
CN114567601B (en) Flow limiting method and system
CN113626282B (en) Cloud computing physical node load monitoring method, device, terminal and storage medium
CN110941489A (en) Method and device for scaling stream processing engine
CN111143148B (en) Model parameter determining method, device and storage medium
CN113055199B (en) Gateway access method and device and gateway equipment
CN114185643A (en) Virtual machine scheduling method, device, equipment and storage medium
CN114489463A (en) Method and device for dynamically adjusting QOS (quality of service) of storage volume and computing equipment
CN104424101A (en) Method and equipment for determining performance interference models of programs
CN114079958B (en) Disaster recovery pool selection method and device for 5G slice instance and computing equipment

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