Power strategy determination method, device, equipment, medium and computer program product

Through semantic decision library matching and configuration, the server power mode is automatically adjusted, which solves the problem of low efficiency and accuracy of power policy configuration in the existing technology, and achieves more efficient power policy settings.

CN118860107BActive Publication Date: 2024-12-20INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411347764.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2024-12-20
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

In the prior art, the server power strategy configuration efficiency and accuracy are low. The manufacturer recommends that it is not optimized completely and the configuration process is cumbersome, requiring a lot of manual adjustment of multiple configuration items in the BIOS.

Method used

Using a semantic decision library, by collecting server hardware information, matching the target power mode, and automatically adjusting the server power mode according to the configuration item data, including energy saving, high performance, balance, low latency, online transaction processing, virtualization, network optimization and storage optimization Combination of patterns.

Benefits of technology

Improves the efficiency and accuracy of power policy configuration, reduces the workload of manual configuration, and ensures the optimal power mode setting for the server in different usage scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118860107B_ABST
    Figure CN118860107B_ABST
Patent Text Reader

Abstract

The present application discloses a power policy determination method, device and equipment, medium and computer program product, which relates to the field of computer technology. The method comprises: collecting hardware information of a server; matching the corresponding target power mode in a semantic decision library with the hardware information as an index; wherein the semantic decision library comprises a plurality of entries, each entry comprises an index item and a corresponding power mode, the semantic decision library further comprises configuration item data corresponding to the power mode, the configuration item data comprises configuration values ​​corresponding to a plurality of configuration items; the server is configured according to the configuration item data of the target power mode in the semantic decision library, so as to adjust the power mode of the server to the target power mode. The present application improves the efficiency and accuracy of power policy configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to a power strategy determination method, apparatus and device, medium and computer program product. Background Art

[0002] When purchasing a large number of servers, they will be classified, such as some as business systems for business processing, some as file storage, and so on. Therefore, different power strategies need to be configured for the servers to meet different usage scenarios. Power strategy configuration is essentially the configuration of certain options in the BIOS (Basic Input / Output System) to achieve the maximum use of the server.

[0003] In the related art, the power policy configuration items mainly come from the manufacturer, and then they are configured separately on each machine according to the manufacturer's suggestions. However, due to the large number of machine types and the different configuration items for each model, the manufacturer's suggestions are not the best suggestions. In addition, a single configuration requires restarting the machine first, and then going to the BIOS configuration page to configure dozens of configuration items according to the suggestions. Dozens of configuration items are distributed in various places on the BIOS configuration page, which is a very large workload.

[0004] Therefore, how to improve the efficiency and accuracy of power strategy configuration is a technical problem that those skilled in the art need to solve. Summary of the invention

[0005] The purpose of the present application is to provide a power policy determination method, apparatus and device, medium and computer program product, which improve the efficiency and accuracy of power policy configuration.

[0006] To achieve the above objectives, the present application provides a method for determining a power strategy, comprising:

[0007] Collect server hardware information;

[0008] The corresponding target power mode is matched in a semantic decision library using the hardware information as an index; wherein the semantic decision library includes a plurality of entries, each entry includes an index item and a corresponding power mode, the semantic decision library also includes configuration item data corresponding to the power mode, and the configuration item data includes configuration values ​​corresponding to a plurality of configuration items;

[0009] The server is configured according to the configuration item data of the target power mode in the semantic decision library to adjust the power mode of the server to the target power mode.

[0010] The power supply mode includes any combination of energy-saving mode, high-performance mode, balanced mode, low-latency mode, online transaction processing mode, virtualization mode, network optimization mode, and storage optimization mode.

[0011] Among them, it also includes:

[0012] Setting multiple power modes, and determining the configuration item data corresponding to each power mode, and the hardware information of the server applicable to each power mode;

[0013] Creating multiple entries as index items using hardware information of servers applicable to each of the power modes;

[0014] A semantic decision library is constructed based on the multiple entries and the configuration item data corresponding to each of the power modes.

[0015] Wherein, determining the hardware information of the server applicable to each of the power supply modes includes:

[0016] Determining different types of hardware information of the server to which each of the power modes is applicable;

[0017] Accordingly, multiple entries are created with the hardware information of the server applicable to each power mode as the index item, including:

[0018] Corresponding entries are created using different types of hardware information of the server to which the power mode is applicable as index items.

[0019] The hardware information of the server is collected, including:

[0020] Collect different types of server hardware information;

[0021] Accordingly, matching the corresponding target power mode in the semantic decision library with the hardware information as an index includes:

[0022] Calculating similarities between different types of collected hardware information and index items of corresponding types in the entries;

[0023] Perform weighted calculation on the similarities corresponding to different types of hardware information according to the weights of different types of hardware information to obtain weighted similarity;

[0024] It is determined whether the maximum weighted similarity is greater than or equal to a first preset value, and if so, the power mode included in the entry corresponding to the maximum weighted similarity is determined as the target power mode.

[0025] The calculating of the similarity between the collected hardware information of different types and the index items of corresponding types in the entries includes:

[0026] Performing word segmentation processing on the collected hardware information to obtain a first word segmentation result, performing word segmentation processing on the index items of the corresponding type in the entry to obtain a second word segmentation result, and determining a union of the first word segmentation result and the second word segmentation result;

[0027] Counting the occurrence of each word in the first word segmentation result in the union to obtain a first vector representation of the hardware information, and counting the occurrence of each word in the second word segmentation result in the union to obtain a second vector representation of the index item;

[0028] The cosine similarity between the first vector representation and the second vector representation is calculated as the similarity between the hardware information and the index item.

[0029] After determining whether the maximum weighted similarity is greater than or equal to the first preset value, the method further includes:

[0030] If the maximum weighted similarity is less than the first preset value, a stress test is performed on the hardware device of the server, and a target power mode is determined according to the stress test result.

[0031] After determining the target power mode according to the stress test result, the following steps are also included:

[0032] Determine a target entry corresponding to the target power mode;

[0033] Determining target hardware information of the same type as an index item of a corresponding type in the target entry from among the collected hardware information of different types;

[0034] The weight of the target hardware information is increased.

[0035] Wherein, increasing the weight of the target hardware information includes:

[0036] Counting the target quantity of the target hardware information;

[0037] Add one to the numerator of the weight of the target hardware information and add the target number to the denominator to update the weight of the target hardware information;

[0038] The denominator of the weight of other hardware information except the target hardware information is added to the target quantity to update the weight of other hardware information.

[0039] After determining the target power mode according to the stress test result, the following steps are also included:

[0040] Different types of collected hardware information are used as index items respectively, and new entries corresponding to the target power mode are created in the semantic decision library.

[0041] The hardware information of the server includes any one or a combination of server manufacturer, server model, basic input and output system platform, processor manufacturer, processor model, number of processors, memory capacity, storage configuration, and network card model.

[0042] The step of configuring the server according to the configuration item data of the target power mode in the semantic decision library to adjust the power mode of the server to the target power mode includes:

[0043] Acquire configuration item data of the target power mode from the semantic decision library;

[0044] An instruction to modify the configuration item data is received through an input interface, and the server is configured based on the modified configuration item data.

[0045] After configuring the server based on the modified configuration item data, the method further includes:

[0046] Using the collected hardware information as an index item, a new entry is created in the semantic decision library based on the modified configuration item data.

[0047] The step of configuring the server according to the configuration item data of the target power mode in the semantic decision library includes:

[0048] Traversing all configuration items of the server, and matching the traversed current configuration item with the configuration item in the configuration item data of the target power mode;

[0049] If the match is successful, the current configuration item is configured according to the configuration value corresponding to the matched configuration item, and the next configuration item is traversed;

[0050] If the match fails, continue to traverse the next configuration item.

[0051] If the match fails, it also includes:

[0052] Matching the keywords in the semantic library corresponding to the current configuration item with the configuration items in the configuration item data of the target power mode; wherein the semantic library corresponding to the current configuration item is used to record keywords with semantically similar semantics to the current configuration item;

[0053] If there is a successfully matched keyword, the current configuration item is configured according to the configuration value corresponding to the matched configuration item, and the next configuration item is traversed;

[0054] If there is no successfully matched keyword, continue to traverse the next configuration item.

[0055] Among them, it also includes:

[0056] Obtaining a configuration text, and counting the frequency of occurrence of words in the configuration text;

[0057] Generate a context vector corresponding to the word according to the distance between the word and other words in the configuration text; wherein, if the distance between the word and other words in the configuration text is less than or equal to a distance threshold, the position corresponding to the other words in the context vector is set to the frequency of occurrence of the word; if the distance between the word and other words in the configuration text is greater than the distance threshold, the position corresponding to the other words in the context vector is set to zero;

[0058] Determining a keyword; wherein the similarity between the context vector of the keyword and the context vector of the configuration item is greater than or equal to a second preset value;

[0059] A semantic library of the configuration items is constructed based on the keywords.

[0060] To achieve the above objectives, the present application provides a power strategy determination device, comprising:

[0061] The acquisition module is used to acquire the hardware information of the server;

[0062] A matching module, used to match the corresponding target power mode in a semantic decision library with the hardware information as an index; wherein the semantic decision library includes a plurality of entries, each entry includes an index item and a corresponding power mode, and the semantic decision library also includes configuration item data corresponding to the power mode, and the configuration item data includes configuration values ​​corresponding to a plurality of configuration items;

[0063] A configuration module is used to configure the server according to the configuration item data of the target power mode in the semantic decision library to adjust the power mode of the server to the target power mode.

[0064] To achieve the above objectives, the present application provides an electronic device, including:

[0065] Memory for storing computer programs;

[0066] A processor is used to implement the steps of the power strategy determination method as described above when executing the computer program.

[0067] To achieve the above-mentioned purpose, the present application provides a non-volatile storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the power strategy determination method as described above are implemented.

[0068] To achieve the above objectives, the present application provides a computer program product, including a computer program, which implements the steps of the above power strategy determination method when executed by a processor.

[0069] It can be seen from the above scheme that a power policy determination method provided by the present application includes: collecting hardware information of a server; matching the corresponding target power mode in a semantic decision library with the hardware information as an index; wherein the semantic decision library includes multiple entries, each entry includes an index item and a corresponding power mode, and the semantic decision library also includes configuration item data corresponding to the power mode, and the configuration item data includes configuration values ​​corresponding to multiple configuration items; configuring the server according to the configuration item data of the target power mode in the semantic decision library to adjust the power mode of the server to the target power mode.

[0070] The power policy determination method provided by the present application utilizes a semantic decision library to maintain power modes applicable to different hardware information, and records the configuration item data corresponding to each power mode. When it is necessary to configure the power policy of the server, the applicable target power mode is retrieved from the semantic decision library according to the hardware information of the server, and multiple configuration items of the server are automatically configured according to the configuration item data of the target power mode, thereby improving the efficiency and accuracy of the power policy configuration. The present application also discloses a power policy determination device, an electronic device, a non-volatile storage medium, and a computer program product, which can also achieve the above-mentioned technical effects.

[0071] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. The drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific implementation methods, they are used to explain the present disclosure, but do not constitute a limitation to the present disclosure. In the drawings:

[0073] Figure 1 This is a flow chart of a method for determining a power strategy according to an exemplary embodiment;

[0074] Figure 2 is a schematic diagram of a semantic decision library according to an exemplary embodiment;

[0075] Figure 3 A flowchart of another power strategy determination method according to an exemplary embodiment;

[0076] Figure 4 A flowchart of a method for determining a power strategy in an application embodiment provided by the present application;

[0077] Figure 5 is a structural diagram of a power strategy determination device according to an exemplary embodiment;

[0078] Figure 6 The figure is a structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0079] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In addition, in the embodiments of the present application, "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0080] The embodiment of the present application discloses a power policy determination method, which improves the efficiency and accuracy of power policy configuration.

[0081] See also Figure 1 , according to an exemplary embodiment, a flowchart of a method for determining a power strategy is shown, such as Figure 1 As shown, including:

[0082] S101: Collecting server hardware information;

[0083] In this step, the hardware information of the server is collected. Different types of hardware information of the server can be collected, including any one or a combination of server manufacturer, server model, basic input and output system platform, processor manufacturer, processor model, number of processors, memory capacity, storage configuration, and network card model.

[0084] S102: Matching a corresponding target power mode in a semantic decision library using the hardware information as an index; wherein the semantic decision library includes a plurality of entries, each entry includes an index item and a corresponding power mode, and the semantic decision library also includes configuration item data corresponding to the power mode, and the configuration item data includes configuration values ​​corresponding to a plurality of configuration items;

[0085] In this embodiment, a semantic decision library is used to maintain power modes applicable to different hardware information, and to record the configuration item data corresponding to each power mode. The semantic decision library includes multiple entries, each of which uses hardware information as an index item and records the power mode applicable to the hardware information. The power mode may include energy-saving mode, high-performance mode, balanced mode, low-latency mode, online transaction processing mode, virtualization mode, network optimization mode, storage optimization mode, etc. At the same time, the semantic decision library also records the configuration item data corresponding to each power mode, including configuration values ​​corresponding to multiple configuration items. The configuration items here may be BIOS configuration items.

[0086] For example, if you configure the server into virtualization mode, you need to configure Hyper-Threading to Enabled, C-States to Disabled, Virtualization (VT-x / AMD-V) to Enabled, Memory Frequency to Maximum supported frequency, etc.

[0087] It should be noted that the configuration item data corresponding to each power mode collects the maximum set of configuration items that all BIOS manufacturers need to configure the power mode. For example, if a server needs to be configured in virtualization mode, the configuration item is Hyper-Threading is Enabled, and C-States is configured to Disabled. Another server needs to be configured in virtualization mode with the configuration item Hyper-Threading is Enabled, C-States is configured to Disabled, and Memory Frequency is configured to Maximum supported frequency. Then the virtualization model is the union of all.

[0088] The semantic decision library is constructed in the following manner: multiple power modes are set, and the configuration item data corresponding to each of the power modes and the hardware information of the server applicable to each of the power modes are determined; multiple entries are created with the hardware information of the server applicable to each of the power modes as index items; and a semantic decision library is constructed based on the multiple entries and the configuration item data corresponding to each of the power modes.

[0089] As a feasible implementation method, the hardware information of the server applicable to each of the power modes is determined, including: determining different types of hardware information of the server applicable to each of the power modes; accordingly, creating multiple entries with the hardware information of the server applicable to each of the power modes as index items, including: creating corresponding entries with different types of hardware information of the server applicable to the power modes as index items.

[0090] In a specific implementation, different types of hardware information of the server are used as index items of entries, and the entries record the power modes applicable to these different types of hardware information. For example, the constructed semantic decision library is as follows: Figure 2 As shown, server manufacturer A, server model A, BIOS platform A, processor manufacturer A, processor model A, number of processors A, memory capacity A, storage configuration A, and network card model A correspond to the virtualization mode, and server manufacturer B, server model B, BIOS platform B, processor manufacturer B, processor model B, number of processors B, memory capacity B, storage configuration B, and network card model B correspond to the storage optimization mode.

[0091] In this step, when it is necessary to configure the power policy for the server, the applicable target power mode is retrieved in the semantic decision library based on the hardware information of the server. As a feasible implementation method, if a single type of hardware information is used as an index item in the semantic decision library, the similarity between the collected hardware information and the index items of each entry in the semantic decision library is calculated. The maximum similarity can be determined by using the cosine similarity calculation method. If the maximum similarity is greater than or equal to the first preset value, it means that the target power mode applicable to the server is matched, and the power mode included in the entry corresponding to the maximum similarity is determined as the target power mode. If the maximum similarity is less than the first preset value, it means that the target power mode applicable to the server is not matched.

[0092] As another feasible implementation, if different types of hardware information are used as index items in the semantic decision library, then the corresponding target power mode is matched in the semantic decision library using the hardware information as the index, including: calculating the similarity between the different types of collected hardware information and the index items of the corresponding types in the entries; performing weighted calculation on the similarities corresponding to the different types of hardware information according to the weights of the different types of hardware information to obtain weighted similarity; determining whether the maximum weighted similarity is greater than or equal to a first preset value, and if so, determining the power mode contained in the entry corresponding to the maximum weighted similarity as the target power mode.

[0093] In a specific implementation, the similarity between each type of hardware information collected and the index item of the corresponding type in the semantic decision library is calculated. The cosine similarity calculation method can be used to assign a corresponding weight to each type of hardware information to reflect its importance in determining the power mode. Initially, the weights of each type of hardware information can be set to be consistent, and then adjusted according to actual conditions. Then, the similarities corresponding to different types of hardware information are weighted according to the weights of different types of hardware information to obtain a comprehensive weighted similarity, and the maximum weighted similarity is determined. If the maximum weighted similarity is greater than or equal to the first preset value, it means that the target power mode applicable to the server is matched, and the power mode included in the entry corresponding to the maximum weighted similarity is determined as the target power mode. If the maximum weighted similarity is less than the first preset value, it means that the target power mode applicable to the server is not matched.

[0094] As a feasible implementation method, the similarity between different types of collected hardware information and index items of corresponding types in the entry is calculated, including: performing word segmentation processing on the collected hardware information to obtain a first word segmentation result, performing word segmentation processing on the index items of corresponding types in the entry to obtain a second word segmentation result, and determining the union of the first word segmentation result and the second word segmentation result; counting the occurrence of each word in the first word segmentation result in the union to obtain a first vector representation of the hardware information, and counting the occurrence of each word in the second word segmentation result in the union to obtain a second vector representation of the index item; calculating the cosine similarity between the first vector representation and the second vector representation as the similarity between the hardware information and the index item.

[0095] In a specific implementation, the collected hardware information is segmented to generate a group of segmentation results, namely the first segmentation results, and then the corresponding type of index items in the semantic decision library are also segmented in the same way to generate another group of segmentation results, namely the second segmentation results. The union of the two groups of segmentation results is determined, that is, the set of all segmentations that have appeared. The number of occurrences of each segmentation in the first segmentation result in the union is counted to generate a vector representation of the hardware information, namely the first vector representation. Similarly, the number of occurrences of each segmentation in the second segmentation result in the union is counted to generate a vector representation of the index item, namely the second vector representation. The similarity between the hardware information and the index item is evaluated by calculating the cosine similarity between the two vectors. Cosine similarity is an indicator that measures the degree of directional similarity between two vectors in space. The closer its value is to 1, the more similar the two vectors are, that is, the more the hardware information matches the index item.

[0096] For example, the CPU (Central Processing Unit) model collected is CpuWsaBdgX86Xeon5318Y, and there is a CPU model CpuCpuWsbBdgX86Xeon5418X in the semantic decision library. The two groups of strings are segmented. The first group of strings is segmented as follows [Cpu, Wsa, Bdg, X86, Xe, on, 53, 18, Y], and the second group of strings is segmented as follows [Cpu, Cpu, Wsb, Bdg, X86, Xe, on, 54, 18, X]. The two segmented words are combined [ Cpu,Wsa,Bdg,X86,Xe,on,53,18,Y,Wsb,54,X], the word frequency vector is calculated based on the two word segmentation results, where the length of the word frequency vector is the union, and each bit represents the number of occurrences of a word. The first vector corresponding to the collected CPU model is expressed as (1,1,1,1,1,1,1,1,1,0,0,0), and the second vector corresponding to the CPU model in the semantic decision library is expressed as (2,0,1,1,1,1,0,1,0,1,0,1). The formula for calculating cosine similarity is:

[0097] ;

[0098] in, is the value of the i-th dimension in the first vector representation, is the value of the i-th dimension in the second vector representation, n is the total number of dimensions, is the calculated cosine similarity.

[0099] Substituting the first vector representation and the second vector representation in the above example into the above formula:

[0100] .

[0101] As a feasible implementation method, after determining whether the maximum weighted similarity is greater than or equal to a first preset value, it also includes: if the maximum weighted similarity is less than the first preset value, stress testing the hardware device of the server, and determining the target power mode according to the stress test result.

[0102] In the specific implementation, if the target power mode is not reached according to the similarity, the server's hardware equipment is stress tested, and test data of the hardware equipment under high load conditions is collected, including data such as CPU graphics processing, text compression capability, SQLite (Self-Contained, Serverless, Zero-Configuration, Transactional SQLDatabase Engine, the full name in Chinese is self-contained, serverless, zero-configuration, transactional SQL database engine) read and write capabilities, memory event processing capabilities, hard disk IOPS (Input / Output Operations Per Second), bandwidth data, network card throughput, etc. According to the performance of the server under high load conditions, the target power mode of the server is recommended.

[0103] For Energy Saving Mode, if the server shows good energy efficiency ratio under high load, that is, it can still maintain acceptable performance at lower energy consumption, then Energy Saving Mode is suitable. This mode will reduce hardware performance to reduce energy consumption, which is suitable for scenarios where performance requirements are not high but you want to reduce power consumption. For High Performance Mode, when the server can still maintain high efficiency under high load and heat dissipation is good, you can choose High Performance Mode. This mode maximizes hardware performance without considering energy consumption, and is suitable for tasks that require fast processing of large amounts of data, such as video rendering or large-scale data analysis. For Balanced Mode, if the server shows balanced performance and energy consumption under high load, then Balanced Mode is suitable. This mode strikes a balance between performance and energy consumption, is suitable for daily use, and can meet most office and home needs. For Low Latency Mode, for applications that require fast response, such as online games or real-time data processing, if the server can provide stable low-latency performance under high load, then Low Latency Mode is an ideal choice. For the online transaction processing mode, if the server shows high efficiency when processing a large number of transactions, especially in terms of database and transaction processing performance, then the online transaction processing mode is suitable. This mode optimizes database and transaction processing performance and is suitable for server environments that need to process a large number of transactions. For the virtualization mode, in an environment running multiple virtual machines, if the server can efficiently manage resource allocation, then the virtualization mode is beneficial. This mode optimizes the performance and resource allocation of virtual machines and is suitable for virtualized environments. For the network optimization mode, if the server can maintain high network performance under high load, then the network optimization mode is suitable. This mode improves network performance and is suitable for applications that require large amounts of data transfer. For the storage optimization mode, for scenarios where large amounts of data need to be read and written frequently, if the server performs well in terms of hard disk IOPS and bandwidth data, then the storage optimization mode is an ideal choice. This mode optimizes the performance of storage devices and is suitable for storage-intensive applications.

[0104] As a preferred implementation, after determining the target power mode according to the stress test results, it also includes: determining the target entry corresponding to the target power mode; determining target hardware information that is the same as the index item of the corresponding type in the target entry among the different types of hardware information collected; and increasing the weight of the target hardware information.

[0105] If the target power mode is determined through stress testing, the weights of various types of hardware information need to be adjusted so that the same hardware information can be directly matched to the target power mode during the next match. In a specific implementation, the target entry corresponding to the target power mode is determined in the semantic decision library, and then the target hardware information that is the same as the index item of the corresponding type in the target entry is determined among the different types of hardware information collected to increase the weight of the target hardware information. When the power mode is subsequently matched, if the same hardware information is collected, it can be directly matched to the target power mode, which improves the matching efficiency and accuracy of subsequent power modes. For example, if the collected CPU model and the CPU model in the target entry are both InBryBMCX86Xeon5318Y, the weight of the CPU model needs to be increased.

[0106] As a feasible implementation method, improving the weight of the target hardware information includes: counting the target number of the target hardware information; increasing the numerator of the weight of the target hardware information by one and the denominator by the target number to update the weight of the target hardware information; adding the target number to the denominator of the weight of other hardware information except the target hardware information to update the weight of other hardware information.

[0107] In a specific implementation, the number of target hardware information of the same type as the index item of the corresponding type in the target entry in the collected hardware information is counted, that is, the target number, and the weight of the target hardware information is updated to: (original numerator + 1) / (original denominator + target number), and the weight of other hardware information is updated to: original numerator / (original denominator + target number).

[0108] For example, if the index item contains a total of 9 types of hardware information, the weight of each type of hardware information is 1 / 9. If the target hardware information is the CPU model, the weight of the CPU model is adjusted to (1+1) / (9+1)=2 / 10, and the weight of other hardware information is adjusted to 1 / (9+1)=1 / 10.

[0109] As a preferred implementation, after determining the target power mode according to the stress test results, it also includes: using different types of collected hardware information as index items, creating new entries corresponding to the target power mode in the semantic decision library.

[0110] In the specific implementation, if the target power mode is determined through stress testing, the different types of hardware information collected are used as index items to create new entries corresponding to the target power mode in the semantic decision library, thereby expanding the semantic decision library. When the power mode is subsequently matched, if the same hardware information is collected, it can be directly matched to the target power mode, which improves the efficiency and accuracy of subsequent power mode matching.

[0111] S103: configuring the server according to the configuration item data of the target power mode in the semantic decision library to adjust the power mode of the server to the target power mode.

[0112] In this step, the configuration item data of the target power mode in the semantic decision library is obtained, and the server is configured according to the configuration value of each configuration item included in the configuration item data, so as to adjust the power mode of the server to the target power mode.

[0113] As a feasible implementation method, the server is configured according to the configuration item data of the target power mode in the semantic decision library, including: traversing all configuration items of the server, matching the traversed current configuration item with the configuration item in the configuration item data of the target power mode; if the match is successful, configuring the current configuration item according to the configuration value corresponding to the matched configuration item, and continuing to traverse the next configuration item; if the match fails, continuing to traverse the next configuration item.

[0114] In a specific implementation, all configuration items that need to be configured on the server are traversed. For the current configuration item traversed, it is determined in the configuration item data of the target power mode whether there is a configuration item that successfully matches the current configuration item. If so, the current configuration item is configured according to the configuration value corresponding to the matched configuration item, and then the traversal of the next configuration item continues. If not, the traversal of the next configuration item is performed directly.

[0115] As a preferred implementation, the server is configured according to the configuration item data of the target power mode in the semantic decision library to adjust the power mode of the server to the target power mode, including: obtaining the configuration item data of the target power mode from the semantic decision library; receiving a modification instruction for the configuration item data through an input interface, and configuring the server based on the modified configuration item data.

[0116] In a specific implementation, after determining that the server adopts the target power mode, the configuration item data of the target power mode is obtained from the semantic decision library, supporting users to make customized modifications to the configuration item data, and configuring the server according to the modified configuration item data to set the server's power mode with higher flexibility.

[0117] As a preferred implementation, after configuring the server based on the modified configuration item data, the method further includes: using the collected hardware information as an index item, and creating a new entry in the semantic decision library based on the modified configuration item data.

