CN117149343A - Information processing method, control node and computer readable storage medium - Google Patents
Information processing method, control node and computer readable storage medium Download PDFInfo
- Publication number
- CN117149343A CN117149343A CN202210570378.XA CN202210570378A CN117149343A CN 117149343 A CN117149343 A CN 117149343A CN 202210570378 A CN202210570378 A CN 202210570378A CN 117149343 A CN117149343 A CN 117149343A
- Authority
- CN
- China
- Prior art keywords
- node
- service node
- middleware
- information
- created
- 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
- 230000010365 information processing Effects 0.000 title claims abstract description 38
- 238000003672 processing method Methods 0.000 title claims abstract description 24
- 238000003860 storage Methods 0.000 title claims abstract description 16
- 230000015654 memory Effects 0.000 claims description 46
- 238000000034 method Methods 0.000 claims description 28
- 238000004891 communication Methods 0.000 claims description 9
- 230000006870 function Effects 0.000 description 18
- 230000009471 action Effects 0.000 description 10
- 239000011159 matrix material Substances 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 9
- 238000012545 processing Methods 0.000 description 6
- 238000004590 computer program Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000005291 magnetic effect Effects 0.000 description 3
- 230000002787 reinforcement Effects 0.000 description 3
- 238000009826 distribution Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013016 damping Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000005294 ferromagnetic effect Effects 0.000 description 1
- 238000012804 iterative process Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
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
- 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
-
- 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/45562—Creating, deleting, cloning virtual machine instances
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The embodiment of the application discloses an information processing method, which comprises the following steps: receiving a creation request for creating the middleware, and determining the type of the middleware to be created based on the creation request; under the condition that the type is the first type and the creation request does not carry the identification of the service node, determining a target service node for creating the middleware to be created from a plurality of service nodes based on the requirement information corresponding to the middleware to be created and the state information of the container arrangement system; wherein the service node is a node except a control node in the container arranging system; determining a target service node from the plurality of service nodes based on the demand information and the status information of each service node in the case of the type being the second type; control creates middleware to be created on the target service node. The embodiment of the application also discloses a control node and a computer readable storage medium.
Description
Technical Field
The present application relates to the field of information processing, and in particular, to an information processing method, a control node, and a computer readable storage medium.
Background
Kubernetes (container orchestration system) provides large-scale container deployment, orchestration, and management capabilities that may be used to create hybrid clouds, containerized middleware, and the like; when creating the middleware to be created, the container arrangement system generally determines a target Node from a plurality of Node nodes according to the requirement information corresponding to the middleware to be created and the state information of each Node, and then creates the middleware to be created on the target Node; however, the target Node is determined in such a manner for each middleware to be created, so that the accuracy of the determined target Node is low.
Disclosure of Invention
To solve the above technical problems, embodiments of the present application desire to provide an information processing method, a control Node, and a computer readable storage medium, which solve the problem of low accuracy in determining a target Node, and improve the accuracy in determining the target Node.
The technical scheme of the application is realized as follows:
an information processing method applied to a control node in a container orchestration system, the method comprising:
receiving a creation request for creating middleware, and determining the type of the middleware to be created based on the creation request;
Determining a target service node for creating the middleware to be created from a plurality of service nodes based on the requirement information corresponding to the middleware to be created and the state information of the container arrangement system under the condition that the type is a first type and the creation request does not carry the identification of the service node; wherein the service node is a node other than the control node in the container arrangement system;
determining the target service node from the plurality of service nodes based on the demand information and the status information of each service node in the case that the type is the second type;
and controlling the creation of the middleware to be created on the target service node.
In the above solution, the determining, from a plurality of service nodes, a target service node for creating the middleware to be created based on the requirement information corresponding to the middleware to be created and the state information of the container arrangement system includes:
acquiring state information of the container arrangement system;
determining a state value corresponding to the container arrangement system after the middleware to be created is created on each service node based on the demand information and the state information of the container arrangement system; wherein the status value characterizes a performance of the container orchestration system;
The target service node is determined from the plurality of service nodes based on the state value.
In the above scheme, acquiring the state information of the container arranging system includes:
determining current state information of the container orchestration system in case the creation request is an initially received creation request within a target period;
acquiring prediction state information of the container arrangement system under the condition that the creation request is not an initially received creation request in the target period; wherein the predicted state information is predicted state information of the container arrangement system after the middleware is created on the last selected service node.
In the above solution, the determining, based on the requirement information and the state information of the container arrangement system, a state value corresponding to the container arrangement system after the middleware to be created is created on each service node includes:
grouping a plurality of the creation requests based on a target time window to obtain a plurality of groups of creation requests;
for each set of creation requests, determining a plurality of state values corresponding to each creation request based on the requirement information in the creation request and the state information of the container arrangement system.
In the above solution, the determining, based on the requirement information in each creation request and the state information of the container arrangement system, a plurality of state values corresponding to each creation request includes:
predicting a predicted state of the container orchestration system after creating the middleware to be created on each service node based on each demand information and state information of the container orchestration system;
and determining a state value corresponding to the predicted state based on the predicted state corresponding to each service node.
In the above solution, the determining the target service node from the plurality of service nodes based on the state value includes:
determining a target state value satisfying a state value condition from the plurality of state values for each piece of demand information;
and determining the service node corresponding to the target state value as the target service node.
In the above scheme, the method further comprises:
and under the condition that the type is the first type and the creation request carries the identifier, determining the service node corresponding to the identifier as a target service node.
In the above solution, the determining the target service node from the plurality of service nodes based on the requirement information and the status information of each service node includes:
Determining target state information meeting a state condition from a plurality of state information based on the demand information;
and determining the service node corresponding to the target state information as the target service node.
A control node, the control node comprising: a processor, a memory, and a communication bus;
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is configured to execute an information processing program in the memory to implement the steps of the information processing method described above.
A computer-readable storage medium storing one or more programs executable by one or more processors to implement the steps of the above-described information processing method.
The information processing method, the control node and the computer readable storage medium provided by the embodiment of the application receive the creation request for creating the middleware and determine the type of the middleware to be created based on the creation request; under the condition that the type is the first type and the creation request does not carry the identification of the service node, determining a target service node for creating the middleware to be created from a plurality of service nodes based on the requirement information corresponding to the middleware to be created and the state information of the container arrangement system; wherein the service node is a node except a control node in the container arranging system; determining a target service node from the plurality of service nodes based on the demand information and the status information of each service node in the case of the type being the second type; controlling to create middleware to be created on the target service node; therefore, the target service node can be determined by adopting different information based on different types of middleware to be created, and the target service node is not determined based on the requirement information and the state information of each service node for each middleware to be created in the related technology, so that the accuracy of the determined target service node is improved.
Drawings
Fig. 1 is a schematic flow chart of an information processing method according to an embodiment of the present application;
FIG. 2 is a flowchart of another information processing method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a Q-learning scheduling module according to an embodiment of the present application;
FIG. 4 is a flowchart of another information processing method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a control node according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
An embodiment of the present application provides an information processing method, which may be applied to a control node in a container arrangement system, as shown with reference to fig. 1, including the steps of:
step 101, receiving a creation request for creating middleware, and determining the type of the middleware to be created based on the creation request.
In embodiments of the present application, the container orchestration system may be simply referred to as k8s; the control node receives a creation request for creating the middleware, which is sent by the client, analyzes the creation request, and obtains the type of the middleware to be created from the creation request. The type of the middleware to be created comprises a first type and a second type; wherein the first type may be a single pod; the second type may be a plurality of pod. A pod is the smallest deployable computing unit that can be created and managed in a container orchestration system, the pod being made up of at least one container. The middleware to be created can also be understood as a containerized middleware to be created.
It should be noted that, the type of the middleware to be created may be carried in the creation request, and the control node may directly obtain from the creation request after resolving the creation request; the type of the middleware to be created can also be obtained by analyzing the requirement information in the creation request by the control node; the requirement information is requirement information corresponding to the middleware to be created.
In one possible implementation, the middleware to be created may be a containerized middleware such as Redis, mongoDB, elasticSearch, kafka.
Step 102, determining a target service node for creating the middleware to be created from a plurality of service nodes based on the requirement information corresponding to the middleware to be created and the state information of the container arrangement system under the condition that the type is the first type and the creation request does not carry the identification of the service node.
The state information may be current state information of the container arrangement system, or predicted state information of the container arrangement system.
In the embodiment of the application, the service Node is a Node except a control Node (Master Node) in k8 s; in the case that the type is the first type and the creation request does not carry the identifier of the service node, it is indicated that the user does not specify the service node to create the middleware with the type of a single pod, and at this time, the control node may autonomously determine the target service node to create the middleware to be created. When determining the target service node, the control node can predict the predicted state of the container arrangement system after creating the middleware to be created on each service node based on the requirement information and the state information of the container arrangement system, and determine the target service node from a plurality of service nodes based on the predicted state corresponding to each service node.
In one possible implementation, the requirement information may be the number of central processing units (Central Processing Unit, CPU), the size of the memory, and the size of the storage needed when creating the middleware to be created.
It should be noted that, step 104 may be performed after step 102.
Step 103, in the case that the type is the second type, determining a target service node from a plurality of service nodes based on the requirement information and the state information of each service node.
Wherein the service node is a node other than the control node in the container orchestration system.
In the embodiment of the application, under the condition that the type is the second type, each service node can be detected, the state information of each service node is obtained, and a plurality of service nodes are screened to obtain the target service node based on the requirement information and the state information of each service node.
The state information of the service node includes information such as CPU remaining amount, memory remaining amount, storage remaining amount, service type and service volume of the service node.
In one possible implementation, in the case that the type is the second type, the control node may screen the plurality of service nodes according to the requirement information and the status information of the service node to obtain the target service node.
It should be noted that step 104 may be performed after step 103.
Step 104, control creates middleware to be created on the target service node.
In the embodiment of the application, after the target service node is determined, the control node can actively modify the configuration file for the scheduling node in the container arrangement system so as to control the creation of the middleware to be created in the target service node through the modified configuration file; the configuration file may specifically be a value.
In one possible implementation, the control Node may configure to create the middleware to be created on the target service Node by dynamically modifying the Node Selector option in the values. Yaml configuration file, and control to create the middleware to be created on the target service Node based on the modified values. Yaml configuration file.
The information processing method provided by the embodiment of the application receives the creation request for creating the middleware and determines the type of the middleware to be created based on the creation request; under the condition that the type is the first type and the creation request does not carry the identification of the service node, determining a target service node for creating the middleware to be created from a plurality of service nodes based on the requirement information corresponding to the middleware to be created and the state information of the container arrangement system; wherein the service node is a node except a control node in the container arranging system; determining a target service node from the plurality of service nodes based on the demand information and the status information of each service node in the case of the type being the second type; controlling to create middleware to be created on the target service node; therefore, the target service node can be determined by adopting different information based on different types of middleware to be created, and the target service node is not determined based on the requirement information and the state information of each service node for each middleware to be created in the related technology, so that the accuracy of the determined target service node is improved.
Based on the foregoing embodiments, an embodiment of the present application provides an information processing method, referring to fig. 2, including the steps of:
step 201, the control node receives a creation request for creating the middleware, and determines the type of the middleware to be created based on the creation request.
It should be noted that any of steps 202, 205, and 206 may be performed after step 201.
Step 202, under the condition that the type is the first type and the creation request does not carry the identification of the service node, the control node acquires the state information of the container arrangement system.
In the embodiment of the application, the time when the creation request is received can be determined, whether the creation request is the first creation request received in the target period or not is determined based on the time, and the state information of the container arrangement system is acquired in different modes according to the determination result; wherein the state information of the container orchestration system may be current state information of the container orchestration system or predicted state information of the container orchestration system.
It should be noted that step 202 may be implemented by steps A1-A2:
and A1, under the condition that the creation request is the creation request initially received in the target period, the control node determines the current state information of the container arrangement system.
In the embodiment of the present application, in the case that the creation request is determined to be the first creation request received in the target period, the current state information of each service node in the container arrangement system may be acquired, and the current state information of the container arrangement system may be determined based on the current state information of the plurality of service nodes.
In one possible implementation, the current state information of the container arrangement system may be information such as the number of CPUs currently remaining in the container arrangement system, the remaining amount of memory, the usage amount of Input/Output (IO), and the load amount.
And A2, the control node acquires the prediction state information of the container arrangement system under the condition that the creation request is not initially received in the target period.
The predicted state information is the state information of the container arrangement system after the middleware is created on the service node selected last time.
In the embodiment of the application, under the condition that the creation request is determined to be the non-first creation request received in the target period, the state information of the container arrangement system after the middleware is created on the last selected service node is determined and predicted to be obtained, and the predicted state information is obtained.
In a possible implementation manner, the creation request is a third request to be created received in the target period, and the state information of the container arrangement system after the creation of the middleware corresponding to the second request to be created is predicted on the target service node selected by the second request to be created, so as to obtain the predicted state information.
Step 203, the control node determines, based on the requirement information and the state information of the container arrangement system, a state value corresponding to the container arrangement system after the middleware to be created is created on each service node.
Wherein the status value characterizes a performance of the container orchestration system.
In the embodiment of the application, under the condition that the state of the container arrangement system is in the state corresponding to the state information, the state value corresponding to the container arrangement system after the middleware to be created is created on each service node can be predicted.
It should be noted that, step 203 may be implemented by steps B1-B2:
and B1, the control node groups a plurality of creation requests based on a target time window to obtain a plurality of groups of creation requests.
The type of the middleware to be created corresponding to each creation request in the plurality of creation requests is a first type, and each creation request does not carry the identification of the service node.
In the embodiment of the application, the size of the target time window is determined by the number of service nodes in k8 s; the size of the time window is equal to the number of service nodes; the plurality of creation requests can be sequenced according to the receiving time to obtain sequenced plurality of creation requests, and the sequenced plurality of creation requests are cut according to the target time window to obtain a plurality of groups of creation requests.
In a possible implementation, if the number of service nodes in k8s is 6, the size of the target time window is 6, and when the number of creation requests is 18, the 18 creation requests are divided into 3 groups, and the number of creation requests in each group is 6.
And B2, the control node determines a plurality of state values corresponding to each creation request according to the requirement information in each creation request and the state information of the container arrangement system.
It should be noted that, there may be multiple sets of creation requests or one set of creation requests in the target period.
In the embodiment of the application, for each creation request in each group of creation requests, under the condition that the state of the container arrangement system is in the state corresponding to the state information, the state values of the container arrangement system after the middleware to be created corresponding to the creation request are respectively created on each service node, so as to obtain a plurality of state values corresponding to each creation request.
In one possible implementation, for each creation request in each set of creation requests, the number of service nodes in the container arrangement system is 5, and the 5 service nodes are Node1 Node, node2 Node, node3 Node, node4 Node and Node5 Node respectively; the control Node may predict that the state value corresponding to the container arrangement system after the middleware to be created is created on the Node1 Node in the case that the state of the container arrangement system is in the state corresponding to the state information, obtain the state value corresponding to the Node1 Node, and then determine the state value corresponding to the Node2 Node, the state value corresponding to the Node3 Node, the state value corresponding to the Node4 Node, and the state value corresponding to the Node5 Node in the same manner.
It should be noted that B2 can be realized by steps B1-B2:
and b1, the control node predicts the predicted state of the container arrangement system after creating the middleware to be created on each service node based on the requirement information and the state information of the container arrangement system.
In the embodiment of the application, under the condition that the state of the container arrangement system is in the state corresponding to the state information, the predicted state of the container arrangement system after the middleware to be created is respectively created on each service node based on the requirement information is predicted.
In a possible implementation manner, only one group of creation requests is provided in the target period, the number of the creation requests in the group of creation requests is 5, and for the first creation request in the group of creation requests, the prediction state of the container arrangement system after the middleware to be created is created on each service node can be predicted based on the demand information in the first creation request and the current state information of the container arrangement system, so as to obtain the prediction state corresponding to each service node; for a second creation request in the creation requests, after the middleware to be created corresponding to the first creation request is created on the target service node corresponding to the first creation request, the prediction state information of the container arrangement system can be determined, the prediction state information is used as the state information of the container arrangement system for the second creation request, and when the container arrangement system is in the state corresponding to the state information, the prediction state of the container arrangement system after the middleware to be created corresponding to the second creation request is created is performed on each service node to obtain the prediction state corresponding to each service node.
And b2, the control node determines a state value corresponding to the predicted state based on the predicted state corresponding to each service node.
In the embodiment of the application, for each creation request, a state value corresponding to a predicted state is calculated by adopting a target rewarding function based on the predicted state corresponding to each service node.
Step 204, the control node determines a target service node from the plurality of service nodes based on the state value.
In the embodiment of the application, a plurality of state values can be screened to obtain the target state value, and the service node corresponding to the target state value is used as the target service node.
It should be noted that step 204 may be implemented by steps C1-C2:
and C1, determining a target state value meeting a state value condition from a plurality of state values by the control node aiming at each piece of requirement information.
In the embodiment of the application, the state value condition may be that the state value is greater than the preset state value, and then the control node may determine the state value greater than the preset state value from the plurality of state values, and screen the state value greater than the preset state value to obtain the target state value; the state value condition may also be that a maximum state value is selected from a plurality of state values, and the control node may then determine the maximum state value from the plurality of state values as the target state value.
And C2, the control node determines the service node corresponding to the target state value as the target service node.
Wherein the target state value may characterize that the performance of the container orchestration system is at an optimum.
In one possible implementation manner, for any creation request, when it is predicted that the performance of the container arrangement system is optimal after the middleware to be created corresponding to the creation request is created on the Node3 Node, the Node3 Node may be used as the target service Node.
It should be noted that, step 208 may be performed after step 204.
In step 205, when the type is the first type and the creation request carries the identifier, the control node determines that the service node corresponding to the identifier is the target service node.
The identifier may be a number of the service node, where the identifier is used to uniquely refer to the service node.
In the embodiment of the present application, when the type of the middleware to be created is the first type, the creation request carries the number "3" of the service node, and then the service node with the number of 3 may be determined from a plurality of service nodes as the target service node.
It should be noted that step 208 may be performed after step 205.
In step 206, when the type is the second type, the control node determines, based on the requirement information, target state information satisfying the state condition from the plurality of state information.
In the embodiment of the application, under the condition that the middleware to be created is of the second type, determining the to-be-selected state information matched with the requirement information from a plurality of state information; when the number of the state information to be selected is one, the state information to be selected is used as target state information; and when the number of the candidate state information is multiple, determining the candidate state information representing the optimal state of the service node from the multiple candidate state information as target state information.
Step 207, the control node determines that the service node corresponding to the target state information is the target service node.
In one possible implementation, if the determined target state information is the state information of the Node3 Node, the Node3 Node may be used as the target service Node.
Step 208, the control node controls to create the middleware to be created on the target service node.
The information processing method provided by the embodiment of the application is explained in detail below in conjunction with an application scenario.
In the embodiment of the application, the mode of determining the target Node is divided into two modes according to the influence of different types of middleware to be created on the k8s performance and considering long-term return, and different modes are adopted for determining the target Node aiming at different types of middleware to be created. The information processing architecture proposed in the embodiment of the present application is explained below.
The information processing architecture comprises a middleware type judging module, a Node judging module, a configuration module, a Q-learning scheduling module, a k8s scheduling module, a Node state detecting module and a strategy executing module.
Wherein, middleware type discriminating module: the main function of the module is to judge the type of the middleware to be created, if the type of the middleware to be created is a single Pod, the module interacts with the Q-learning scheduling module to realize the determination of a target Node for creating the middleware to be created from a plurality of service nodes based on the requirement information corresponding to the middleware to be created and the state information of a container arrangement system; if the middleware type to be created is a plurality of Pod, the module interacts with a k8s scheduling module to determine a target Node from a plurality of service nodes based on the requirement information and the state information of each service Node.
Node discriminating module: the main function of the module is to determine whether the middleware to be created designates a specific Node to create (i.e. determine whether the creation request of the first type carries the Node identifier), if so, the module interacts with the configuration module to create the middleware to be created on the specific Node.
And (3) a configuration module: the main function of the module is to complete the creation of the middleware to be created on the designated Node through the Node Selector option by dynamically modifying the values.yaml configuration file. The configuration module can interact with the Q-learning scheduling module and also interact with the k8s scheduling module so as to realize the creation of the middleware to be created on the determined target Node by dynamically modifying the value.yaml configuration file after the Q-learning scheduling module or the k8s scheduling module determines the target Node.
The Q-learning scheduling module is explained in detail below in conjunction with FIG. 3.
As shown in fig. 3, in the case that the type of the middleware to be created is a single pod and the identifier of the service Node is not carried, the learning module in the Q-learning scheduling module adopts a Q-learning algorithm to determine a target Node for the middleware to be created. As shown in FIG. 3, the Q-learning scheduling module adopts a reinforcement learning model design, and mainly comprises the following components: system environment (i.e., state information of k8 s), agent (Agent), bonus function (forward), state function (State), selection policy (Action). Wherein the agent may represent middleware to be created; the state value may be determined by a prize value calculated by a prize function; the state function is used for calculating the state of the k8s system when a Node is selected; the selection policy refers to selecting a Node.
As shown in fig. 3, the agent selects a Node at the current time, which is the state (i.e., the k8s environment) that the agent begins to try the k8s system. The agent observes the state of k8s and gets a specific prize value, which may be positive or negative. The agent is constantly trying to interact with the k8s environment and after a certain number of attempts, the agent can eventually make an optimal decision. (i.e., determining a target Node from a plurality of Node nodes).
In a feasible implementation manner, the agent is the middleware 1 to be created in the creation request 1, under the condition that k8s is in a state corresponding to the state information, the middleware 1 to be created selects Node1 nodes, predicts to obtain state values corresponding to k8s after the middleware 1 to be created is created on the Node1 nodes, then the middleware 1 to be created respectively selects other Node nodes, predicts state values corresponding to k8s after the middleware 1 to be created is created on each other Node, and finally can obtain a plurality of state values corresponding to the middleware 1 to be created, determines the maximum state value from the plurality of state values, and takes the Node corresponding to the maximum state value as a target Node; when determining that Node3 is a target Node for the middleware 1 to be created in the creation request 1, acquiring predicted state information of the Node3 Node after the predicted Node3 Node creates the middleware 1 to be created on the Node3 Node, and obtaining predicted first state information of k8s according to the predicted state information of the Node3 and state information of other Node nodes; when the agent is the middleware 2 to be created in the creation request 2, it needs to predict the state value corresponding to the Node when each Node creates the middleware 2 to be created when the state of k8s is in the state corresponding to the first state information. It should be noted that, when the middleware 2 to be created tries to select the Node3, for the middleware 2 to be created, initial state information of the Node3 Node is predicted state information of the Node3 Node after the middleware 1 to be created is created on the Node3 Node
k8s scheduling module: for determining a target Node from the plurality of Node nodes based on the demand information and the state information of each Node.
The Node state detection module is mainly used for determining the current state information of the Node and determining the current state information of k8s based on the current state information of the Node.
The main function of the policy execution module is to execute the creation of the middleware to be created on the target Node determined by the Q-Learning module.
The information processing method executed on the information processing architecture according to the embodiment of the present application is explained in detail below.
As shown in fig. 4, firstly, a middleware type discriminating module discriminates the type of the middleware to be created, and if the type of the middleware to be created is a single Pod, the module interacts with a Q-learning scheduling module to determine a target Node; if the deployed middleware types are a plurality of Pods, the module interacts with the K8S scheduling module to determine a target Node.
The Q-learning scheduling module can receive a plurality of creation requests transmitted by the middleware type judging module, wherein the type of the middleware to be created corresponding to each creation request is a first type and does not carry the identification of the Node, the Q-learning scheduling module can sort the plurality of creation requests according to the receiving time, the sorted plurality of creation requests are grouped by adopting a target time window N to obtain a plurality of groups of creation requests, state information of each Node is obtained, a Q value sequence is obtained by training according to the Q-learning algorithm, and the Node corresponding to the maximum Q value is selected as a target Node; q is a state value. After determining a target Node for each creation request, the r value sequence needs to be updated according to the rewarding function so as to update the state of the Node; wherein, the r value sequence is a reward value sequence; when the creation requests of the same group reach the target Node for each creation request, the Q-learning scheduling module sends each creation request in the same group and the identification of the target Node corresponding to each creation request to the configuration module, and the value.yaml configuration file is modified through the configuration module so as to create the middleware to be created based on the modified value.yaml configuration file through the middleware deployment execution module.
Under the condition that the type of the middleware to be created is the second type, sending a creation request to a k8s scheduling module, and determining a target Node by adopting k8s primary scheduling through the k8s scheduling module; the k8s primary scheduling is to determine a target Node based on the requirement information corresponding to the middleware to be created and the state information of each Node.
And under the condition that the type of the middleware to be created is the first type and the creation request carries the Node identification, determining the target Node as the Node corresponding to the Node identification.
The Q-learning algorithm employed by the Q-learning scheduling module is explained below.
The Q-Learning algorithm is an advanced version of reinforcement Learning, which is a model-free and strategically-separated Learning process. Q-Learning is used as model-free advanced version reinforcement Learning, and depends on Q value iteration to realize a selection strategy. In the iterative process of the Q-Learning algorithm, the selection is generally performed according to the direction of the maximum Q value. However, not every iteration will follow this principle, and the Q-Learning algorithm will follow a probability distribution according to the results of multiple experiments, where the distribution will be as most likely to be in the direction of the maximum Q value.
The containerized middleware scheduling method based on Q-Learning adopts a numerical iteration solving method to approach an optimal value. The complex network environment in which the middleware to be created is located is a finite state markov process. After a Node is selected from the action set (multiple Node nodes) of the middleware to be created, the Node is selected to create the middleware to be created, k8s receives the action and makes a state transition, and a reward value is given to the decision. The larger the prize value obtained from a Node, the probability of later re-selecting that Node increases.
In particular, determining a target Node from a plurality of Node nodes may be described as a quadruple < S, R, a, Q >. Wherein S represents Node nodes in the whole k 8S; r (Reward) represents a matrix for obtaining prize values after an action (Node) is selected. A (Action) represents the behavior of the next Node selected according to the k8s state; as shown in table 1, Q represents a trained Q matrix (where a set of creation requests corresponds to one Q matrix), which may represent knowledge that an agent has learned from experience; each element in the Q matrix representing a state value; for each row in the table, a state value corresponding to each Node for a request to be created is represented, where max represents the maximum state value.
TABLE 1 schematic diagram of Q matrix
As shown in table 1, for the request 1 to be created, node3 represents a target Node determined for the middleware 1 to be created corresponding to the request 1 to be created; for the request 2 to be created, node1 represents a target Node determined for the middleware 2 to be created in the request 2 to be created on the basis of determining Node3 for the middleware 1 to be created.
The reward function R used in calculating the Q value is shown in formula (1):
wherein,
wherein alpha is a compensation function, and the function is that when the memory, CPU and storage of Node can not meet the minimum resource requirement of Pod, the above rewarding value is a larger negative value, indicating that the Node resource can not meet the minimum resource requirement of Pod. μ is a weighting function. x may represent any one of memory, cpu, and storage.Any one of the memory idle value, the CPU idle value and the storage idle value representing the i Node is determined in particular according to the meaning represented by x, e.g. when x is memory>Representing the memory idle value of the ith Node;any one of the total memory, the total CPU and the total memory of the ith Node is represented, and is specifically determined according to the meaning represented by x. / >Any one of the minimum memory, the minimum CPU and the minimum memory value required for representing the Pod is determined according to the meaning represented by x memory_limits Indicating the maximum memory occupied by the Pod node is constrained.Representing an idle memory value of an ith Node;Representing the total amount of memory of the i Node. />
Given a priori knowledge, a prize matrix R (the elements in R represent the prize values given by selecting a node) is initialized, and the Q matrix is typically initialized to a 0 matrix. A routing Action (Action) is performed to observe the prize value and the change in the new link state. And (3) carrying out iterative updating on the Q value according to the formula (2).
Q (S, a) ≡Q (S, a) +α [ r+γ ] max (Q (S ', a') -Q (S, a)) ] formula (2)
Wherein, gamma (also understood as attenuation factor) represents the damping coefficient, the value range interval is [0,1 ], Q (S, a) represents the Q value after executing action a under the state S corresponding to the state information of k 8S; q (S ', a') represents the Q value after action a 'is performed in the next state S', r is the reward after action a is performed in the current state S (i.e. the reward r in the next state), gamma is a discount factor, alpha is learning efficiency, gamma is a discount reward in the next state, gamma is max (Q (S ', a') forms an improved estimate of the reward in the next state according to formula (2), the Q value in the Q matrix is iteratively updated until S is the final state (i.e. the corresponding target service node is determined for each creation request of the same group), and a trained Q matrix is obtained.
It should be noted that, in this embodiment, the descriptions of the same steps and the same content as those in other embodiments may refer to the descriptions in other embodiments, and are not repeated here.
According to the information processing method provided by the embodiment of the application, the target service node can be determined by adopting different information based on different types of middleware to be created, and the target service node is not determined based on the requirement information and the state information of each service node for each middleware to be created in the related technology, so that the accuracy of the determined target service node is improved.
Based on the foregoing embodiments, the embodiment of the present application provides a control node, which may be applied to the information processing method provided in the corresponding embodiment of fig. 1 to 2, and referring to fig. 5, the control node 3 may include: a processor 31, a memory 32, and a communication bus 33, wherein:
the communication bus 33 is used to enable a communication connection between the processor 31 and the memory 32;
the processor 31 is configured to execute an information processing program in the memory 32 to realize the steps of:
receiving a creation request for creating the middleware, and determining the type of the middleware to be created based on the creation request;
Under the condition that the type is the first type and the creation request does not carry the identification of the service node, determining a target service node for creating the middleware to be created from a plurality of service nodes based on the requirement information corresponding to the middleware to be created and the state information of the container arrangement system; wherein the service node is a node except a control node in the container arranging system;
determining a target service node from the plurality of service nodes based on the demand information and the status information of each service node in the case of the type being the second type;
control creates middleware to be created on the target service node.
In other embodiments of the present application, the processor 31 is configured to execute the information processing program in the memory 32, and determine a target service node for creating the middleware to be created from a plurality of service nodes based on the requirement information corresponding to the middleware to be created and the state information of the container arrangement system, so as to implement the following steps:
acquiring state information of a container arranging system;
determining a state value corresponding to the container arrangement system after the middleware to be created is created on each service node based on the requirement information and the state information of the container arrangement system; the state value characterizes the performance of the container orchestration system;
A target service node is determined from the plurality of service nodes based on the state values.
In other embodiments of the present application, the processor 31 is configured to execute the information processing program in the memory 32 to obtain the status information of the container arrangement system, so as to implement the following steps:
determining current state information of the container orchestration system in case the creation request is an initially received creation request within a target period;
acquiring the prediction state information of the container arrangement system under the condition that the creation request is not an initially received creation request in a target period; the predicted state information is the state information of the container arrangement system after the middleware is created on the service node selected last time.
In other embodiments of the present application, the processor 31 is configured to execute the information processing program in the memory 32, determine a status value corresponding to the container arrangement system after creating the middleware to be created on each service node based on the requirement information and the status information of the container arrangement system, so as to implement the following steps:
grouping a plurality of creation requests based on a target time window to obtain a plurality of groups of creation requests;
for each set of creation requests, a plurality of status values corresponding to each creation request are determined based on the demand information in each creation request and the status information of the container orchestration system.
In other embodiments of the present application, the processor 31 is configured to execute the information processing program in the memory 32 to determine a plurality of status values corresponding to each creation request based on the requirement information in each creation request and the status information of the container arrangement system, so as to implement the following steps:
predicting a predicted state of the container orchestration system after creating middleware to be created on each service node based on each demand information and state information of the container orchestration system;
and determining a state value corresponding to the predicted state based on the predicted state corresponding to each service node.
In other embodiments of the present application, the processor 31 is configured to determine a target service node from a plurality of service nodes based on the state values for executing the information processing program in the memory 32, to implement the steps of:
for each piece of demand information, determining a target state value satisfying a state value condition from a plurality of state values;
and determining the service node corresponding to the target state value as a target service node.
In other embodiments of the present application, the processor 31 is configured to execute an information processing program in the memory 32 to implement the following steps:
and under the condition that the type is the first type and the creation request carries the identifier, determining the service node corresponding to the identifier as the target service node.
In other embodiments of the present application, the processor 31 is configured to execute the information processing program in the memory 32 to determine a target service node from a plurality of service nodes based on the requirement information and the status information of each service node, so as to implement the following steps:
determining target state information satisfying a state condition from the plurality of state information based on the demand information;
and determining the service node corresponding to the target state information as a target service node.
It should be noted that, the specific implementation process of the steps executed by the processor in this embodiment may refer to the implementation process in the information processing method provided in the embodiment corresponding to fig. 1 to 2, which is not described herein again.
The control node provided by the embodiment of the application can determine the target service node by adopting different information based on different types of the middleware to be created, and does not determine the target service node based on the requirement information and the state information of each service node for each middleware to be created in the related technology, thereby improving the accuracy of the determined target service node.
Based on the foregoing embodiments, embodiments of the present application provide a computer-readable storage medium storing one or more programs executable by one or more processors to implement steps in the information processing method provided by the corresponding embodiments of fig. 1-2.
The computer readable storage medium may be a Read Only Memory (ROM), a programmable Read Only Memory (Programmable Read-Only Memory, PROM), an erasable programmable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable programmable Read Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic random access Memory (Ferromagnetic Random Access Memory, FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a compact disk Read Only Memory (Compact Disc Read-Only Memory, CD-ROM), or the like; but may be various electronic devices such as mobile phones, computers, tablet devices, personal digital assistants, etc., that include one or any combination of the above-mentioned memories.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.
Claims (10)
1. An information processing method, applied to a control node in a container orchestration system, the method comprising:
receiving a creation request for creating middleware, and determining the type of the middleware to be created based on the creation request;
determining a target service node for creating the middleware to be created from a plurality of service nodes based on the requirement information corresponding to the middleware to be created and the state information of the container arrangement system under the condition that the type is a first type and the creation request does not carry the identification of the service node; wherein the service node is a node other than the control node in the container arrangement system;
determining the target service node from the plurality of service nodes based on the demand information and the status information of each service node in the case that the type is the second type;
and controlling the creation of the middleware to be created on the target service node.
2. The method of claim 1, wherein the determining a target service node for creating the middleware to be created from a plurality of service nodes based on the requirement information corresponding to the middleware to be created and the state information of the container arrangement system comprises:
Acquiring state information of the container arrangement system;
determining a state value corresponding to the container arrangement system after the middleware to be created is created on each service node based on the demand information and the state information of the container arrangement system; wherein the status value characterizes a performance of the container orchestration system;
the target service node is determined from the plurality of service nodes based on the state value.
3. The method of claim 2, wherein the obtaining status information of the container orchestration system comprises:
determining current state information of the container orchestration system in case the creation request is an initially received creation request within a target period;
acquiring prediction state information of the container arrangement system under the condition that the creation request is not an initially received creation request in the target period; wherein the predicted state information is predicted state information of the container arrangement system after the middleware is created on the last selected service node.
4. The method of claim 2, wherein the determining, based on the demand information and the state information of the container orchestration system, a state value that characterizes a correspondence of the container orchestration system after creation of the middleware to be created on each service node, comprises:
Grouping a plurality of the creation requests based on a target time window to obtain a plurality of groups of creation requests;
for each set of creation requests, determining a plurality of state values corresponding to each creation request based on the requirement information in the creation request and the state information of the container arrangement system.
5. The method of claim 4, wherein determining a plurality of status values corresponding to each creation request based on the demand information in the each creation request and the status information of the container orchestration system comprises:
predicting a predicted state of the container orchestration system after creating the middleware to be created on each service node based on each demand information and state information of the container orchestration system;
and determining a state value corresponding to the predicted state based on the predicted state corresponding to each service node.
6. The method of claim 5, wherein said determining the target service node from the plurality of service nodes based on the status value comprises:
determining a target state value satisfying a state value condition from the plurality of state values for each piece of demand information;
And determining the service node corresponding to the target state value as the target service node.
7. The method according to claim 1, wherein the method further comprises:
and under the condition that the type is the first type and the creation request carries the identifier, determining the service node corresponding to the identifier as a target service node.
8. The method of claim 1, wherein the determining the target service node from the plurality of service nodes based on the demand information and the status information of each service node comprises:
determining target state information meeting a state condition from a plurality of state information based on the demand information;
and determining the service node corresponding to the target state information as the target service node.
9. A control node, the control node comprising: a processor, a memory, and a communication bus;
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is configured to execute an information processing program in a memory to realize the steps of the information processing method according to any one of claims 1 to 8.
10. A computer-readable storage medium storing one or more programs executable by one or more processors to implement the steps of the information processing method of any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210570378.XA CN117149343A (en) | 2022-05-24 | 2022-05-24 | Information processing method, control node and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210570378.XA CN117149343A (en) | 2022-05-24 | 2022-05-24 | Information processing method, control node and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117149343A true CN117149343A (en) | 2023-12-01 |
Family
ID=88897381
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210570378.XA Pending CN117149343A (en) | 2022-05-24 | 2022-05-24 | Information processing method, control node and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117149343A (en) |
-
2022
- 2022-05-24 CN CN202210570378.XA patent/CN117149343A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8276143B2 (en) | Dynamic scheduling of application tasks in a distributed task based system | |
US20110161294A1 (en) | Method for determining whether to dynamically replicate data | |
US10970127B1 (en) | Systems and methods for virtual machine resource optimization using machine learning techniques | |
CN112214288B (en) | Pod scheduling method, device, equipment and medium based on Kubernetes cluster | |
CN109408230B (en) | Docker container deployment method and system based on energy consumption optimization | |
CN112631758A (en) | Edge computing resource scheduling method, device and equipment and readable storage medium | |
US11513866B1 (en) | Method and system for managing resource utilization based on reinforcement learning | |
US20240086296A1 (en) | Dynamic allocation and use of ims processing resources | |
US20220051135A1 (en) | Load balancing using data-efficient learning | |
CN113535346B (en) | Method, device, equipment and computer storage medium for adjusting thread number | |
CN118012906A (en) | Multi-level cache self-adaption system and strategy based on machine learning | |
CN116302448B (en) | Task scheduling method and system | |
CN117149343A (en) | Information processing method, control node and computer readable storage medium | |
CN113596146B (en) | Resource scheduling method and device based on big data | |
CN112230964A (en) | Application program development method, application program running method, device, equipment and medium | |
Ren et al. | Learning-driven service caching in MEC networks with bursty data traffic and uncertain delays | |
CN113672356A (en) | Computing resource scheduling method and device, storage medium and electronic equipment | |
CN112395072A (en) | Model deployment method and device, storage medium and electronic equipment | |
CN117130790B (en) | Dynamic scheduling method for cloud computing resource pool | |
CN115720195B (en) | Virtual network remapping method, device and storage medium | |
CN116192673B (en) | Genetic algorithm-based multi-target dynamic weighting service combination method and device | |
EP4383790A1 (en) | A method, device and computing device to improve action selection in an actionnable system | |
CN112669893B (en) | Method, system, device and equipment for determining read voltage to be used | |
CN117171261B (en) | Elastic expansion intelligent calling method and system for multiple database units | |
Kadhim | RESPONSE TIME AWARE TASK-PLACEMENT STRATEGY FOR IOT-FOG NETWORK |
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 |