CN110795236B - Method, device, electronic equipment and medium for adjusting capacity of server - Google Patents

Method, device, electronic equipment and medium for adjusting capacity of server Download PDF

Info

Publication number
CN110795236B
CN110795236B CN201910916585.4A CN201910916585A CN110795236B CN 110795236 B CN110795236 B CN 110795236B CN 201910916585 A CN201910916585 A CN 201910916585A CN 110795236 B CN110795236 B CN 110795236B
Authority
CN
China
Prior art keywords
capacity
target server
time period
preset time
server
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
CN201910916585.4A
Other languages
Chinese (zh)
Other versions
CN110795236A (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.)
Beijing Dami Technology Co Ltd
Original Assignee
Beijing Dami Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dami Technology Co Ltd filed Critical Beijing Dami Technology Co Ltd
Priority to CN201910916585.4A priority Critical patent/CN110795236B/en
Publication of CN110795236A publication Critical patent/CN110795236A/en
Application granted granted Critical
Publication of CN110795236B publication Critical patent/CN110795236B/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/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Abstract

The application discloses a method and a device for adjusting server capacity, electronic equipment and a medium. In the present application, after the operation parameters of the target server within the first preset time period are obtained, the operation state of the target server may be determined based on the number of processed services and the capacity ratio in the operation parameters, and the capacity of the target server may be adjusted according to the operation state. By applying the technical scheme of the application, the performance data required by the server to process the service in the future time period is determined according to the operation parameters of the server in the historical time period, and further the capacity is dynamically adjusted. Thereby avoiding the problem of the prior art that the capacity needs to be adjusted for the server manually.

Description

