CN115220915B - Server control method, device, storage medium and electronic equipment - Google Patents

Server control method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115220915B
CN115220915B CN202210836696.6A CN202210836696A CN115220915B CN 115220915 B CN115220915 B CN 115220915B CN 202210836696 A CN202210836696 A CN 202210836696A CN 115220915 B CN115220915 B CN 115220915B
Authority
CN
China
Prior art keywords
server
controlled
resource
role
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210836696.6A
Other languages
Chinese (zh)
Other versions
CN115220915A (en
Inventor
吴秉佺
李力卡
张慧嫦
姜林伟
余淼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202210836696.6A priority Critical patent/CN115220915B/en
Publication of CN115220915A publication Critical patent/CN115220915A/en
Application granted granted Critical
Publication of CN115220915B publication Critical patent/CN115220915B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Abstract

The disclosure provides a server control method, a server control device, a storage medium and electronic equipment, and relates to the technical field of computers. The server control method comprises the following steps: acquiring characteristic data of a server to be controlled; processing the characteristic data of the server to be controlled by utilizing a pre-trained role identification model to determine the role of a target node to which the server to be controlled belongs; acquiring resource use policy information corresponding to the target node role from a pre-constructed node information database; and determining control information aiming at the server to be controlled according to the resource use strategy information corresponding to the target node role and the current resource state information of the server to be controlled. The reliability of the server control method is improved.

Description

Server control method, device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a server control method, a server control device, a computer readable storage medium, and an electronic apparatus.
Background
Servers are often used in the fields of data processing, the internet, etc., and a plurality of servers may be generally grouped into a server cluster to improve the reliability of the server processing procedure.
The server control method in the related art causes the idling of the server, so that the server resource is wasted, the utilization efficiency of the server is low, and the reliability of the control method of the server is reduced.
Disclosure of Invention
The present disclosure provides a server control method, a server control device, a computer-readable storage medium, and an electronic apparatus, thereby improving reliability of a control method of a server at least to some extent.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to a first aspect of the present disclosure, there is provided a server control method including: acquiring characteristic data of a server to be controlled; processing the characteristic data of the server to be controlled by utilizing a pre-trained role identification model to determine the role of a target node to which the server to be controlled belongs; acquiring resource use policy information corresponding to the target node role from a pre-constructed node information database; and determining control information aiming at the server to be controlled according to the resource use strategy information corresponding to the target node role and the current resource state information of the server to be controlled.
Optionally, the server control method of the first aspect further includes: acquiring characteristic data of a reference server in a sampling period to serve as sample characteristic data, and acquiring node role labels of the reference server in the sampling period; training a machine learning model using the sample feature data and the node character labels to obtain the character recognition model.
Optionally, the server control method of the first aspect further includes: acquiring resource state information of the reference server in the sampling period; and constructing the node information database according to the resource state information of the reference server in the sampling period and the node role label of the reference server in the sampling period.
Optionally, the resource usage policy information includes a resource usage index, and the current resource status information includes a current resource usage rate; the determining control information for the server to be controlled according to the resource usage policy information corresponding to the target node role and the current resource state information of the server to be controlled includes: determining a resource use index corresponding to the server to be controlled from the resource use strategy information corresponding to the target node role; and comparing the current resource utilization rate of the server to be controlled with the resource utilization index corresponding to the server to be controlled to determine control information aiming at the server to be controlled.
Optionally, the resource usage policy information includes one or more resource usage indexes corresponding to the resource demand information; the current resource state information also comprises current resource configuration; the determining the resource usage index corresponding to the server to be controlled from the resource usage policy information corresponding to the target node role includes: and matching the current resource configuration of the server to be controlled with the resource demand information corresponding to the target node role to determine a resource use index corresponding to the server to be controlled.
Optionally, the server to be controlled belongs to a target cluster; the obtaining the resource usage policy information corresponding to the target node role in the pre-constructed node information database includes: determining a node information database corresponding to the target cluster, and acquiring resource use policy information corresponding to the target node role from the node information database corresponding to the target cluster.
Optionally, the server control method of the first aspect further includes: and if the target node role belongs to a preset role in the target cluster, determining that the control information of the server to be controlled is in a maintenance running state.
According to a second aspect of the present disclosure, there is provided a server control apparatus including: the characteristic data acquisition module is configured to acquire characteristic data of a server to be controlled; the target node role determining module is configured to process the characteristic data of the server to be controlled by utilizing a pre-trained role identification model so as to determine the target node role of the server to be controlled; the resource use policy information acquisition module is configured to acquire resource use policy information corresponding to the target node role from a pre-constructed node information database; and the control information determining module is configured to determine control information aiming at the server to be controlled according to the resource use strategy information corresponding to the target node role and the current resource state information of the server to be controlled.
According to a third aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the server control method of the first aspect described above and possible implementations thereof.
According to a fourth aspect of the present disclosure, there is provided an electronic device comprising: a processor; and the memory is used for storing executable instructions of the processor. Wherein the processor is configured to perform the server control method of the first aspect and possible implementations thereof via execution of the executable instructions.
The technical scheme of the present disclosure has the following beneficial effects:
the method comprises the steps of firstly obtaining characteristic data of a server to be controlled, then outputting a target node role to which the server to be controlled belongs by utilizing a role identification model, obtaining resource use strategy information corresponding to the target node role in a pre-constructed node information database, and finally determining control information aiming at the server to be controlled according to the resource use strategy information corresponding to the target node role and current resource state information of the server to be controlled. On the one hand, a role recognition model is used for outputting a target node role to which a server to be controlled belongs, so that the stability of the node role acquisition process of the server is improved, and the judgment accuracy of the node roles of the server is improved; on the other hand, the character recognition model can be applied to other server processing procedures, so that portability and reusability of the character recognition model are enhanced; in still another aspect, control information for the server to be controlled is determined according to the resource configuration information corresponding to the role of the target node and the current resource state information of the server to be controlled, so that accurate control of the server is realized, the utilization efficiency of the server is improved, the reliability of a server control method is improved, and the user experience is further improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort.
FIG. 1 illustrates a system architecture of an operating environment of the present exemplary embodiment;
fig. 2 shows a flowchart of a server control method in the present exemplary embodiment;
FIG. 3 is a schematic diagram showing a process of generating a character recognition model in the present exemplary embodiment;
FIG. 4 illustrates a flowchart of one method of generating a character recognition model in accordance with the exemplary embodiment;
fig. 5 is a schematic diagram showing a process of determining control information in the present exemplary embodiment;
fig. 6 is a schematic diagram showing a process of constructing a node information database in the present exemplary embodiment;
Fig. 7 shows a flowchart of a server control method of the present exemplary embodiment;
fig. 8 is a schematic diagram showing the structure of a server control device in the present exemplary embodiment;
fig. 9 shows a schematic structural diagram of an electronic device in the present exemplary embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the present disclosure. However, those skilled in the art will recognize that the aspects of the present disclosure may be practiced with one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
In the related art, the virtualized resources of the server are not fully utilized, which usually results in idle server, so that the server resources are wasted, the utilization efficiency of the server is low, and the reliability of the control method of the server is reduced. Moreover, the roles of each server in the cluster are not completely known in the related art, resulting in inefficiency in server control.
In view of one or more of the problems described above, exemplary embodiments of the present disclosure first provide a server control method. The system architecture of the operating environment of the present exemplary embodiment is described below in conjunction with fig. 1.
Referring to fig. 1, the system architecture 100 may include a plurality of servers 110 and a control server 120, where the control server 120 is used to control the servers 110, and the control server 120 may be a specially configured server, or may be any one or more servers in the servers 110. The number and connection manner of the servers in the server 110 are not particularly limited in the present disclosure, wherein the server 110 may have feature data; server 120 broadly refers to a backend system that provides server control related services in the present exemplary embodiment; server 120 may be a server or a cluster of servers, which is not limited by this disclosure. The plurality of servers 110 and the control server 120 may be connected through a wired or wireless communication link for data interaction.
In one embodiment, the control server 120 may obtain feature data of a server to be controlled from the plurality of servers 110, and then process the feature data of the server to be controlled according to a pre-trained role recognition model to determine a target node role of the server to be controlled; acquiring resource configuration information corresponding to the target node role from a pre-constructed node information database; and finally, determining control information aiming at the server to be controlled according to the resource use strategy information corresponding to the target node role and the current resource state information of the server to be controlled in the server cluster 110.
The server control method is described below with reference to fig. 2. Fig. 2 shows an exemplary flow of a server control method, including the following steps S210 to S240:
step S210, obtaining characteristic data of a server to be controlled;
step S220, processing the data of the server to be controlled by utilizing a pre-trained role recognition model so as to determine the role of the target node to which the server to be controlled belongs;
step S230, obtaining resource use strategy information corresponding to the target node role from a pre-constructed node information database;
step S240, determining control information for the server to be controlled according to the resource use strategy information corresponding to the target node role and the current resource state information of the server to be controlled.
Based on the method, on one hand, a role identification model is used for outputting a target node role to which a server to be controlled belongs, so that the stability of the node role acquisition process of the server is improved, and the judgment accuracy of the node role of the server is improved; on the other hand, the character recognition model can be applied to other server processing procedures, so that portability and reusability of the character recognition model are enhanced; in still another aspect, control information for the server to be controlled is determined according to resource usage policy information corresponding to the role of the target node and current resource state information of the server to be controlled, so that accurate control of the server is achieved, utilization efficiency of the server is improved, reliability of a server control method is improved, and user experience is further improved.
Each step in fig. 2 is specifically described below.
Referring to fig. 2, in step S210, feature data of a server to be controlled is acquired.
The feature data is data related to the server, and the specific content of the feature data is not limited in this disclosure, for example, the feature data may include historical data, service data, and the like of the server, and in an embodiment, the feature data may include index data such as CPU utilization rate and memory utilization rate of the server.
In one embodiment, the service data, the history data, the index data, and the like of the server to be controlled may be subjected to feature extraction, and the result of the feature extraction is taken as the feature data, and the specific mode of feature extraction is not particularly limited in the present disclosure, for example, feature extraction may include extracting peaks and troughs of certain history data of the server to be controlled, and may also be an autocorrelation function (Autocorrelation Function, ACF) index, a partial autocorrelation function (Partial Autocorrelation Function, PACF) index, and the like, which extract the index data.
With continued reference to fig. 2, at step S220, data of the server to be controlled may be processed using a pre-trained role recognition model to determine a target node role to which the server to be controlled belongs;
The character recognition model may be a machine learning model for recognizing node characters of the server, and the present disclosure is not limited in particular to a machine learning model for generating the character recognition model, and for example, the machine learning model may be a decision tree model.
The node roles may be determined according to the functional class of the cluster in which the server is located, and the specific content of the node roles is not particularly limited in the present disclosure, for example, the node roles may include a standby node, a data intake node, a coordination node, a conversion node, and the like. The target node role may be the node role of the server to be controlled as determined by the role recognition model described above.
In one embodiment, as shown in fig. 3, the character recognition model may be obtained according to the following steps S310 to S320:
step S310, obtaining characteristic data of a reference server in a sampling period to serve as sample characteristic data, and obtaining node role labels of the reference server in the sampling period;
step S320, training the machine learning model by using the sample feature data and the node character labels to obtain a character recognition model.
The reference server may be a running server in a cluster, or may be a server to be turned off in a cluster, and the source of the reference server and the number of the reference servers are not particularly limited in the disclosure. The sampling period may be a period of time during which reference server characteristic data is acquired, and the specific duration of the sampling period is not particularly limited by the present disclosure.
The node role tag may be an identifier of the node role, and the specific content of the node role tag is not limited in this disclosure, for example, the node role may be represented by a six-bit binary number, such as: 000001 may be an identification of a standby node and 000010 may be an identification of a data node.
A machine learning model is an expression of an algorithm that can look up patterns or make predictions by combing large amounts of data. The specific type of machine learning model is not particularly limited in this disclosure, and for example, the machine learning model may include a support vector machine, a linear classifier, a decision tree model, and the like.
In the present exemplary embodiment, first, feature data of a reference server in a sampling period may be collected to obtain sample feature data; and simultaneously acquiring node role labels of the reference server in the sampling period, and training a machine learning model by using sample characteristic data and the node role labels of the reference server in the sampling period to obtain the role identification model.
In one embodiment, sample feature data may be obtained according to a feature extraction result of index data of a reference server, and the machine learning model may be a decision tree model, and then the index data and a node role label of the reference server in a sampling period may be obtained first, and feature extraction is performed on the index data to obtain index feature data; training the decision tree model by utilizing index characteristic data of the reference server and the node role labels to obtain the role identification model.
After the character recognition model is obtained, in an implementation manner, after the character recognition model receives the feature data of the server to be controlled, the scores of the server to be controlled under different node angle labels can be determined according to the similarity degree of the feature data of the server to be controlled and sample feature data corresponding to different node character labels; determining the role portraits of the servers to be controlled based on the scores of the servers to be controlled under the different node angle tags; the higher the similarity degree of the characteristic data of the server to be controlled and the sample characteristic data corresponding to a certain node role label is, the higher the score of the server to be controlled on the role label is, and the node role label corresponding to the server to be controlled when the score of the server to be controlled is highest under various role labels is obtained to be used as the target node role to which the server to be controlled belongs.
In one embodiment, the feature data may be a feature extraction result of index data of the server to be controlled; the sample feature data may be a result of feature extraction of index data of the reference server, the machine learning model may be a decision tree model, as shown in fig. 4, a role recognition model may be obtained according to steps S401 to S404, and a target node role to which the server to be controlled belongs may be determined according to steps S405 to S407:
Step S401, sample index data of a reference server in a sampling period and node role labels are obtained;
step S402, extracting characteristics of sample index data to obtain sample index characteristic data;
step S403, inputting the sample index feature data and the node role labels into a decision tree model to train the decision number model;
step S404, obtaining a role recognition model according to the trained decision tree model;
step S405, index data of a server to be controlled is obtained;
step S406, extracting the characteristics of the index data to obtain index characteristic data;
step S407, obtaining the role of the target node to which the server to be controlled belongs.
According to the method, the target node role of the server to be controlled is acquired according to the pre-trained role identification model, so that the stability of the acquisition process of the target node role can be improved, the error of the acquisition process of the target node role can be reduced, the accuracy and reusability of the acquisition of the target node role can be improved, and the application of large-scale server data in the actual process can be met.
After the target node role of the server to be controlled is acquired, with continued reference to fig. 2, in step S230, resource usage policy information corresponding to the target node role may be acquired from a node information database constructed in advance;
The node information database may include a node role tag and resource usage policy information corresponding to the node role tag, and the construction mode of the node information database is not particularly limited in the present disclosure. The resource use policy information may include a node role tag, one or more kinds of resource requirement information corresponding to the node role tag, and a resource use index corresponding to each kind of resource requirement information; the specific content of the resource demand information is not particularly limited, for example, the resource demand information may be central processing units (Central Processing Unit, CPU) of different cores corresponding to the node role label, memory demands of the CPU of different cores, and the like; the resource configuration may include various configuration information of the server, and the specific content of the resource configuration is not particularly limited in the disclosure, for example, the resource configuration may include configuration information such as processor configuration, memory configuration, and the like; the resource usage index may be a threshold value of a resource usage rate, and the specific content of the resource usage index is not particularly limited in the disclosure, for example, the resource usage index may include a threshold value of a memory usage rate corresponding to a data node under certain resource requirement information; the above-mentioned resource usage rate may include space usage rate information of the server, and the specific content of the resource usage rate is not particularly limited in this disclosure, and for example, the resource usage rate may include CPU usage rate, memory usage rate, and the like.
In one embodiment, the target node role may be matched with the node role tag in the node information database, and the resource usage policy information may be determined according to the resource requirement information and the resource usage index value corresponding to the matched node role tag.
After obtaining the resource usage policy information corresponding to the target node role, referring to fig. 2, in step S240, control information for the server to be controlled may be determined according to the resource usage policy information corresponding to the target node role and current resource status information of the server to be controlled.
The current resource status information may include at least a current resource configuration and a current resource usage of the server to be controlled. The control information may include a control instruction of the server to be controlled, and the specific content of the control information is not particularly limited in this disclosure, for example, the control information may include other control instructions such as "shutdown server instruction", "maintain running state instruction", and the like.
In one embodiment, the resource usage policy information includes a resource usage index, and the current resource status information includes a current resource usage rate; as shown in fig. 5, determining control information for the server to be controlled according to the resource usage policy information corresponding to the role of the target node and the current resource status information of the server to be controlled may include the following steps S510 to S520:
Step S510, determining a resource use index corresponding to the server to be controlled from the resource use strategy information corresponding to the target node role;
step S520, the current resource usage of the server to be controlled is compared with the resource usage index corresponding to the server to be controlled, so as to determine the control information for the server to be controlled.
In step S510, determining a resource usage index corresponding to the server to be controlled from the resource usage policy information corresponding to the target node role; in one embodiment, the resource usage policy information includes one or more resource usage indexes corresponding to resource demand information; the current resource status information further includes a current resource configuration; the determining, from the resource usage policy information corresponding to the target node role, the resource usage index corresponding to the server to be controlled may include:
and matching the current resource configuration of the server to be controlled with the resource demand information corresponding to the target node role so as to determine the resource use index corresponding to the server to be controlled.
For example, when the target node role of the server to be controlled is "data node", the "data node" may correspond to one or more kinds of resource requirement information in the node information database, where each kind of resource requirement information corresponds to one kind of resource usage index, for example, the data node may correspond to two kinds of resource requirement information: the first disk read-write type is CPU64 core, memory 128G, and the second disk read-write type is CPU16 core, memory 32G, wherein, the first resource demand information corresponds to a resource usage index: "memory utilization threshold 0.1"; a resource usage index corresponding to the second resource demand information: "memory utilization threshold 0.05"; the node information database may be recorded as: the data node is a first type of disk read-write type, namely a CPU64 core, a memory 128G and a memory utilization threshold value of 0.1; the second type of disk read-write type is CPU16 core, memory 32G, memory utilization threshold 0.05". The matching can be performed according to the current resource configuration of the server to be controlled and various resource requirement information corresponding to the data node in the node information database, for example, the obtained current resource configuration of the server to be controlled is the CPU16 core and the memory 32G, the matching is performed in the node information database according to the CPU16 core and the memory 32G, the matching is performed to the second requirement information of the server to be controlled belonging to the data node, and the corresponding resource use index is obtained to be the memory utilization threshold value 0.05.
The method for determining the resource use index corresponding to the server to be controlled from the resource use strategy information corresponding to the target node role enables the resource use index to be obtained more accurately, and reduces the interference of abnormal values.
After the resource usage index corresponding to the server to be controlled is obtained, in step S520, the control information for the server to be controlled may be determined by comparing the current resource usage rate of the server to be controlled with the resource usage index corresponding to the server to be controlled.
In one embodiment, when the current resource usage rate of the server to be controlled is lower than the resource usage index corresponding to the server to be controlled, it may be determined that the server to be controlled is in an idle state, and the server to be controlled outputs a "shutdown server" instruction. In the exemplary embodiment, the server to be controlled is accurately shut down based on the resource utilization index corresponding to the target node role and the current resource utilization rate of the server to be controlled, so that the phenomena of misclosing and missed closing are avoided, the control accuracy of the server is improved, meanwhile, the idle server is shut down in time, the maximum energy saving can be realized, and the user experience is improved.
In one embodiment, as shown in fig. 6, the node information database may be constructed according to the following steps S610 to S620:
step S610, acquiring resource state information of a reference server in a sampling period;
step S620, a node information database is constructed according to the resource state information of the reference server in the sampling period and the node role labels of the reference server in the sampling period.
In the present exemplary embodiment, resource status information of a reference server within a sampling period may be first acquired, wherein the resource status information may include a resource usage rate and a resource configuration of the reference server; and then constructing a node information database according to the resource state information of the reference server in the sampling period and the node role label of the reference server in the sampling period, wherein the node role label can be acquired when constructing the role identification model, so that the problem of low efficiency caused by repeatedly acquiring the node role label is avoided.
In one embodiment, the resource usage policy information may be obtained according to the corresponding resource status information when the reference server is precisely turned off, so as to construct a node information database, and after the resource status information of the reference server is obtained, the resource usage policy information may include a resource usage rate and a resource configuration corresponding to the reference server when the reference server is turned off; the resource utilization index in the resource utilization strategy information can be obtained according to the corresponding resource utilization rate when the reference server is shut down; the resource demand information in the resource use policy information can be obtained according to the corresponding resource configuration when the reference server is shut down; counting the resource use policy information of the reference server to obtain a node role label corresponding to the reference server, one or more resource demand information corresponding to the node role label, and a group of resource use indexes corresponding to each resource demand information; and finally, corresponding one or more kinds of resource demand information corresponding to the node role label and a group of three variables of resource use indexes corresponding to each kind of resource demand information to construct a node information database.
In one embodiment, the server to be controlled belongs to a target cluster; the obtaining the resource usage policy information corresponding to the target node role in the pre-constructed node information database may include the following steps:
determining a node information database corresponding to the target cluster, and acquiring resource use policy information corresponding to the target node role from the node information database corresponding to the target cluster.
In this exemplary embodiment, the node information database corresponding to the target cluster may be determined first, and the resource usage policy information corresponding to the target node role may be obtained from the node information database corresponding to the target cluster.
In one embodiment, if the target node role belongs to a preset role in the target cluster, it may be determined that the control information of the server to be controlled is in a maintenance operation state.
The preset roles refer to special node roles needing to maintain the running state, and are generally node roles required by the running of the target cluster. The present disclosure does not limit the preset role, for example, the preset role may be a traffic interface role, responsible for traffic transmission of other servers in the cluster, and when the target cluster is in a working state, the server belonging to the node role cannot be turned off.
In the method, different target clusters correspond to different node information databases, so that the server control method disclosed by the invention can be flexibly adapted to different clusters, different control information is given for node roles of servers in the clusters, and the universality and the flexibility of the server control method are improved.
In one embodiment, a set of resource usage indexes may be predetermined, and the control information of the servers with different node roles in the cluster is determined based on the same set of resource usage indexes; firstly, determining whether a server to be controlled in a cluster belongs to an important node or not in a mode of inquiring a service party, and if the server to be controlled does not belong to the important node; determining control information of the server to be controlled according to whether index data such as CPU utilization rate, memory utilization rate and the like of the server to be controlled are lower than the resource use index; in this exemplary embodiment, the service side may not know the node roles of the servers in the cluster, so that the determination result of the node roles of the servers is inaccurate, and thus accurate control of the servers cannot be achieved according to the node roles where the servers are located; in addition, the resource usage index corresponding to the different node roles may be different, and the control information of the server to be controlled is determined only by whether the index data of the server to be controlled reaches the resource usage index, so that the reliability of the server control method is poor, for example, the index data of the server to be controlled is lower than the resource usage index, but the server to be controlled belongs to the traffic interface role and cannot be shut down, at this time, the shut down of the server to be controlled is determined only by whether the resource usage index is reached, which can cause paralysis of the whole cluster where the server to be controlled is located, and reduce the user experience.
In one embodiment, an exemplary flow of the server control method of the present disclosure is shown in fig. 7, and the server to be controlled may be controlled according to the following steps S701 to S713.
Step S701, obtaining sample characteristic data of a reference server in a sampling period and node role labels
Step S702, inputting sample feature data and node role labels into a decision tree model, and training a decision number model;
step S703, obtaining a role recognition model according to the trained decision tree model;
step S704, obtaining corresponding resource state information and node role labels when the reference server is precisely shut down;
step S705, obtaining the resource use strategy information according to the resource state information;
step S706, the node role labels are corresponding to the resource use policy information to construct a node information database;
step S707, obtaining the feature data of the server to be controlled
Step S708, processing the characteristic data by using the role identification model, and determining the role of the target node to which the server to be controlled belongs;
step S709, whether the target node role belongs to a preset role in the target cluster; if yes, go to step S710, otherwise, go to step S711;
Step S710, determining control information as maintaining an operation state;
step S711, obtaining the resource use strategy information corresponding to the target node role from the node information database;
step S712, determining control information according to the current resource status information of the server to be controlled by the resource usage policy information corresponding to the role of the target node.
In an embodiment, the server to be controlled may be a bare metal server, the feature data may be index data of bare metal, and since the relationship between bare metal servers in the cluster is complex and the node roles are not clear, the server control method of the present disclosure may be used to control the bare metal server.
In the present exemplary embodiment, a character recognition model and a node information database may be first constructed for use in a subsequent server control method. Node roles of reference bare metal servers in the existing cluster can be collected to determine role labels, and sample characteristic data are determined based on index data corresponding to the reference bare metal servers in the cluster when the reference bare metal servers belong to a certain node role; feature extraction is performed on the collected index data to determine sample feature data, for example, feature extraction may be to average and variance the index data, or consider whether the maximum value of a certain index data is greater than a preset threshold value, or the like; after the node role label and sample characteristic data of the reference bare metal server are obtained, the sample characteristic data of the reference bare metal server can be used as X input and the role label of the bare metal server can be used as Y input in the decision tree portrait model module; the X input and the Y input are input into the decision tree model together, and the decision tree model is trained to obtain the character recognition model.
In the node information database acquisition module, resource use policy information can be acquired according to the corresponding resource state information when the reference bare metal server is precisely shut down, wherein the resource use policy information can comprise resource use indexes and resource demand information; the node information database may be constructed according to node role labels of the reference bare metal server and resource usage policy information.
After the character recognition model and the node information database are obtained, the current index data of the bare metal server to be controlled can be obtained in the data acquisition module, and then the index data of the bare metal server to be controlled is subjected to characteristic extraction to obtain index characteristic data of the bare metal server to be controlled; in the decision tree portrait model module, index feature data are input into the character recognition model, the character recognition model can obtain the scores of the bare metal server to be controlled in various node character labels according to the index feature data, and the node character corresponding to the node character label with the highest score can be selected as the target node character of the bare metal server to be controlled.
After the target node role of the bare metal server to be controlled is acquired, resource use policy information corresponding to the target node role can be determined in the node information database according to the matching result of the target node role. And in the shutdown energy-saving module, determining a resource utilization index corresponding to the bare metal server to be controlled from resource utilization strategy information corresponding to the target node role, and comparing the current resource utilization rate of the bare metal server to be controlled with the resource utilization index corresponding to the bare metal server to be controlled to determine control information aiming at the bare metal server to be controlled.
In addition, the node information database corresponds to a target cluster to which the bare metal to be controlled belongs, and when the target node role of the bare metal server to be controlled belongs to a preset role, for example, a traffic interface role, the control information of the bare metal server to be controlled is determined to be in a maintenance running state; for example, when the bare metal server to be controlled belongs to the traffic interface role, although the corresponding index data is lower than the index data shutdown threshold value when the bare metal server to be controlled is shutdown, the control information of the shutdown server is not output to the bare metal server to be controlled.
The exemplary embodiment of the disclosure also provides a server control device. As shown in fig. 8, the server control apparatus 800 may include:
a data acquisition module 810 configured to acquire performance index data of a server to be controlled;
a target node role determination module 820 configured to process the feature data of the server to be controlled using a pre-trained role recognition model to determine a target node role to which the server to be controlled belongs;
the resource usage policy information obtaining module 830 is configured to obtain resource usage policy information corresponding to the target node role from a node information database constructed in advance;
The control information determining module 840 is configured to determine control information for the server to be controlled according to the resource usage policy information corresponding to the target node role and the current resource status information of the server to be controlled.
In one embodiment, the server control device further includes a character recognition model acquisition module configured to:
acquiring characteristic data of a reference server in a sampling period to serve as sample characteristic data, and acquiring node role labels of the reference server in the sampling period;
training a machine learning model by using the sample feature data and the node character labels to obtain a character recognition model.
In one embodiment, the server control device further includes a node information database construction module configured to:
acquiring resource state information of a reference server in a sampling period;
and constructing a node information database according to the resource state information of the reference server in the sampling period and the node role label of the reference server in the sampling period.
In an embodiment, the resource usage policy information includes a resource usage index, the current resource status information includes a current resource usage rate, and determining the control information for the server to be controlled according to the resource usage policy information corresponding to the target node role and the current resource status information of the server to be controlled may include:
Determining a resource use index corresponding to a server to be controlled from resource use strategy information corresponding to a target node role;
and comparing the current resource utilization rate of the server to be controlled with the resource utilization index corresponding to the server to be controlled to determine the control information aiming at the server to be controlled.
In one embodiment, the resource usage policy information includes one or more resource usage indexes corresponding to resource demand information; the current resource status information further includes a current resource configuration; the determining, from the resource usage policy information corresponding to the target node role, the resource usage index corresponding to the server to be controlled may include:
and matching the current resource configuration of the server to be controlled with the resource demand information corresponding to the target node role so as to determine the resource use index corresponding to the server to be controlled.
In one embodiment, the server to be controlled belongs to a target cluster; the obtaining the resource usage policy information corresponding to the target node role in the pre-constructed node information database may include:
determining a node information database corresponding to the target cluster, and acquiring resource use policy information corresponding to the target node role from the node information database corresponding to the target cluster.
In one embodiment, the resource usage policy information obtaining module may further include:
and if the target node role belongs to the preset role in the target cluster, determining that the control information of the server to be controlled is in a maintenance running state.
The specific details of each part in the above apparatus are already described in the method part embodiments, and thus will not be repeated.
Exemplary embodiments of the present disclosure also provide a computer readable storage medium, which may be implemented in the form of a program product comprising program code for causing an electronic device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the above section of the "exemplary method" when the program product is run on the electronic device. In an alternative embodiment, the program product may be implemented as a portable compact disc read only memory (CD-ROM) and comprises program code and may run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Exemplary embodiments of the present disclosure also provide an electronic device. The electronic device may include a processor and a memory. The memory stores executable instructions of the processor, such as program code. The processor performs the method of the present exemplary embodiment by executing the executable instructions.
An electronic device is illustrated in the form of a general purpose computing device with reference to fig. 9. It should be understood that the electronic device 900 shown in fig. 9 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 9, the electronic device 900 may include: processor 910, memory 920, bus 930, I/O (input/output) interface 940, and network adapter 950.
The processor 910 may include one or more processing units such as, for example: the processor 910 may include a central processor (Central Processing Unit, CPU), an AP (Application Processor ), a modem processor, a display processor (Display Process Unit, DPU), a GPU (Graphics Processing Unit, graphics processor), an ISP (Image Signal Processor ), a controller, an encoder, a decoder, a DSP (Digital Signal Processor ), a baseband processor, an artificial intelligence processor, and the like. The data processing method in this exemplary embodiment may be executed by a CPU, in one embodiment, the CPU may acquire feature data of a server to be controlled, process the feature data of the server to be controlled by using a pre-trained role recognition model to determine a target node role to which the server to be controlled belongs, acquire resource usage policy information corresponding to the target node role in a pre-built node information database, and finally determine control information for the server to be controlled according to the resource usage policy information corresponding to the target node role and current resource state information of the server to be controlled.
The memory 920 may include volatile memory, such as RAM 921, a cache unit 922, and may also include nonvolatile memory, such as ROM 923. In one embodiment, the memory 920 may store the acquired feature data of the server to be controlled, as well as a pre-trained character recognition model and a pre-built node information database. Memory 920 may also include one or more program modules 924, such program modules 924 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. For example, program modules 924 may include the modules in apparatus 900 described above.
The bus 930 is used to facilitate connections between the different components of the electronic device 900 and may include a data bus, an address bus, and a control bus.
The electronic device 900 may communicate with one or more external devices 1000 (e.g., keyboard, mouse, external controller, etc.) through an I/O interface 940.
The electronic device 900 may communicate with one or more networks through a network adapter 950, e.g., the network adapter 950 may provide a mobile communication solution such as 3G/4G/5G, or a wireless communication solution such as wireless local area network, bluetooth, near field communication, etc. The network adapter 950 may communicate with other modules of the electronic device 900 via the bus 930.
Although not shown in fig. 9, other hardware and/or software modules may also be provided in electronic device 900, including, but not limited to: displays, microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with exemplary embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A server control method, comprising:
acquiring characteristic data of a server to be controlled;
processing the characteristic data of the server to be controlled by utilizing a pre-trained role identification model to determine the role of a target node to which the server to be controlled belongs;
acquiring resource use policy information corresponding to the target node role from a pre-constructed node information database;
and determining control information aiming at the server to be controlled according to the resource use strategy information corresponding to the target node role and the current resource state information of the server to be controlled.
2. The method according to claim 1, wherein the method further comprises:
acquiring characteristic data of a reference server in a sampling period to serve as sample characteristic data, and acquiring node role labels of the reference server in the sampling period;
training a machine learning model using the sample feature data and the node character labels to obtain the character recognition model.
3. The method according to claim 2, wherein the method further comprises:
acquiring resource state information of the reference server in the sampling period;
and constructing the node information database according to the resource state information of the reference server in the sampling period and the node role label of the reference server in the sampling period.
4. The method of claim 1, wherein the resource usage policy information comprises a resource usage index and the current resource status information comprises a current resource usage rate; the determining control information for the server to be controlled according to the resource usage policy information corresponding to the target node role and the current resource state information of the server to be controlled includes:
determining a resource use index corresponding to the server to be controlled from the resource use strategy information corresponding to the target node role;
and comparing the current resource utilization rate of the server to be controlled with the resource utilization index corresponding to the server to be controlled to determine control information aiming at the server to be controlled.
5. The method of claim 4, wherein the resource usage policy information includes one or more resource usage indicators corresponding to the resource demand information; the current resource state information also comprises current resource configuration; the determining the resource usage index corresponding to the server to be controlled from the resource usage policy information corresponding to the target node role includes:
And matching the current resource configuration of the server to be controlled with the resource demand information corresponding to the target node role to determine a resource use index corresponding to the server to be controlled.
6. The method according to claim 1, wherein the server to be controlled belongs to a target cluster; the obtaining the resource usage policy information corresponding to the target node role in the pre-constructed node information database includes:
determining a node information database corresponding to the target cluster, and acquiring resource use policy information corresponding to the target node role from the node information database corresponding to the target cluster.
7. The method of claim 6, wherein the method further comprises:
and if the target node role belongs to a preset role in the target cluster, determining that the control information of the server to be controlled is in a maintenance running state.
8. A server control apparatus, comprising:
the characteristic data acquisition module is configured to acquire characteristic data of a server to be controlled;
the target node role determining module is configured to process the characteristic data of the server to be controlled by utilizing a pre-trained role identification model so as to determine the target node role of the server to be controlled;
The resource use policy information acquisition module is configured to acquire resource use policy information corresponding to the target node role from a pre-constructed node information database;
and the control information determining module is configured to determine control information aiming at the server to be controlled according to the resource use strategy information corresponding to the target node role and the current resource state information of the server to be controlled.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any of claims 1 to 7.
10. An electronic device, comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any one of claims 1 to 7 via execution of the executable instructions.
CN202210836696.6A 2022-07-15 2022-07-15 Server control method, device, storage medium and electronic equipment Active CN115220915B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210836696.6A CN115220915B (en) 2022-07-15 2022-07-15 Server control method, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210836696.6A CN115220915B (en) 2022-07-15 2022-07-15 Server control method, device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN115220915A CN115220915A (en) 2022-10-21
CN115220915B true CN115220915B (en) 2024-02-02

Family

ID=83612104

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210836696.6A Active CN115220915B (en) 2022-07-15 2022-07-15 Server control method, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115220915B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111190888A (en) * 2020-01-03 2020-05-22 中国建设银行股份有限公司 Method and device for managing graph database cluster
CN111431996A (en) * 2020-03-20 2020-07-17 北京百度网讯科技有限公司 Method, apparatus, device and medium for resource configuration
CN113157418A (en) * 2021-04-25 2021-07-23 腾讯科技(深圳)有限公司 Server resource allocation method and device, storage medium and electronic equipment
CN113869421A (en) * 2021-09-29 2021-12-31 中国联合网络通信集团有限公司 Picture identification method, device, equipment and storage medium
CN113922994A (en) * 2021-09-26 2022-01-11 杭州未识智能科技有限公司 Information processing method and system for Internet works

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7454483B2 (en) * 2003-05-14 2008-11-18 Microsoft Corporation Method and apparatus for configuring servers
US11895087B2 (en) * 2018-08-21 2024-02-06 International Business Machines Corporation Adjusting firewall parameters based on node characteristics

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111190888A (en) * 2020-01-03 2020-05-22 中国建设银行股份有限公司 Method and device for managing graph database cluster
CN111431996A (en) * 2020-03-20 2020-07-17 北京百度网讯科技有限公司 Method, apparatus, device and medium for resource configuration
CN113157418A (en) * 2021-04-25 2021-07-23 腾讯科技(深圳)有限公司 Server resource allocation method and device, storage medium and electronic equipment
CN113922994A (en) * 2021-09-26 2022-01-11 杭州未识智能科技有限公司 Information processing method and system for Internet works
CN113869421A (en) * 2021-09-29 2021-12-31 中国联合网络通信集团有限公司 Picture identification method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN115220915A (en) 2022-10-21

Similar Documents

Publication Publication Date Title
JP6936888B2 (en) Training corpus generation methods, devices, equipment and storage media
TWI729472B (en) Method, device and server for determining feature words
CN111723209A (en) Semi-supervised text classification model training method, text classification method, system, device and medium
CN111291882A (en) Model conversion method, device, equipment and computer storage medium
CN110851644A (en) Image retrieval method and device, computer-readable storage medium and electronic device
CN113723618B (en) SHAP optimization method, equipment and medium
CN113435582B (en) Text processing method and related equipment based on sentence vector pre-training model
CN111353311A (en) Named entity identification method and device, computer equipment and storage medium
CN112464642A (en) Method, device, medium and electronic equipment for adding punctuation to text
CN114399772B (en) Sample generation, model training and track recognition methods, devices, equipment and media
CN111738009B (en) Entity word label generation method, entity word label generation device, computer equipment and readable storage medium
CN115220915B (en) Server control method, device, storage medium and electronic equipment
US11144724B2 (en) Clustering of words with multiple meanings based on generating vectors for each meaning
JP2022165925A (en) Data labeling method, device, electronic apparatus, and readable storage medium
CN114611625A (en) Language model training method, language model training device, language model data processing method, language model data processing device, language model data processing equipment, language model data processing medium and language model data processing product
CN110442714B (en) POI name normative evaluation method, device, equipment and storage medium
CN112244863A (en) Signal identification method, signal identification device, electronic device and readable storage medium
CN113033179A (en) Knowledge acquisition method and device, electronic equipment and readable storage medium
CN114119972A (en) Model acquisition and object processing method and device, electronic equipment and storage medium
CN114973279B (en) Training method and device for handwritten text image generation model and storage medium
CN115102852B (en) Internet of things service opening method and device, electronic equipment and computer medium
CN113408661B (en) Method, apparatus, device and medium for determining mismatching
CN113536751B (en) Processing method and device of form data, electronic equipment and storage medium
CN113127610B (en) Data processing method, device, equipment and medium
CN113392084A (en) Log data processing method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant