Baseboard management controller adaptation method, device, equipment and medium
By vectorizing and mapping the management data of the baseboard management controller, the adaptation failure and library redundancy problems caused by model dependence in traditional methods are solved, and adaptation with high compatibility and low maintenance costs is achieved.
Patent Information
- Application Number
- CN202510840277.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2045-06-23
AI Technical Summary
Traditional baseboard management controller adaptation methods rely too much on device models, resulting in adaptation failure when the model is tampered with, and the adaptation library is redundant, increasing maintenance costs.
By acquiring the management data of the baseboard management controller, performing vectorized processing, using the mapping relationship in the preset adaptation library to obtain the target adaptation object, and executing the adaptation logic to achieve adaptation.
It improves the compatibility of adaptation, avoids adaptation failure due to model tampering, realizes the inheritance and reuse of adaptation objects, and reduces manual participation and maintenance costs.
Smart Images

Figure CN120371412B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computer network management and server remote management, and in particular to an adaptation method, apparatus, device and medium for a baseboard management controller. Background Art
[0002] Server remote management systems communicate with baseboard management controllers (BMCs) using standardized protocols, leveraging them to monitor and manage the server's hardware status. However, different BMC vendors implement the protocol in significant ways, making adaptation between the management system and the BMC challenging. Traditional adaptation methods typically obtain the BMC device model and implement adaptation based on an adaptation library that stores mappings between device models and adaptation policies.
[0003] However, the traditional method has some shortcomings. First, the traditional method relies too much on the device model for matching. When the device model is tampered with, the management system cannot match the adaptation strategy in the adaptation library with the tampered device model. Second, the traditional method configures the adaptation strategy for each model of baseboard management controller separately. Even if the interfaces and adaptation strategies of the same series of baseboard management controllers are the same, the same adaptation strategy still needs to be repeatedly configured due to model differences, resulting in redundancy of the adaptation library and increased maintenance costs. Summary of the Invention
[0004] The present application provides a baseboard management controller adaptation method, apparatus, device and medium to at least solve the problems of over-reliance on device models and redundancy of adaptation libraries in related technologies.
[0005] This application provides a baseboard management controller adaptation method, including:
[0006] Obtain management data of the baseboard management controller;
[0007] Perform vectorization on the management data to obtain the target feature vector;
[0008] Based on the target feature vector and the preset adaptation library, a target adaptation object is obtained, wherein the preset adaptation library stores a mapping relationship between features and adaptation objects;
[0009] Based on the target adaptation object, the adaptation logic corresponding to the target adaptation object is executed to obtain the adaptation result.
[0010] The present application also provides an adapter device for a baseboard management controller, comprising:
[0011] An acquisition module, used for acquiring management data of a baseboard management controller;
[0012] Vectorization module, used to perform vectorization processing on management data to obtain target feature vectors;
[0013] An obtaining module is used to obtain a target adaptation object based on a target feature vector and a preset adaptation library, wherein the preset adaptation library stores a mapping relationship between features and adaptation objects;
[0014] The execution module is used to execute the adaptation logic corresponding to the target adaptation object based on the target adaptation object to obtain the adaptation result.
[0015] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned baseboard management controller adaptation methods when executing the computer program.
[0016] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned baseboard management controller adaptation methods are implemented.
[0017] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned baseboard management controller adaptation methods when executed by a processor.
[0018] Through this application, the management data of the baseboard management controller is obtained and vectorized, and then the target adaptation object is obtained by combining the mapping relationship stored in the preset adaptation library. The adaptation logic corresponding to the target adaptation object is executed to obtain the adaptation result, thereby realizing the adaptation of the baseboard management controller and the management system. Therefore, it is possible to avoid adaptation failure due to excessive dependence on the device model, improve the compatibility of the adaptation, and for derivative devices and devices of the same series, the inheritance and reuse of adaptation objects can be realized without the need to repeatedly configure the same adaptation object, solving the problem of redundancy in the adaptation library and reducing manual participation and maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. 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 any creative work.
[0020] Figure 1 A flow chart of a method for adapting a baseboard management controller provided in an embodiment of the present application;
[0021] Figure 2 A flowchart of another baseboard management controller adaptation method provided in an embodiment of the present application;
[0022] Figure 3A flowchart of another baseboard management controller adaptation method provided in an embodiment of the present application;
[0023] Figure 4 A flowchart of another baseboard management controller adaptation method provided in an embodiment of the present application;
[0024] Figure 5 An algorithm flow chart of an adaptation method of a baseboard management controller provided in an embodiment of the present application;
[0025] Figure 6 A structural block diagram of an adapter device for a baseboard management controller provided in an embodiment of the present application;
[0026] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0028] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such 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 elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0029] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0030] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the baseboard management controller adaptation method depends, the specific application environment architecture or the specific hardware architecture is described herein.
[0031] A baseboard management controller (BMC) is a server hardware component responsible for managing and monitoring the server's hardware status, particularly when the server is faulty or unbooted, through out-of-band management. Server remote management systems communicate with the BMC using standardized protocols and use it to monitor and manage the server's hardware status.
[0032] However, different BMC vendors implement their protocols significantly differently, leading to challenges in adapting management systems to BMCs. For example, the Intelligent Platform Management Interface (IPMI) protocol includes a large number of vendor-defined command sets that are not defined in the standard specification. While management protocols based on the Redfish standard define a common data model, vendors implement specific functionality through extension fields, resulting in interface structure differences. The Simple Network Management Protocol (SNMP) management information base file contains vendor-specific extension fields, resulting in a non-standard object identifier tree structure.
[0033] In order to solve the adaptation problem between the management system and the baseboard management controller, the traditional adaptation method usually adopts the "device model-adaptation strategy" matching mechanism, that is, obtaining the device model of the baseboard management controller, and retrieving the adaptation strategy of the corresponding model from the adaptation library that stores the mapping relationship between the device model and the adaptation strategy, and executing the adaptation logic corresponding to the adaptation strategy to achieve the adaptation of the management system and the baseboard management controller.
[0034] However, the traditional method has some shortcomings. First, the traditional method relies too much on the device model for matching. When the device model is tampered with, such as when the manufacturer customizes the device model (changing the standard name to an internal identifier, etc.) or when a field abnormality occurs due to human operation, the management system cannot match the adaptation strategy in the adaptation library with the tampered device model; second, the traditional method configures the adaptation strategy for each model of baseboard management controller separately. Even if the interfaces and adaptation strategies of the same series of baseboard management controllers are the same, the same adaptation strategy still needs to be repeatedly configured due to model differences, resulting in the linear expansion of the adaptation library size with the device model, significantly increasing maintenance costs.
[0035] Therefore, when adapting the management system to the baseboard management controller, the related technology has the problem of over-reliance on the device model and redundancy of the adaptation library.
[0036] The embodiment of the present application provides a method for adapting a baseboard management controller, such as Figure 1 As shown, Figure 1 A flow chart of a baseboard management controller adaptation method provided in an embodiment of the present application is provided. The flow chart can be applied to a management system and includes the following steps:
[0037] Step S101: Acquire management data of a baseboard management controller.
[0038] Optionally, in the embodiment of the present disclosure, management data refers to data related to hardware management in the baseboard management controller, including page data and interface data, etc.
[0039] Page data refers to the Hypertext Markup Language (HTML) content of the baseboard management controller's web management interface. Page features corresponding to this data include, but are not limited to, page element layout, event binding patterns, and Cascading Style Sheets (CSS) class naming conventions. Interface data refers to the baseboard management controller's interface response data. Interface features corresponding to this data include, but are not limited to, data model structure, vendor extension fields, and enumeration value ranges.
[0040] Specifically, the management system first calls the corresponding protocol adapter to establish a communication connection with the baseboard management controller based on the protocol type supported by the baseboard management controller (such as IPMI, Redfish, SNMP, etc.), and then uses the HTTP protocol to access the web management interface of the baseboard management controller to obtain the HTML content of the web management interface, that is, the page data. At the same time, according to the protocol type of the baseboard management controller, the corresponding request is sent to the interface of the baseboard management controller, and the returned interface response data, that is, the interface data, is received.
[0041] Step S102: perform vectorization processing on the management data to obtain a target feature vector.
[0042] Optionally, in an embodiment of the present disclosure, the target feature vector is obtained based on management data of the baseboard management controller and is used to characterize dynamic features of the baseboard management controller.
[0043] Specifically, the management system first extracts features from the page data and interface data in the management data to obtain page features and interface features, then weights the page features and interface features to obtain page feature vectors and interface feature vectors, and finally fuses the page feature vectors and interface feature vectors to obtain the target feature vector.
[0044] Step S103: obtaining a target adaptation object based on the target feature vector and a preset adaptation library, wherein the preset adaptation library stores a mapping relationship between features and adaptation objects.
[0045] Optionally, in an embodiment of the present disclosure, the features in the preset adaptation library include historical page features and historical interface features. The adaptation object in the preset adaptation library refers to the adaptation strategy between the management system and the baseboard management controller, which can be in the form of adaptation code, including but not limited to protocol interaction code modules (such as the connection and data interaction logic of the IPMI / SNMP protocol), data acquisition rule functions (such as the acquisition logic of management data such as sensor data and device status), page parsing class libraries (such as element positioning and parsing methods of the web management interface), and status code verification mechanism codes (such as conditional logic for determining adaptation results). The target adaptation object refers to the optimal adaptation strategy between the management system and the baseboard management controller. The preset adaptation library is an adaptation library pre-generated by the management system, which stores the mapping relationship between features and adaptation objects.
[0046] Specifically, the management system first weights the historical page features and historical interface features corresponding to the adaptation objects in the preset adaptation library to obtain the historical page feature vector and the historical interface feature vector, and then fuses the historical page feature vector and the historical interface feature vector to obtain the preset feature vector, and then matches the target feature vector with the preset feature vector to obtain the matching degree, and obtains the maximum value of the matching degree as the target matching degree. Finally, the target matching degree is compared with the preset threshold. If the target matching degree is greater than or equal to the preset threshold, the adaptation object corresponding to the target matching degree is used as the target adaptation object; if the target matching degree is less than the preset threshold, the preset adaptation object is used as the target adaptation object.
[0047] More specifically, the management system can match the target feature vector with the preset feature vector through a clustering algorithm: first, the preset feature vector is clustered and divided into different clusters, and then the distance between the target feature vector and the center vector of each cluster is calculated (such as the Euclidean distance), and the target cluster with the smallest distance to the target feature vector is determined. Finally, the cosine similarity between the target feature vector and the preset feature vector in the target cluster is calculated to obtain the matching degree.
[0048] The management system can also match the target feature vector with the preset feature vector through a hash algorithm: first, perform locality sensitive hashing (LSH) encoding on the preset feature vector to obtain a preset hash value, and perform the same locality sensitive hash encoding on the target feature vector to obtain the target hash value. Then, the Hamming distance between the target hash value and the preset hash value is calculated, and the preset feature vector whose Hamming distance is less than the distance threshold is obtained to obtain a set of candidate feature vectors. Finally, the cosine similarity between the target feature vector and the vectors in the candidate feature vector set is calculated to obtain the matching degree.
[0049] Step S104: Based on the target adaptation object, the adaptation logic corresponding to the target adaptation object is executed to obtain an adaptation result.
[0050] Optionally, in the disclosed embodiments, the adaptation logic includes, but is not limited to, protocol connection establishment, data collection rules, page parsing methods, and status code verification mechanisms. The adaptation result refers to the adaptation result between the management system and the baseboard management controller, including both successful and failed adaptation results.
[0051] Specifically, the management system first calls the code block corresponding to the target adaptation object, and then executes the adaptation logic corresponding to the code block, such as protocol connection establishment, data collection rules, page parsing method, and status code verification mechanism. Finally, based on the type of response status code received, the adaptation result between the management system and the baseboard management controller is determined.
[0052] Through this application, the management data of the baseboard management controller is obtained and vectorized, and then the target adaptation object is obtained by combining the mapping relationship stored in the preset adaptation library. The adaptation logic corresponding to the target adaptation object is executed to obtain the adaptation result, thereby realizing the adaptation of the baseboard management controller and the management system. Therefore, it is possible to avoid adaptation failure due to excessive dependence on the device model, improve the compatibility of the adaptation, and for derivative devices and devices of the same series, the inheritance and reuse of adaptation objects can be realized without the need to repeatedly configure the same adaptation object, solving the problem of redundancy in the adaptation library and reducing manual participation and maintenance costs.
[0053] The embodiment of the present application provides another baseboard management controller adaptation method, such as Figure 2 As shown, Figure 2 A flowchart of another baseboard management controller adaptation method provided in an embodiment of the present application is provided. The flowchart can be applied to a management system and includes the following steps:
[0054] Step S201: Obtain management data of the baseboard management controller. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0055] Step S202: perform vectorization processing on the management data to obtain a target feature vector.
[0056] Specifically, the above step S202 includes:
[0057] Step S2021 , performing vectorization processing on the page data to obtain a page feature vector, and performing vectorization processing on the interface data to obtain an interface feature vector.
[0058] Specifically, the management system extracts features from the page data and the interface data in the management data to obtain page features and interface features, and then weights the page features and the interface features to obtain page feature vectors and interface feature vectors.
[0059] In some optional implementations, the above step S2021 includes:
[0060] Step a1: extract features from page data to obtain page features, and extract features from interface data to obtain interface features.
[0061] Step a2: weight the page features based on the second preset weight to obtain a page feature vector, and weight the interface features based on the third preset weight to obtain an interface feature vector, wherein the second preset weight is used to characterize the importance of elements within the page features, and the third preset weight is used to characterize the importance of elements within the interface features.
[0062] Optionally, in the disclosed embodiment, the second preset weight refers to the weight corresponding to elements such as page element layout, event binding mode, and CSS class naming rules within the page feature, and the management system can assign different weights to these elements based on their importance. The third preset weight refers to the weight corresponding to elements such as data model structure, vendor extension fields, and enumeration value range within the interface feature, and the management system can also assign different weights to these elements based on their importance.
[0063] Specifically, when extracting page features, the management system uses an HTML parsing tool to convert the HTML content of the web management interface of the baseboard management controller into a Document Object Model (DOM) tree structure, and then traverses the DOM tree to extract page features such as page element layout (such as the nesting hierarchy of container elements, table structure, and spatial positioning, etc.), event binding mode (such as event type, bound function name, and parameter passing logic, etc.), and CSS class naming rules (such as naming patterns, hierarchical associations, and state class names).
[0064] When extracting interface features, the management system first converts the interface response data into an operable object through a JSON parser, then traverses the fields in the data model, extracts the hierarchical structure of standard fields and vendor extension fields, and identifies the enumeration value range of each field, such as the legal value set of temperature units.
[0065] Afterwards, the management system multiplies the elements in the page features by the corresponding second preset weights, and converts the page features into a multidimensional vector to obtain a page feature vector. For example, the weight of the page element layout is 0.3, the weight of the event binding mode is 0.25, and the weight of the CSS class naming rule is 0.45, then the page feature vector = [page element layout 0.3, event binding mode 0.25, CSS class naming rules 0.45].
[0066] At the same time, the management system multiplies the elements in the interface feature by the corresponding third preset weight, and converts the interface feature into a multidimensional vector to obtain an interface feature vector. For example, the weight of the data model structure is 0.25, the weight of the manufacturer extension field is 0.35, and the weight of the enumeration value range is 0.4, then the interface feature vector = [data model structure 0.25, manufacturer extension field 0.35, enumeration value range 0.4].
[0067] In the above embodiment, by extracting features from page data and interface data respectively and weighting the extracted features, dynamic features of the baseboard management controller can be obtained, thereby avoiding adaptation failure caused by over-reliance on static identification of device models.
[0068] Step S2022: The page feature vector and the interface feature vector are merged based on a first preset weight to obtain a target feature vector, wherein the first preset weight is used to represent the importance of the page feature vector and the interface feature vector.
[0069] Optionally, in an embodiment of the present disclosure, the first preset weight refers to the weights corresponding to the page feature vector and the interface feature vector when calculating the target feature vector. The management system may assign different weights to the page feature vector and the interface feature vector according to their importance.
[0070] Specifically, the management system multiplies the page feature vector and the interface feature vector by the corresponding first preset weight, and adds the weighted page feature vector and the weighted interface feature vector to obtain the target feature vector. For example, the weight of the page feature vector is , the interface feature vector is , then the target feature vector = Page feature vector+ Interface Characteristic Vector ( ).
[0071] Step S203: Get the target adaptation object based on the target feature vector and the preset adaptation library, wherein the preset adaptation library stores the mapping relationship between features and adaptation objects. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0072] Step S204: Based on the target adaptation object, execute the adaptation logic corresponding to the target adaptation object to obtain the adaptation result. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0073] In the embodiment of the present disclosure, by vectorizing the page data and the interface data respectively and fusing the processed page feature vector and interface feature vector, the dynamic characteristics of the baseboard management controller can be obtained, thereby avoiding adaptation failure due to over-reliance on static identification of the device model.
[0074] The embodiment of the present application provides another baseboard management controller adaptation method, such as Figure 3 As shown, Figure 3 A flowchart of another baseboard management controller adaptation method provided in an embodiment of the present application is provided. The flowchart can be applied to a management system and includes the following steps:
[0075] Step S301: Obtain the management data of the baseboard management controller. Figure 2 Step S201 of the illustrated embodiment will not be described in detail here.
[0076] Step S302: vectorize the management data to obtain the target feature vector. Figure 2 Step S202 of the illustrated embodiment will not be described in detail here.
[0077] Step S303: obtaining a target adaptation object based on the target feature vector and a preset adaptation library, wherein the preset adaptation library stores a mapping relationship between features and adaptation objects.
[0078] Specifically, the above step S303 includes:
[0079] Step S3031 : obtaining a preset feature vector of a feature in a preset adaptation library, wherein the preset feature vector is obtained based on a historical page feature vector and a historical interface feature vector.
[0080] Specifically, the management system first weights the historical page features and historical interface features corresponding to the adaptation objects in the preset adaptation library to obtain the historical page feature vector and the historical interface feature vector, and then fuses the historical page feature vector and the historical interface feature vector to obtain the preset feature vector.
[0081] Step S3032: Match the target feature vector with the preset feature vector to obtain a target matching degree.
[0082] Preferably, in the embodiment of the present disclosure, the target matching degree is the maximum matching degree. Depending on the actual application scenario, the target matching degree may also be the minimum matching degree or a matching degree of other specific magnitude.
[0083] Specifically, after obtaining the target feature vector and the preset feature vector, the management system can match the target feature vector with the preset feature vector through a clustering algorithm or a hash algorithm to obtain the matching degree between the target feature vector and the preset feature vector, and select a matching degree of a specific size (such as maximum or minimum) as the target matching degree.
[0084] In some optional implementations, step S3032 includes:
[0085] Step b1: Obtain the cosine similarity and edit distance between the target feature vector and the preset feature vector.
[0086] Step b2: fusing the cosine similarity and the edit distance based on a fourth preset weight to obtain a target matching degree, wherein the fourth preset weight is used to represent the importance of the cosine similarity and the edit distance.
[0087] Optionally, in the embodiment of the present disclosure, the fourth preset weight refers to the weights corresponding to the cosine similarity and the edit distance when calculating the target matching degree. The management system may assign different weights to the cosine similarity and the edit distance according to their importance.
[0088] It's important to note that cosine similarity measures the directional similarity of two vectors by calculating the cosine of the angle between them. It's often used to determine whether feature vectors have consistent distribution trends in multidimensional space and is suitable for capturing overall feature relevance. Edit distance calculates the minimum number of operations (including insertions, deletions, and substitutions) required to transform one string into another. It's used to quantify subtle differences in data structures or strings and can accurately identify local changes in feature vectors. Combining cosine similarity and edit distance allows for the analysis of both overall trends and detailed differences in feature matching.
[0089] Specifically, the management system first calculates the cosine similarity and edit distance between the target feature vector and the preset feature vector, then multiplies the calculated cosine similarity and edit distance by the corresponding fourth preset weight, and adds the weighted cosine similarity and weighted edit distance to obtain the matching degree, and finally selects a matching degree of a specific size (such as maximum or minimum) from the matching degrees as the target matching degree.
[0090] In the above embodiment, by obtaining the cosine similarity and edit distance between the target feature vector and the preset feature vector and fusing them, a plurality of similarity algorithms can be integrated to obtain the target matching degree, thereby improving the adaptation accuracy of the baseboard management controller and the management system.
[0091] Step S3033: obtaining a target adaptation object based on a comparison result between the target matching degree and a preset threshold, wherein the preset threshold is used to screen the target matching degree to obtain the target adaptation object.
[0092] Optionally, in the embodiment of the present disclosure, the preset threshold refers to a boundary value (such as 0.85) for determining the matching degree of different target adaptation object acquisition strategies, and the management system can adjust the size of the preset threshold according to the actual application scenario.
[0093] Specifically, after obtaining the target matching degree, the management system compares the target matching degree with a preset threshold, and determines a corresponding target adaptation object acquisition strategy according to the comparison result.
[0094] In some optional implementations, the above step S3033 includes:
[0095] Step c1: when the target matching degree is greater than or equal to a preset threshold, taking the adaptation object corresponding to the target matching degree as the target adaptation object.
[0096] Step c2: when the target matching degree is less than a preset threshold, using a preset adaptation object as a target adaptation object, wherein the preset adaptation object is used to achieve adaptation with the baseboard management controller.
[0097] Optionally, in the embodiment of the present disclosure, the preset adaptation object refers to a universal adaptation code stored in the management system, which can achieve adaptation between the management system and the baseboard management controller and is used to maintain the basic management function of the management system on the baseboard management controller.
[0098] Specifically, the management system determines the corresponding target adaptation object acquisition strategy based on the comparison result between the target matching degree and the preset threshold:
[0099] If the target matching degree is greater than or equal to a preset threshold (such as 0.85), it means that the target feature vector has a high matching degree with the preset feature vector, and the BMC is highly consistent with the historical BMC corresponding to the preset feature vector. The adaptation object corresponding to the preset feature vector can be inherited and reused. In this case, the management system uses the adaptation object corresponding to the target matching degree as the target adaptation object.
[0100] If the target matching degree is less than the preset threshold (such as 0.85), it means that the matching degree between the target feature vector and the preset feature vector is low, the baseboard management controller and the historical baseboard management controller corresponding to the preset feature vector are quite different, and none of the adaptation objects in the preset adaptation library support the baseboard management controller. In this case, the management system will use the preset adaptation object as the target adaptation object.
[0101] In the above implementation, by using the adaptation object corresponding to the target matching degree as the target adaptation object when the target matching degree is greater than or equal to the preset threshold, the inheritance and reuse of the adaptation object can be achieved without the need to repeatedly configure the same adaptation object, thereby solving the problem of redundancy in the adaptation library and reducing manual participation and maintenance costs; by using the preset adaptation object as the target adaptation object when the target matching degree is less than the preset threshold, monitoring interruption due to adaptation failure can be avoided, thereby ensuring the stable operation of the management system.
[0102] Step S304: Based on the target adaptation object, execute the adaptation logic corresponding to the target adaptation object to obtain the adaptation result. Figure 2 Step S204 of the illustrated embodiment will not be described in detail here.
[0103] In the embodiment of the present disclosure, the target matching degree is obtained by matching the target feature vector with the preset feature vector, and the target matching degree is compared with the preset threshold to obtain the target adaptation object. This enables the inheritance and reuse of adaptation objects of derivative devices and devices in the same series without the need to repeatedly configure the same adaptation object, thereby solving the problem of redundancy in the adaptation library and reducing manual participation and maintenance costs.
[0104] The embodiment of the present application provides another baseboard management controller adaptation method, such as Figure 4 As shown, Figure 4 A flowchart of another baseboard management controller adaptation method provided in an embodiment of the present application is provided. The flowchart can be applied to a management system and includes the following steps:
[0105] Step S401: Obtain management data of the baseboard management controller. Figure 3 Step S301 of the illustrated embodiment will not be described in detail here.
[0106] Step S402: vectorize the management data to obtain the target feature vector. Figure 3 Step S302 of the illustrated embodiment will not be described in detail here.
[0107] Step S403: Get the target adaptation object based on the target feature vector and the preset adaptation library, wherein the preset adaptation library stores the mapping relationship between features and adaptation objects. Figure 3 Step S303 of the illustrated embodiment will not be described in detail here.
[0108] Step S404: Based on the target adaptation object, the adaptation logic corresponding to the target adaptation object is executed to obtain an adaptation result.
[0109] Specifically, the above step S404 includes:
[0110] Step S4041: Based on the target adaptation object, execute the adaptation logic corresponding to the target adaptation object.
[0111] Specifically, the management system calls the code block corresponding to the target adaptation object and executes the adaptation logic corresponding to the code block, such as protocol connection establishment, data collection rules, page parsing method, and status code verification mechanism.
[0112] Step S4042: When the first status code is received, determine that the adaptation result is successful.
[0113] Optionally, in the embodiment of the present disclosure, the first status code is used to indicate successful adaptation, and is a success response code that complies with the protocol specification, such as 200 in the HTTP protocol and 0x00 in the IPMI protocol.
[0114] Specifically, after executing the adaptation logic, the management system obtains the response status code from the baseboard management controller and determines the type of the response status code. If the response status code is the first status code, it means that the adaptation logic has been executed correctly (such as the page parsing successfully obtains the sensor table data, the interface request correctly returns the temperature reading, etc.), then the adaptation result is determined to be successful.
[0115] Step S4043: When the second status code is received, determine that the adaptation result is adaptation failure.
[0116] Optionally, in an embodiment of the present disclosure, the first status code is used to indicate adaptation failure, and is an error response code defined by the protocol, such as 404 in the HTTP protocol and 0x01 in the IPMI protocol.
[0117] Specifically, after executing the adaptation logic, the management system obtains the response status code from the baseboard management controller and determines the type of the response status code. If the response status code is the second status code, it means that an exception occurred in the adaptation process (such as the requested interface resource does not exist, DOM node positioning fails, or protocol parameters do not match, etc.), then the adaptation result is determined to be adaptation failure.
[0118] In the embodiment of the present disclosure, by executing the adaptation logic corresponding to the target adaptation object and determining the adaptation result according to the received status code, the adaptation of the baseboard management controller and the management system can be achieved, thereby ensuring the stable operation of the management system.
[0119] In some optional embodiments, such as Figure 5 As shown, Figure 5An algorithm flow chart of an adaptation method for a baseboard management controller provided in an embodiment of the present application, the management system first obtains the management data (including interface data and page data) of the baseboard management controller through a protocol adapter (such as an adapter corresponding to protocols such as IPMI, Redfish, SNMP, etc.), and then extracts interface features and page features in parallel, and then vectorizes the extracted interface features and page features, and then uses a similarity matching algorithm to match the target adaptation object from a preset adaptation library, and executes the adaptation logic corresponding to the target adaptation object to obtain the adaptation result.
[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0121] The embodiment of the present application also provides an adaptation device of a baseboard management controller, such as Figure 6 Shown, including:
[0122] An acquisition module 601 is used to acquire management data of a baseboard management controller;
[0123] Vectorization module 602, used to perform vectorization processing on the management data to obtain a target feature vector;
[0124] An obtaining module 603 is configured to obtain a target adaptation object based on the target feature vector and a preset adaptation library, wherein the preset adaptation library stores a mapping relationship between features and adaptation objects;
[0125] The execution module 604 is used to execute the adaptation logic corresponding to the target adaptation object based on the target adaptation object to obtain the adaptation result.
[0126] Through this application, the management data of the baseboard management controller is obtained and vectorized, and then the target adaptation object is obtained by combining the mapping relationship stored in the preset adaptation library. The adaptation logic corresponding to the target adaptation object is executed to obtain the adaptation result, thereby realizing the adaptation of the baseboard management controller and the management system. Therefore, it is possible to avoid adaptation failure due to excessive dependence on the device model, improve the compatibility of the adaptation, and for derivative devices and devices of the same series, the inheritance and reuse of adaptation objects can be realized without the need to repeatedly configure the same adaptation object, solving the problem of redundancy in the adaptation library and reducing manual participation and maintenance costs.
[0127] In some optional implementations, the vectorization module 602 includes:
[0128] The vectorization submodule is used to vectorize the page data to obtain the page feature vector and to vectorize the interface data to obtain the interface feature vector;
[0129] The fusion submodule is used to fuse the page feature vector and the interface feature vector based on a first preset weight to obtain a target feature vector, wherein the first preset weight is used to represent the importance of the page feature vector and the interface feature vector.
[0130] In some optional implementations, obtaining module 603 includes:
[0131] An acquisition submodule, configured to acquire a preset feature vector of a feature in a preset adaptation library, wherein the preset feature vector is obtained based on a historical page feature vector and a historical interface feature vector;
[0132] The matching submodule is used to match the target feature vector with the preset feature vector to obtain the target matching degree;
[0133] The obtaining submodule is used to obtain the target adaptation object based on the comparison result between the target matching degree and the preset threshold value, wherein the preset threshold value is used to screen the target matching degree to obtain the target adaptation object.
[0134] In some optional implementations, the vectorization submodule includes:
[0135] An extraction unit, configured to extract features from page data to obtain page features, and extract features from interface data to obtain interface features;
[0136] A weighting unit is used to weight the page features based on the second preset weight to obtain a page feature vector, and to weight the interface features based on the third preset weight to obtain an interface feature vector, wherein the second preset weight is used to characterize the importance of elements within the page features, and the third preset weight is used to characterize the importance of elements within the interface features.
[0137] In some optional implementations, the matching submodule includes:
[0138] An acquisition unit, configured to acquire the cosine similarity and edit distance between the target feature vector and the preset feature vector;
[0139] The fusion unit is configured to fuse the cosine similarity and the edit distance based on a fourth preset weight to obtain a target matching degree, wherein the fourth preset weight is used to represent the importance of the cosine similarity and the edit distance.
[0140] In some optional implementations, obtaining the submodule includes:
[0141] The first unit is configured to, when the target matching degree is greater than or equal to a preset threshold, use the adaptation object corresponding to the target matching degree as the target adaptation object;
[0142] The second serving unit is configured to use a preset adaptation object as a target adaptation object when the target matching degree is less than a preset threshold, wherein the preset adaptation object is used to achieve adaptation with the baseboard management controller.
[0143] In some optional implementations, the execution module 604 includes:
[0144] An execution submodule is used to execute the adaptation logic corresponding to the target adaptation object based on the target adaptation object;
[0145] A first determining submodule, configured to determine that the adaptation result is successful when the first status code is received;
[0146] The second determining submodule is configured to determine, upon receiving the second status code, that the adaptation result is adaptation failure.
[0147] For descriptions of features in the embodiments corresponding to the adaptation device of the baseboard management controller, reference may be made to the relevant descriptions of the embodiments corresponding to the adaptation method of the baseboard management controller, which will not be described in detail here.
[0148] The embodiment of the present application also provides an electronic device, such as Figure 7 As shown, it includes a memory 10 and a processor 20. The memory 10 stores a computer program. The processor 20 is configured to run the computer program to execute the steps in any of the above-mentioned baseboard management controller adaptation method embodiments.
[0149] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above-mentioned baseboard management controller adaptation method embodiments when running.
[0150] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0151] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned baseboard management controller adaptation method embodiments are implemented.
[0152] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps in any of the above-mentioned baseboard management controller adaptation method embodiments.
[0153] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0154] The above is a detailed introduction to the adaptation method, device, equipment and medium of a baseboard management controller provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A baseboard management controller adaptation method, characterized in that: The method comprises: Obtain management data of the baseboard management controller; Performing vectorization processing on the management data to obtain a target feature vector; Obtaining a target adaptation object based on the target feature vector and a preset adaptation library, wherein the preset adaptation library stores a mapping relationship between features and adaptation objects; Based on the target adaptation object, executing the adaptation logic corresponding to the target adaptation object to obtain an adaptation result, wherein the adaptation logic includes protocol connection establishment, data collection rules, page parsing method and status code verification mechanism; The management data includes page data and interface data. The page data refers to the hypertext markup language content of the web page management interface of the baseboard management controller, and the page features corresponding to the page data include page element layout, event binding mode and cascading style sheet class naming rules; the interface data refers to the interface response data of the baseboard management controller, and the interface features corresponding to the interface response data include data model structure, manufacturer extension field and enumeration value range; The vectorizing the management data to obtain a target feature vector includes: Performing vectorization processing on the page data to obtain a page feature vector, and performing vectorization processing on the interface data to obtain an interface feature vector; fusing the page feature vector and the interface feature vector based on a first preset weight to obtain the target feature vector, wherein the first preset weight is used to represent the importance of the page feature vector and the interface feature vector; The vectorizing the page data to obtain a page feature vector, and the vectorizing the interface data to obtain an interface feature vector, include: Performing feature extraction on the page data to obtain page features, and performing feature extraction on the interface data to obtain interface features; The page features are weighted based on the second preset weight to obtain the page feature vector, and the interface features are weighted based on the third preset weight to obtain the interface feature vector, wherein the second preset weight is used to characterize the importance of the elements within the page features, and the third preset weight is used to characterize the importance of the elements within the interface features.
2. The baseboard management controller adaptation method according to claim 1, characterized in that: The obtaining of a target adaptation object based on the target feature vector and a preset adaptation library includes: Obtaining a preset feature vector of a feature in the preset adaptation library, wherein the preset feature vector is obtained based on a historical page feature vector and a historical interface feature vector; Matching the target feature vector with the preset feature vector to obtain a target matching degree; The target adaptation object is obtained based on a comparison result between the target matching degree and a preset threshold, wherein the preset threshold is used to filter the target matching degree to obtain the target adaptation object.
3. The baseboard management controller adaptation method according to claim 2, characterized in that: The matching of the target feature vector with the preset feature vector to obtain a target matching degree includes: Obtaining the cosine similarity and edit distance between the target feature vector and the preset feature vector; The cosine similarity and the edit distance are fused based on a fourth preset weight to obtain the target matching degree, wherein the fourth preset weight is used to represent the importance of the cosine similarity and the edit distance.
4. The baseboard management controller adaptation method according to claim 2, characterized in that: The obtaining of the target adaptation object based on a comparison result of the target matching degree and a preset threshold value includes: When the target matching degree is greater than or equal to a preset threshold, the adaptation object corresponding to the target matching degree is used as the target adaptation object; When the target matching degree is less than the preset threshold, a preset adaptation object is used as the target adaptation object, wherein the preset adaptation object is used to achieve adaptation with the baseboard management controller.
5. The baseboard management controller adaptation method according to claim 1, characterized in that: The step of executing the adaptation logic corresponding to the target adaptation object based on the target adaptation object to obtain an adaptation result includes: Based on the target adaptation object, executing the adaptation logic corresponding to the target adaptation object; When the first status code is received, determining that the adaptation result is successful; When the second status code is received, it is determined that the adaptation result is adaptation failure.
6. An adapter device for a baseboard management controller, characterized in that: include: An acquisition module, used for acquiring management data of a baseboard management controller; A vectorization module, configured to perform vectorization processing on the management data to obtain a target feature vector; Obtaining a module for obtaining a target adaptation object based on the target feature vector and a preset adaptation library, wherein the preset adaptation library stores a mapping relationship between features and adaptation objects; An execution module, configured to execute the adaptation logic corresponding to the target adaptation object based on the target adaptation object to obtain an adaptation result, wherein the adaptation logic includes protocol connection establishment, data collection rules, page parsing method, and status code verification mechanism; The management data includes page data and interface data. The page data refers to the hypertext markup language content of the web page management interface of the baseboard management controller, and the page features corresponding to the page data include page element layout, event binding mode and cascading style sheet class naming rules; the interface data refers to the interface response data of the baseboard management controller, and the interface features corresponding to the interface response data include data model structure, manufacturer extension field and enumeration value range; The vectorization module includes: A vectorization submodule, configured to perform vectorization processing on the page data to obtain a page feature vector, and to perform vectorization processing on the interface data to obtain an interface feature vector; a fusion submodule, configured to fuse the page feature vector and the interface feature vector based on a first preset weight to obtain the target feature vector, wherein the first preset weight is used to represent the importance of the page feature vector and the interface feature vector; The vectorization submodules include: an extraction unit, configured to perform feature extraction on the page data to obtain page features, and perform feature extraction on the interface data to obtain interface features; A weighting unit is used to weight the page feature based on a second preset weight to obtain the page feature vector, and to weight the interface feature based on a third preset weight to obtain the interface feature vector, wherein the second preset weight is used to characterize the importance of the elements within the page feature, and the third preset weight is used to characterize the importance of the elements within the interface feature.
7. An electronic device, characterized in that: include: memory for storing computer programs; A processor is configured to implement the steps of the baseboard management controller adaptation method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the baseboard management controller adaptation method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Power supply strategy determination method, device and equipment, medium and computer program product
CN118860107A
BIOS configuration method and server
CN118885203A