Method, device, electronic equipment and medium for adjusting capacity of server
Technical Field
The present application relates to data processing technologies, and in particular, to a method, an apparatus, an electronic device, and a medium for adjusting server capacity.
Background
With the development of society, more and more people can choose to learn various knowledge to expand themselves continuously. In which, online lectures are accepted by a large number of users.
Furthermore, the server supports the operation of the service during the network lecture of the user. In the running process of the server, the server load has peaks and valleys due to different access volumes of users in different time periods. In order to save cost and ensure service availability, dynamic capacity expansion and capacity reduction of the server are generally required. In the related art, the server is usually expanded and contracted manually by a human.
However, the method of manually increasing or decreasing the capacity of the server in the related art consumes a lot of human resource cost.
Disclosure of Invention
The embodiment of the application provides a method and a device for adjusting server capacity, electronic equipment and a medium.
According to an aspect of an embodiment of the present application, a method for adjusting a capacity of a server is provided, including:
acquiring operation parameters of a target server in a first preset time period, wherein the operation parameters comprise the number of processed services of the target server and a capacity ratio, and the capacity ratio is the ratio of the residual capacity to the total capacity of the target server;
determining an operating state of the target server based on the operating parameters, wherein the operating state is used for representing performance data required by the target server to process the service in a second preset time period, and the second preset time period is a future time period;
and adjusting the capacity of the target server according to the running state.
Optionally, in another embodiment based on the method of the present application, the operating parameters include:
historical operating parameters of the target server within a preset time period closest to the current moment; and/or the presence of a gas in the gas,
and the historical operating parameters of the target server within a third preset time period before the current moment are matched with the third preset time period.
Optionally, in another embodiment based on the foregoing method of the present application, the adjusting the capacity of the target server according to the operating state includes:
obtaining a capacity threshold according to the operation state, wherein the capacity threshold can meet the capacity threshold of the operation state;
and adjusting the capacity of the target server based on the size relation between the residual capacity of the target server and a capacity threshold value.
Optionally, in another embodiment based on the foregoing method of the present application, before the performing the capacity adjustment on the target server according to the operating state, the method further includes:
detecting the processing service type of the target server;
and setting a capacity upper limit and a capacity lower limit for the target server based on the processing service type.
Optionally, in another embodiment based on the foregoing method of the present application, the adjusting the capacity of the target server according to the operating state further includes:
and adjusting the capacity of the target server according to the running state, the upper capacity limit and the lower capacity limit.
Optionally, in another embodiment based on the foregoing method of the present application, the operating parameters further include:
memory footprint, and/or CPU load.
According to another aspect of the embodiments of the present application, there is provided an apparatus for adjusting a capacity of a server, including:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is set to acquire operation parameters of a target server in a first preset time period, the operation parameters comprise the number of processed services of the target server and a capacity ratio, and the capacity ratio is the ratio of the residual capacity to the total capacity of the target server;
a determining module, configured to determine, based on the operation parameter, an operation status of the target server, where the operation status is used to characterize performance data required by the target server to process a service within a second preset time period;
and the adjusting module is used for adjusting the capacity of the target server according to the running state.
Optionally, in another embodiment of the apparatus according to the present application, the apparatus includes:
the acquisition module is configured to acquire historical operating parameters of the target server in real time;
the obtaining of the operation parameters of the target server within the first preset time period includes:
the acquisition module is set to take the historical operating parameter of the preset time period closest to the current moment as the operating parameter; or the like, or, alternatively,
the acquisition module is configured to use a historical operating parameter of a third preset time period before the current time as the operating parameter, where the third preset time period is a time period matched with the second preset time period.
According to another aspect of the embodiments of the present application, there is provided an electronic device including:
a memory for storing executable instructions; and
a display for displaying with the memory to execute the executable instructions to perform the operations of any of the methods for adjusting server capacity described above.
According to a further aspect of the embodiments of the present application, there is provided a computer-readable storage medium for storing computer-readable instructions, which when executed, perform the operations of any one of the methods for adjusting server capacity described above.
In the application, after the operation parameters of the target server are obtained within the first preset time period, the operation state of the target server may be determined based on the number of processed services and the capacity ratio in the operation parameters, and the capacity of the target server may be adjusted according to the operation state. By applying the technical scheme of the application, the performance data required by the server to process the service in the future time period is determined according to the operation parameters of the server in the historical time period, and further the capacity is dynamically adjusted. Thereby avoiding the problem of the prior art that the capacity needs to be adjusted for the server manually.
The technical solution of the present application is further described in detail by the accompanying drawings and examples.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description, serve to explain the principles of the application.
The present application may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
fig. 1 is a schematic diagram of a method for adjusting server capacity according to the present application;
FIG. 2 is a diagram of an apparatus for adjusting server capacity according to the present application;
fig. 3 is a schematic structural diagram of an electronic device for adjusting server capacity according to the present application.
Detailed Description
Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present application unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the application, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
It should be noted that all the directional indications (such as up, down, left, right, front, and rear … …) in the embodiment of the present application are only used to explain the relative position relationship between the components, the movement situation, and the like in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indication is changed accordingly.
In addition, descriptions in this application as to "first", "second", etc. are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicit to the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In this application, unless expressly stated or limited otherwise, the terms "connected," "secured," and the like are to be construed broadly, and for example, "secured" may be a fixed connection, a removable connection, or an integral part; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
In addition, technical solutions between the various embodiments of the present application may be combined with each other, but it must be based on the realization of the technical solutions by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination of technical solutions should be considered to be absent and not within the protection scope of the present application.
A method for performing adjustment of server capacity according to an exemplary embodiment of the present application is described below with reference to fig. 1 to 2. It should be noted that the following application scenarios are merely illustrated for the convenience of understanding the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect. Rather, embodiments of the present application may be applied to any scenario where applicable.
The application also provides a method, a device, a target terminal and a medium for adjusting the capacity of the server.
Fig. 1 schematically shows a flowchart of a method for adjusting server capacity according to an embodiment of the present application. As shown in fig. 1, the method includes:
s101, obtaining operation parameters of the target server in a first preset time period, wherein the operation parameters comprise the number of processed services of the target server and a capacity ratio, and the capacity ratio is a ratio of the residual capacity to the total capacity of the target server.
First, the target server is not specifically limited in the present application, and may be, for example, a cloud server. Furthermore, an Electronic Computing Service (ECS) is a computing Service that is simple, efficient, safe, reliable, and flexible in processing capability. The management mode is simpler and more efficient than that of a physical server. As hardware does not need to be purchased, any plurality of cloud servers can be quickly created or released in the service processing process, and the service processing efficiency is greatly improved.
It should be noted that, the first preset time period is not specifically limited in the present application. That is, the first preset time period may be a time period of any duration. In addition, the first preset time period may be any one range of time period before the current time. For example, the time period may be a time period in a time range closest to the current time, or may be a time period in any time range in the historical time.
Further, the operation parameters in the present application may include the amount of the services processed by the target server and the capacity ratio. The amount of the service processed by the target server may be the amount of the service that the target server has started processing and has not completed. In addition, the service category is not specifically limited in the present application. That is, the operation parameters may include the number of the target server corresponding to process any type of service, or may also include the number of the target server corresponding to process a specific type of service.
And S102, determining the running state of the target server based on the running parameters, wherein the running state is used for representing performance data required by the target server to process the service in a second preset time period, and the second preset time period is a future time period.
Optionally, the performance data required by the target server to process the service within the second preset time period may be determined based on the number of services in the operation parameters and the capacity ratio. It can be understood that, when the amount of the processed service of the target server in the first preset time period is higher, the performance data representing that the target server needs to process the service in the second preset time period is higher. And further, when the ratio of the remaining capacity to the total capacity of the target server in the first preset time period is lower, the performance data required for processing the service in the second preset time period is also higher.
Further, the method and the device do not specifically limit how to determine the operation state of the target server based on the operation parameters. For example, the performance data required by the target server to process the traffic within the second preset time period may be determined according to preset weight parameters based on the number of the traffics and the capacity ratio.
It should be further noted that the second preset time period is not specifically limited in the present application, that is, the second preset time period may be a time period range of any duration. In addition, the second preset time period may be a time period with the same duration as the first preset time period, or the second preset time period may not be a time period with the same duration as the first preset time period.
And S103, adjusting the capacity of the target server according to the running state.
Optionally, in the present application, after the operation state is determined, the capacity of the target server may be further adjusted.
The capacity adjustment of the server comprises capacity expansion and capacity reduction, and the method for adjusting the capacity of the target server is not limited in the application. For example, the capacity adjustment of the target server can be realized by a mirror image capacity expansion method. In addition, the present application does not specifically limit the magnitude of the capacity adjustment. For example, capacity adjustments of any magnitude may be made as compared to the original total capacity.
In the application, after the operation parameters of the target server are obtained within the first preset time period, the operation state of the target server may be determined based on the number of processed services and the capacity ratio in the operation parameters, and the capacity of the target server may be adjusted according to the operation state. By applying the technical scheme of the application, the performance data required by the server to process the service in the future time period is determined according to the operation parameters of the server in the historical time period, and further the capacity is dynamically adjusted. Thereby avoiding the problem of the prior art that the capacity needs to be adjusted for the server manually.
In a possible embodiment of the present application, before S101 (acquiring the operation parameters of the target server within the first preset time period), the following may be implemented:
acquiring historical operating parameters of a target server in real time;
further, after the historical operating parameters of the target server are obtained in real time, the method and the device can achieve the purpose that the operating parameters of the target server are obtained within the first preset time period in any one of the following two ways:
the first mode is as follows:
and taking the historical operating parameter of the preset time period closest to the current moment as the operating parameter.
It will be appreciated that the present application may be used for any range of time periods prior to the present time. For example, the time period may be a time range closest to the current time. For example, when the current time is 2019.7.18 days 18:00 and the preset time period is 12 hours, the first preset time period may be a time period ranging from 2019.7.18 days 06:00 to 2019.7.18 days 18: 00. Further, the application may select, as the operation parameter, a historical operation parameter of the target server corresponding to a time period range of 06:00 to 18:00 on 2019.7.18 days.
The second mode is as follows:
and taking the historical operation parameter of a third preset time period before the current time as the operation parameter, wherein the third preset time period and the second preset time period are matched time periods.
Further, the present application may also be applied to any range of time periods before the current time. For example, the time period may be any time range in the historical time (third preset time period). It should be noted that the third preset time period and the second preset time period are matched time periods. For example, the time periods may be on different dates, in the same time range.
For example, when the second predetermined time period is 2019.6.18 days 10:00-2019.6.18 days 18: 00. The third preset time period may be the same time period range as the third preset time period, but may be a time period different from the third preset time period, for example, a time period range from 2018.6.18 days 10:00 to 2018.6.18 days 18: 00. It can be understood that the time period matched with the second preset time period is selected as the third preset time period, and the running state of the second preset time period in the future time can be judged according to the rule of the historical running parameters. Further, the application may select, as the operation parameter, a historical operation parameter of the target server corresponding to a time period range of 10:00 to 18:00 on 2018.6.18 days.
In another possible embodiment of the present application, in S103 (acquiring the operation parameter of the target server within the first preset time period), the following may be implemented:
obtaining a capacity threshold according to the running state, wherein the capacity threshold is a capacity threshold which can meet the running state;
and adjusting the capacity of the target server based on the size relation between the residual capacity of the target server and the capacity threshold.
In the application, after determining the operation parameter of the target server in the first preset time period and obtaining the performance data required by the target server to process the service in the second preset time period based on the operation parameter, the capacity threshold corresponding to the operation state may be determined according to the operation state. As can be appreciated, the capacity threshold is a capacity threshold that can satisfy the operating condition. That is, in the case that the server guarantees the capacity threshold, it guarantees the smoothness of operation when processing the traffic in the second preset time period. The problem of processing traffic delay due to insufficient capacity does not occur.
Further, according to the application, when it is detected that the remaining capacity of the target server is smaller than the capacity threshold, in order to avoid the problem of processing service delay caused by insufficient capacity, capacity expansion adjustment is performed on the target server. And when detecting that the residual capacity of the target server is larger than the capacity threshold, in order to avoid resource waste of the server, the target server can be selected to be subjected to capacity reduction adjustment.
In yet another possible embodiment of the present application, before S103 (acquiring the operation parameters of the target server within the first preset time period), the following may be implemented:
detecting the processing service type of a target server;
based on the processing traffic type, a capacity upper limit and a capacity lower limit are set for the target server.
Further optionally, after setting a capacity upper limit and a capacity lower limit for the target server based on the processing service type, the following steps may be further implemented in the present application:
and adjusting the capacity of the target server according to the operation state, the upper capacity limit and the lower capacity limit.
Specifically, in the present application, a corresponding upper capacity limit and a corresponding lower capacity limit may be determined based on a processing service type of the target server. The service type is not specifically limited in the present application, and may be, for example, a payment type service type, an audio/video data transmission type service type, a data storage type service type, and the like.
Optionally, the present application may perform classification on each service type in advance according to the priority size. It can be understood that, when the priority corresponding to the processing service type of the target server is higher, the application may set a higher upper capacity limit and a higher lower capacity limit for the target server. Similarly, when the priority corresponding to the service type processed by the target server is low, the application may set a low upper capacity limit and a low lower capacity limit for the target server. The upper and lower limits of the capacity do not affect the scope of protection of the present application.
It should also be noted that the operating parameters in the present application may further include at least one or more of the following parameters:
memory occupancy, CPU load.
In another embodiment of the present application, as shown in fig. 2, the present application further provides an apparatus for adjusting server capacity, the apparatus includes an obtaining module 201, a determining module 202, and an adjusting module 203, wherein,
an obtaining module 201, configured to obtain an operation parameter of a target server within a first preset time period, where the operation parameter includes a number of services processed by the target server and a capacity ratio, and the capacity ratio is a ratio of a remaining capacity of the target server to a total capacity of the target server;
a determining module 202, configured to determine, based on the operation parameter, an operation status of the target server, where the operation status is used to characterize performance data required by the target server to process a service within a second preset time period;
and the adjusting module 203 is configured to perform capacity adjustment on the target server according to the operating state.
In the application, after the operation parameters of the target server are obtained within the first preset time period, the operation state of the target server may be determined based on the number of processed services and the capacity ratio in the operation parameters, and the capacity of the target server may be adjusted according to the operation state. By applying the technical scheme of the application, the performance data required by the server to process the service in the future time period is determined according to the operation parameters of the server in the historical time period, and further the capacity is dynamically adjusted. Thereby avoiding the problem of the prior art that the capacity needs to be adjusted for the server manually.
Optionally, in another embodiment of the present application, the obtaining module 201 further includes a obtaining unit, where:
an acquisition unit configured to acquire a historical operating parameter of the target server in real time;
the obtaining of the operation parameters of the target server within the first preset time period includes:
the acquisition unit is set to take the historical operation parameter of the preset time period closest to the current moment as the operation parameter; or the like, or, alternatively,
and the acquisition unit is set to take the historical operating parameter of a third preset time period before the current time as the operating parameter, wherein the third preset time period is matched with the second preset time period.
In another embodiment of the present application, the method further includes generating a module, wherein:
the generating module is configured to obtain a capacity threshold according to the operating state, wherein the capacity threshold is a capacity threshold which can meet the operating state;
and the generating module is arranged for carrying out capacity adjustment on the target server based on the size relation between the residual capacity of the target server and a capacity threshold value.
In another embodiment of the present application, the method further comprises a detection module, wherein:
a detection module configured to detect a processing service type of the target server;
and the detection module is set to set a capacity upper limit and a capacity lower limit for the target server based on the processing service type.
In another embodiment of the present application, the adjusting module 203 further includes:
an adjusting module 203 configured to perform capacity adjustment on the target server according to the operating state, the upper capacity limit, and the lower capacity limit.
In another embodiment of the present application, the operating parameters further include:
memory footprint, and/or CPU load.
Fig. 3 is a block diagram illustrating a logical structure of an electronic device according to an example embodiment. For example, the electronic device 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 3, electronic device 300 may include one or more of the following components: a processor 301 and a memory 302.
The processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 301 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 301 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 302 may include one or more computer-readable storage media, which may be non-transitory. Memory 302 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 302 is configured to store at least one instruction for execution by the processor 301 to implement the interactive special effect calibration method provided by the method embodiments of the present application.
In some embodiments, the electronic device 300 may further include: a peripheral interface 303 and at least one peripheral. The processor 301, memory 302 and peripheral interface 303 may be connected by a bus or signal lines. Each peripheral may be connected to the peripheral interface 303 by a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 304, display screen 305, camera 306, audio circuitry 307, positioning components 308, and power supply 309.
The peripheral interface 303 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 301 and the memory 302. In some embodiments, processor 301, memory 302, and peripheral interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302 and the peripheral interface 303 may be implemented on a separate chip or circuit board, which is not limited by the embodiment.
The Radio Frequency circuit 304 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 304 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 304 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 304 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 304 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 304 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 305 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 305 is a touch display screen, the display screen 305 also has the ability to capture touch signals on or over the surface of the display screen 305. The touch signal may be input to the processor 301 as a control signal for processing. At this point, the display screen 305 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 305 may be one, providing the front panel of the electronic device 300; in other embodiments, the display screens 305 may be at least two, respectively disposed on different surfaces of the electronic device 300 or in a folded design; in still other embodiments, the display 305 may be a flexible display disposed on a curved surface or on a folded surface of the electronic device 300. Even further, the display screen 305 may be arranged in a non-rectangular irregular figure, i.e. a shaped screen. The Display screen 305 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 306 is used to capture images or video. Optionally, camera assembly 306 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 306 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
Audio circuitry 307 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 301 for processing or inputting the electric signals to the radio frequency circuit 304 to realize voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different portions of the electronic device 300. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 301 or the radio frequency circuitry 304 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuitry 307 may also include a headphone jack.
The positioning component 308 is used to locate the current geographic Location of the electronic device 300 to implement navigation or LBS (Location Based Service). The Positioning component 308 may be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, the graves System in russia, or the galileo System in the european union.
The power supply 309 is used to supply power to various components in the electronic device 300. The power source 309 may be alternating current, direct current, disposable batteries, or rechargeable batteries. When the power source 309 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the electronic device 300 also includes one or more sensors 310. The one or more sensors 310 include, but are not limited to: acceleration sensor 311, gyro sensor 312, pressure sensor 313, fingerprint sensor 314, optical sensor 315, and proximity sensor 316.
The acceleration sensor 311 may detect the magnitude of acceleration in three coordinate axes of a coordinate system established with the electronic device 300. For example, the acceleration sensor 311 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 301 may control the display screen 305 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 311. The acceleration sensor 311 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 312 may detect a body direction and a rotation angle of the electronic device 300, and the gyro sensor 312 and the acceleration sensor 311 may cooperate to acquire a 3D motion of the user on the electronic device 300. The processor 301 may implement the following functions according to the data collected by the gyro sensor 312: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 313 may be disposed on a side bezel of the electronic device 300 and/or underneath the display screen 305. When the pressure sensor 313 is arranged on the side frame of the electronic device 300, the holding signal of the user to the electronic device 300 can be detected, and the processor 301 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 313. When the pressure sensor 313 is disposed at the lower layer of the display screen 305, the processor 301 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 305. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 314 is used for collecting a fingerprint of the user, and the processor 301 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 314, or the fingerprint sensor 314 identifies the identity of the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, processor 301 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 314 may be disposed on the front, back, or side of the electronic device 300. When a physical button or vendor Logo is provided on the electronic device 300, the fingerprint sensor 314 may be integrated with the physical button or vendor Logo.
The optical sensor 315 is used to collect the ambient light intensity. In one embodiment, the processor 301 may control the display brightness of the display screen 305 based on the ambient light intensity collected by the optical sensor 315. Specifically, when the ambient light intensity is high, the display brightness of the display screen 305 is increased; when the ambient light intensity is low, the display brightness of the display screen 305 is reduced. In another embodiment, the processor 301 may also dynamically adjust the shooting parameters of the camera head assembly 306 according to the ambient light intensity collected by the optical sensor 315.
The proximity sensor 316, also referred to as a distance sensor, is typically disposed on the front panel of the electronic device 300. The proximity sensor 316 is used to capture the distance between the user and the front of the electronic device 300. In one embodiment, the processor 301 controls the display screen 305 to switch from the bright screen state to the dark screen state when the proximity sensor 316 detects that the distance between the user and the front surface of the electronic device 300 is gradually decreased; when the proximity sensor 316 detects that the distance between the user and the front surface of the electronic device 300 is gradually increased, the processor 301 controls the display screen 305 to switch from the breath-screen state to the bright-screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 3 is not intended to be limiting of electronic device 300, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
In an exemplary embodiment, there is also provided a non-transitory computer readable storage medium, such as the memory 302, comprising instructions executable by the processor 301 of the electronic device 300 to perform the above method of adjusting server capacity, the method comprising: acquiring operation parameters of a target server in a first preset time period, wherein the operation parameters comprise the number of processed services of the target server and a capacity ratio, and the capacity ratio is the ratio of the residual capacity to the total capacity of the target server; determining an operating state of the target server based on the operating parameters, wherein the operating state is used for representing performance data required by the target server to process the service in a second preset time period, and the second preset time period is a future time period; and adjusting the capacity of the target server according to the running state. Optionally, the instructions may also be executable by the processor 301 of the electronic device 300 to perform other steps involved in the exemplary embodiments described above. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there is also provided an application/computer program product comprising one or more instructions executable by the processor 301 of the electronic device 300 to perform the above method of adjusting server capacity, the method comprising: acquiring operation parameters of a target server in a first preset time period, wherein the operation parameters comprise the number of processed services of the target server and a capacity ratio, and the capacity ratio is the ratio of the residual capacity to the total capacity of the target server; determining an operating state of the target server based on the operating parameters, wherein the operating state is used for representing performance data required by the target server to process the service in a second preset time period, and the second preset time period is a future time period; and adjusting the capacity of the target server according to the running state. Optionally, the instructions may also be executable by the processor 301 of the electronic device 300 to perform other steps involved in the exemplary embodiments described above.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (8)

