CN111858015A - 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
CN111858015A
CN111858015A CN201910339073.6A CN201910339073A CN111858015A CN 111858015 A CN111858015 A CN 111858015A CN 201910339073 A CN201910339073 A CN 201910339073A CN 111858015 A CN111858015 A CN 111858015A
Authority
CN
China
Prior art keywords
resource
resources
application program
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.)
Granted
Application number
CN201910339073.6A
Other languages
Chinese (zh)
Other versions
CN111858015B (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

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
    • 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 running resources of an application program, wherein the method comprises the following steps: acquiring access variable quantity of the application program accessed within a preset time length; calculating the resource to be configured required by meeting the access variable quantity according to a preset resource matching model; and adjusting the running resources of the application program according to the resources to be configured. Through the mode, 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 waste caused by running resource configuration delay or too much 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 running resources of an application program.
Background
The Web application program is a program which is deployed at a server and can be accessed through Web, and because the user does not need to install software locally and can access the software through a browser, the Web application program is more and more popular with the user, and the Web application program is more and more.
In the process of implementing the embodiment of the present invention, the inventors found that: at present, the Web application is maintained manually by development and maintenance personnel, for example: the method comprises the steps that a development maintainer judges operation resources required by a Web application program according to own experience, then configures corresponding operation resources for the Web application program, and when the operation resources occupied by the Web application program reach an alarm threshold, the development maintainer analyzes according to the current situation and re-configures new operation resources for the Web application program, but the operation resource configuration is easily delayed due to the manual judgment and the manual operation resource allocation mode along with the increase of the demand of timely response of people on the Web application program, and the user experience is influenced.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a method for configuring operating resources of an application, which overcomes or at least partially solves the above problems.
According to an aspect of the embodiments of the present invention, there is provided a method for configuring a running resource of an application program, the method including: acquiring access variable quantity of the application program accessed within a preset time length; calculating the resource to be configured required by meeting the access variable quantity 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 variation is an access increase, the adjusting the running resource of the application program according to the resource to be configured further includes: extracting the resource to be configured from the configurable resource in the resource pool; and configuring the extracted resources to be configured to the application program.
In an optional manner, before the extracting the resource to be configured from the allocable resources of the resource pool, the method further includes: judging whether the allocable resources of the resource pool are smaller than the resources to be configured or not; if yes, outputting alarm information of insufficient allocable resources of the resource pool; and if the resource is larger than or equal to the preset resource, executing the step of extracting the resource to be configured from the configurable resource of the resource pool.
In an optional manner, before the step of extracting the resource to be configured from the configurable resources in the resource pool, the method further includes: acquiring the total access amount of the current access application program; judging whether the total visit amount is greater than or equal to a preset minimum visit amount or not; and if the resource is larger than or equal to the preset resource, executing the step of extracting the resource to be configured from the configurable resource of the resource pool.
In an optional manner, 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 includes: and recovering the resources to be configured from the running resources occupied by the application program.
In an optional manner, the method further comprises: acquiring the operation resources occupied by the application program; calculating the difference between the running resource and the resource to be configured to obtain the residual resource; judging whether the residual resource is smaller than a preset minimum resource or not; if so, adjusting the operation resources occupied by the application program to the preset minimum resources; and if not, executing the operation of recovering the resources to be configured from the operation resources occupied by the application program.
According to another aspect of the embodiments of the present invention, there is provided an apparatus for configuring a running resource of an application, including: the acquisition module is used for acquiring the access variable quantity of the application program accessed within the preset time; the calculation module is used for calculating the resources to be configured which meet 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 the embodiments 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 variable quantity of the user side accessing the application program within a preset time length, and calculating the resource to be configured required by meeting the access variable quantity 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 variation is an access increase, the processor adjusts the running resource of the application program according to the resource to be configured, further including: extracting the resource to be configured from the configurable resource in the resource pool; and configuring the extracted resources to be configured to the application program.
In an optional manner, before the processor extracts the resource to be configured from the allocable resources of the resource pool, the method further includes: judging whether the allocable resources of the resource pool are smaller than the resources to be configured or not; if yes, outputting alarm information of insufficient allocable resources of the resource pool; and if the resource is larger than or equal to the preset resource, executing the step of extracting the resource to be configured from the configurable resource of the resource pool.
In an optional manner, before the step of extracting the resource to be configured from the configurable resources in the resource pool, the processor further includes: acquiring the total access amount of the current access application program; judging whether the total visit amount is larger than a preset minimum visit amount or not; and if so, executing the step of extracting the resource to be configured from the configurable resource of the resource pool.
In an optional manner, when the access variation is an 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 running resources occupied by the application program.
In an optional manner, the processor is further configured to: acquiring the operation resources occupied by the application program; calculating the difference between the running resource and the resource to be configured to obtain the residual resource; judging whether the residual resource is smaller than a preset minimum resource or not; if so, adjusting the operation resources occupied by the application program to the preset minimum resources; and if not, executing the operation of recovering the resources to be configured from the operation resources occupied by the application program.
According to another aspect of the embodiments of the present invention, there is provided a gateway, including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication 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 operation of the method.
According to yet another aspect of the embodiments of the present invention, there is provided a computer storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to perform the operations of the above-mentioned method.
In the embodiment of the invention, the running resources of the application program are adjusted according to the access variable quantity of the access application program, so that the running resources of the application program are dynamically configured, the running resources required by the application program are ensured to be configured in time, the situation that the user experience is influenced by the fact that the application program is blocked is avoided, and the situation that the running resources are excessively distributed to the application program to cause the waste of the running resources is also avoided.
The foregoing description is only an overview of the technical solutions of the embodiments of the present invention, and the embodiments of the present invention can be implemented according to the content of the description in order to make the technical means of the embodiments of the present invention more clearly understood, and the detailed description of the present invention is provided below in order to make the foregoing and other objects, features, and advantages of the embodiments of the present invention more clearly understandable.
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 refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a schematic diagram of an application environment for a method of configuring operating resources of an application program according to the present invention;
FIG. 2 is a flow diagram illustrating an embodiment of a method of configuring operating resources of an application in accordance with the present invention;
FIG. 3 is a flow chart illustrating a manner of adjusting the operating resources of an application in an embodiment of the method of configuring the operating resources of an application according to the present invention;
FIG. 4 is a flow chart illustrating another way of adjusting the operating resources of an application in an embodiment of the method for configuring the operating resources of an application according to the present invention;
FIG. 5 is a schematic diagram of an embodiment of an apparatus for configuring operating resources of an application in accordance with the present invention;
FIG. 6 shows a schematic structural 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 invention are shown in the drawings, it should be understood that the invention can 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 illustrating an application environment of a method for configuring running resources of an application according to the present invention, where the application environment 10 includes a client 11, a gateway 12, and a server 13. The application program runs on the server 13, the server 13 is provided with a resource pool 131, and the resource pool 131 is used for allocating running resources to the application program running on the server 13, for example: memory resources, CPU (Central processing unit) 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 accessing the application program, for example: personal computers, smart phones, smart watches, and the like. The user end 11 is connected to the server 13 through a network, so that the user end 11 can access the application program on the server 13 as long as the user end 11 is connected to the network, and the user end 11 is not limited by the geographical location.
The gateway 12 is disposed on the network and is configured to relay data transmitted between the server 13 and the user terminal 11. Since the data of the server 13 interacting with the client 11 is relayed through the gateway 12, the information of the amount of users 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 the running resources of the application, which is applied to the gateway 12. The method comprises the following steps:
step 101: acquiring access variable quantity of the application program accessed within a preset time length;
the access variation is the variation of the connection of the user accessing the application program through the gateway, and when the connection of the access application program increases, the increase of the user or the increase of the operation of the user on the application program is indicated, and the running resource overhead required by the application program to respond to the operation of the user is correspondingly increased. When the connection for accessing the application program is reduced, it indicates that the user is reduced or the operation of the application program by the user is reduced, and the running resource required by the application program is 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: calculating the resource to be configured required by meeting the access variable quantity according to a preset resource matching model;
the preset resource matching model is preset and used for calculating an algorithm between required running resources according to the access amount, and in some embodiments, the preset resource matching model can be obtained by adopting a deep learning algorithm of a multi-level matrix and training based on a large amount of historical data of a gateway and historical overhead data of the running resources of an application program on a server. The training process of the preset resource matching model may be: setting an error threshold value, 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, then obtaining the actual cost of the application program from the server, and when the difference value between the prediction cost and the actual cost is greater than the error threshold value, adjusting the parameters in the preset resource matching model until the difference value between the prediction cost and the actual cost is less than or equal to the error threshold value.
In order to make the reader understand the training process of the preset resource matching model more easily, the following is also exemplified:
the user's access amount is R ═ R1,r2,r3,....,rvAnd the operation resources in the resource pool comprise: CPU resource set C ═ { C ═ C 1,c2,c3,....,cpThe memory resource set M ═ M1,m2,m3,....,mtN, a set of network bandwidth resources N ═ N1,n2,n3,....,nzH, storing resource set S ═ S1,s2,s3,....,suEtc. at time t1, the access amount R of the application programt1Running resource Q occupied by applicationt1=∑(ct1,mt1,nt1,st1...), at time t2, the access amount R of the application programt2Running resource Q occupied by applicationt2=∑(ct2,mt2,nt2,st2...), the access variation from time t1 to time t2 is: rt2-Rt1The running resource variation of the application program is as follows: Δ Q ═ Qt2-Qt1And when the difference value is greater than the error threshold value, adjusting the parameters of the preset resource matching model, and continuing training until the error is less than or equal to the error threshold value.
It can be understood that: in some embodiments, after the error between the predicted operating resource and the actually required operating resource of the preset resource matching model is smaller than the error threshold, the value of the error per unit time may be counted, that is:
Figure BDA0002040102920000061
after the resource to be configured is obtained according to the access variation, the resource to be configured can be addedThe resource of the error is 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 t kWithin, access variance is RkThen the operating resources that need to be added are:
Figure BDA0002040102920000062
Figure BDA0002040102920000063
the predicted need for increased operating resources 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 variable amount of the access application program, so that the dynamic balance between 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 because the application program occupies too many running resources can be avoided.
When the access variation of the application program is the access increase amount, as shown in fig. 3, adjusting the running resource of the application program according to the resource to be configured may further include:
step 1031 a: judging whether the allocable resources of the resource pool are smaller than the resources to be configured, if so, executing a step 1032a, and if not, executing a step 1034 a;
step 1032 a: extracting the resource to be configured from the configurable resource in the resource pool;
Step 1033 a: and configuring the extracted resources to be configured to the application program.
Step 1034 a: and outputting alarm information of insufficient allocable resources of the resource pool.
When the available resources of the resource pool are sufficient, the resources to be configured are additionally configured for the application program from the resource pool, so that the operating resources owned by the application program can meet the cost of the current access amount, and the operating fluency of the application program is ensured. When the available resources in the resource pool are insufficient, the worker is informed through the alarm, so that the worker can know the insufficient resources in the resource pool in time, and the running resources of the resource pool are expanded in time.
It can be understood that: in other embodiments, the total amount of the operating resources in the resource pool may also be monitored in real time, and when the total amount of the operating resources is lower than the alarm threshold, 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 both meets the operation of the application program and enables the application program to meet the processing requirement of a preset minimum access amount, so that when an increase in the access amount of the application program is detected, the total access amount of the currently accessed application program may be obtained, and it is determined whether the total access amount is greater than or equal to the preset minimum access amount, if so, steps 1031 to 1034 are performed, otherwise, the operation resource of the application program is kept unchanged.
When the access amount of the application program is decreased, reducing the running resources of the application program, and avoiding the situation that the application program occupies too many running resources to cause running resource waste, then step 103 may be: and when the access variable quantity is the access reduction quantity, recovering the resource to be configured from the running resource 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 normal operation of the application program and meet the processing requirement for the preset minimum access amount, when the processing resource of the application program is reduced, to avoid that the operating 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 1031 b: acquiring the operation resources occupied by the application program;
step 1032 b: calculating the difference between the running resource and the resource to be configured to obtain the residual resource;
step 1033 b: judging whether the residual resource is less than the preset lowest resource, if so, executing a step 1034b, otherwise, executing a step 1035 b;
step 1034 b: adjusting the operation resources occupied by the application program to the preset minimum resources;
Step 1035 b: and recovering the resources to be configured from the running 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 variable quantity of the access application program, so that the running resources of the application program are dynamically configured according to the access variable quantity of the application program, the running resources required by the application program are ensured to be sufficient, 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 the waste of the running resources is avoided.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating an embodiment of an apparatus for configuring operating resources of an application according to the present invention, and the apparatus 30 for configuring operating resources 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 for accessing the application program within a preset time period. And the calculating module 32 is configured to calculate the resource to be configured, which is required to meet 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 running resources of the application program according to the access variable quantity of the access application program, the dynamic balance between the running resources occupied by the application program and the access quantity is realized, the smooth running of the application program can be ensured, and the running resource waste caused by the excessive running resources occupied by the application program can be avoided.
Specifically, the adjusting module 33 includes an extracting unit 331, a configuring unit 332, a first judging unit 333, and an outputting unit 334.
When the access variation is an access increase amount, the first determining unit 332 is configured to determine whether the allocable 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 allocable resource of the resource pool when the first determining unit determines that the allocable resource of 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 that the allocable resource of the resource pool is insufficient when the first determining unit determines that the allocable resource of the resource pool is smaller than the resource to be configured. When the resources in the resource pool are insufficient, the staff can be reminded to expand the resource pool in time by outputting the alarm information.
In some embodiments, the adjusting module 33 may further include a first obtaining unit 335 and a second determining unit 336. The first obtaining unit 335 is configured to obtain a total access amount of the application program currently accessed. The second determining unit 336 is configured to determine whether the total number of accesses is greater than a preset minimum number of accesses. The extracting unit 331 is specifically configured to, when the second determining unit 336 determines that the total access amount is greater than or equal to the preset minimum access amount, extract the resource to be configured from the allocable resources of the resource pool, and when the total access amount is less than the preset minimum access amount, continue to keep the running resource of the application program unchanged.
Further, the adjusting module 33 further includes a second obtaining unit 337, a calculating unit 338, a third judging unit 339 and an adjusting unit 340.
When the access variation is an access reduction amount, the second obtaining unit 337 obtains the operating resource occupied by the application program. The calculating unit 338 calculates a difference between the operating resource and the resource to be configured to obtain the remaining resource. The third determining unit 339 determines whether the remaining resource is smaller than a predetermined minimum resource. The adjusting unit 340 is configured to adjust the running resource occupied by the application program to the preset minimum resource when the third determining unit 339 determines that the remaining resource is smaller than the preset minimum resource, and recover the resource to be configured from the running resource occupied by the application program when the third determining unit 339 determines that the remaining resource is greater than or equal to the preset minimum resource, so that the running resource occupied by the application program reduces the resource to be configured.
In the embodiment of the present invention, the adjusting module 33 adjusts the running resources of the application program according to the access variable of the access application program, so as to dynamically configure the running resources of the application program according to the access variable of the application program, thereby ensuring sufficient running resources required by the application program, avoiding the situation that the application program is stuck, and avoiding the situation that the running resources are excessively allocated to the application program, which causes the waste of the running resources.
Embodiments of the present invention provide a non-volatile computer storage medium, where at least one executable instruction is stored in the computer storage medium, and the computer executable instruction may perform operations of the method for configuring the running resource of the application program in any method embodiment 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 that, when executed by a computer, cause the computer to perform the operations of the method of configuring operating 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, and the specific embodiment of the present invention does not limit the specific implementation of the gateway.
As shown in fig. 6, the gateway may include: a processor (processor)402, a communication interface 404, a memory 406, and a communication bus 408.
Wherein: the processor 402, communication interface 404, and memory 406 communicate with each other via a 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 graph drawing method for a gateway described above.
In particular, program 410 may include program code comprising computer operating instructions.
The processor 402 may be a central processing unit CPU, or an application specific Integrated circuit asic, or one or more Integrated circuits configured to implement an embodiment of the present invention. The gateway comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 406 for storing a program 410. Memory 406 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 410 may specifically be configured to cause the processor 402 to perform the following operations:
acquiring access variable quantity of the application program accessed within a preset time length;
calculating the resource to be configured required by meeting the access variable quantity 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 variation is an access increase, 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, further including:
Extracting the resource to be configured from the configurable resource in the resource pool;
and configuring the extracted resources to be configured to the application program.
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 allocable resources in the resource pool:
judging whether the allocable resources of the resource pool are smaller than the resources to be configured or not;
if yes, outputting alarm information of insufficient allocable resources of the resource pool;
and if the resource is larger than or equal to the preset resource, executing the step of extracting the resource to be configured from the configurable resource of 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 application program;
judging whether the total visit amount is greater than or equal to a preset minimum visit amount or not;
and if the resource is larger than or equal to the preset resource, executing the step of extracting the resource to be configured from the configurable resource of the resource pool.
In an optional manner, when the access variation is an access reduction amount, the program 410 causes the processor to perform an operation of adjusting the running resource of the application according to the resource to be configured, further including:
And recovering the resources to be configured from the running resources occupied by the application program.
In an alternative approach, the program 410 causes the processor to:
acquiring the operation resources occupied by the application program;
calculating the difference between the running resource and the resource to be configured to obtain the residual resource;
judging whether the residual resource is smaller than a preset minimum resource or not;
if so, adjusting the operation resources occupied by the application program to the preset minimum resources;
and if not, executing the operation of 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 variable quantity of the access application program, so that the running resources of the application program are dynamically configured according to the access quantity of the application program, the running resources required by the application program are ensured to be sufficient, 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 the waste of the running resources is avoided.
Referring to fig. 7, fig. 7 is a schematic structural diagram of another embodiment of the gateway of the present invention, and the 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 accessing the application program within a preset time duration, and calculate a resource to be configured that meets 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 variation is an access increase, the processor 502 adjusts the running resource of the application program according to the resource to be configured, and further includes: judging whether the allocable resources of the resource pool are smaller than the resources to be configured or not; if yes, outputting alarm information of insufficient allocable resources of the resource pool; if the resource is larger than or equal to the preset resource, extracting the resource to be configured from the configurable resource of the resource pool; and configuring the extracted resources to be configured to the application program.
In some embodiments, the processor 502 further includes, before the step of extracting the resource to be configured from the configurable resources in the resource pool: acquiring the total access amount of the current access application program; judging whether the total visit amount is larger than a preset minimum visit amount or not; and if so, executing the step of extracting the resource to be configured from the configurable resource of the resource pool.
When the access variation is an access reduction, the processor 502 adjusts the running resource of the application according to the resource to be configured, and further includes: acquiring the operation resources occupied by the application program; calculating the difference between the running resource and the resource to be configured to obtain the residual resource; judging whether the residual resource is smaller than a preset minimum resource or not; if so, 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 running 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 variable quantity of the access application program, so that the running resources of the application program are dynamically configured according to the access quantity of the application program, the running resources required by the application program are ensured to be sufficient, 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 the 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 constructing such a system will be apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, 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 foregoing 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 invention and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed 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 device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. 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. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements 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 included in other embodiments, rather than other features, 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 may 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 usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specified otherwise.

Claims (15)

1. A method for configuring running resources of an application program, applied to a gateway, is characterized by comprising the following steps:
Acquiring access variable quantity of the application program accessed within a preset time length;
calculating the resource to be configured required by meeting the access variable quantity according to a preset resource matching model;
and adjusting the running resources of the application program according to the resources to be configured.
2. The method of claim 1,
when the access variation is an access increment, adjusting the running resource of the application program according to the resource to be configured, further comprising:
extracting the resource to be configured from the configurable resource in the resource pool;
and configuring the extracted resources to be configured to the application program.
3. The method according to claim 2, wherein before said extracting the resource to be configured from the allocable resources of the resource pool, the method further comprises:
judging whether the allocable resources of the resource pool are smaller than the resources to be configured or not;
if yes, outputting alarm information of insufficient allocable resources of the resource pool;
if not, the step of extracting the resource to be configured from the configurable resource of the resource pool is executed.
4. The method according to claim 2, wherein before the step of extracting the resource to be configured from the configurable resources of the resource pool, the method further comprises:
Acquiring the total access amount of the current access application program;
judging whether the total visit amount is greater than or equal to a preset minimum visit amount or not;
and if so, executing the step of extracting the resource to be configured from the configurable resource of the resource pool.
5. The method according to claim 1, wherein when the access change amount is an access reduction amount, the adjusting the running resource of the application according to the resource to be configured further comprises:
and recovering the resources to be configured from the running resources occupied by the application program.
6. The method of claim 5, further comprising:
acquiring the operation resources occupied by the application program;
calculating the difference between the running resource and the resource to be configured to obtain the residual resource;
judging whether the residual resource is smaller than a preset minimum resource or not;
if so, adjusting the operation resources occupied by the application program to the preset minimum resources;
and if not, executing the operation of recovering the resources to be configured from the operation resources occupied by the application program.
7. An apparatus for configuring operating resources of an application, the apparatus comprising:
The acquisition module is used for acquiring the access variable quantity of the application program accessed within the preset time;
the calculation module is used for calculating the resources to be configured which meet 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.
8. 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 variable quantity of the user side accessing the application program within a preset time length, and calculating the resource to be configured required by meeting the access variable quantity according to a preset resource matching model; and adjusting the running resources of the application program according to the resources to be configured.
9. The gateway according to claim 8,
when the access variation is an access increment, the processor adjusts the running resource of the application program according to the resource to be configured, and further includes:
extracting the resource to be configured from the configurable resource in the resource pool;
and configuring the extracted resources to be configured to the application program.
10. The gateway according to claim 9,
before the processor extracts the resource to be configured from the allocable resources of the resource pool, the method further includes:
judging whether the allocable resources of the resource pool are smaller than the resources to be configured or not;
if yes, outputting alarm information of insufficient allocable resources of the resource pool;
if not, the step of extracting the resource to be configured from the configurable resource of the resource pool is executed.
11. The gateway according to claim 9,
before the step of extracting the resource to be configured from the configurable resources in the resource pool, the processor further includes:
acquiring the total access amount of the current access application program;
judging whether the total visit amount is larger than a preset minimum visit amount or not;
and if so, executing the step of extracting the resource to be configured from the configurable resource of the resource pool.
12. The gateway according to claim 8,
when the access variation is an access reduction, 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 running resources occupied by the application program.
13. The gateway of claim 12, wherein the processor is further configured to:
acquiring the operation resources occupied by the application program;
calculating the difference between the running resource and the resource to be configured to obtain the residual resource;
judging whether the residual resource is smaller than a preset minimum resource or not;
if so, adjusting the operation resources occupied by the application program to the preset minimum resources;
and if not, executing the operation of recovering the resources to be configured from the operation resources occupied by the application program.
14. A gateway, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is configured to store at least one executable instruction that causes the processor to perform the operations of the method of any one of claims 1-6.
15. A computer storage medium having stored therein at least one executable instruction that causes a processor to perform operations of a method according to any one of claims 1-6.
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 true CN111858015A (en) 2020-10-30
CN111858015B 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)

