A computer room server grouping method and system based on determinant
Through the determinant-based computer room server grouping method, using two-dimensional arrays to verify adjacent servers, and automatically implement the 'two cabinet model' and 'four cabinet model', solving the problems of manual allocation errors and untimely resource release in the existing technology. Improves grouping accuracy and efficiency, and avoids waste of hardware resources.
Patent Information
- Application Number
- CN202211508581.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-29
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2042-11-29
AI Technical Summary
The existing computer room management system lacks intelligent grouping functions, which makes it easy to make mistakes when manually allocating server resources, making it difficult to accurately judge the server occupation status, and resource release is not timely, resulting in waste of hardware resources and high allocation logic complexity.
The determinant-based computer room server grouping method is adopted to verify adjacent servers through two-dimensional arrays, and the grouping rules of the 'two cabinet model' and 'four cabinet models' are automatically realized to ensure the accuracy of server grouping and the timely release of resources.
It realizes automated server grouping and resource release, improves operational efficiency and accuracy, avoids manual misoperation and resource waste, and simplifies the administrator's workflow.
Smart Images

Figure CN115913881B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of server management, and in particular to a method and system for grouping computer room servers based on a determinant. Background Art
[0002] For large-scale server rooms, there are a large number of cabinets, each of which is equipped with hardware servers or switches. Whenever a software system goes online, the room manager needs to allocate a number of hardware servers from the cabinets in the room for the software system for deployment, and the allocated servers are considered occupied. In reality, each server looks the same, and even the room manager can hardly distinguish whether a server is occupied. At the same time, the allocation method is generally divided into "two-cabinet model" and "four-cabinet model" according to the requirements of the software system. These two grouping models are more common ways to allocate hardware resources. The "two-cabinet model" means that the servers allocated to a software system must come from two independent server cabinets, and the two cabinets are as close as possible to each other. The "four-cabinet model" means that the servers allocated to a software system must come from four independent server cabinets, and the four cabinets are as close as possible to each other. The manual allocation process cannot guarantee the accuracy of the server being unoccupied. For the temporarily canceled grouping plan, the release of server resources is also easily forgotten or conflicts are formed; and the large number of cabinet selection processes also increases the complexity of the allocation logic.
[0003] The current management system only uses the database to record the basic information of the computer room, cabinets, and servers. As far as the user is concerned, when allocating server resources to the business software system, the action of selecting the server is still a manual operation, because it is necessary to manually identify key states such as whether the server is occupied by other software systems. After allocating server resources, it is also necessary to record important information such as the occupancy status. The existing computer room management system on the market only records and manages server information, and does not have a functional algorithm for intelligent grouping of server resources. Usually, they are manually grouped and then allocated to the specified software system. A large number of manual operations are prone to mistakes, or forgetting to release server resources after the grouping is canceled, resulting in waste. Summary of the invention
[0004] In view of the above technical problems, the present invention provides a method and system for grouping computer room servers based on determinant.
[0005] The present invention is implemented by adopting the following technical scheme: a method for grouping server rooms based on determinant, comprising the following steps:
[0006] S1: Confirm the number of servers to be grouped;
[0007] S2: Use a two-cabinet model or a four-cabinet model to verify one or more layers of adjacent servers;
[0008] S3: Counting starts from the first ungrouped server selected. When the cumulative number of ungrouped servers reaches a, the grouping is completed and the selected server is marked.
[0009] S4: When the grouping is canceled, the resources of the selected server are released and the next grouping starts.
[0010] Further, the method of verifying one or more layers of adjacent servers using the two-cabinet model is as follows:
[0011] Initialize a two-dimensional array arr[n][m], representing two adjacent servers;
[0012] Start verification from the nth layer, and after each layer is verified, jump to the next layer to continue verification;
[0013] In the two-dimensional array arr[n][m], n represents the number of server layers, m represents the adjacent server, and the value range of m is [0, 1].
[0014] Furthermore, when verification starts from the nth layer, two server groups arr[n][0 / 1] are verified in sequence, where arr[n][0] represents the first selected server and arr[n][1] represents the second selected server.
[0015] Furthermore, when verification starts from the nth layer, it is necessary to skip the servers that have been occupied by the group.
[0016] Furthermore, when starting verification from the nth layer, it is necessary to skip the switch.
[0017] Furthermore, when the grouping is cancelled, the marks of several servers recorded this time are cancelled to release resources, and the released servers can participate in the next grouping.
[0018] Furthermore, the verification rules of the four-cabinet model are the same as the verification rules of the two-cabinet model.
[0019] Furthermore, when the four-cabinet model is used to verify one or more layers of adjacent servers, a two-dimensional array arr[n][m] is used to represent four adjacent servers, where n represents the number of server layers, m represents the adjacent server, and the value range of m is [0, 3].
[0020] A server grouping system for a computer room based on a determinant includes a confirmation module, a grouping module and a cancellation module, wherein the confirmation module is used to confirm the number a of servers to be grouped; the grouping module is used to verify one or more layers of adjacent servers using a two-cabinet model or a four-cabinet model, and start counting from the first selected ungrouped server. When the cumulative number of ungrouped servers reaches a, the grouping is completed and the selected server is marked; the cancellation module is used to release resources for the selected server when the grouping is canceled, waiting for the next grouping to start.
[0021] The beneficial effects of the present invention are as follows: the present invention can automatically logically group the servers according to the given number based on the information of the servers and the cabinets in which they are located, and fully realizes the grouping rules such as the "two-cabinet model" and the "four-cabinet model", eliminating the need for the administrator to manually query and update the equipment information, greatly saving time and improving efficiency while ensuring the accuracy of the algorithm; the present invention ensures the accuracy of operations during the grouping process and the fast execution of the algorithm; all operations can be traced to prevent the occurrence of erroneous operations; after the grouping is canceled, the server resources can be released in time to avoid the waste of hardware resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0023] Figure 1 It is a flow chart of the present invention;
[0024] Figure 2 This is the schematic diagram of the two-cabinet model;
[0025] Figure 3 This is the schematic diagram of the four-cabinet model;
[0026] Figure 4 This is a system structure block diagram of the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0028] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0029] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0030] Embodiment 1:
[0031] See also Figure 1 , a method for grouping computer room servers based on determinant, comprising the following steps:
[0032] S1: Confirm the number of servers to be grouped;
[0033] S2: Use a two-cabinet model or a four-cabinet model to verify one or more layers of adjacent servers;
[0034] S3: Counting starts from the first ungrouped server selected. When the cumulative number of ungrouped servers reaches a, the grouping is completed and the selected server is marked.
[0035] S4: When the grouping is canceled, the resources of the selected server are released and the next grouping starts.
[0036] In this embodiment, a two-cabinet model is used (the schematic diagram of the two-cabinet model can be found in Figure 2 ) The method to verify one or more layers of adjacent servers is:
[0037] Initialize a two-dimensional array arr[n][m] to represent two adjacent servers; in the two-dimensional array arr[n][m], n represents the number of server layers, m represents the adjacent server, and the value range of m is [0, 1];
[0038] Verification starts from the nth layer, and after each layer is verified, it jumps to the next layer to continue verification, and verifies the two server groups arr[n][0 / 1] in turn, where arr[n][0] represents the first selected server and arr[n][1] represents the second selected server; in this process, it is necessary to skip the servers that have been grouped and skip the switches.
[0039] As you can imagine, when a server in one layer has verified a servers, there is no need to jump to the next layer for verification. Of course, when the verification of one layer of servers is completed, but the number of servers to be grouped has not yet reached a, it is necessary to jump to the next layer (arr[n+1][m]) to start verification. Counting starts from the first ungrouped server selected. When the cumulative number of ungrouped servers reaches a, the grouping is completed. At this time, the selected server is marked for verification during the next grouping.
[0040] When the grouping behavior is canceled, the server marks of several records are canceled and recorded as resource release, that is, the grouping is canceled, and the released server resources can participate in the next grouping.
[0041] In this embodiment, the four-cabinet model (the schematic diagram of the four-cabinet model can be found in Figure 3 ) is the same as the two-cabinet model. Compared with the two-cabinet model, when the four-cabinet model is used to verify one or more layers of adjacent servers, a two-dimensional array arr[n][m] is used to represent four adjacent servers, where n represents the number of server layers, m represents adjacent servers, and the value range of m is [0, 3], which represents the same layer of servers in four adjacent cabinets.
[0042] See also Figure 4 A computer room server grouping system based on determinant is used to implement the above-mentioned computer room server grouping method based on determinant. The system includes a confirmation module, a grouping module and a cancellation module, wherein the confirmation module is used to confirm the number a of servers to be grouped; the grouping module is used to verify one or more layers of adjacent servers using a two-cabinet model or a four-cabinet model, and start counting from the first selected ungrouped server. When the cumulative number of ungrouped servers reaches a, the grouping is completed and the selected server is marked; the cancellation module is used to release resources for the selected server when the grouping is canceled, waiting for the next grouping to start.
[0043] The present invention has at least the following technical effects: the present invention can automatically logically group servers according to the information of the servers and the cabinets where they are located and the given number, and fully realizes the grouping rules such as the "two-cabinet model" and the "four-cabinet model", eliminating the process of administrators manually querying and updating device information, greatly saving time, improving efficiency, and ensuring the accuracy of the algorithm; the present invention ensures the accuracy of operations during the grouping process and the fast execution of the algorithm; all operations can be traced, and the occurrence of erroneous operations is eliminated; after the grouping is canceled, the server resources can be released in time, avoiding the waste of hardware resources.
[0044] It should be noted that, for the above embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification belong to preferred embodiments, and the actions involved are not necessarily required by the present application.
[0045] The above embodiments describe the basic principles and main features of the present invention and the advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the changes and modifications made by those skilled in the art shall be within the scope of protection of the appended claims of the present invention without departing from the spirit and scope of the present invention.
Claims
1. A method for grouping server rooms based on determinants, characterized in that: The steps include: S1: Confirm the number of servers to be grouped; S2: Use the two-cabinet model or the four-cabinet model to verify one or more layers of adjacent servers. The method of using the two-cabinet model to verify one or more layers of adjacent servers is as follows: Initialize a two-dimensional array arr[n][m], representing two adjacent servers; Start verification from the nth layer, and after each layer is verified, jump to the next layer to continue verification; In the two-dimensional array arr[n][m], n represents the number of server layers, m represents the adjacent server, and the value range of m is [0, 1]. When verification starts from the nth layer, two server groups arr[n][0 / 1] are verified in sequence, where arr[n][0] represents the first selected server and arr[n][1] represents the second selected server. When verification starts from the nth layer, servers and switches that have been grouped and occupied need to be skipped. S3: Counting starts from the first ungrouped server selected. When the cumulative number of ungrouped servers reaches a, the grouping is completed and the selected server is marked. S4: When the grouping is canceled, the resources of the selected server are released and the next grouping starts.
2. A method for grouping computer room servers based on a determinant as claimed in claim 1, characterized in that: When the grouping is canceled, the server marks of the recorded servers are cancelled to release resources. The released servers can participate in the next grouping.
3. A method for grouping computer room servers based on a determinant as claimed in claim 1, characterized in that: The verification rules for the four-cabinet model are the same as the verification rules for the two-cabinet model.
4. A method for grouping computer room servers based on a determinant as claimed in claim 3, characterized in that: When the four-cabinet model is used to verify one or more layers of adjacent servers, a two-dimensional array arr[n][m] is used to represent four adjacent servers, where n represents the number of server layers, m represents the adjacent server, and the value range of m is [0, 3].
5. A computer room server grouping system based on determinant, used to implement a computer room server grouping method based on determinant as claimed in any one of claims 1 to 4, characterized in that: It includes a confirmation module, a grouping module and a cancellation module, wherein the confirmation module is used to confirm the number a of servers to be grouped; the grouping module is used to verify one or more layers of adjacent servers using a two-cabinet model or a four-cabinet model, and starts counting from the first selected ungrouped server. When the cumulative number of ungrouped servers reaches a, the grouping is completed and the selected server is marked; the cancellation module is used to release resources for the selected server when the grouping is canceled, waiting for the next grouping to start.