1. A method for adjusting server capacity, comprising:
acquiring operation parameters of a target server in a first preset time period, wherein the operation parameters comprise the number of processed services of the target server and a capacity ratio, and the capacity ratio is the ratio of the residual capacity to the total capacity of the target server;
determining an operating state of the target server based on the operating parameters, wherein the operating state is used for representing performance data required by the target server to process the service in a second preset time period, and the second preset time period is a future time period;
detecting the processing service type of the target server;
setting a capacity upper limit and a capacity lower limit for the target server based on the processing service type;
and adjusting the capacity of the target server according to the running state, the upper capacity limit and the lower capacity limit.
2. The method of claim 1, wherein the operating parameters comprise:
historical operating parameters of the target server within a preset time period closest to the current moment; and/or the presence of a gas in the gas,
and the historical operating parameters of the target server within a third preset time period before the current moment are matched with the third preset time period.
3. The method of claim 1, wherein the capacity adjusting the target server based on the operational state comprises:
obtaining a capacity threshold according to the operation state, wherein the capacity threshold can meet the capacity threshold of the operation state;
and adjusting the capacity of the target server based on the size relation between the residual capacity of the target server and a capacity threshold value.
4. The method of claim 1, wherein the operating parameters further comprise:
memory footprint, and/or CPU load.
5. An apparatus for adjusting server capacity, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is set to acquire operation parameters of a target server in a first preset time period, the operation parameters comprise the number of processed services of the target server and a capacity ratio, and the capacity ratio is the ratio of the residual capacity to the total capacity of the target server;
a determining module, configured to determine, based on the operation parameter, an operation status of the target server, where the operation status is used to characterize performance data required by the target server to process a service within a second preset time period;
a detection module configured to detect a processing service type of the target server;
a detection module configured to set a capacity upper limit and a capacity lower limit for the target server based on the processing service type;
and the adjusting module is set to adjust the capacity of the target server according to the running state, the upper capacity limit and the lower capacity limit.
6. The apparatus of claim 5, comprising:
the acquisition module is configured to acquire historical operating parameters of the target server in real time;
the obtaining of the operation parameters of the target server within the first preset time period includes:
the acquisition module is set to take the historical operating parameter of the preset time period closest to the current moment as the operating parameter; or the like, or, alternatively,
the acquisition module is configured to use a historical operating parameter of a third preset time period before the current time as the operating parameter, where the third preset time period is a time period matched with the second preset time period.
7. An electronic device, comprising:
a memory for storing executable instructions; and the number of the first and second groups,
a display for display with the memory to execute the executable instructions to perform the operations of the method of adjusting server capacity of any of claims 1-4.
8. A computer-readable storage medium storing computer-readable instructions that, when executed, perform the operations of the method of adjusting server capacity of any of claims 1-4.
CN201910916585.4A 2019-09-26 2019-09-26 Method, device, electronic equipment and medium for adjusting capacity of server Active CN110795236B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910916585.4A CN110795236B (en) 2019-09-26 2019-09-26 Method, device, electronic equipment and medium for adjusting capacity of server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910916585.4A CN110795236B (en) 2019-09-26 2019-09-26 Method, device, electronic equipment and medium for adjusting capacity of server