[0118] In a specific implementation, if the user makes a customized modification to the configuration item data, the collected hardware information can be used as an index item, and a new entry can be created in the semantic decision library based on the modified configuration item data. The entry contains the modified configuration item data, thereby expanding the semantic decision library. When the power mode is subsequently matched, if the same hardware information is collected, it can be directly matched to the entry, and the server can be configured based on the configuration item data in the entry, thereby improving the efficiency and accuracy of subsequent power mode matching.

[0119] The power policy determination method provided in the embodiment of the present application utilizes a semantic decision library to maintain power modes applicable to different hardware information, and records the configuration item data corresponding to each power mode. When it is necessary to configure the power policy of a server, the applicable target power mode is retrieved from the semantic decision library according to the hardware information of the server, and multiple configuration items of the server are automatically configured according to the configuration item data of the target power mode, thereby improving the efficiency and accuracy of the power policy configuration.

[0120] The embodiment of the present application discloses a method for determining a power strategy. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically:

[0121] See also Figure 3 , a flowchart of another method for determining a power strategy according to an exemplary embodiment is shown, such as Figure 3 As shown, including:

[0122] S201: Collecting server hardware information;

[0123] S202: Matching the corresponding target power mode in a semantic decision library with the hardware information as an index; wherein the semantic decision library includes a plurality of entries, each entry includes an index item and a corresponding power mode, and the semantic decision library also includes configuration item data corresponding to the power mode, and the configuration item data includes configuration values ​​corresponding to a plurality of configuration items;

[0124] S203: traverse all configuration items of the server, and match the traversed current configuration item with the configuration item in the configuration item data of the target power mode; if the match is successful, proceed to S205; if the match fails, proceed to S204;

[0125] S204: Match the keywords in the semantic library corresponding to the current configuration item with the configuration item in the configuration item data of the target power mode; if there is a successfully matched keyword, proceed to S205; if there is no successfully matched keyword, proceed to S206; wherein the semantic library corresponding to the current configuration item is used to record keywords with semantically similar keywords to the current configuration item;

[0126] It is understandable that in actual applications, the names of various configuration items are different in different server manufacturers and BIOS manufacturers. For example, the virtualization mode requires that Virtualization (VT-x / AMD-V) be configured as Enabled, but in different situations, some are Virtualization, some are VT-x, and some are AMD-v, and there are also language differences, which is equivalent to determining the configuration items that need to be configured, but it cannot be guaranteed whether the actual configuration item names in the server are consistent with those recorded in the semantic decision library. Therefore, in this embodiment, a corresponding semantic library is created for each configuration item to record keywords with similar semantics to the configuration item.

[0127] The method for creating a semantic library of a configuration item is as follows: obtaining a configuration text, and counting the frequency of occurrence of a word in the configuration text; generating a context vector corresponding to the word according to the distance between the word and other words in the configuration text; wherein, if the distance between the word and other words in the configuration text is less than or equal to a distance threshold, the position corresponding to the other words in the context vector is set to the frequency of occurrence of the word, and if the distance between the word and other words in the configuration text is greater than the distance threshold, the position corresponding to the other words in the context vector is set to zero; determining a keyword; wherein the similarity between the context vector of the keyword and the context vector of the configuration item is greater than or equal to a second preset value; and constructing a semantic library of the configuration item based on the keyword.

[0128] In the specific implementation, the configuration text is collected, which may include BIOS configuration manuals, user manuals, configuration item professional terminology explanations, etc. of different versions from different BIOS manufacturers, and uniformly translated into a preset language, and then the data is standardized, punctuation and irrelevant words are removed, a vocabulary is made, and the number of times each word in the vocabulary appears in the context of other words is calculated. The context vector of each word is generated based on the relative distance between each word and other words in the text. In this process, if the distance between the two words is within the preset distance threshold, then in the context vector, the corresponding position will be set to the frequency of occurrence of the word; if the distance exceeds this threshold, the corresponding position will be set to zero. In this way, the context vector of each word can reflect its contextual relationship in the text.

[0129] For example, descriptions of similar words from two server description texts:

[0130] Text 1: C-States is a state of Intel CPU when it is idle, they are collectively referred to as "C-state" or "C-mode".

[0131] Text 2: C-state refers to the CPU power state.

[0132] After translating and standardizing it, it becomes:

[0133] Text 1:

[0134] C-States is a state of CPU when idle. They are collectively referred to as c-state or c-mode.

[0135] Text 2:

[0136] C state is a state of CPU power.

[0137] In the above text, the frequency of “C-States” is 1, and the frequency of “C state” is 1. If the distance threshold is 2, the context vector of “C-States” is (0,1,1,0,0,0,0,0,0), and the context vector of “C state” is (0,1,1,0,0,0,0,0,0).

[0138] For each configuration item in the semantic decision library, determine the keywords whose context vector has a similarity greater than or equal to the second preset value with the context vector of the configuration item to form the semantic library of the configuration item. The cosine similarity calculation method can also be used here, and the calculation formula of the cosine similarity can refer to the introduction in the previous embodiment.

[0139] S205: Configure the current configuration item according to the configuration value corresponding to the matched configuration item, and proceed to S206;

[0140] S206: Continue to traverse the next configuration item.

[0141] In the process of configuring the service, all configuration items that need to be configured on the server are traversed. For the current configuration item traversed, determine whether there is a configuration item that successfully matches the current configuration item in the configuration item data of the target power mode. If so, configure the current configuration item according to the configuration value corresponding to the matched configuration item, and then continue to traverse the next configuration item. If not, determine the semantic library corresponding to the current configuration item, match the keywords in the semantic library with the configuration items in the configuration item data of the target power mode, and judge whether there is a successfully matched keyword. If so, configure the current configuration item according to the configuration value corresponding to the matched configuration item, and then continue to traverse the next configuration item. If not, directly traverse the next configuration item.

[0142] It can be seen that this embodiment records the semantically similar keywords of each configuration item through the semantic library. When the configuration item of the server cannot be matched with the configuration item in the semantic decision library, the keywords with similar semantics to the configuration item are used to match the configuration item in the semantic decision library, thereby improving the accuracy of configuration item matching.

[0143] An application example provided by the present application is described below. Figure 4 As shown, the following steps are included:

[0144] Step 1: Initialization process of the semantic decision library. The semantic decision library is divided into eight modes, namely energy-saving mode, high-performance mode, balanced mode, low-latency mode, online transaction processing mode, virtualization mode, network optimization mode, and storage optimization mode. The mode configuration items are initialized. The BIOS configuration items of each mode are a complete set of the mode. Different types of servers only need to configure some of the configuration items. The BIOS configuration items required for each mode are initialized. The initialization data source is partly determined by collecting keywords describing various modes in the BIOS operation documents of each server manufacturer, and the other part is the configuration item data of each mode in the semantic decision library that users can see. Users can modify the configuration items of each mode in the semantic decision library based on their own experience or the suggestions provided by the server manufacturer. In addition, the configuration items of the user's semantic decision library will be reported to the operation and maintenance platform at regular intervals. The operation and maintenance platform will analyze the information reported by each user, self-calibrate the configuration items of the semantic decision library, and distribute them to each user according to iteration.

