CN114138401A - Container configuration method, device, equipment and medium based on artificial intelligence - Google Patents
Container configuration method, device, equipment and medium based on artificial intelligence Download PDFInfo
- Publication number
- CN114138401A CN114138401A CN202111222982.5A CN202111222982A CN114138401A CN 114138401 A CN114138401 A CN 114138401A CN 202111222982 A CN202111222982 A CN 202111222982A CN 114138401 A CN114138401 A CN 114138401A
- Authority
- CN
- China
- Prior art keywords
- load
- capacity
- server
- node server
- peak value
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45575—Starting, stopping, suspending or resuming virtual machine instances
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45595—Network integration; Enabling network access in virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Biomedical Technology (AREA)
- Artificial Intelligence (AREA)
- Mathematical Physics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a container configuration method, a device, equipment and a medium based on artificial intelligence, wherein the method comprises the following steps: the method comprises the steps of obtaining load information of each node server in a current period as an initial load corresponding to the node server, inputting each initial load into a trained reinforcement learning model for trend prejudgment to obtain a predicted peak value corresponding to each node server, taking the initial load corresponding to the predicted peak value larger than a first preset threshold value as a first load, taking the initial load corresponding to the predicted peak value smaller than a second preset threshold value as a second load, and carrying out capacity expansion processing on the node server corresponding to the first load and capacity reduction processing on the node server corresponding to the second load according to a preset capacity adjustment mode.
Description
Technical Field
The invention relates to the field of data processing, in particular to a container configuration method, a container configuration device, container configuration equipment and a container configuration medium based on artificial intelligence.
Background
With the rapid development of computer technology, more and more transactions are processed through a network to access the internet to obtain information, which is a common thing in daily life, and in some large groups or internet enterprises/organizations, in order to process increasingly expanded information access services, a cluster mode is adopted to provide support for information access, wherein the cluster comprises a plurality of server nodes, and each server node processes data access of corresponding applications. When access flow of different applications is inconsistent at different time periods, for example, when an application is used for some marketing activities, a large amount of data access requests are generated in a short time period, and therefore, adjustment of capacity configuration needs to be performed for each node server.
The existing capacity configuration adjustment is usually to preset a threshold value, upgrade is performed when the use capacity of a server node reaches the threshold value, but restart and other processing are required in the upgrade process, so that application service is interrupted, user experience is poor, and meanwhile, upgrading the capacity is usually based on manual experience, so that the capacity configuration needs to be modified and updated for many times, and the efficiency of the capacity configuration is low.
Disclosure of Invention
The embodiment of the invention provides a container configuration method and device based on artificial intelligence, computer equipment and a storage medium, so as to improve the container configuration efficiency.
In order to solve the above technical problem, an embodiment of the present application provides a container configuration method based on artificial intelligence, including:
acquiring load information of each node server in a current period as an initial load corresponding to the node server;
inputting each initial load into a trained reinforcement learning model for trend prejudgment to obtain a prediction peak value corresponding to each node server;
taking the initial load corresponding to the predicted peak value larger than a first preset threshold value as a first load, and taking the initial load corresponding to the predicted peak value smaller than a second preset threshold value as a second load, wherein the first preset threshold value is larger than the second preset threshold value;
and carrying out capacity expansion processing on the node server corresponding to the first load according to a preset capacity adjustment mode, and carrying out capacity reduction processing on the node server corresponding to the second load.
Optionally, the inputting each initial load into a trained reinforcement learning model for trend prejudgment, and obtaining a predicted peak value corresponding to each node server includes:
inputting the initial load into a pre-trained LSTM model for peak prediction to obtain a first load peak;
inputting the first load peak value and the initial load into the trained reinforcement learning model, performing difference calculation through the trained reinforcement learning model based on the first load peak value and the initial load, and calculating a reward function based on the difference and a loss function;
inputting the initial load and the obtained reward function into a decision unit in the trained reinforcement learning model for decision making to obtain a decision making result, wherein the decision making unit is a sensor model;
and determining a second load peak value as a predicted peak value of the node server corresponding to the preliminary load according to the decision result.
Optionally, the performing, according to a preset capacity adjustment manner, capacity expansion processing on the node server corresponding to the first load includes:
taking the node server corresponding to the first load as a first server;
dividing the capacity of the first server into a first capacity and a second capacity based on a virtual capacity division manner;
and responding to data access of an application program by adopting the first capacity, modifying the configuration file of the second capacity, restarting the virtual server corresponding to the second capacity, and merging the first capacity and the adjusted second capacity after restarting.
Optionally, the performing capacity reduction processing on the node server corresponding to the second load includes:
taking the node server corresponding to the second load as a second server; transferring an access request directed to the second server to other node servers;
and adjusting the configuration file of the second server and restarting the second server.
In order to solve the above technical problem, an embodiment of the present application further provides an artificial intelligence based container configuration device, including:
the load acquisition module is used for acquiring load information of each node server in the current period as an initial load corresponding to the node server;
the peak value prediction module is used for inputting each initial load into a trained reinforcement learning model for trend prejudgment to obtain a prediction peak value corresponding to each node server;
the load comparison module is used for taking the initial load corresponding to the predicted peak value larger than a first preset threshold value as a first load and taking the initial load corresponding to the predicted peak value smaller than a second preset threshold value as a second load, wherein the first preset threshold value is larger than the second preset threshold value;
and the capacity adjusting module is used for carrying out capacity expansion processing on the node server corresponding to the first load and carrying out capacity reduction processing on the node server corresponding to the second load according to a preset capacity adjusting mode.
Optionally, the peak prediction module comprises:
the first prediction unit is used for inputting the initial load into a pre-trained LSTM model for peak prediction to obtain a first load peak;
a difference calculation unit, configured to input the first load peak value and the initial load into the trained reinforcement learning model, perform difference calculation based on the first load peak value and the initial load through the trained reinforcement learning model, and calculate a reward function based on a difference and a loss function;
the decision unit is used for inputting the initial load and the obtained reward function into a decision unit in the trained reinforcement learning model for decision making to obtain a decision result, and the decision unit is a perceptron model;
and the second prediction unit is used for determining a second load peak value according to the decision result, and the second load peak value is used as a prediction peak value of the node server corresponding to the preliminary load.
Optionally, the capacity adjustment module includes:
a first server determining unit, configured to use a node server corresponding to the first load as a first server;
a capacity dividing unit, configured to divide a capacity of the first server into a first capacity and a second capacity based on a virtual capacity division manner;
and the first capacity adjusting unit is used for responding to data access of an application program by adopting the first capacity, modifying the configuration file of the second capacity, restarting the virtual server corresponding to the second capacity, and merging the first capacity and the adjusted second capacity after restarting.
Optionally, the capacity adjustment module further includes:
a second server determining unit, configured to use a node server corresponding to the second load as a second server;
an access request transfer unit configured to transfer an access request directed to the second server to another node server;
and the second capacity adjusting unit is used for adjusting the configuration file of the second server and restarting the second server.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the artificial intelligence based container configuration method when executing the computer program.
In order to solve the above technical problem, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements the steps of the artificial intelligence based container configuration method.
The artificial intelligence based container configuration method, device, computer equipment and storage medium provided by the embodiments of the present invention obtain load information of each node server in a current period, use the load information as an initial load corresponding to the node server, input each initial load into a trained reinforcement learning model for trend prediction to obtain a predicted peak value corresponding to each node server, use an initial load corresponding to a predicted peak value larger than a first preset threshold as a first load, use an initial load corresponding to a predicted peak value smaller than a second preset threshold as a second load, where the first preset threshold is larger than the second preset threshold, perform capacity expansion processing on the node server corresponding to the first load according to a preset capacity adjustment mode, perform capacity reduction processing on the node server corresponding to the second load, and implement intelligent adjustment on the capacity of each node server, the method is beneficial to improving the utilization rate of the server capacity and enhancing the pertinence and efficiency of capacity adjustment.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a schematic diagram of an application environment of the present application;
FIG. 2 is a flow diagram of one embodiment of an artificial intelligence based container configuration method of the present application;
FIG. 3 is a schematic block diagram of one embodiment of an artificial intelligence based container configuration apparatus according to the present application;
FIG. 4 is a schematic block diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, as shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that the artificial intelligence based container configuration provided by the embodiment of the present application is executed by a server, and accordingly, an artificial intelligence based container configuration apparatus is provided in the server.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. Any number of terminal devices, networks and servers may be provided according to implementation needs, and the terminal devices 101, 102 and 103 in this embodiment may specifically correspond to an application system in actual production. The server in the embodiment of the application may be an independent server, or may be a cloud server that provides basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Content Delivery Network (CDN), big data, an artificial intelligence platform, and the like.
Referring to fig. 2, fig. 2 shows an artificial intelligence based container configuration according to an embodiment of the present invention, which is described by taking the application of the method to the server in fig. 1 as an example, and is detailed as follows:
s201: and acquiring load information of each node server in the current period as the initial load corresponding to the node server.
Specifically, the server presets a fixed period, for example, one hour, according to actual needs, and collects load information of each node server in the current period through a preset program or script, as an initial load corresponding to the node server.
S202: and inputting each initial load into a trained reinforcement learning model for trend prejudgment to obtain a prediction peak value corresponding to each node server.
In a specific embodiment, in step S202, inputting each initial load into a trained reinforcement learning model for trend prediction, and obtaining a predicted peak value corresponding to each node server includes:
inputting the initial load into a pre-trained LSTM model for peak prediction to obtain a first load peak;
inputting the first load peak value and the initial load into a trained reinforcement learning model, performing difference calculation on the basis of the first load peak value and the initial load through the trained reinforcement learning model, and calculating a reward function on the basis of the difference and a loss function;
inputting the initial load and the obtained reward function into a decision unit in a trained reinforcement learning model for decision making to obtain a decision making result, wherein the decision making unit is a perceptron model;
and determining a second load peak value as a prediction peak value of the node server corresponding to the preliminary load according to the decision result.
Specifically, the reinforcement learning model may be a Q learning model, a Deep Q learning model, a Policy Gradients model, and the like, wherein the reinforcement learning model is obtained by training according to historical load information of the node server.
S203: and taking the initial load corresponding to the predicted peak value larger than the first preset threshold value as a first load, and taking the initial load corresponding to the predicted peak value smaller than the second preset threshold value as a second load, wherein the first preset threshold value is larger than the second preset threshold value.
Specifically, a first preset threshold and a second preset threshold may be set according to actual requirements, where the first preset threshold is used to monitor a maximum threshold of the server node, and the second preset threshold is used to monitor a minimum threshold of the server node, that is, when the capacity usage of the server node reaches the first preset threshold, capacity expansion processing needs to be performed to prevent occurrence of abnormal situations such as user access delay, loss or halfway upgrade due to insufficient subsequent capacity, and when the capacity usage of the server node reaches the second preset threshold, capacity reduction processing needs to be performed to save resources.
S204: and carrying out capacity expansion processing on the node server corresponding to the first load and carrying out capacity reduction processing on the node server corresponding to the second load according to a preset capacity adjustment mode.
In a specific embodiment, in step S204, performing capacity expansion processing on the node server corresponding to the first load according to a preset capacity adjustment manner includes:
taking a node server corresponding to the first load as a first server;
dividing the capacity of the first server into a first capacity and a second capacity based on a virtual capacity division mode;
and responding to the data access of the application program by adopting the first capacity, modifying the configuration file for the second capacity, restarting the virtual server corresponding to the second capacity, and merging the first capacity and the adjusted second capacity after restarting.
In a specific embodiment, in step S204, performing a capacity reduction process on the node server corresponding to the second load includes:
taking a node server corresponding to the second load as a second server; transferring the access request pointing to the second server to other node servers;
and adjusting the configuration file of the second server, and restarting the second server.
In this embodiment, load information of each node server in a current period is obtained as an initial load corresponding to the node server, each initial load is input into a trained reinforcement learning model for trend prediction to obtain a predicted peak value corresponding to each node server, the initial load corresponding to the predicted peak value larger than a first preset threshold is used as a first load, the initial load corresponding to the predicted peak value smaller than a second preset threshold is used as a second load, the first preset threshold is larger than the second preset threshold, and the load information is adjusted according to a preset capacity adjustment mode, the capacity expansion processing is carried out on the node server corresponding to the first load, the capacity reduction processing is carried out on the node server corresponding to the second load, the capacity of each node server is intelligently adjusted, the utilization rate of the server capacity is improved, and the pertinence and the efficiency of capacity adjustment are enhanced.
In the embodiment, concurrent processing is realized by means of data fragmentation, which is beneficial to improving the processing efficiency of the access request.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 3 is a schematic block diagram of an artificial intelligence based container configuration apparatus in one-to-one correspondence with the artificial intelligence based container configuration method according to the above-described embodiment. As shown in fig. 3, the artificial intelligence based container configuration apparatus includes a load obtaining module 31, a peak predicting module 32, a load comparing module 33, and a capacity adjusting module 34. The functional modules are explained in detail as follows:
a load obtaining module 31, configured to obtain load information of each node server in a current period, where the load information is used as an initial load corresponding to the node server;
the peak value prediction module 32 is configured to input each initial load into the trained reinforcement learning model to perform trend prejudgment, so as to obtain a prediction peak value corresponding to each node server;
a load comparison module 33, configured to use an initial load corresponding to a predicted peak value greater than a first preset threshold as a first load, and use an initial load corresponding to a predicted peak value less than a second preset threshold as a second load, where the first preset threshold is greater than the second preset threshold;
and the capacity adjusting module 34 is configured to perform capacity expansion processing on the node server corresponding to the first load and perform capacity reduction processing on the node server corresponding to the second load according to a preset capacity adjusting manner.
Optionally, the peak prediction module 32 comprises:
the first prediction unit is used for inputting the initial load into the pre-trained LSTM model for peak prediction to obtain a first load peak;
the difference value calculation unit is used for inputting the first load peak value and the initial load into the trained reinforcement learning model, performing difference value calculation on the basis of the first load peak value and the initial load through the trained reinforcement learning model, and calculating a reward function on the basis of the difference value and the loss function;
the decision unit is used for inputting the initial load and the obtained reward function into a decision unit in the trained reinforcement learning model for decision making to obtain a decision result, and the decision unit is a sensor model;
and the second prediction unit is used for determining a second load peak value according to the decision result, and the second load peak value is used as a prediction peak value of the node server corresponding to the preliminary load.
Optionally, the capacity adjustment module 34 includes:
a first server determination unit, configured to use a node server corresponding to the first load as a first server;
a capacity dividing unit, configured to divide a capacity of the first server into a first capacity and a second capacity based on a virtual capacity division manner;
and the first capacity adjusting unit is used for responding to the data access of the application program by adopting the first capacity, modifying the configuration file of the second capacity, restarting the virtual server corresponding to the second capacity, and merging the first capacity and the adjusted second capacity after restarting.
Optionally, the capacity adjustment module 34 further includes:
a second server determination unit, configured to use a node server corresponding to the second load as a second server;
an access request transfer unit for transferring an access request directed to the second server to another node server;
and the second capacity adjusting unit is used for adjusting the configuration file of the second server and restarting the second server.
For specific limitations of the artificial intelligence based container configuration apparatus, reference may be made to the above limitations of the artificial intelligence based container configuration method, which will not be described herein again. The various modules in the artificial intelligence based container configuration apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 4, fig. 4 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It is noted that only the computer device 4 having the components connection memory 41, processor 42, network interface 43 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or D interface display memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the computer device 4. Of course, the memory 41 may also include both internal and external storage devices of the computer device 4. In this embodiment, the memory 41 is generally used for storing an operating system installed in the computer device 4 and various types of application software, such as program codes for container configuration based on artificial intelligence. Further, the memory 41 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute the program code stored in the memory 41 or process data, for example, execute the program code for data access.
The network interface 43 may comprise a wireless network interface or a wired network interface, and the network interface 43 is generally used for establishing communication connection between the computer device 4 and other electronic devices.
The present application provides yet another embodiment that provides a computer-readable storage medium having stored thereon a data access program executable by at least one processor to cause the at least one processor to perform the steps of the artificial intelligence based container configuration method as described above.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.
Claims (10)
1. A container configuration method based on artificial intelligence is applied to a cluster server, and is characterized in that the container configuration method based on artificial intelligence comprises the following steps:
acquiring load information of each node server in a current period as an initial load corresponding to the node server;
inputting each initial load into a trained reinforcement learning model for trend prejudgment to obtain a prediction peak value corresponding to each node server;
taking the initial load corresponding to the predicted peak value larger than a first preset threshold value as a first load, and taking the initial load corresponding to the predicted peak value smaller than a second preset threshold value as a second load, wherein the first preset threshold value is larger than the second preset threshold value;
and carrying out capacity expansion processing on the node server corresponding to the first load according to a preset capacity adjustment mode, and carrying out capacity reduction processing on the node server corresponding to the second load.
2. The artificial intelligence based container configuration method according to claim 1, wherein the inputting each initial load into a trained reinforcement learning model for trend prediction to obtain a predicted peak value corresponding to each node server comprises:
inputting the initial load into a pre-trained LSTM model for peak prediction to obtain a first load peak;
inputting the first load peak value and the initial load into the trained reinforcement learning model, performing difference calculation through the trained reinforcement learning model based on the first load peak value and the initial load, and calculating a reward function based on the difference and a loss function;
inputting the initial load and the obtained reward function into a decision unit in the trained reinforcement learning model for decision making to obtain a decision making result, wherein the decision making unit is a sensor model;
and determining a second load peak value as a predicted peak value of the node server corresponding to the preliminary load according to the decision result.
3. The artificial intelligence based container configuration method according to claim 1, wherein the performing capacity expansion processing on the node server corresponding to the first load according to a preset capacity adjustment manner includes:
taking the node server corresponding to the first load as a first server;
dividing the capacity of the first server into a first capacity and a second capacity based on a virtual capacity division manner;
and responding to data access of an application program by adopting the first capacity, modifying the configuration file of the second capacity, restarting the virtual server corresponding to the second capacity, and merging the first capacity and the adjusted second capacity after restarting.
4. The artificial intelligence based container configuration method according to claim 1, wherein said capacity reduction processing on the node server corresponding to the second load comprises:
taking the node server corresponding to the second load as a second server; transferring an access request directed to the second server to other node servers;
and adjusting the configuration file of the second server and restarting the second server.
5. An artificial intelligence based container configuration apparatus, the artificial intelligence based container configuration apparatus comprising:
the load acquisition module is used for acquiring load information of each node server in the current period as an initial load corresponding to the node server;
the peak value prediction module is used for inputting each initial load into a trained reinforcement learning model for trend prejudgment to obtain a prediction peak value corresponding to each node server;
the load comparison module is used for taking the initial load corresponding to the predicted peak value larger than a first preset threshold value as a first load and taking the initial load corresponding to the predicted peak value smaller than a second preset threshold value as a second load, wherein the first preset threshold value is larger than the second preset threshold value;
and the capacity adjusting module is used for carrying out capacity expansion processing on the node server corresponding to the first load and carrying out capacity reduction processing on the node server corresponding to the second load according to a preset capacity adjusting mode.
6. The artificial intelligence based container configuration apparatus of claim 5, wherein the peak prediction module comprises:
the first prediction unit is used for inputting the initial load into a pre-trained LSTM model for peak prediction to obtain a first load peak;
a difference calculation unit, configured to input the first load peak value and the initial load into the trained reinforcement learning model, perform difference calculation based on the first load peak value and the initial load through the trained reinforcement learning model, and calculate a reward function based on a difference and a loss function;
the decision unit is used for inputting the initial load and the obtained reward function into a decision unit in the trained reinforcement learning model for decision making to obtain a decision result, and the decision unit is a perceptron model;
and the second prediction unit is used for determining a second load peak value according to the decision result, and the second load peak value is used as a prediction peak value of the node server corresponding to the preliminary load.
7. The artificial intelligence based container configuration apparatus of claim 5, wherein the capacity adjustment module comprises:
a first server determining unit, configured to use a node server corresponding to the first load as a first server;
a capacity dividing unit, configured to divide a capacity of the first server into a first capacity and a second capacity based on a virtual capacity division manner;
and the first capacity adjusting unit is used for responding to data access of an application program by adopting the first capacity, modifying the configuration file of the second capacity, restarting the virtual server corresponding to the second capacity, and merging the first capacity and the adjusted second capacity after restarting.
8. The artificial intelligence based container configuration apparatus of claim 5, wherein the volume adjustment module further comprises:
a second server determining unit, configured to use a node server corresponding to the second load as a second server;
an access request transfer unit configured to transfer an access request directed to the second server to another node server;
and the second capacity adjusting unit is used for adjusting the configuration file of the second server and restarting the second server.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the artificial intelligence based container configuration method according to any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the artificial intelligence based container configuration method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111222982.5A CN114138401A (en) | 2021-10-20 | 2021-10-20 | Container configuration method, device, equipment and medium based on artificial intelligence |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111222982.5A CN114138401A (en) | 2021-10-20 | 2021-10-20 | Container configuration method, device, equipment and medium based on artificial intelligence |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114138401A true CN114138401A (en) | 2022-03-04 |
Family
ID=80395228
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111222982.5A Pending CN114138401A (en) | 2021-10-20 | 2021-10-20 | Container configuration method, device, equipment and medium based on artificial intelligence |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114138401A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115412449A (en) * | 2022-08-31 | 2022-11-29 | 西安交通大学 | Container dynamic stretching method and system based on load prediction |
-
2021
- 2021-10-20 CN CN202111222982.5A patent/CN114138401A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115412449A (en) * | 2022-08-31 | 2022-11-29 | 西安交通大学 | Container dynamic stretching method and system based on load prediction |
CN115412449B (en) * | 2022-08-31 | 2024-02-27 | 西安交通大学 | Dynamic container telescoping method and system based on load prediction |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111800462A (en) | Micro-service instance processing method and device, computer equipment and storage medium | |
CN109299088A (en) | Mass data storage means, device, storage medium and electronic equipment | |
CN115277566B (en) | Load balancing method and device for data access, computer equipment and medium | |
CN111782304B (en) | Paging loading data logic control method, device, computer equipment and medium | |
CN103686226A (en) | Method and system for monitoring internet access of set top box based on cloud computation and set top box | |
CN114095567A (en) | Data access request processing method and device, computer equipment and medium | |
CN113986564A (en) | Application data flow monitoring method and device, computer equipment and medium | |
CN114070583A (en) | Information access control method, information access control device, computer equipment and medium | |
CN110825807A (en) | Data interaction conversion method, device, equipment and medium based on artificial intelligence | |
CN113254445A (en) | Real-time data storage method and device, computer equipment and storage medium | |
CN113179188A (en) | Service degradation dynamic realization method and device, computer equipment and storage medium | |
CN114490089A (en) | Cloud computing resource automatic adjusting method and device, computer equipment and storage medium | |
CN114138401A (en) | Container configuration method, device, equipment and medium based on artificial intelligence | |
CN114567600A (en) | Traffic management method and related equipment | |
CN113791909A (en) | Server capacity adjusting method and device, computer equipment and storage medium | |
CN116911572A (en) | Page automation assembly method, system, computer equipment and storage medium | |
CN113342502B (en) | Performance diagnosis method and device for data lake, computer equipment and storage medium | |
CN114281817A (en) | Data cleaning method and device, computer equipment and storage medium | |
CN105228139A (en) | A kind of call processing method based on smart machine, device and equipment | |
CN112948817A (en) | Permission control method and device of application program, computer equipment and medium | |
CN112002352B (en) | Random music playing method and device, computer equipment and storage medium | |
CN111327513B (en) | Message data pushing method and device, computer equipment and storage medium | |
CN112684878B (en) | Data transmission method and electronic equipment | |
CN116017069A (en) | Software program package loading method and device, computer equipment and storage medium | |
CN118113376A (en) | Application program starting method for controlling miner lamp and related 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 |