Publications (2)

Publication Number Publication Date
CN110795236A CN110795236A (en) 2020-02-14
CN110795236B true CN110795236B (en) 2022-04-05

Family

ID=69439771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910916585.4A Active CN110795236B (en) 2019-09-26 2019-09-26 Method, device, electronic equipment and medium for adjusting capacity of server

Country Status (1)

Country Link
CN (1) CN110795236B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111324520A (en) * 2020-03-06 2020-06-23 五八有限公司 Service interface monitoring method and device, electronic equipment and storage medium
CN113411829A (en) * 2020-03-17 2021-09-17 中国联合网络通信集团有限公司 Carrier configuration method, device, apparatus and storage medium
CN111464616A (en) * 2020-03-30 2020-07-28 招商局金融科技有限公司 Method, server and storage medium for automatically adjusting number of application load services
CN111651339B (en) * 2020-06-04 2022-02-15 腾讯科技(深圳)有限公司 Request quantity control method and related device
CN113835470A (en) * 2020-06-08 2021-12-24 Oppo广东移动通信有限公司 Display screen control method and device, terminal and storage medium
CN112084022B (en) * 2020-08-21 2023-09-08 北京水滴科技集团有限公司 Project capacity planning method and device, computer equipment and storage medium
CN112380011B (en) * 2020-11-16 2024-02-27 中国工商银行股份有限公司 Dynamic adjustment method and device for service capacity
CN113032157B (en) * 2021-05-31 2021-08-24 睿至科技集团有限公司 Automatic intelligent server capacity expansion and reduction method and system
CN113467227A (en) * 2021-06-30 2021-10-01 北京达佳互联信息技术有限公司 Resource delivery method, device, server and storage medium
CN113900906A (en) * 2021-10-28 2022-01-07 北京达佳互联信息技术有限公司 Log capacity determination method and device, electronic equipment and storage medium
CN117421186B (en) * 2023-12-18 2024-03-15 苏州元脑智能科技有限公司 Method, device, system and storage medium for adjusting server operation parameters

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108845881A (en) * 2018-05-30 2018-11-20 有米科技股份有限公司 The method and device of server capacity dynamic adjustment
CN109669758A (en) * 2018-09-11 2019-04-23 深圳平安财富宝投资咨询有限公司 Concocting method, device, equipment and the storage medium of server resource
CN109766182A (en) * 2018-12-18 2019-05-17 平安科技(深圳)有限公司 The scalable appearance method, apparatus of system resource dynamic, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108845881A (en) * 2018-05-30 2018-11-20 有米科技股份有限公司 The method and device of server capacity dynamic adjustment
CN109669758A (en) * 2018-09-11 2019-04-23 深圳平安财富宝投资咨询有限公司 Concocting method, device, equipment and the storage medium of server resource
CN109766182A (en) * 2018-12-18 2019-05-17 平安科技(深圳)有限公司 The scalable appearance method, apparatus of system resource dynamic, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110795236A (en) 2020-02-14