Cited By (1)

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

Citations (16)

* 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
US20090217267A1 (en) * 2008-02-25 2009-08-27 Alexander Gebhart Dynamic Resizing of Applications Running on Virtual Machines
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
US20140304494A1 (en) * 2013-04-08 2014-10-09 Steelseries Aps Method and apparatus for configuring a computing environment
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
US20170331705A1 (en) * 2015-01-30 2017-11-16 Huawei Technologies Co., Ltd. Resource Scaling Method on Cloud Platform and Cloud Platform
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
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
CN109284871A (en) * 2018-09-30 2019-01-29 北京金山云网络技术有限公司 Resource adjusting method, device and cloud platform
CN109412829A (en) * 2018-08-30 2019-03-01 华为技术有限公司 A kind of prediction technique and equipment of resource distribution
CN109412874A (en) * 2018-12-21 2019-03-01 腾讯科技(深圳)有限公司 Configuration method, device, server and the storage medium of device resource

Patent Citations (16)

* 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
US20090217267A1 (en) * 2008-02-25 2009-08-27 Alexander Gebhart Dynamic Resizing of Applications Running on Virtual Machines
CN103152389A (en) * 2013-02-01 2013-06-12 华南师范大学 Method and system of responding peak access in cloud computer system
US20140304494A1 (en) * 2013-04-08 2014-10-09 Steelseries Aps Method and apparatus for configuring a computing environment
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
US20170331705A1 (en) * 2015-01-30 2017-11-16 Huawei Technologies Co., Ltd. Resource Scaling Method on Cloud Platform and Cloud Platform
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
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
CN109412829A (en) * 2018-08-30 2019-03-01 华为技术有限公司 A kind of prediction technique and equipment of resource distribution
CN109284871A (en) * 2018-09-30 2019-01-29 北京金山云网络技术有限公司 Resource adjusting method, device and cloud platform
CN109412874A (en) * 2018-12-21 2019-03-01 腾讯科技(深圳)有限公司 Configuration method, device, server and the storage medium of device resource

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
倪春泉: "面向web应用的云资源自适应配置方法", 《中国优秀硕士学位论文全文数据库》, no. 2018, pages 139 - 113 *
安天镇: "基于OpenStack的云资源管理技术研究", 《中国优秀硕士学位论文全文数据库》, no. 2017, pages 140 - 6 *

