Computing equipment configuration method and device, computing equipment and storage medium
By selecting the computing device with the highest device weight in the computing device collection and generating an accessory replacement solution based on the accessories weight, the problem of low configuration efficiency of computing equipment is solved, and efficient and safe accessory replacement is achieved.
Patent Information
- Application Number
- CN202510354226.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-08-08
AI Technical Summary
In the prior art, the efficiency of replacement of computing equipment accessories is low, and the efficiency of manual planning schemes is low.
By determining configuration requirements, selecting the target computing device in the computing device collection based on the device weight and accessories weight of the computing device, and generating an accessory replacement solution, automatically generating configuration solutions to meet the needs.
Improves the efficiency and security of computing device configuration and reduces the difficulty and risk of replacement.
Smart Images

Figure CN120447977A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computing devices, and in particular to a computing device configuration method, apparatus, computing device, and storage medium. Background Art
[0002] Computing devices include various accessories, and different accessories correspond to different usage requirements. When an accessory of a computing device cannot meet the current usage requirements, the accessory can be replaced between multiple computing devices so that the computing device after the replacement of the accessory can meet the usage requirements.
[0003] In related technologies, when replacing accessories, the accessory information and accessory quantity of each computing device in the computing device set can be queried, and the computing device configuration plan can be determined through manual planning. However, in the above method, manual planning of computing device configuration plans is inefficient. Summary of the Invention
[0004] The embodiments of the present application provide a computing device configuration method, apparatus, computing device, and storage medium, which are used to solve the technical problem of low computing device configuration efficiency.
[0005] In a first aspect, an embodiment of the present application provides a computing device configuration method, comprising:
[0006] Determining configuration requirements, including accessory information and accessory quantity for each accessory type;
[0007] Determining a target computing device in the set of computing devices based on the configuration requirements and a device weight of each computing device, where the device weight is the sum of the weights of the accessories corresponding to the accessories in the computing devices that meet the configuration requirements, and the target computing device has the highest device weight;
[0008] When the target computing device does not meet the configuration requirements, a configuration plan for the target computing device is generated based on the configuration requirements, and the configuration plan indicates that accessories of other computing devices in the computing device set should be replaced with the target computing device so that the target computing device after the accessories are replaced meets the configuration requirements.
[0009] In the above scheme, configuration requirements for multiple accessory types can be determined. Based on the configuration requirements and the device weights of each computing device, a target computing device can be identified from a set of computing devices. Based on the configuration requirements and the set of computing devices, a configuration plan for the target computing device can be generated. In the above method, a configuration plan can be automatically generated based on the configuration requirements and the device weights of each computing device, improving the efficiency of computing device configuration. The replacement risk and difficulty of accessories can be measured using device weights and accessory weights, thereby improving the security of computing device configuration.
[0010] In one possible implementation, determining a target computing device from a set of computing devices according to the configuration requirements and the device weight of each computing device includes:
[0011] Determining an accessory weight for each accessory type, where the accessory weight indicates the difficulty and risk of replacing an accessory corresponding to the accessory type. Each computing device includes multiple types of accessories, and each type of accessory corresponds to a different accessory weight.
[0012] Determining a device weight for each computing device in the set of computing devices based on the configuration requirements and the accessory weight for each accessory type;
[0013] The computing device with the largest device weight in the computing device set is determined as the target computing device.
[0014] In the above scheme, the computing device with the highest device weight in the computing device set can be determined as the target device, so that when replacing accessories, accessories with high replacement difficulty and replacement risk can be avoided as much as possible, thereby improving the security of the computing device configuration.
[0015] In one possible implementation, for any computing device in the device set, determining a device weight of the computing device according to the configuration requirements and the accessory weights of each accessory type includes:
[0016] For any accessory type, determining the number M of accessories corresponding to the accessory type in the computing device, where there are M accessories of the accessory type in the computing device that satisfy the accessory information of the accessory type, where M is an integer;
[0017] The device weight of the computing device is determined according to the number of accessories corresponding to each accessory type and the accessory weight of each accessory type.
[0018] In the above solution, the purpose of determining the device weight of each computing device in the computing device set is achieved by determining the number of accessories corresponding to the accessory type and combining the accessory weight of each accessory type.
[0019] In one possible implementation, generating a configuration solution for the target computing device according to the configuration requirement and the set of computing devices includes:
[0020] Determining, based on the configuration requirements and the target computing device, missing component information of the target computing device, the missing component information including a type of at least one component missing from the target computing device and a missing quantity of each component;
[0021] According to the missing parts information, the target parts are determined in each part type in ascending order of part weights to generate the configuration plan.
[0022] In the above scheme, accessories that meet the configuration requirements can be replaced in order from small to large according to the missing parts information, thereby improving the security and efficiency of computing device configuration.
[0023] In a possible implementation, determining the target accessory in each accessory type in turn and generating the configuration solution includes:
[0024] Determining, based on the configuration requirements and the accessory weights of the accessory types, a device weight of each candidate computing device, wherein the candidate computing device is a computing device other than the target computing device in the set of computing devices;
[0025] According to the missing parts information, the target accessories are determined in each candidate computing device in order of device weight from small to large, until the target accessories are determined to meet the missing parts information, and the configuration plan is obtained.
[0026] In the above scheme, by determining the target accessories in the candidate computing devices in order of device weight from small to large, it can ensure that the accessories removed from a certain candidate computing device are low in quantity, thereby ensuring the availability of the candidate computing device after the accessories are removed, and improving the efficiency of computing device configuration by automatically generating configuration plans.
[0027] In one possible implementation, the configuration solution includes: replacing the accessories in the selected computing device that meet the missing parts information with the target computing device.
[0028] In the above solution, by providing the accessories that need to be replaced and the computing device corresponding to the accessories, it is convenient for users to perform accessory replacement operations and obtain a computing device that meets their usage needs.
[0029] In one possible implementation, determining the accessory weight of each accessory type includes:
[0030] Determine a maximum number of accessories corresponding to each accessory type, where the maximum number of accessories is the maximum number of accessories corresponding to the accessory type that can be set in a single computing device;
[0031] The maximum value among the maximum accessory quantities corresponding to each accessory type is determined as the target accessory quantity;
[0032] The accessory weight of each accessory type is determined according to the target accessory quantity, wherein the multiple ratio between any two adjacent accessory weights is greater than or equal to the target accessory quantity.
[0033] In the above scheme, the multiple ratio between any two adjacent accessory weights is greater than or equal to the target accessory quantity, which can ensure that the value after multiplying the accessory with low accessory weight by the corresponding accessory quantity is less than the value after multiplying the accessory with high accessory weight by the corresponding accessory quantity, that is, ensuring that the accessory quantity will not affect the difficulty and risk of accessory replacement, thereby improving the security of computing device configuration.
[0034] In a second aspect, an embodiment of the present application provides a computing device configuration apparatus, the computing device configuration apparatus comprising a first determination module, a second determination module, and a processing module, wherein:
[0035] The first determining module is used to determine configuration requirements, wherein the configuration requirements include accessory information and accessory quantity of each accessory type;
[0036] The second determining module is configured to determine a target computing device in the set of computing devices based on the configuration requirement and a device weight of each computing device, wherein the device weight is the sum of the accessory weights corresponding to accessories in the computing devices that meet the configuration requirement, and the target computing device has the highest device weight;
[0037] The processing module is used to generate a configuration plan for the target computing device according to the configuration requirements when the target computing device does not meet the configuration requirements. The configuration plan indicates that accessories of other computing devices in the computing device set should be replaced with the target computing device so that the target computing device after the accessories are replaced meets the configuration requirements.
[0038] In the above scheme, configuration requirements for multiple accessory types can be determined. Based on the configuration requirements and the device weights of each computing device, a target computing device can be identified from a set of computing devices. Based on the configuration requirements and the set of computing devices, a configuration plan for the target computing device can be generated. In the above method, a configuration plan can be automatically generated based on the configuration requirements and the device weights of each computing device, improving the efficiency of computing device configuration. The replacement risk and difficulty of accessories can be measured using device weights and accessory weights, thereby improving the security of computing device configuration.
[0039] In a possible implementation, the second determining module is specifically configured to:
[0040] Determining an accessory weight for each accessory type, where the accessory weight indicates the difficulty and risk of replacing an accessory corresponding to the accessory type. Each computing device includes multiple types of accessories, and each type of accessory corresponds to a different accessory weight.
[0041] Determining a device weight for each computing device in the set of computing devices based on the configuration requirements and the accessory weight for each accessory type;
[0042] The computing device with the largest device weight in the computing device set is determined as the target computing device.
[0043] In the above scheme, the computing device with the highest device weight in the computing device set can be determined as the target device, so that when replacing accessories, accessories with high replacement difficulty and replacement risk can be avoided as much as possible, thereby improving the security of the computing device configuration.
[0044] In a possible implementation, the second determining module is specifically configured to:
[0045] For any accessory type, determining the number M of accessories corresponding to the accessory type in the computing device, where there are M accessories of the accessory type in the computing device that satisfy the accessory information of the accessory type, where M is an integer;
[0046] The device weight of the computing device is determined according to the number of accessories corresponding to each accessory type and the accessory weight of each accessory type.
[0047] In the above solution, the purpose of determining the device weight of each computing device in the computing device set is achieved by determining the number of accessories corresponding to the accessory type and combining the accessory weight of each accessory type.
[0048] In a possible implementation, the processing module is specifically configured to:
[0049] Determining, based on the configuration requirements and the target computing device, missing component information of the target computing device, the missing component information including a type of at least one component missing from the target computing device and a missing quantity of each component;
[0050] According to the missing parts information, the target parts are determined in each part type in ascending order of part weights to generate the configuration plan.
[0051] In the above scheme, accessories that meet the configuration requirements can be replaced in order of accessory weight from small to large according to the configuration requirements, thereby improving the security and efficiency of computing device configuration.
[0052] In a possible implementation, the processing module is specifically configured to:
[0053] Determining, based on the configuration requirements and the accessory weights of the accessory types, a device weight of each candidate computing device, wherein the candidate computing device is a computing device other than the target computing device in the set of computing devices;
[0054] According to the missing parts information, the target accessories are determined in each candidate computing device in order of device weight from small to large, until the target accessories are determined to meet the missing parts information, and the configuration plan is obtained.
[0055] In the above scheme, by determining the target accessories in the candidate computing devices in order of device weight from small to large, it can ensure that the accessories removed from a certain candidate computing device are low in quantity, thereby ensuring the availability of the candidate computing device after the accessories are removed, and improving the efficiency of computing device configuration by automatically generating configuration plans.
[0056] In a possible implementation, the processing module is specifically configured to:
[0057] The configuration plan is obtained, and the configuration plan includes replacing the accessories in the selected computing device that meet the missing parts information with the target computing device.
[0058] In the above solution, by providing the accessories that need to be replaced and the computing device corresponding to the accessories, it is convenient for users to perform accessory replacement operations and obtain a computing device that meets their usage needs.
[0059] In a possible implementation, the first determining module is specifically configured to:
[0060] Determine a maximum number of accessories corresponding to each accessory type, where the maximum number of accessories is the maximum number of accessories corresponding to the accessory type that can be set in a single computing device;
[0061] The maximum value among the maximum accessory quantities corresponding to each accessory type is determined as the target accessory quantity;
[0062] The accessory weight of each accessory type is determined according to the target accessory quantity, wherein the multiple ratio between any two adjacent accessory weights is greater than or equal to the target accessory quantity.
[0063] In the above scheme, the multiple ratio between any two adjacent accessory weights is greater than or equal to the target accessory quantity, which can ensure that the value after multiplying the accessory with low accessory weight by the corresponding accessory quantity is less than the value after multiplying the accessory with high accessory weight by the corresponding accessory quantity, that is, ensuring that the accessory quantity will not affect the difficulty and risk of accessory replacement, thereby improving the security of computing device configuration.
[0064] In a third aspect, an embodiment of the present application provides a computing device, including: a memory, a processor;
[0065] The memory stores computer-executable instructions;
[0066] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0067] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementation methods of the first aspect.
[0068] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0069] The computing device configuration method, apparatus, computing device, and storage medium provided in the embodiments of the present application can determine configuration requirements for multiple accessory types, determine a target computing device from a set of computing devices based on the configuration requirements and the device weights of each computing device, and generate a configuration plan for the target computing device based on the configuration requirements. In the above method, a configuration plan for a computing device can be automatically generated based on the configuration requirements and the device weights of each computing device, thereby improving the efficiency of computing device configuration. The device weight and accessory weight are used to measure the replacement risk and difficulty of accessory replacement, thereby improving the security of computing device configuration. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0071] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application;
[0072] Figure 2 A flowchart of a computing device configuration method provided in an embodiment of the present application;
[0073] Figure 3 A schematic diagram of a process for determining the weight of each accessory type provided in an embodiment of the present application;
[0074] Figure 4 A flowchart of a method for determining a target device provided in an embodiment of the present application;
[0075] Figure 5 A flowchart of another computing device configuration method provided in an embodiment of the present application;
[0076] Figure 6 A schematic diagram of the structure of a computing device configuration apparatus provided in an embodiment of the present application;
[0077] Figure 7 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0078] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0079] For ease of understanding, the following Figure 1 , describes the application scenarios involved in the embodiments of this application.
[0080] Figure 1 This is a schematic diagram of an application scenario provided by the embodiment of this application. Figure 1 The computing device set includes multiple computing devices. For example, the computing device set may include computing device 1, computing device 2, ..., and computing device M, where M may be an integer greater than or equal to 2.
[0081] The computing device may be a server, for example, a graphics processing unit (GPU) server or an artificial intelligence (AI) server.
[0082] It should be understood that each computing device can have corresponding accessories. If the accessories of the current computing device do not meet the usage requirements, the required accessories can be removed from other computing devices and replaced with the accessories of the current computing device to meet the usage requirements of the computing device. For example, if the computing device is a server, the memory accessories of server 2 can be replaced with server 1 to enable server 1 to meet the usage requirements.
[0083] In the related art, when replacing accessories, the accessory information and accessory quantity of each computing device in the computing device set are queried, and then the computing device configuration plan is determined through manual planning. However, in the above method, manual planning of computing device configuration plans is inefficient.
[0084] In view of this, an embodiment of the present application proposes a computing device configuration method. By determining the configuration requirements for multiple accessory types, a computing device with the highest device weight is determined in a computing device set as the target computing device. Then, based on the configuration requirements, the accessories of other computing devices in the computing device set are replaced with the target computing device, so that the target computing device can meet the configuration requirements. In the above process, a configuration plan can be automatically generated based on the configuration requirements and the device weights of each computing device, thereby improving the efficiency of computing device configuration. The replacement risk and difficulty of accessories when replacing them are measured by the device weight and accessory weight, thereby improving the security of computing device configuration.
[0085] The following specific embodiments are used to describe the technical solutions of the embodiments of the present application in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0086] Figure 2 This is a flowchart of a method for configuring a computing device provided in an embodiment of the present application. The execution subject of the method can be a computing device or a processor set in the computing device. For example, the computing device can be a server. For example, the processor in the computing device can be a CPU in the server. For ease of understanding, the following description is based on the example of the execution subject being a computing device. Figure 2 , the method may include:
[0087] S201: Determine configuration requirements, where the configuration requirements include accessory information and accessory quantity for each accessory type.
[0088] Accessory type refers to the category of accessories in a computing device. Accessory type can be CPU type, memory type, disk type, network card type, etc. Various types of accessories can be replaced or upgraded.
[0089] Configuration requirements refer to the types and quantities of accessories required by a computing device to meet specific application or service requirements. Configuration requirements can include accessory information and quantities for each accessory type. Configuration information can include accessory performance, model, and manufacturer, and the accessory quantity can be as low as two.
[0090] For example, the information included in the configuration requirements may be as shown in Table 1:
[0091]
[0092] Please refer to Table 1. The accessory information includes accessory information and accessory quantity of multiple accessory types for each accessory type.
[0093] Accessory weights are metrics set for each accessory type. Computing devices include multiple accessory types, each with a different accessory weight. Accessory weights indicate the difficulty and risk of replacing an accessory. A higher accessory weight indicates a greater difficulty and risk of replacement. For example, accessory removal and installation are more complex, and replacement may result in data loss or service interruption.
[0094] The weights of the various accessories may be: the CPU accessory type has the highest weight, the memory accessory type has the second highest weight, the network card accessory type has the third highest weight, and the disk accessory type has the lowest weight.
[0095] For example, the accessory weights corresponding to each accessory type may be as shown in Table 2:
[0096]
[0097] S202: Determine a target computing device in the computing device set according to configuration requirements and the device weight of each computing device.
[0098] The computing device set includes multiple computing devices, each of which includes multiple accessories. The types and quantities of accessories included in different computing devices may be different. The computing device set may include all idle computing devices in the computer room.
[0099] The target computing device is the computing device with the highest device weight in the computing device set.
[0100] The device weight of each computing device in the computing device set may be determined based on the accessory weight of each accessory type, and the computing device with the highest device weight in the computing device set may be determined as the target computing device.
[0101] For example, the computing device set includes 5 computing devices, namely computing device 1 to computing device 5, and the device weights corresponding to each computing device are device weight 1 to device weight 5, among which device weight 1 is 2320012, device weight 2 is 2160224, device weight 3 is 320024, device weight 4 is 160200, and device weight 5 is 24. Then computing device 1 has the highest device weight, so computing device 1 is determined as the target computing device.
[0102] S203: When the target computing device does not meet the configuration requirements, generate a configuration plan for the target computing device according to the configuration requirements.
[0103] The configuration scheme is used to instruct to replace accessories of other computing devices in the computing device set with the target computing device, so that the target computing device after the accessories are replaced meets the configuration requirements.
[0104] For example, a computing device set includes five computing devices, with computing device 2 as the target computing device. The target computing device differs from the configuration requirement by 12 disks of manufacturer 1's disk capacity and accessory type. Computing device 1 includes 12 disks of manufacturer 1's disk capacity and accessory type. The configuration solution could be to replace the 12 disks of manufacturer 1's disk capacity and accessory type in computing device 1 with computing device 2. After the accessory replacement is complete, computing device 2 can meet the configuration requirement.
[0105] The computing device configuration method provided in an embodiment of the present application can determine configuration requirements for multiple accessory types, determine a target computing device from a set of computing devices based on the configuration requirements and the device weights of each computing device, and generate a configuration plan for the target computing device based on the configuration requirements. In the above method, a configuration plan for a computing device can be automatically generated based on the configuration requirements and the device weights of each computing device, thereby improving the efficiency of computing device configuration. The replacement risk and difficulty of accessories when replacing them are measured using device weights and accessory weights, thereby improving the security of computing device configuration.
[0106] Based on the above embodiments, the computing device configuration method provided in the embodiments of the present application is further described below in conjunction with the accompanying drawings.
[0107] Figure 3 This is a flow chart of determining the weight of each accessory type provided by an embodiment of the present application. Figure 3 As shown, including:
[0108] S301: Determine the maximum number of accessories corresponding to each accessory type.
[0109] The maximum number of accessories is the maximum number of accessories that can be set in a single computing device and corresponds to the accessory type.
[0110] For example, a computing device set includes five computing devices, namely computing device 1 to computing device 5. The maximum number of accessories that can be set for each accessory type in each computing device is shown in Table 3 below:
[0111]
[0112] As shown in Table 3, in this computing device set, the maximum number of accessories corresponding to the CPU accessory type is 2, the maximum number of accessories corresponding to the memory accessory type is 32, the maximum number of accessories corresponding to the network card accessory type is 2, and the maximum number of accessories corresponding to the disk accessory type is 24.
[0113] S302: Determine the maximum value among the maximum accessory quantities corresponding to each accessory type as the target accessory quantity.
[0114] Referring to Table 3, the maximum value of the maximum accessory quantity corresponding to each accessory type is 32, so 32 is determined as the target accessory quantity.
[0115] S303: Determine the accessory weight of each accessory type according to the target accessory quantity.
[0116] The multiple ratio between the weights of any two adjacent accessories is greater than or equal to the target number of accessories.
[0117] Taking the example that the CPU accessory type has the highest accessory weight, the memory accessory type has the second highest accessory weight, the network card accessory type has the third highest accessory weight, and the disk accessory type has the lowest accessory weight, the ratio of the CPU accessory type's accessory weight to the memory accessory type's accessory weight is greater than or equal to the target accessory quantity, the ratio of the memory accessory type's accessory weight to the network card accessory type's accessory weight is greater than or equal to the target accessory quantity, the ratio of the network card accessory type's accessory weight to the disk accessory type's accessory weight is greater than or equal to the target accessory quantity, and so on.
[0118] For example, when the target number of accessories is 32, the multiple ratio between adjacent accessory types can be 32. For example, the accessory weight of the CPU accessory type is 32768, the accessory weight of the memory accessory type is 1024, the accessory weight of the network card accessory type is 32, and the accessory weight of the disk accessory type is 1.
[0119] For another example, when the target number of accessories is 32, the multiple ratio between adjacent accessory types can be greater than 32, such as 100. For example, the accessory weight of the CPU accessory type is 1000000, the accessory weight of the memory accessory type is 10000, the accessory weight of the network card accessory type is 100, and the accessory weight of the disk accessory type is 1.
[0120] In one possible implementation, the accessory weights of each accessory type can be set in advance before determining the configuration requirements. In this case, the set of computing devices can be all computing devices in the computer room. In this case, the target accessory quantity is the maximum value of the maximum accessory quantity corresponding to each accessory type in all computing devices in the computer room, so that the value of the target accessory quantity can meet any configuration requirements, further improving the efficiency of computing device configuration.
[0121] In one possible implementation, the accessory weights of each accessory type may be determined after the configuration requirements are determined. At this time, the set of computing devices may be the currently idle computing devices in the computer room, and the target number of accessories may meet the configuration requirements in the current situation.
[0122] Figure 4 A flow chart of a method for determining a target device provided in an embodiment of the present application. Figure 4 As shown, including:
[0123] S401: Determine the device weight of each computing device in the computing device set according to configuration requirements and the accessory weight of each accessory type.
[0124] The device weight is used to indicate the degree to which the computing device satisfies the configuration requirements.
[0125] The method for determining the device weight of each computing device in the computing device set is the same. Taking any computing device as an example, the device weight of the computing device can be determined in the following way: for any accessory type, determine the number of accessories M corresponding to the accessory type in the computing device, and there are M accessories of the accessory type in the computing device that meet the accessory information of the accessory type, where M is an integer; determine the device weight of the computing device based on the number of accessories corresponding to each accessory type and the accessory weight of each accessory type.
[0126] Specifically, taking the multiple ratio between adjacent accessory types as 100 as an example, if the number of accessories corresponding to the CPU accessory type is c, the number of accessories corresponding to the memory accessory type is m, the number of accessories corresponding to the network card accessory type is n, and the number of accessories corresponding to the disk accessory type is d, then the device weight of the computing device is: 1000000×c+10000×m+100×n+1×d.
[0127] By using the above method, the device weights corresponding to all computing devices in the device set can be determined, for example: the device weight of computing device 1 is device weight 1, the device weight of computing device 2 is device weight 2, and so on.
[0128] The following is a specific example to illustrate the process of determining the weight of each device in the computing device set. See Table 4 and Table 5 below. Table 4 shows the configuration requirements. Among them, the accessory types include CPU type, memory type, network card type and disk type. The multiple ratio between adjacent accessory types is 100, that is, the accessory weight of the CPU accessory type is 1000000, the accessory weight of the memory accessory type is 10000, the accessory weight of the network card accessory type is 100, and the accessory weight of the disk accessory type is 1. Table 5 shows the accessory information and accessory quantity of each computing device in the computing device set. Among them, the computing device set includes 5 computing devices, namely computing device 1 to computing device 5.
[0129]
[0130]
[0131] For computing device 1, there are 2 CPUs that meet the accessory information, 32 memories that meet the accessory information, 0 network cards that meet the accessory information, and 12 disks that meet the accessory information.
[0132] The device weight 1 of computing device 1 is: 2×1000000 + 32×10000 + 0×100 + 12×1 = 2320012.
[0133] Correspondingly, the device weights of other computing devices are:
[0134] Device weight 2: 2 × 1,000,000 + 16 × 10,000 + 2 × 100 + 24 × 1 = 2,160,224.
[0135] Device weight 3: 0×1000000 + 32×10000 + 0×100 + 24×1 = 320024.
[0136] Device weight 4: 0×1000000 + 16×10000 + 2×100 + 12×0 = 160200.
[0137] Device weight 5: 0×1000000 + 0×10000 + 0×100 + 12×24 = 24.
[0138] S402: Determine the computing device with the largest device weight in the computing device set as the target computing device.
[0139] Referring to the examples shown in Table 4 and Table 5, device weight 1 is the largest, so computing device 1 is determined as the target computing device.
[0140] Optionally, before S402, the requirement weight corresponding to the configuration requirement is calculated. For example, the requirement weight corresponding to the configuration requirement shown in Table 4 is: 2×1000000 + 33×10000 + 2×100 + 24×1 = 2320224. If there is a computing device in the computing device set whose device weight is the same as the requirement weight, such as the device weight m is 2320224, it means that a computing device that can meet the configuration requirement already exists in the current device set. In this case, it can be directly determined that the computing device that meets the configuration requirement is available, and no further accessory replacement is required. On the contrary, if the weight of each device in the computing device set is less than the target weight, S402 is executed to determine the target computing device and further determine the configuration plan.
[0141] Figure 5 This is a flow chart of another method for configuring a computing device provided in an embodiment of the present application. Figure 5 As shown, including:
[0142] S501: Determine missing component information of a target computing device according to configuration requirements and the target computing device.
[0143] The missing component information includes the component type of at least one component that is missing from the target computing device, and the missing quantity of each component.
[0144] For example, in the examples shown in Table 4 and Table 5, the missing parts information of the target computing device includes: 12 disks of manufacturer 2 with a disk capacity of 1, and 2 network cards of network card model 1.
[0145] S502: According to the missing parts information, target parts are determined in each part type in descending order of weight.
[0146] The target accessory is the accessory with the smallest weight among the accessories missing from the target computing device. For example, when the target computing device lacks a network card of network card model 1 and a disk of disk capacity 1 from manufacturer 2, the accessory weight of the network card accessory type is 100, and the accessory weight of the disk accessory type is 1, the disk of disk capacity 1 is determined as the target accessory.
[0147] When the disk with disk capacity 1 of manufacturer 2 meets the configuration requirement, that is, when the current target computing device only lacks the network card with network card model 1, the target accessory is the network card with network card model 1.
[0148] S503: Determine the device weight of each candidate computing device according to the configuration requirements and the weight of each accessory type.
[0149] The selected computing devices are computing devices other than the target computing device in the set of computing devices. For example, in the examples shown in Tables 4 and 5, the selected computing devices are computing devices 2 through 5. The method for determining the device weight of each selected computing device is as described in S401 and will not be repeated here.
[0150] S504: According to the missing parts information, target accessories are determined in each candidate computing device in ascending order of device weight, until the target accessories are determined to meet the missing parts information, and a configuration plan is obtained.
[0151] Specifically, the selected computing devices are ordered from small to large according to the device weight, and it is determined whether the target accessories exist in the current computing device. If so, the satisfaction of the current accessories is recorded, and it is determined whether all the missing parts information is met. The configuration plan is obtained until it is determined that the target accessories meet the missing parts information.
[0152] The configuration plan involves replacing the target component in the candidate computing device with the target computing device. This includes the device identifier of the candidate computing device, the component information of the target component, and the quantity of the target component. The computing device identifier includes, for example, the device serial number, and the component information of the target component includes, for example, the performance, model, and manufacturer of the component.
[0153] For example, in the examples shown in Table 4 and Table 5, the computing devices to be selected are in the order of device weight from small to large: computing device 5, computing device 4, computing device 3, computing device 2.
[0154] When the target component is a disk with a capacity of 1 from manufacturer 2, the system first records the current available replacements for computing device 5, which contains 12 target components, and updates the missing component information. At this point, the missing component information contains two network cards of model 1, which are not yet available. Therefore, the target component is a network card of model 1.
[0155] If the target accessory is a network card of model 1, the system first determines whether computing device 5, which does not contain the target accessory, further determines whether computing device 4 contains the target accessory. For computing device 4, which contains two target accessories, the system records the current available replacements and updates the missing parts information. At this point, if the target accessories satisfy all the missing parts information, a configuration solution is obtained. The configuration solution includes: computing device 5 can replace 12 disks of manufacturer 2 with a capacity of 1 for computing device 1, and computing device 4 can replace two network cards of model 1 for computing device 1.
[0156] Furthermore, the computing device configuration method provided in the embodiment of the present application can be used for old computing devices that are idle in the computer room. By automatically recommending configuration plans, it is possible to assemble computing devices that meet the production requirements and improve the utilization rate of old computing devices.
[0157] The computing device configuration method provided in the embodiment of the present application determines the device weight of each computing device in the computing device set according to the configuration requirements and the weight of the accessory type, determines the computing device with the largest device weight in the computing device set as the target computing device, determines the missing parts information of the target computing device according to the configuration requirements and the target computing device, determines the device weight of each candidate computing device according to the configuration requirements and the weight of each accessory type, and determines the target accessories in each candidate computing device in order of device weight from small to large according to the missing parts information, until it is determined that the target accessories meet the missing parts information, and obtains the configuration plan. In the above method, by determining the computing device with the largest device weight as the target computing device, it can be ensured that accessories with high replacement risk and difficulty are not replaced as much as possible, thereby improving the security and efficiency of computing device configuration; by determining the target accessories in the candidate computing devices according to the order of device weight from small to large, it can be ensured that the accessories removed from a candidate computing device are low in number, thereby ensuring the availability of the candidate computing device after the accessories are removed.
[0158] Figure 6 This is a schematic diagram of the structure of a computing device configuration device provided in an embodiment of the present application. Figure 6As shown, the computing device configuration apparatus 10 includes: a first determination module 11, a second determination module 12 and a processing module 13, wherein:
[0159] The first determining module 11 is used to determine configuration requirements, wherein the configuration requirements include accessory information and accessory quantity of each accessory type;
[0160] The second determining module 12 is configured to determine a target computing device in the set of computing devices based on the configuration requirement and a device weight of each computing device, wherein the device weight is the sum of the weights of the accessories corresponding to the accessories in the computing devices that meet the configuration requirement, and the target computing device has the highest device weight;
[0161] The processing module 13 is used to generate a configuration plan for the target computing device according to the configuration requirements when the target computing device does not meet the configuration requirements. The configuration plan indicates that accessories of other computing devices in the computing device set should be replaced with the target computing device so that the target computing device after the accessories are replaced meets the configuration requirements.
[0162] In a possible implementation, the second determining module 12 is specifically configured to:
[0163] Determining an accessory weight for each accessory type, where the accessory weight indicates the difficulty and risk of replacing an accessory corresponding to the accessory type. Each computing device includes multiple types of accessories, and each type of accessory corresponds to a different accessory weight.
[0164] Determining a device weight for each computing device in the set of computing devices based on the configuration requirements and the accessory weight for each accessory type;
[0165] The computing device with the largest device weight in the computing device set is determined as the target computing device.
[0166] In a possible implementation, the second determining module 12 is specifically configured to:
[0167] For any accessory type, determining the number M of accessories corresponding to the accessory type in the computing device, where there are M accessories of the accessory type in the computing device that satisfy the accessory information of the accessory type, where M is an integer;
[0168] The device weight of the computing device is determined according to the number of accessories corresponding to each accessory type and the accessory weight of each accessory type.
[0169] In a possible implementation, the processing module 13 is specifically configured to:
[0170] Determining, based on the configuration requirements and the target computing device, missing component information of the target computing device, the missing component information including a type of at least one component missing from the target computing device and a missing quantity of each component;
[0171] According to the missing parts information, the target parts are determined in each part type in ascending order of part weights to generate the configuration plan.
[0172] In a possible implementation, the processing module 13 is specifically configured to:
[0173] Determining, based on the configuration requirements and the accessory weights of the accessory types, a device weight of each candidate computing device, wherein the candidate computing device is a computing device other than the target computing device in the set of computing devices;
[0174] According to the missing parts information, the target accessories are determined in each candidate computing device in order of device weight from small to large, until the target accessories are determined to meet the missing parts information, and the configuration plan is obtained.
[0175] In a possible implementation, the processing module 13 is specifically configured to:
[0176] The configuration plan is obtained, and the configuration plan includes replacing the accessories in the selected computing device that meet the missing parts information with the target computing device.
[0177] In a possible implementation, the first determining module 11 is specifically configured to:
[0178] Determine a maximum number of accessories corresponding to each accessory type, where the maximum number of accessories is the maximum number of accessories corresponding to the accessory type that can be set in a single computing device;
[0179] The maximum value among the maximum accessory quantities corresponding to each accessory type is determined as the target accessory quantity;
[0180] The accessory weight of each accessory type is determined according to the target accessory quantity, wherein the multiple ratio between any two adjacent accessory weights is greater than or equal to the target accessory quantity.
[0181] Figure 7 This is a schematic diagram of the structure of a computing device provided in an embodiment of the present application. Figure 7As shown, the computing device 20 may include: a processor 21 and a memory 22, wherein the processor 21 and the memory 22 can communicate; exemplarily, the processor 21 and the memory 22 communicate via a communication bus 23, the memory 22 is used to store computer execution instructions, and the processor 21 is used to call the computer execution instructions in the memory to execute the method shown in any of the above method embodiments.
[0182] Optionally, the computing device 20 may further include a communication interface, which may include a transmitter and / or a receiver.
[0183] The computing device 20 may be the computing device shown in any of the above method embodiments, and may execute the computing device configuration method shown in any of the above method embodiments.
[0184] Optionally, the processor may be a CPU, a GPU, a baseboard management controller (BMC), other general-purpose processors, a digital signal processor (DSP), or an application-specific integrated circuit (ASIC). The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present application may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
[0185] An embodiment of the present application provides a computer-readable storage medium having computer-executable instructions stored thereon; the computer-executable instructions are used to implement the computing device configuration method as described in any of the above embodiments.
[0186] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, it enables a computer to execute the above-mentioned computing device configuration method.
[0187] All or part of the steps in the above-mentioned method embodiments may be implemented by hardware associated with program instructions. The aforementioned program may be stored in a readable memory. When executed, the program performs the steps of the above-mentioned method embodiments. The aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.
[0188] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable terminal device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0189] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0190] These computer program instructions can also be loaded onto a computer or other programmable terminal device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0191] Obviously, those skilled in the art may make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the embodiments of the present application are intended to include such modifications and variations.
[0192] In the embodiments of the present application, the terms "include", "comprise" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. The term "or" and its variations may refer to "and / or". In the embodiments of the present application, the terms "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In the embodiments of the present application, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0193] Those skilled in the art will readily conceive of other embodiments of the present application after considering the invention disclosed in the specification and practice. The embodiments of the present application are intended to cover any variations, uses, or adaptations of the embodiments of the present application, which follow the general principles of the embodiments of the present application and include common knowledge or customary technical means in the art that are not disclosed in the embodiments of the present application.
Claims
1. A computing device configuration method, characterized in that: include: Determining configuration requirements, including accessory information and accessory quantity for each accessory type; Determining a target computing device in the set of computing devices based on the configuration requirements and a device weight of each computing device, where the device weight is the sum of the weights of the accessories corresponding to the accessories in the computing devices that meet the configuration requirements, and the target computing device has the highest device weight; When the target computing device does not meet the configuration requirements, a configuration plan for the target computing device is generated based on the configuration requirements, and the configuration plan indicates that accessories of other computing devices in the computing device set should be replaced with the target computing device so that the target computing device after the accessories are replaced meets the configuration requirements.
2. The method according to claim 1, characterized in that Determining a target computing device from the set of computing devices according to the configuration requirements and the device weights of the computing devices includes: Determining an accessory weight for each accessory type, where the accessory weight indicates the difficulty and risk of replacing an accessory corresponding to the accessory type. Each computing device includes multiple types of accessories, and each type of accessory corresponds to a different accessory weight. Determine a device weight of each computing device in the set of computing devices based on the configuration requirements and the accessory weight of each accessory type.
3. The method according to claim 2, characterized in that For any computing device in the device set, determining a device weight of the computing device according to the configuration requirements and the accessory weights of each accessory type includes: For any accessory type, determining the number M of accessories corresponding to the accessory type in the computing device, where there are M accessories of the accessory type in the computing device that satisfy the accessory information of the accessory type, where M is an integer; The device weight of the computing device is determined according to the number of accessories corresponding to each accessory type and the accessory weight of each accessory type.
4. The method according to any one of claims 1 to 3, characterized in that Generating a configuration solution for the target computing device according to the configuration requirements includes: Determining, based on the configuration requirements and the target computing device, missing component information of the target computing device, the missing component information including a type of at least one component missing from the target computing device and a missing quantity of each component; According to the missing parts information, target parts are determined in each part type in ascending order of part weights to generate the configuration plan.
5. The method according to claim 4, characterized in that Determining target accessories in each accessory type in turn and generating the configuration scheme includes: Determining, based on the configuration requirements and the accessory weights of the accessory types, a device weight of each candidate computing device, wherein the candidate computing device is a computing device other than the target computing device in the set of computing devices; According to the missing parts information, the target accessories are determined in each candidate computing device in order of device weight from small to large, until the target accessories are determined to meet the missing parts information, and the configuration plan is obtained.
6. The method according to claim 5, characterized in that The configuration solution includes: replacing a target accessory in at least one selected computing device with the target computing device.
7. The method according to any one of claims 1 to 3, characterized in that Determine the accessory weights for each accessory type, including: Determine a maximum number of accessories corresponding to each accessory type, where the maximum number of accessories is the maximum number of accessories corresponding to the accessory type that can be set in a single computing device; The maximum value among the maximum accessory quantities corresponding to each accessory type is determined as the target accessory quantity; The accessory weight of each accessory type is determined according to the target accessory quantity, wherein the multiple ratio between any two adjacent accessory weights is greater than or equal to the target accessory quantity.
8. A computing device configuration apparatus, characterized in that: The computing device configuration apparatus includes a first determination module, a second determination module and a processing module, wherein: The first determining module is used to determine configuration requirements, wherein the configuration requirements include accessory information and accessory quantity of each accessory type; The second determining module is configured to determine a target computing device in the set of computing devices based on the configuration requirement and a device weight of each computing device, wherein the device weight is the sum of the accessory weights corresponding to accessories in the computing devices that meet the configuration requirement, and the target computing device has the highest device weight; The processing module is used to generate a configuration plan for the target computing device according to the configuration requirements when the target computing device does not meet the configuration requirements. The configuration plan indicates that accessories of other computing devices in the computing device set should be replaced with the target computing device so that the target computing device after the accessories are replaced meets the configuration requirements.
9. A computing device, characterized in that include: memory and processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.