Similar Documents

Publication Publication Date Title
CN110795236B (en) Method, device, electronic equipment and medium for adjusting capacity of server
CN111083516B (en) Live broadcast processing method and device
CN110278464B (en) Method and device for displaying list
CN111327953B (en) Live broadcast voting method and device and storage medium
CN112965683A (en) Volume adjusting method and device, electronic equipment and medium
CN111031170A (en) Method, apparatus, electronic device and medium for selecting communication mode
CN110944374A (en) Communication mode selection method and device, electronic equipment and medium
CN110933468A (en) Playing method, playing device, electronic equipment and medium
CN109886208B (en) Object detection method and device, computer equipment and storage medium
CN112667835A (en) Work processing method and device, electronic equipment and storage medium
CN110675473A (en) Method, device, electronic equipment and medium for generating GIF dynamic graph
CN111857793A (en) Network model training method, device, equipment and storage medium
CN109688064B (en) Data transmission method and device, electronic equipment and storage medium
CN111327819A (en) Method, device, electronic equipment and medium for selecting image
CN112860046A (en) Method, apparatus, electronic device and medium for selecting operation mode
CN110781032A (en) Data transmission method, device, electronic equipment and medium
CN110853124A (en) Method, device, electronic equipment and medium for generating GIF dynamic graph
CN111369434B (en) Method, device, equipment and storage medium for generating spliced video covers
CN114594885A (en) Application icon management method, device and equipment and computer readable storage medium
CN110708582B (en) Synchronous playing method, device, electronic equipment and medium
CN110336881B (en) Method and device for executing service processing request
CN109344284B (en) Song file playing method, device, equipment and storage medium
CN110717365B (en) Method and device for obtaining picture
CN112132472A (en) Resource management method and device, electronic equipment and computer readable storage medium
CN113592874A (en) Image display method and device and computer 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