Cited By (2)

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

Also Published As

Publication number Publication date
CN111858015B (en) 2024-01-12

Similar Documents

Publication Publication Date Title
JP7355404B2 (en) Automatic tuner for embedding cloud microservices
JP6457447B2 (en) Data center network traffic scheduling method and apparatus
EP3335120B1 (en) Method and system for resource scheduling
US8190744B2 (en) Data center batch job quality of service control
EP2972857B1 (en) Managing computer server capacity
CN111461332A (en) Deep learning model online reasoning method and device, electronic equipment and storage medium
CN101681273B (en) Server device operating in response to received request
CN109783157B (en) Method and related device for loading algorithm program
CN108306874B (en) Service interface access current limiting method and device
EP2898412B1 (en) Adaptive service timeouts
CN105760230A (en) Method and device for automatically adjusting operation of cloud host
CN113342477A (en) Container group deployment method, device, equipment and storage medium
CN115827253A (en) Chip resource calculation allocation method, device, equipment and storage medium
CN111858015A (en) Method, device and gateway for configuring running resources of application program
CN112328395A (en) Cloud resource capacity planning method and system
CN107203256B (en) Energy-saving distribution method and device under network function virtualization scene
CN107391257B (en) Method, device and server for estimating memory capacity required by service
CN109521970A (en) A kind of data processing method and relevant device
CN111385328A (en) Service request processing method and system and electronic equipment
CN106649415A (en) Method and device for detecting updating of data of client terminal
CN108900865B (en) Server, and scheduling method and execution method of transcoding task
CN113543160A (en) 5G slice resource allocation method and device, computing equipment and computer storage medium
CN113626282B (en) Cloud computing physical node load monitoring method, device, terminal and storage medium
CN110941489A (en) Method and device for scaling stream processing engine
CN110442455A (en) A kind of data processing method and device

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