[0145] Step 2: Collect configuration item descriptions and generate a semantic library for configuration items. Each configuration item will have an introduction to the configuration item function. The semantics of the introductions of different BIOS architecture manufacturers are consistent, but they are displayed differently on the BIOS configuration page. Collect all descriptions of all BIOS configuration items and generate a semantic library for each configuration item. To generate the semantic library, first translate the data into English, remove punctuation and irrelevant words, make a vocabulary, use the distance-first algorithm, generate a set of vectors, and use the configuration item keyword as the benchmark to calculate the similarity between all vectors and the benchmark vector. The cosine similarity algorithm can be used. Using the clustering algorithm, all those with a similarity greater than 0.7 are used as the semantic library of the configuration item keyword.

[0146] Step 3: Collect basic information of the server, including server manufacturer, server model, BIOS platform, CPU manufacturer, CPU model, number of CPUs, memory capacity, storage configuration, and network card model. Use the nine indicators as indexes to find the corresponding power policy mode in the semantic decision library and determine whether it matches the decision library index. If it can be matched, the power policy mode configured for the server is determined. If the match fails, the nine indicators of the server are respectively calculated for all indexes in the semantic decision library. The formula for calculating the similarity is f(x)=p0c0+p1c1+p2c2+⋯, where c is the similarity of each indicator item and p is the weight of each indicator item. The weight has self-optimization capability.

[0147] Step 4: If the index is not found in the semantic decision library in the previous step, or the similarity is not found to be greater than 0.8, it is necessary to use the built-in server stress test model of this device to stress test the server's CPU, memory, hard disk, network card, etc., and collect data such as CPU graphics processing, text compression capability, SQLite reading and writing capabilities under high load conditions, memory event processing capabilities, hard disk IOPS, bandwidth data, network card throughput, etc. According to the performance of the server under high load conditions, the power policy mode of the server is recommended.

[0148] Step 5: Get all BIOS configuration items that recommend the power policy mode of the server, get all BIOS configuration items of the current server, loop all BIOS configuration items, compare the configuration items with the configuration item text in the power policy mode, if the match fails, find the semantic library of the configuration item for all text comparisons, if all matches fail, then this BIOS configuration does not need to be configured, and the configuration item is discarded. If the match is successful, this configuration item needs to be recorded, and this configuration item is one of the configuration items configured into the power policy mode.

[0149] Step 6: After looping through all configuration items of the server BIOS configuration, summarize all the required configuration items, and present the required configuration items to the user in a visual way. The user confirms the configuration mode and configuration items of the server. If the user thinks there is a problem with the recommendation, he can modify it manually to detect whether the user has modified the recommended configuration. If modified, the data in the semantic decision library is modified synchronously. After the user confirms, the configuration item is configured.

[0150] Step 7: Check whether the stress test mode of this device is used in the recommendation process. If it is used, it means that the semantic decision library needs to be expanded. The nine indicators of the server used in this result are used as a new index. The value corresponding to the new index is the power policy mode recommended this time. If a new BIOS configuration item is used in this configuration, it is synchronously added to the configuration item library of the power policy mode.

[0151] A power strategy determination device provided in an embodiment of the present application is introduced below. The power strategy determination device described below and the power strategy determination method described above can be referenced to each other.

[0152] See also Figure 5 , according to an exemplary embodiment, a structural diagram of a power strategy determination device is shown, such as Figure 5 As shown, including:

[0153] The acquisition module 501 is used to acquire the hardware information of the server;

[0154] A matching module 502 is used to match the corresponding target power mode in a semantic decision library with the hardware information as an index; wherein the semantic decision library includes a plurality of entries, each entry includes an index item and a corresponding power mode, and the semantic decision library also includes configuration item data corresponding to the power mode, and the configuration item data includes configuration values ​​corresponding to a plurality of configuration items;

[0155] The configuration module 503 is used to configure the server according to the configuration item data of the target power mode in the semantic decision library to adjust the power mode of the server to the target power mode.

[0156] The power policy determination device provided in the embodiment of the present application uses a semantic decision library to maintain power modes applicable to different hardware information, and records the configuration item data corresponding to each power mode. When it is necessary to configure the power policy of the server, the applicable target power mode is retrieved from the semantic decision library according to the hardware information of the server, and multiple configuration items of the server are automatically configured according to the configuration item data of the target power mode, thereby improving the efficiency and accuracy of the power policy configuration.

[0157] Based on the above embodiments, as a preferred implementation mode, the power mode includes any combination of energy-saving mode, high-performance mode, balanced mode, low-latency mode, online transaction processing mode, virtualization mode, network optimization mode, and storage optimization mode.

[0158] Based on the above embodiment, as a preferred implementation, it also includes:

[0159] The first construction module is used to set multiple power modes and determine the configuration item data corresponding to each power mode and the hardware information of the server applicable to each power mode; create multiple entries with the hardware information of the server applicable to each power mode as index items; and build a semantic decision library based on the multiple entries and the configuration item data corresponding to each power mode.

[0160] Based on the above embodiments, as a preferred implementation mode, the first construction module is specifically used to: set multiple power modes and determine different types of hardware information of the server applicable to each power mode; create corresponding entries with different types of hardware information of the server applicable to the power mode as index items; and build a semantic decision library based on multiple entries and configuration item data corresponding to each power mode.

[0161] Based on the above embodiment, as a preferred implementation, the acquisition module 501 is specifically used to: acquire different types of hardware information of the server;

[0162] Correspondingly, the matching module 502 is specifically used to: calculate the similarity between the different types of collected hardware information and the index items of the corresponding types in the entries; perform weighted calculation on the similarities corresponding to the different types of hardware information according to the weights of the different types of hardware information to obtain weighted similarity; determine whether the maximum weighted similarity is greater than or equal to a first preset value, and if so, determine the power mode contained in the entry corresponding to the maximum weighted similarity as the target power mode.

[0163] On the basis of the above embodiments, as a preferred implementation mode, the matching module 502 is specifically used for: performing word segmentation processing on the collected hardware information to obtain a first word segmentation result, performing word segmentation processing on the index item of the corresponding type in the entry to obtain a second word segmentation result, and determining the union of the first word segmentation result and the second word segmentation result; counting the occurrence test of each word in the first word segmentation result in the union to obtain a first vector representation of the hardware information, and counting the occurrence test of each word in the second word segmentation result in the union to obtain a second vector representation of the index item; calculating the cosine similarity between the first vector representation and the second vector representation as the similarity between the hardware information and the index item.

[0164] Based on the above embodiment, as a preferred implementation, the matching module 502 is also used for: if the maximum weighted similarity is less than the first preset value, performing a stress test on the hardware device of the server, and determining a target power mode according to the stress test result.

[0165] Based on the above embodiment, as a preferred implementation, it also includes:

[0166] An improvement module is used to determine a target entry corresponding to the target power mode; determine target hardware information that is the same as an index item of a corresponding type in the target entry from different types of collected hardware information; and increase the weight of the target hardware information.

[0167] On the basis of the above embodiments, as a preferred implementation mode, the improvement module is specifically used to: count the target quantity of the target hardware information; increase the numerator of the weight of the target hardware information by one and the denominator by the target quantity to update the weight of the target hardware information; add the target quantity to the denominator of the weight of other hardware information except the target hardware information to update the weight of other hardware information.

[0168] Based on the above embodiment, as a preferred implementation, it also includes:

[0169] The first creation module is used to create new entries corresponding to the target power mode in the semantic decision library by using different types of collected hardware information as index items respectively.

[0170] Based on the above embodiments, as a preferred implementation mode, the hardware information of the server includes any one or a combination of several of the server manufacturer, server model, basic input and output system platform, processor manufacturer, processor model, number of processors, memory capacity, storage configuration, and network card model.

[0171] Based on the above embodiments, as a preferred implementation mode, the configuration module 503 is specifically used to: obtain the configuration item data of the target power mode from the semantic decision library; receive modification instructions for the configuration item data through the input interface, and configure the server based on the modified configuration item data.

[0172] Based on the above embodiment, as a preferred implementation, it also includes:

[0173] The second creation module is used to use the collected hardware information as an index item and create a new entry in the semantic decision library based on the modified configuration item data.

[0174] On the basis of the above embodiment, as a preferred implementation mode, the configuration module 503 is specifically used to: traverse all configuration items of the server, and match the traversed current configuration item with the configuration item in the configuration item data of the target power mode; if the match is successful, configure the current configuration item according to the configuration value corresponding to the matched configuration item, and continue to traverse the next configuration item; if the match fails, continue to traverse the next configuration item.

[0175] On the basis of the above embodiments, as a preferred implementation mode, the configuration module 503 is specifically used to: traverse all configuration items of the server, and match the traversed current configuration item with the configuration item in the configuration item data of the target power mode; if the match is successful, configure the current configuration item according to the configuration value corresponding to the matched configuration item, and continue to traverse the next configuration item; if the match fails, match the keyword in the semantic library corresponding to the current configuration item with the configuration item in the configuration item data of the target power mode; wherein the semantic library corresponding to the current configuration item is used to record keywords with similar semantics to the current configuration item; if there is a successfully matched keyword, configure the current configuration item according to the configuration value corresponding to the matched configuration item, and continue to traverse the next configuration item; if there is no successfully matched keyword, continue to traverse the next configuration item.

[0176] Based on the above embodiment, as a preferred implementation, it also includes:

[0177] The second construction module is used to obtain a configuration text, count the frequency of occurrence of a word in the configuration text; generate a context vector corresponding to the word according to the distance between the word and other words in the configuration text; wherein, if the distance between the word and other words in the configuration text is less than or equal to a distance threshold, the position corresponding to the other words in the context vector is set to the frequency of occurrence of the word, and if the distance between the word and other words in the configuration text is greater than the distance threshold, the position corresponding to the other words in the context vector is set to zero; determine a keyword; wherein the similarity between the context vector of the keyword and the context vector of the configuration item is greater than or equal to a second preset value; and construct a semantic library of the configuration item based on the keyword.

[0178] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0179] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the present application, the embodiment of the present application further provides an electronic device, Figure 6 FIG. 1 is a structural diagram of an electronic device according to an exemplary embodiment. Figure 6 As shown, the electronic equipment includes:

[0180] Communication interface 1, capable of exchanging information with other devices such as network devices;

[0181] The processor 2 is connected to the communication interface 1 to implement information exchange with other devices, and is used to execute the power strategy determination method provided by one or more technical solutions when running a computer program. The computer program is stored in the memory 3.

[0182] Of course, in actual application, the various components in the electronic device are coupled together through the bus system 4. It can be understood that the bus system 4 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 4 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 6 Various buses are labeled as bus system 4 .

[0183] The memory 3 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program used to operate on the electronic device.

[0184] It can be understood that the memory 3 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAMbus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory 3 described in the embodiments of the present application is intended to include but is not limited to these and any other suitable types of memories.

[0185] The method disclosed in the above embodiment of the present application can be applied to the processor 2, or implemented by the processor 2. The processor 2 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 2 or the instruction in the form of software. The above processor 2 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 2 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the memory 3, and the processor 2 reads the program in the memory 3 and completes the steps of the above method in combination with its hardware.

[0186] When the processor 2 executes the program, the corresponding processes in the various methods of the embodiments of the present application are implemented, which will not be repeated here for the sake of brevity.

[0187] In an exemplary embodiment, the embodiment of the present application further provides a non-volatile storage medium storing a computer program, which can be executed by the processor 2 to complete the steps of the aforementioned method.

[0188] In an exemplary embodiment, the present application also provides a computer program product, including a computer program, which is executed by the processor 2 to complete the steps of the aforementioned method.

[0189] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to computer program instructions, and the aforementioned computer program can be stored in a non-volatile storage medium. When the computer program is executed, it executes the steps of the above-mentioned method embodiment. Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product, which is stored in a non-volatile storage medium and includes a number of instructions for an electronic device (which can be a personal computer, a server, a network device, etc.) to execute all or part of the methods described in each embodiment of the present application.

[0190] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A method for determining a power strategy, characterized in that: include: Collect server hardware information; The corresponding target power mode is matched in a semantic decision library using the hardware information as an index; wherein the semantic decision library includes a plurality of entries, each entry includes an index item and a corresponding power mode, the semantic decision library also includes configuration item data corresponding to the power mode, and the configuration item data includes configuration values ​​corresponding to a plurality of configuration items; configuring the server according to the configuration item data of the target power mode in the semantic decision library to adjust the power mode of the server to the target power mode; Among them, it also includes: Set multiple power modes, and determine the configuration item data corresponding to each power mode, and the hardware information of the server applicable to each power mode; wherein the configuration item data corresponding to each power mode includes the maximum set of all basic input and output system manufacturers that need to configure the power mode; Creating multiple entries as index items using hardware information of servers applicable to each of the power modes; A semantic decision library is constructed based on the multiple entries and the configuration item data corresponding to each of the power modes.

2. The power strategy determination method according to claim 1, characterized in that: The power supply mode includes any combination of energy-saving mode, high-performance mode, balanced mode, low-latency mode, online transaction processing mode, virtualization mode, network optimization mode, and storage optimization mode.

3. The power strategy determination method according to claim 1, characterized in that: Determine the server's hardware information for each of the described power modes, including: Determining different types of hardware information of the server to which each of the power modes is applicable; Accordingly, multiple entries are created with the hardware information of the server applicable to each power mode as the index item, including: Corresponding entries are created using different types of hardware information of the server to which the power mode is applicable as index items.

4. The power strategy determination method according to claim 3, characterized in that: Collect server hardware information, including: Collect different types of server hardware information; Accordingly, matching the corresponding target power mode in the semantic decision library with the hardware information as an index includes: Calculating similarities between different types of collected hardware information and index items of corresponding types in the entries; Perform weighted calculation on the similarities corresponding to different types of hardware information according to the weights of different types of hardware information to obtain weighted similarity; It is determined whether the maximum weighted similarity is greater than or equal to a first preset value, and if so, the power mode included in the entry corresponding to the maximum weighted similarity is determined as the target power mode.

5. The power strategy determination method according to claim 4, characterized in that: Calculating the similarity between the collected hardware information of different types and the index items of corresponding types in the entry, including: Performing word segmentation processing on the collected hardware information to obtain a first word segmentation result, performing word segmentation processing on the index items of the corresponding type in the entry to obtain a second word segmentation result, and determining a union of the first word segmentation result and the second word segmentation result; Counting the occurrence of each word in the first word segmentation result in the union to obtain a first vector representation of the hardware information, and counting the occurrence of each word in the second word segmentation result in the union to obtain a second vector representation of the index item; The cosine similarity between the first vector representation and the second vector representation is calculated as the similarity between the hardware information and the index item.

6. The power strategy determination method according to claim 3, characterized in that: After determining whether the maximum weighted similarity is greater than or equal to the first preset value, the method further includes: If the maximum weighted similarity is less than the first preset value, a stress test is performed on the hardware device of the server, and a target power mode is determined according to the stress test result.

7. The power strategy determination method according to claim 6, characterized in that: After determining the target power mode based on the stress test results, it also includes: Determine a target entry corresponding to the target power mode; Determining target hardware information of the same type as an index item of a corresponding type in the target entry from among the collected hardware information of different types; The weight of the target hardware information is increased.

8. The power strategy determination method according to claim 7, characterized in that: Improving the weight of the target hardware information includes: Counting the target quantity of the target hardware information; Add one to the numerator of the weight of the target hardware information and add the target number to the denominator to update the weight of the target hardware information; The denominator of the weight of other hardware information except the target hardware information is added to the target quantity to update the weight of other hardware information.

9. The power strategy determination method according to claim 6, characterized in that: After determining the target power mode based on the stress test results, it also includes: Different types of collected hardware information are used as index items respectively, and new entries corresponding to the target power mode are created in the semantic decision library.

10. The power strategy determination method according to claim 1, characterized in that: The hardware information of the server includes any one or a combination of server manufacturer, server model, basic input and output system platform, processor manufacturer, processor model, number of processors, memory capacity, storage configuration, and network card model.

11. The power strategy determination method according to claim 1, characterized in that: Configuring the server according to the configuration item data of the target power mode in the semantic decision library to adjust the power mode of the server to the target power mode includes: Acquire configuration item data of the target power mode from the semantic decision library; An instruction to modify the configuration item data is received through an input interface, and the server is configured based on the modified configuration item data.

12. The power strategy determination method according to claim 11, characterized in that: After configuring the server based on the modified configuration item data, the method further includes: Using the collected hardware information as an index item, a new entry is created in the semantic decision library based on the modified configuration item data.

13. The power strategy determination method according to claim 1, characterized in that: Configuring the server according to the configuration item data of the target power mode in the semantic decision library includes: Traversing all configuration items of the server, and matching the traversed current configuration item with the configuration item in the configuration item data of the target power mode; If the match is successful, the current configuration item is configured according to the configuration value corresponding to the matched configuration item, and the next configuration item is traversed; If the match fails, continue to traverse the next configuration item.

14. The power strategy determination method according to claim 13, characterized in that: If the match fails, it also includes: Matching the keywords in the semantic library corresponding to the current configuration item with the configuration items in the configuration item data of the target power mode; wherein the semantic library corresponding to the current configuration item is used to record keywords with semantically similar semantics to the current configuration item; If there is a successfully matched keyword, the current configuration item is configured according to the configuration value corresponding to the matched configuration item, and the next configuration item is traversed; If there is no successfully matched keyword, continue to traverse the next configuration item.

15. The power strategy determination method according to claim 14, characterized in that: Also includes: Obtaining a configuration text, and counting the frequency of occurrence of words in the configuration text; Generate a context vector corresponding to the word according to the distance between the word and other words in the configuration text; wherein, if the distance between the word and other words in the configuration text is less than or equal to a distance threshold, the position corresponding to the other words in the context vector is set to the frequency of occurrence of the word; if the distance between the word and other words in the configuration text is greater than the distance threshold, the position corresponding to the other words in the context vector is set to zero; Determining a keyword; wherein the similarity between the context vector of the keyword and the context vector of the configuration item is greater than or equal to a second preset value; A semantic library of the configuration items is constructed based on the keywords.

16. A power strategy determination device, characterized in that: include: The acquisition module is used to acquire the hardware information of the server; A matching module, used to match the corresponding target power mode in a semantic decision library with the hardware information as an index; wherein the semantic decision library includes a plurality of entries, each entry includes an index item and a corresponding power mode, and the semantic decision library also includes configuration item data corresponding to the power mode, and the configuration item data includes configuration values ​​corresponding to a plurality of configuration items; a configuration module, configured to configure the server according to the configuration item data of the target power mode in the semantic decision library, so as to adjust the power mode of the server to the target power mode; Among them, it also includes: The first construction module is used to set multiple power modes and determine the configuration item data corresponding to each power mode and the hardware information of the server applicable to each power mode; wherein the configuration item data corresponding to each power mode includes the maximum set of all basic input and output system manufacturers that need to configure the power mode; multiple entries are created with the hardware information of the server applicable to each power mode as index items; and a semantic decision library is constructed based on the multiple entries and the configuration item data corresponding to each power mode.

17. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the power strategy determination method as claimed in any one of claims 1 to 15 when executing the computer program.

18. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, and when the computer program is executed, the steps of the power strategy determination method according to any one of claims 1 to 15 are implemented.

19. A computer program product, characterized in that It comprises a computer program, which implements the steps of the power strategy determination method according to any one of claims 1 to 15 when being executed.