Server management method, apparatus and system, and electronic device and storage medium

By quickly obtaining and feedbacking server attribute information using preset mapping tables in the server, the problems of low data feedback efficiency and large storage space in the prior art are solved, and efficient data processing and simplified development process are realized.

WO2025025812A1PCT designated stage expired Publication Date: 2025-02-06INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/097866
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-28
Filing Date
2024-06-06
Publication Date
2025-02-06

AI Technical Summary

Technical Problem

The existing redfish-based server software management system occupies too much storage space and has too low data feedback efficiency when performing data feedback.

Method used

By presetting a mapping table in the server, determining the key names of the first level distribution information of the first attribute corresponding to the target resource identifier and the server attribute recorded in the first level distribution information in the preset database, and building a structure Framework, obtain and populate target information, perform format conversion and data feedback.

Benefits of technology

It improves the data feedback efficiency of the server management system, saves memory space and computing resources, simplifies the development process, and reduces hardware costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024097866_06022025_PF_FP_ABST
    Figure CN2024097866_06022025_PF_FP_ABST
Patent Text Reader

Abstract

Provided are a server management method, apparatus and system, and an electronic device and a storage medium, belonging to the technical field of communications. The method is applied to a server, and comprises: receiving an information acquisition request which is sent by a client for a first attribute of a server; determining, from a preset mapping table, first hierarchical distribution information of the first attribute corresponding to a target resource identifier, and a first key name of a server attribute in a preset first database, said first key name being recorded in the first hierarchical distribution information; on the basis of the first hierarchical distribution information, establishing a structural body framework for the first attribute; on the basis of the first key name, acquiring, from the first database, target information corresponding to the first attribute, and filling the structural body framework with the target information, so as to obtain a target structural body; and according to a preset data exchange language, performing format conversion on the target structural body, so as to obtain target attribute data corresponding to the first attribute, and feeding back the target attribute data to the client. A memory space can be saved on, and the data feedback efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Server management method, device, system, electronic device and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on July 28, 2023, with application number 202310944278.3, and entitled “Server Management Method, Device, System, Electronic Device and Storage Medium”, all contents of which are incorporated by reference into this application. Technical Field

[0003] The present application belongs to the field of communication technology, and in particular relates to a server management method, device, system, electronic device and non-volatile readable storage medium. Background Art

[0004] With the continuous development of servers, the demand for server-based management functions is also increasing. It is not only necessary to support the monitoring functions of various sensors in the server, but also to include fan control, asset information acquisition and display, fault diagnosis and analysis and positioning, and various component information monitoring functions. Therefore, the original server management specification IPMI is becoming increasingly inadequate. A new interactive protocol redfish for server management systems has come into being.

[0005] In related technologies, redfish is mainly implemented through the following scheme: based on the original restful interface and architecture and information template (mockup) file, the relevant functions of redfish are implemented. Because redfish is based on https / http for the transmission of relevant management data, the implementation module of redfish can be separated from the previous restful interface, that is, various uniform resource locators (urls) are defined for redfish, and then the corresponding mockup files are defined based on the specific return format of the url. When the data of the url is requested, the mockup file is first imported into the memory of the bmc, and then the information of the relevant fields in the json is obtained through inter-process communication and other methods, and then the relevant fields are filled or modified, and finally a json data with updated information is generated and uploaded to the client through the web server.

[0006] However, in the above method, a separate mockup file needs to be specified for each URL, which undoubtedly increases the amount of code development. At the same time, the mockup file needs to be compiled into the image and refreshed to Flash. As the number of mockup files continues to increase, coupled with the large amount of code developed, the image file size continues to increase as the number of URLs developed increases. As a result, the development and operation of the Redfish-based server management system requires excessive storage space, which reduces the data feedback efficiency and development efficiency of the server management system and increases the server hardware cost.

[0007] Summary of the Invention

[0008] The present application provides a server management method, device, system, electronic device and non-volatile readable storage medium to solve the problems of excessive storage space occupation and low data feedback efficiency in existing Redfish-based server software management systems during data feedback.

[0009] In order to solve the above technical problems, this application is implemented as follows:

[0010] The present application provides a server management method, which is applied to the server and includes:

[0011] Receive an information acquisition request for a first attribute of a server sent by a client, where the information acquisition request carries a target resource identifier corresponding to the first attribute;

[0012] In response to the information acquisition request, determining, from a preset mapping table, first-level distribution information of a first attribute corresponding to a target resource identifier and a first key name of a server attribute recorded in the first-level distribution information in a preset first database; the first database is used to record server attribute information;

[0013] Build a structural framework for the first attribute based on the first-level distribution information;

[0014] Obtain target information corresponding to the first attribute from the first database according to the first key name, and fill the target information into the structure frame to obtain a target structure;

[0015] The target structure is format-converted according to a preset data exchange language to obtain target attribute data corresponding to the first attribute, and the target attribute data is fed back to the client.

[0016] In some embodiments of the present application, before determining, in response to an information acquisition request, from a preset mapping table, first-level distribution information of a first attribute corresponding to a target resource identifier and a first key name of a server attribute recorded in the first-level distribution information in a preset first database, the method includes:

[0017] Get the template files corresponding to each server attribute;

[0018] Extracting hierarchical distribution information corresponding to each server attribute from the template file; wherein the hierarchical distribution information corresponding to a single server attribute includes the single server attribute and sub-attributes corresponding to the single server attribute;

[0019] Determine the key name of each server attribute in a preset first database; the first database is used to record server attribute information;

[0020] Building a mapping table to record the first mapping relationship between the resource locator and the hierarchical distribution information and the key name corresponding to each server attribute;

[0021] Import the mapping table into the server's memory.

[0022] In some embodiments of the present application, the hierarchical distribution information corresponding to each server attribute is extracted from the template file, including:

[0023] Calling a preset language function library to import the template files into the memory of the server to obtain a first structure corresponding to each template file; the first structure is used to reflect the hierarchical distribution information of the server attributes in the form of a tree structure;

[0024] The memory data in the first structure is parsed and processed to obtain the hierarchical distribution information corresponding to each server attribute.

[0025] In some embodiments of the present application, a mapping table is constructed to record a first mapping relationship between a resource locator corresponding to each server attribute and hierarchical distribution information and a key name, including:

[0026] Create a property table corresponding to each template file based on the hierarchical distribution information and key names;

[0027] Establishing a second mapping relationship between the attribute table and the resource identifier of the server attribute;

[0028] A mapping table is constructed to record the second mapping relationship and the attribute table.

[0029] In some embodiments of the present application, the attribute table includes a node description string and a database description string. The node description string is used to represent the hierarchical distribution information of the server attribute, and the database description string is used to represent the key name of the server attribute in the preset first database.

[0030] In some embodiments of the present application, the node description string includes a hierarchical relationship descriptor, a data type descriptor, a separator descriptor, and a key name hierarchy table; the key name hierarchy table corresponds one-to-one to the hierarchical relationship descriptor.

[0031] In some embodiments of the present application, importing the mapping table into the memory of the server includes:

[0032] Read the version information of the server's management system;

[0033] Import the mapping table that matches the version information into the server's memory.

[0034] In some embodiments of the present application, the mapping table includes a standard mapping table and a user-customized mapping table.

[0035] In some embodiments of the present application, importing a mapping table that conforms to version information into a memory of a server includes:

[0036] In a case where the mapping table that conforms to the version information includes a standard mapping table and a user-customized mapping table, the standard mapping table is imported into the memory of the server;

[0037] Traverse each element in the user-customized mapping table. If the first element exists in the user-customized mapping table, add the first element to the standard mapping table in the memory; the first element is an element that exists in the user-customized mapping table but not in the standard mapping table.

[0038] In some embodiments of the present application, in response to an information acquisition request, determining, from a preset mapping table, first-level distribution information of a first attribute corresponding to a target resource identifier and a first key name of a server attribute recorded in the first-level distribution information in a preset first database includes:

[0039] In response to the information acquisition request, determining a first attribute table corresponding to the target resource identifier according to a preset mapping table;

[0040] The first hierarchical distribution information corresponding to the first attribute and the first key name of the server attribute recorded in the first hierarchical distribution information in the preset first database are extracted from the first attribute table.

[0041] In some embodiments of the present application, in response to an information acquisition request, determining a first attribute table corresponding to a target resource identifier according to a preset mapping table includes:

[0042] By using a regular matching method, the first attribute table corresponding to the target resource identifier is determined from a preset mapping table.

[0043] In some embodiments of the present application, the first-level distribution information corresponding to the first attribute includes a hierarchical relationship between the first attribute and its sub-attributes. Building a structural framework for the first attribute based on the first-level distribution information includes:

[0044] A structural framework for the first attribute is built according to a hierarchical relationship between the first attribute and its sub-attributes.

[0045] In some embodiments of the present application, the first key name includes the key name of the first attribute and the key name of the sub-attribute of the first attribute.

[0046] In some embodiments of the present application, the target information includes target information corresponding to a sub-attribute of the first attribute; the target information corresponding to the first attribute is obtained from the first database according to the first key name, and the target information is filled into the structure frame to obtain a target structure, including:

[0047] Acquire target information corresponding to the sub-attribute of the first attribute from the first database according to the key name of the sub-attribute of the first attribute;

[0048] Fill the target information corresponding to the sub-attribute of the first attribute into the structure frame to obtain the target structure.

[0049] In some embodiments of the present application, receiving a request for obtaining information about a first attribute of a server from a client includes:

[0050] When detecting a request for obtaining information about a first attribute of a server sent by a client, performing authentication processing on the request for obtaining information;

[0051] If the information acquisition request passes the authentication process, the information acquisition request is received.

[0052] In some embodiments of the present application, the data exchange language includes a JSON format language; converting the target structure into a format according to the preset data exchange language to obtain target attribute data corresponding to the first attribute, and feeding the target attribute data back to the client includes:

[0053] Call the preset cjson library to convert the target structure to obtain the target attribute data in json format corresponding to the first attribute;

[0054] Feedback target attribute data to the client.

[0055] The present application also provides a server management device, which is applied to the server and includes:

[0056] A request receiving module, configured to receive an information acquisition request for a first attribute of a server sent by a client, wherein the information acquisition request carries a target resource identifier corresponding to the first attribute;

[0057] a mapping table calling module, configured to determine, in response to an information acquisition request, from a preset mapping table, first-level distribution information of a first attribute corresponding to a target resource identifier and a first key name of a server attribute recorded in the first-level distribution information in a preset first database; the first database being configured to record server attribute information;

[0058] A framework building module, used for building a structure framework for the first attribute according to the first-level distribution information;

[0059] a structure construction module, configured to obtain target information corresponding to the first attribute from the first database according to the first key name, and fill the target information into the structure framework to obtain a target structure;

[0060] The format conversion module is used to convert the format of the target structure according to a preset data exchange language, obtain target attribute data corresponding to the first attribute, and feed back the target attribute data to the client.

[0061] The present application also provides a server management system, which includes:

[0062] A mapping table generation module is used to build a mapping table, which is used to record hierarchical distribution information corresponding to resource identifiers and server attributes, and a first mapping relationship between key names of server attributes in a preset first database; resource identifiers and server attributes have a one-to-one correspondence;

[0063] A mapping table integration module is used to import the mapping table into the server's memory;

[0064] A request authentication module, configured to authenticate and receive a request for obtaining information about a first attribute of a server sent by a client;

[0065] The request parsing module is used to obtain target attribute data corresponding to the first attribute in response to the information acquisition request, and feed back the target attribute data to the client.

[0066] An embodiment of the present application also provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and running on the processor, wherein when the processor executes the program, the server management method of the first aspect or the second aspect is implemented.

[0067] An embodiment of the present application also provides a non-volatile readable storage medium. When instructions in the non-volatile readable storage medium are executed by a processor of an electronic device, the electronic device can execute the server management method of the first aspect or the second aspect.

[0068] The present application also provides a server management method, which, after receiving an information acquisition request for a first attribute of a server from a client, determines, in response to the information acquisition request, from a preset mapping table the first-level distribution information of the first attribute corresponding to a target resource identifier and the first key name of the server attribute recorded in the first-level distribution information in a preset first database, then builds a structure framework for the first attribute based on the first-level distribution information, obtains the target information corresponding to the first attribute from the first database based on the first key name, and fills the target information into the structure framework to obtain a target structure, and finally performs format conversion on the target structure to obtain target attribute data, which is fed back to the client. Through the above method, the first-level distribution information and the first key name obtained from the preset mapping table can be used to quickly establish a structure recording the information of the first attribute and then perform format conversion and data feedback, thereby improving the data feedback efficiency of the server management system; and, during the information feedback process, there is no need to execute the process of calling and compiling mockup files, effectively saving memory space and computing resources, and thus changing the current situation in which redish development requires developing corresponding logic code for each URL, eliminating the need for complex logic code development, avoiding related problems that may be introduced by code development, and improving development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are 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.

[0070] FIG1 is a flowchart of a method for managing a server according to an embodiment of the present application;

[0071] FIG2 is a flowchart of a method for integrating mapping tables provided in an embodiment of the present application;

[0072] FIG3 is a structural diagram of a server management device provided in an embodiment of the present application;

[0073] FIG4 is a structural diagram of a server management system provided in an embodiment of the present application;

[0074] FIG5 is a structural diagram of another server management system provided in an embodiment of the present application;

[0075] FIG6 is a schematic diagram of an electronic device provided in an embodiment of the present application;

[0076] FIG7 is a block diagram of a computer non-volatile readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION

[0077] The following will be combined with the 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 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.

[0078] FIG1 is a flowchart of a method for managing a server provided in an embodiment of the present application. The method is applied to a server, which may specifically refer to a server based on the Redfish protocol. As shown in FIG1 , the method includes:

[0079] Step 101: Receive an information acquisition request for a first attribute of a server sent by a client, where the information acquisition request carries a target resource identifier corresponding to the first attribute.

[0080] The target resource identifier is the Uniform Resource Identifier (URI) corresponding to the first attribute of the server. The URI corresponds one-to-one with the server attribute. The URI can specifically include a Uniform Resource Locator (URL) used to identify the location of the information of the first attribute. For example, the URL can be used to identify the database or log in which the server temperature information or runtime information is located.

[0081] Step 102, in response to an information acquisition request, determine the first-level distribution information of the first attribute corresponding to the target resource identifier and the first key name of the server attribute recorded in the first-level distribution information in a preset first database from a preset mapping table; the first database is used to record server attribute information.

[0082] Among them, the preset mapping table is used to record the hierarchical distribution information of resource identifiers and server attributes, and the mapping relationship between the key names of server attributes in the preset first database. This mapping table is pre-integrated into the server's memory during the redfish development process. Compared with the method of setting and compiling mockup files for each URL, it can effectively save memory space.

[0083] Hierarchical distribution information refers to the hierarchical relationships between various server attributes. The hierarchical distribution information for a particular server attribute (corresponding to a server attribute) refers to the hierarchical relationship between that server attribute and its sub-attributes when obtaining information about that server attribute. Of course, if a server attribute is the most basic server attribute, meaning it has no subordinate attributes, its hierarchical distribution information refers to its rank within the entire server attribute hierarchy.

[0084] Taking the temperature in the server attribute as an example, the hierarchical distribution information of temperature can be expressed as:

[0085] (1) Server attributes - Server operation attributes - Temperature, which indicates that temperature belongs to the third level in the entire server attributes;

[0086] (2) Temperature - Module A Temperature - Module A CPU Temperature, used to indicate the hierarchical relationship between Temperature and subordinate attributes such as Module A Temperature and Module A CPU Temperature.

[0087] When the first attribute has a subordinate server attribute, the first hierarchical distribution relationship of the first attribute refers to the hierarchical relationship between the first attribute and the sub-attribute of the first attribute. Accordingly, the server attributes recorded in the first hierarchical distribution information in step 102 include the first attribute and the subordinate attributes of the first attribute. When the first attribute has a subordinate server attribute, the first hierarchical distribution relationship of the first attribute refers to the first attribute itself, and the server attributes recorded in the corresponding first hierarchical distribution information only include the first attribute.

[0088] The preset first database is used to record server attribute information, such as the temperature of each server module and the runtime of each module. Specifically, the first database can be a Redis database, which is a log-type, key-value database based on memory and also capable of persistence. Therefore, when obtaining server attribute information recorded in the first database, the key name of the server attribute in the Redis data can be matched with the key-value pair in the Redis database to obtain the response information.

[0089] In the embodiment of the present application, the server attribute recorded in the first-level distribution information, therefore, upon receiving an information acquisition request for the first attribute from the client, the first-level distribution information of the first attribute and the key name of the server attribute recorded in the first-level distribution information in the first database, i.e., the first key name, can be determined using a preset map table. Obtaining the first-level distribution information in step 102 allows for the rapid construction of the in-memory structure framework of the data feedback file, which is then populated with the information of the first attribute obtained from the first database to obtain the target structure, completing rapid information integration. Finally, the format-converted data is returned to the client, completing a complete Redfish interaction and effectively improving the efficiency of Redfish-based data feedback.

[0090] Step 103: Building a structural framework for the first attribute according to the first-level distribution information.

[0091] A structure is a type of structured data composed of a group of data. Each data element of a structured data is called a "member" of the structured data, which describes the size and meaning of a memory range.

[0092] Building a structure framework for the first attribute based on the first-level distribution information is equivalent to building a template in memory for feedback of the first attribute information. Therefore, the obtained first attribute information can be directly added without the need to call and compile the mockup file, effectively saving memory space.

[0093] Step 104 : Obtain target information corresponding to the first attribute from the first database according to the first key name, and fill the target information into the structure framework to obtain a target structure.

[0094] Because the first database is a key-value pair database, corresponding server attribute information, ie, target information, can be obtained by matching the key name of the server attribute in the first database.

[0095] Specifically, when the first attribute has subordinate attributes, the key name of the first attribute in the first database can be used to match the information in the first database, and the information of the lowest-level attribute of the first attribute can be obtained from the database through a top-to-bottom hierarchical relationship. Alternatively, the key name of the lowest-level attribute of the first attribute in the first database can be directly used to match the information in the first database, and the information of the lowest-level attribute of the first attribute can be directly obtained and filled into the structure framework, thereby building a target structure that records the information of the first attribute from bottom to top.

[0096] Step 105 : Convert the target structure into a format according to a preset data exchange language to obtain target attribute data corresponding to the first attribute, and feed the target attribute data back to the client.

[0097] In this application, the JSON format language can be used as the preset data exchange language. Taking the JSON format as an example, the target structure is converted into target attribute data in the JSON format and the data is fed back to the client, thereby realizing an interaction between the client and the server management system.

[0098] In summary, the present application provides a server management method. After receiving an information acquisition request for the first attribute of the server sent by the client, in response to the information acquisition request, the first-level distribution information of the first attribute corresponding to the target resource identifier and the first key name of the server attribute recorded in the first-level distribution information in the preset first database are determined from a preset mapping table, and then a structure framework for the first attribute is constructed according to the first-level distribution information. The target information corresponding to the first attribute is obtained from the first database according to the first key name, and the target information is filled into the structure framework to obtain the target structure. Finally, the target structure is formatted to obtain the target attribute data, and the data is fed back to the client. Through the above method, the first-level distribution information and the first key name obtained by the preset map table can be used to quickly establish a structure for recording the information of the first attribute, and then perform format conversion and data feedback, thereby improving the data feedback efficiency of the server management system; and in the information feedback process, there is no need to execute the process of calling and compiling mockup files, which effectively saves memory space and computing resources. Therefore, it also changes the current situation where redish development requires developing corresponding logic code for each URL, eliminating the complicated logic code development, avoiding related problems that may be introduced by code development, and improving development efficiency.

[0099] In some embodiments of the present application, in response to the information acquisition request at step 102, the method further includes determining, from a preset mapping table, first-level distribution information of a first attribute corresponding to a target resource identifier and a first key name of a server attribute recorded in the first-level distribution information in a preset first database.

[0100] Step S11: Obtain template files corresponding to various server attributes;

[0101] Step S12: extracting hierarchical distribution information corresponding to each server attribute from the template file; wherein the hierarchical distribution information corresponding to a single server attribute includes the single server attribute and the sub-attribute corresponding to the single server attribute;

[0102] Step S13: Determine the key name of each server attribute in a preset first database; the first database is used to record server attribute information;

[0103] Step S14: Building a mapping table to record the first mapping relationship between the resource locator, hierarchical distribution information, and key name corresponding to each server attribute;

[0104] Step S15: Import the mapping table into the memory of the server.

[0105] Among them, the template (mockup) file is a template file for information feedback for different server attributes. After the server management system obtains the information of the server attributes, it fills or modifies the relevant fields in the template file according to the information obtained, and then it can obtain feedback data after the updated information, and upload it to the client to complete the data feedback. Since the Redfish standard protocol will be released with the release of schema files corresponding to different versions, a complete set of mockup template files for development can be obtained through standard tools. The method of automatically generating a Map table of the standard protocol from the Mockup file in the standard through specific tools greatly improves development efficiency compared to manual generation. In the process of upgrading the redfish version from a low version to a high version, this method undoubtedly improves development efficiency, reduces the possibility of errors in the conversion process, and improves the stability of the code.

[0106] Of course, due to different Redfish versions, the mockup files may also be different, and there may also be user-defined mockup files. Therefore, this application does not limit the specific method of obtaining the mockup file, and you can choose according to the actual situation.

[0107] In an embodiment of the present application, before executing the server management process shown in FIG1 , the hierarchical distribution information corresponding to each server attribute is extracted from the mockup file of each server attribute, that is, the information feedback template corresponding to each server attribute is extracted. The key name of each server attribute in the preset first database is determined, and at the same time, a mapping relationship between the hierarchical distribution information and the resource identifier, and a mapping relationship between the key name and the resource identifier are established. Since the resource identifier and the server attribute are one-to-one corresponding, in other words, the mapping relationship between the hierarchical distribution information and the server attribute, and the mapping relationship between the key name and the server attribute are pre-established. Then, when managing the server, there is no need to call or compile the mockup file, and the structural framework is built using the information feedback template and the first attribute information is obtained from the first database simultaneously, completing the rapid integration of the server feedback data, while saving memory resources and improving the data feedback efficiency.

[0108] In some embodiments of the present application, step S12 extracts the hierarchical distribution information corresponding to each server attribute from the template file, including:

[0109] S21. Calling a preset language function library to import the template files into the memory of the server to obtain a first structure corresponding to each template file; the first structure is used to reflect the hierarchical distribution information of the server attributes in the form of a tree structure;

[0110] S22: parse and process the memory data in the first structure to obtain hierarchical distribution information corresponding to each server attribute.

[0111] In an embodiment of the present application, the template file can be imported into the memory of the server by calling a preset language function library, thereby obtaining a first structure corresponding to each template file, and by parsing the memory data in the structure, the hierarchical distribution information corresponding to each server attribute can be obtained.

[0112] Taking the JSON format as an example, we import JSON-formatted template files into memory using the cjson library, generating the first structures corresponding to the different template files. By parsing the memory data in the first structure corresponding to a single template file, we can obtain the key name, value type, and value content of each node described in the tree structure in the JSON file, thereby obtaining the hierarchical distribution information corresponding to the server attributes. Each node represents a server attribute, and the key name of each node represents the key name of that node in the JSON file.

[0113] In some embodiments of the present application, step S14 constructs a mapping table to record a first mapping relationship between a resource locator and hierarchical distribution information and a key name corresponding to each server attribute, including:

[0114] Step S31: Create an attribute table corresponding to each template file according to the hierarchical distribution information and key name;

[0115] Step S32: establishing a second mapping relationship between the attribute table and the resource identifier of the server attribute;

[0116] Step S33: Building a mapping table to record the second mapping relationship and the attribute table.

[0117] Among them, the attribute table describes the hierarchical distribution relationship of server attributes, location distribution and the correspondence between server attributes and the first database in a special format. It can be solidified in the logic code during the development of redfish to generate a map table without the need for separate storage space, which helps to improve the development efficiency of redfish.

[0118] Specifically, after generating the attribute table corresponding to each mockup file, the attribute table and the corresponding URI regular expression string can be matched to establish a second mapping relationship between the attribute table and the resource identifier of the server attribute. Finally, a mapping table is built to record the second mapping relationship and the attribute table.

[0119] In some embodiments of the present application, the attribute table includes a node description string and a database description string. The node description string is used to represent the hierarchical distribution information of the server attribute, and the database description string is used to represent the key name of the server attribute in the preset first database.

[0120] In some embodiments of the present application, the node description string includes a hierarchical relationship descriptor, a data type descriptor, a separator descriptor, and a key name hierarchy table; the key name hierarchy table corresponds one-to-one to the hierarchical relationship descriptor.

[0121] The hierarchical relationship descriptor is used to describe the hierarchical relationship of the nodes corresponding to the service attribute in the entire template file. It mainly contains two key character pairs "{}" and "[]", where {} indicates that the current hierarchy is an object type, and "[]" indicates that the current hierarchy is an array type. For example, if the hierarchical relationship descriptor is "{}[][]{}{}[]", then the descriptor indicates that the hierarchy at which the basic node is currently located is an array within an object within an array within an object within an array. The specific object or array is indicated by the key name hierarchy table. The data type descriptor can be a data type defined in the cjson structure, which is used to indicate whether the current data type is a numeric type, a Boolean type, or a string type. The delimiter descriptor is the delimiter of the specified key name hierarchy table. The name hierarchy table corresponds to the previous hierarchical relationship descriptor, and the last key name is the node corresponding to the lowest-level attribute, that is, the key name of the current most basic node.

[0122] In some embodiments of the present application, step S15 of importing the mapping table into the memory of the server includes:

[0123] Step S41: Read the version information of the management system of the server;

[0124] Step S42: Import the mapping table that complies with the version information into the memory of the server.

[0125] In the use of Redfish, in addition to supporting standard protocol commands, there are also various user customizations. Standard map tables and user-customized map tables are also generated in the customization module. Therefore, before Redfish is officially run, it is necessary to integrate the required Redfish map tables into the memory according to the version information of the management system of the server where Redfish is configured.

[0126] Among them, the version information can be represented according to the version field shown in Table 1, among which the type field occupies the highest byte in the 32-bit value, and mainly includes 3 types, namely, using only the standard version, using only the customized version, and using the standard version + customized version. The standard version occupies the middle 2 bytes of data. Among them, LSB (Least Significant Bit) means the least significant bit in the binary number, and MSB (Most Significant Bit) means the most significant bit in the binary number. Generally speaking, the MSB is located at the leftmost side of the binary number, and the LSB is located at the rightmost side of the binary number. For example, if the standard version is 1.13, the high byte is 1 and the low byte is 13. The customized version is a version number customized for different customers, and can be numbered starting from 01.

[0127] Table 1

[0128] In some embodiments of the present application, the mapping table includes a standard mapping table and a user-customized mapping table.

[0129] As described in the aforementioned steps S41-S42, the standard mapping table refers to a mapping table that supports standard protocol commands, and the user-customized mapping table refers to a mapping table that is user-defined.

[0130] In some embodiments of the present application, step S42 imports the mapping table that conforms to the version information into the memory of the server, including:

[0131] Step S51: if the mapping table that complies with the version information includes a standard mapping table and a user-customized mapping table, import the standard mapping table into the memory of the server;

[0132] Step S52: traverse each element in the user-customized mapping table. If the first element exists in the user-customized mapping table, add the first element to the standard mapping table in the memory; the first element is an element that exists in the user-customized mapping table but not in the standard mapping table.

[0133] Figure 2 is a flowchart of the steps of a mapping table integration method provided in an embodiment of the present application, where Y represents yes and N represents no. If the mapping table that complies with the version information is a standard mapping table, the standard map table is directly imported into the memory. If the mapping table that complies with the version information is only a user-customized mapping table, the user-customized map table can be directly imported into the memory. If the mapping table that complies with the version information includes a standard mapping table and a user-customized mapping table, it is necessary to first import the standard map table into the memory, and then traverse the customized map table. If the element in the corresponding map table already exists in the standard map table, it can be directly overwritten. If the element does not exist in the standard map table, the element, i.e., the first element, is added to the standard mapping table in the memory according to the method of step S52.

[0134] By combining the standard Redfish protocol with the customized protocol, the Redfish version can be set to select the supported Redfish version without having to compile the code and regenerate the image. It can support the standard Redfish version, or be configured to support a customized Redfish version. It can also be configured to achieve customer customization on the standard Redfish version, which has strong flexibility.

[0135] In some embodiments of the present application, step 102, in response to the information acquisition request, determines from a preset mapping table the first-level distribution information of the first attribute corresponding to the target resource identifier and the first key name of the server attribute recorded in the first-level distribution information in a preset first database, including:

[0136] Step S61: In response to an information acquisition request, determine a first attribute table corresponding to a target resource identifier according to a preset mapping table;

[0137] Step S62: extracting from the first attribute table the first hierarchical distribution information corresponding to the first attribute and the first key name of the server attribute recorded in the first hierarchical distribution information in the preset first database.

[0138] The attribute table corresponding to the template file records the hierarchical distribution information corresponding to the server attributes and the key name of the server attributes in the first data. Therefore, after determining the first attribute table corresponding to the target resource identifier, the first hierarchical distribution information of the first attribute and the first key name of the server attribute recorded in the first hierarchical distribution information in the preset first database can be extracted from the first attribute table.

[0139] Taking the attribute table format of the aforementioned content as an example, by extracting the hierarchical relationship descriptor and key name hierarchical table of each attribute in the first attribute table, the first-level distribution information of the first attribute can be obtained; by extracting the database description string of the server attribute in the first attribute table, the key name of the server attribute recorded in the first-level distribution information in the preset first database, that is, the first key name, can be obtained.

[0140] In some embodiments of the present application, step S61, in response to the information acquisition request, determines the first attribute table corresponding to the target resource identifier according to a preset mapping table, including:

[0141] Step S71: Determine the first attribute table corresponding to the target resource identifier from a preset mapping table by using a regular matching method.

[0142] Among them, regular matching is to use a string to describe a feature, and then use it to verify whether another string meets the matching method of this feature.

[0143] In some embodiments of the present application, the first-level distribution information corresponding to the first attribute includes a hierarchical relationship between the first attribute and its sub-attributes. Building a structural framework for the first attribute based on the first-level distribution information includes:

[0144] A structural framework for the first attribute is built according to a hierarchical relationship between the first attribute and its sub-attributes.

[0145] In some embodiments of the present application, the first key name includes the key name of the first attribute and the key name of the sub-attribute of the first attribute.

[0146] The sub-attribute of the first attribute is a subordinate attribute of the first attribute. For example, the server attribute “CPU temperature” is a subordinate attribute of the server attribute “temperature”.

[0147] In some embodiments of the present application, the target information includes target information corresponding to a sub-attribute of the first attribute; step 104 obtains the target information corresponding to the first attribute from the first database according to the first key name, and fills the target information into the structure frame to obtain a target structure, including:

[0148] Acquire target information corresponding to the sub-attribute of the first attribute from the first database according to the key name of the sub-attribute of the first attribute;

[0149] Fill the target information corresponding to the sub-attribute of the first attribute into the structure frame to obtain the target structure.

[0150] Through the above method, when the first attribute has a lower-level attribute, that is, a sub-attribute, the key name of the sub-attribute of the first attribute in the first database can be directly used to match the information in the first database, thereby obtaining the information of the sub-attribute of the first attribute, that is, the target information corresponding to the sub-attribute of the first attribute, and filling the obtained information into the structure framework, and then building a target structure that records the information of the first attribute from bottom to top.

[0151] Of course, if the first attribute has subordinate attributes, the key name of the first attribute in the first database can also be used to match the information in the first database, and the sub-attribute information of the first attribute can be obtained from the database through a top-down hierarchical relationship. The specific implementation method can be selected according to actual circumstances and is not limited in this application.

[0152] In some embodiments of the present application, step 101 of receiving a request for obtaining information about a first attribute of a server sent by a client includes:

[0153] Step S81: When a request for obtaining information about a first attribute of a server is detected from a client, authentication processing is performed on the request;

[0154] Step S82: If the information acquisition request passes the authentication process, receive the information acquisition request.

[0155] To ensure the security of data transmission, before receiving and responding to an information acquisition request, the information acquisition request needs to be authenticated to verify its validity and legitimacy. Authentication can be performed by setting a key, matching identities, etc., which is not limited in this application.

[0156] In some embodiments of the present application, the data exchange language includes a JSON format language; step 105 converts the format of the target structure according to the preset data exchange language, obtains target attribute data corresponding to the first attribute, and feeds the target attribute data back to the client, including:

[0157] Call the preset cjson library to convert the target structure to obtain the target attribute data in json format corresponding to the first attribute;

[0158] Feedback target attribute data to the client.

[0159] 3 , an embodiment of the present application provides a server management device, which is applied to a server. The device 200 includes:

[0160] The request receiving module 201 is configured to receive an information acquisition request for a first attribute of a server sent by a client, wherein the information acquisition request carries a target resource identifier corresponding to the first attribute;

[0161] A mapping table calling module 202 is configured to, in response to an information acquisition request, determine, from a preset mapping table, first-level distribution information of a first attribute corresponding to a target resource identifier and a first key name of a server attribute recorded in the first-level distribution information in a preset first database; the first database is configured to record server attribute information;

[0162] A framework building module 203 is used to build a structure framework for the first attribute according to the first-level distribution information;

[0163] A structure construction module 204 is configured to obtain target information corresponding to the first attribute from the first database according to the first key name, and fill the target information into the structure framework to obtain a target structure;

[0164] The format conversion module 205 is configured to perform format conversion on the target structure according to a preset data exchange language, obtain target attribute data corresponding to the first attribute, and feed the target attribute data back to the client.

[0165] In some embodiments of the present application, the apparatus 200 further includes: the method includes:

[0166] a template file acquisition module, configured to, in response to an information acquisition request, acquire a template file corresponding to each server attribute before determining, from a preset mapping table, first-level distribution information of a first attribute corresponding to a target resource identifier and a first key name of the server attribute recorded in the first-level distribution information in a preset first database;

[0167] A hierarchical distribution information extraction module is used to extract hierarchical distribution information corresponding to each server attribute from the template file; wherein the hierarchical distribution information corresponding to a single server attribute includes the single server attribute and the sub-attribute corresponding to the single server attribute;

[0168] A key name determination module is used to determine the key name of each server attribute in a preset first database; the first database is used to record server attribute information;

[0169] A mapping table building module is used to build a mapping table to record the first mapping relationship between the resource locator and the hierarchical distribution information and the key name corresponding to each server attribute;

[0170] The memory import module is used to import the mapping table into the server's memory.

[0171] In some embodiments of the present application, the hierarchical distribution information extraction module includes:

[0172] A first memory import submodule is used to call a preset language function library to import the template files into the memory of the server to obtain a first structure corresponding to each template file; the first structure is used to reflect the hierarchical distribution information of the server attributes in the form of a tree structure;

[0173] The structure parsing submodule is used to parse the memory data in the first structure to obtain the hierarchical distribution information corresponding to each server attribute.

[0174] In some embodiments of the present application, the mapping table building module includes:

[0175] The attribute table establishment submodule is used to establish the attribute table corresponding to each template file according to the hierarchical distribution information and key name;

[0176] A second mapping relationship establishing submodule, used for establishing a second mapping relationship between the attribute table and the resource identifier of the server attribute;

[0177] The mapping table building submodule is used to build a mapping table to record the second mapping relationship and the attribute table.

[0178] In some embodiments of the present application, the attribute table includes a node description string and a database description string. The node description string is used to represent the hierarchical distribution information of the server attribute, and the database description string is used to represent the key name of the server attribute in the preset first database.

[0179] In some embodiments of the present application, the node description string includes a hierarchical relationship descriptor, a data type descriptor, a separator descriptor, and a key name hierarchy table; the key name hierarchy table corresponds one-to-one to the hierarchical relationship descriptor.

[0180] In some embodiments of the present application, the memory import module includes:

[0181] The version information reading submodule is used to read the version information of the server's management system;

[0182] The first memory import submodule is used to import the mapping table that conforms to the version information into the memory of the server.

[0183] In some embodiments of the present application, the mapping table includes a standard mapping table and a user-customized mapping table.

[0184] In some embodiments of the present application, importing a mapping table that conforms to version information into a memory of a server includes:

[0185] A second memory import submodule is configured to import the standard mapping table into the memory of the server when the mapping table that complies with the version information includes a standard mapping table and a user-customized mapping table;

[0186] The third memory import submodule is used to traverse each element in the user-customized mapping table. If the first element exists in the user-customized mapping table, the first element is added to the standard mapping table in the memory; the first element is an element that exists in the user-customized mapping table but does not exist in the standard mapping table.

[0187] In some embodiments of the present application, the mapping table calling module includes:

[0188] An attribute table determination submodule, configured to determine, in response to an information acquisition request, a first attribute table corresponding to a target resource identifier according to a preset mapping table;

[0189] The information extraction submodule is configured to extract, from the first attribute table, first hierarchical distribution information corresponding to the first attribute and a first key name of the server attribute recorded in the first hierarchical distribution information in a preset first database.

[0190] In some embodiments of the present application, the attribute table determination submodule includes:

[0191] The attribute table matching submodule is used to determine the first attribute table corresponding to the target resource identifier from a preset mapping table by using a regular matching method.

[0192] In some embodiments of the present application, the first hierarchical distribution information corresponding to the first attribute includes a hierarchical relationship between the first attribute and sub-attributes of the first attribute;

[0193] Framework building modules, including:

[0194] The framework building submodule is used to build a structural framework for the first attribute according to the hierarchical relationship between the first attribute and the sub-attributes of the first attribute.

[0195] In some embodiments of the present application, the first key name includes the key name of the first attribute and the key name of the sub-attribute of the first attribute.

[0196] In some embodiments of the present application, the target information includes target information corresponding to a sub-attribute of the first attribute;

[0197] Structural building blocks, including:

[0198] a target information acquisition submodule, configured to acquire target information corresponding to the sub-attribute of the first attribute from the first database according to the key name of the sub-attribute of the first attribute;

[0199] The structure construction submodule is used to fill the target information corresponding to the sub-attribute of the first attribute into the structure framework to obtain the target structure.

[0200] In some embodiments of the present application, the request receiving module includes:

[0201] an authentication submodule, configured to, upon detecting a request for obtaining information on a first attribute of a server sent by a client, perform authentication processing on the request;

[0202] The receiving submodule is used to receive the information acquisition request when the information acquisition request passes the authentication process.

[0203] In some embodiments of the present application, the data exchange language includes a JSON format language;

[0204] Format conversion module, including:

[0205] The cjson library calling submodule is used to call the preset cjson library to convert the format of the target structure to obtain the target attribute data in the json format corresponding to the first attribute;

[0206] The feedback submodule is used to feed back the target attribute data to the client.

[0207] The advantages of the server management device and the server management method of the aforementioned embodiment over the related art are the same, and will not be repeated here.

[0208] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0209] FIG4 shows a structural diagram of a server management system provided in an embodiment of the present application. The management system 300 includes:

[0210] A mapping table generation module is used to build a mapping table, which is used to record hierarchical distribution information corresponding to resource identifiers and server attributes, and a first mapping relationship between key names of server attributes in a preset first database; resource identifiers and server attributes have a one-to-one correspondence;

[0211] A mapping table integration module is used to import the mapping table into the server's memory;

[0212] A request authentication module, configured to authenticate and receive a request for obtaining information about a first attribute of a server sent by a client;

[0213] The request parsing module is used to obtain target attribute data corresponding to the first attribute from a preset first database in response to the information acquisition request, and feed back the target attribute data to the client.

[0214] Specifically, the mapping table generating module is used to construct the mapping table according to the mapping table constructing method of the aforementioned steps S11 - S14 .

[0215] The mapping table integration module is used to import the mapping table into the memory of the server according to the method of the aforementioned step S15.

[0216] The request authentication module is used to authenticate and receive the information acquisition request for the first attribute of the server sent by the client according to the method of steps S81-S82.

[0217] The request parsing module is used to obtain target attribute data corresponding to the first attribute according to the management method of the server for the first attribute in the aforementioned steps 101-105, and feed back the target attribute data to the client.

[0218] Among them, the specific process can refer to the contents of the aforementioned steps or sub-steps of the aforementioned steps, and this application will not go into details here.

[0219] FIG5 shows a structural diagram of another server management system provided in an embodiment of the present application. The service system 400 includes:

[0220] A mapping table generation module is used to build a mapping table, which is used to record hierarchical distribution information corresponding to resource identifiers and server attributes, and a first mapping relationship between key names of server attributes in a preset first database; resource identifiers and server attributes have a one-to-one correspondence;

[0221] A mapping table adaptation module, used to filter out a mapping table that is compatible with the version information of the management system from the mapping table;

[0222] A mapping table integration module is used to import the mapping table that meets the version information into the memory of the server;

[0223] A request authentication module, configured to authenticate and receive a request for obtaining information about a first attribute of a server sent by a client;

[0224] The request parsing module is used to obtain target attribute data corresponding to the first attribute from a preset first database in response to the information acquisition request, and feed back the target attribute data to the client.

[0225] Specifically, the mapping table generating module is used to construct the mapping table according to the mapping table constructing method of the aforementioned steps S11 - S14 .

[0226] The mapping table adaptation module is used to obtain the version information of the management system of the server according to the method of the aforementioned step S41, and filter out the mapping table adapted to the version information of the management system.

[0227] The mapping table integration module is used to import the mapping table that complies with the version information of the management system into the memory of the server according to the method of the aforementioned step S42.

[0228] The request authentication module is used to authenticate and receive the information acquisition request for the first attribute of the server sent by the client according to the method of steps S81-S82.

[0229] The request parsing module is used to obtain target attribute data corresponding to the first attribute according to the management method of the server for the first attribute in the aforementioned steps 101-105, and feed back the target attribute data to the client.

[0230] Among them, the specific process can refer to the contents of the aforementioned steps or sub-steps of the aforementioned steps, and this application will not go into details here.

[0231] The present application also provides an electronic device, see Figure 6, including: a processor 1701, a memory 1702, and a computer program 17021 stored in the memory and running on the processor, and when the processor executes the program, it implements the server management method of the aforementioned embodiment.

[0232] The present application also provides a non-volatile readable storage medium, as shown in FIG7 . When the instructions in the non-volatile readable storage medium 701 are executed by the processor of the electronic device, the electronic device can execute the server management method of the aforementioned embodiment.

[0233] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Based on the above description, it is obvious that the structure required for constructing this type of system is suitable. In addition, the application is not directed to any specific programming language. It should be understood that various programming languages ​​can be utilized to implement the content of the application described herein, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the application.

[0234] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0235] Similarly, it should be understood that in order to streamline the present application and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting an intention that the claimed application requires more features than are expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Accordingly, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of the present application.

[0236] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition may be divided into multiple submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed herein may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0237] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present application. The present application can also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0238] It should be noted that the above embodiments illustrate rather than limit the present application, and that a person skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbols placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0239] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0240] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.

[0241] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0242] It should be noted that the various data-related processes in the embodiments of the present application are all carried out in compliance with the corresponding data protection laws and policies of the country where they are located, and with the authorization given by the owner of the corresponding device.

Claims

1. A server management method, characterized in that: Applied to a server, the method comprises: receiving an information acquisition request for a first attribute of the server sent by a client, wherein the information acquisition request carries a target resource identifier corresponding to the first attribute; In response to the information acquisition request, determining from a preset mapping table the first level distribution information of the first attribute corresponding to the target resource identifier and the first key name of the server attribute recorded in the first level distribution information in a preset first database; the first database is used to record server attribute information; Building a structural framework for the first attribute according to the first-level distribution information; Acquire target information corresponding to the first attribute from the first database according to the first key name, and fill the target information into the structure frame to obtain a target structure; The target structure is format-converted according to a preset data exchange language to obtain target attribute data corresponding to the first attribute, and the target attribute data is fed back to the client.

2. The method according to claim 1, characterized in that Before determining, in response to the information acquisition request, from a preset mapping table, first-level distribution information of the first attribute corresponding to the target resource identifier and a first key name of the server attribute recorded in the first-level distribution information in a preset first database, the method includes: Get the template files corresponding to each server attribute; Extracting hierarchical distribution information corresponding to each server attribute from the template file; wherein the hierarchical distribution information corresponding to a single server attribute includes the single server attribute and a sub-attribute corresponding to the single server attribute; Determine the key name of each server attribute in a preset first database; the first database is used to record server attribute information; Building a mapping table to record a first mapping relationship between a resource locator corresponding to each server attribute and the hierarchical distribution information and the key name; The mapping table is imported into the memory of the server.

3. The method according to claim 2, characterized in that The step of extracting the hierarchical distribution information corresponding to each server attribute from the template file includes: Calling a preset language function library to import the template file into the memory of the server to obtain a first structure corresponding to each template file; the first structure is used to reflect the hierarchical distribution information of the server attributes in the form of a tree structure; The memory data in the first structure is parsed and processed to obtain the hierarchical distribution information corresponding to each server attribute.

4. The method according to claim 2, characterized in that: The mapping table is constructed to record the first mapping relationship between the resource locator corresponding to each server attribute and the hierarchical distribution information and the key name, including: Establishing an attribute table corresponding to each template file according to the hierarchical distribution information and the key name; Establishing a second mapping relationship between the attribute table and a resource identifier of a server attribute; A mapping table is constructed to record the second mapping relationship and the attribute table.

5. The method according to claim 4, characterized in that The attribute table includes a node description string and a database description string. The node description string is used to represent the hierarchical distribution information of the server attribute, and the database description string is used to represent the key name of the server attribute in a preset first database.

6. The method according to claim 5, characterized in that The node description string includes a hierarchical relationship descriptor, a data type descriptor, a separator descriptor and a key name hierarchical table; The key name hierarchy table corresponds to the hierarchy relationship descriptor in a one-to-one manner.

7. The method according to any one of claims 1 to 6, characterized in that: The hierarchical distribution information is used to indicate that the temperature belongs to the third level in the entire server attributes; and / or, the hierarchical distribution information is used to indicate the hierarchical relationship between the temperature and subordinate attributes, wherein the subordinate attributes include module temperature and module CPU temperature.

8. The method according to claim 2, characterized in that: The step of importing the mapping table into the memory of the server includes: Reading the version information of the management system of the server; Importing a mapping table that conforms to the version information into the memory of the server.

9. The method according to claim 8, characterized in that The mapping table includes a standard mapping table and a user-customized mapping table.

10. The method according to claim 9, wherein importing the mapping table that conforms to the version information into the memory of the server comprises: In a case where the mapping table that conforms to the version information includes a standard mapping table and a user-customized mapping table, importing the standard mapping table into the memory of the server; Traversing each element in the user-customized mapping table, and if the first element exists in the user-customized mapping table, adding the first element to the standard mapping table in the memory; The first element is an element that exists in the user-customized mapping table but does not exist in the standard mapping table.

11. The method according to claim 1, characterized in that: The step of determining, in response to the information acquisition request, from a preset mapping table, first-level distribution information of the first attribute corresponding to the target resource identifier and a first key name of the server attribute recorded in the first-level distribution information in a preset first database comprises: In response to the information acquisition request, determining a first attribute table corresponding to the target resource identifier according to a preset mapping table; The first hierarchical distribution information corresponding to the first attribute and the first key name of the server attribute recorded in the first hierarchical distribution information in a preset first database are extracted from the first attribute table.

12. The method according to claim 11, characterized in that The step of determining, in response to the information acquisition request, a first attribute table corresponding to the target resource identifier according to a preset mapping table includes: By using a regular matching method, a first attribute table corresponding to the target resource identifier is determined from a preset mapping table.

13. The method according to claim 11, characterized in that The first hierarchical distribution information corresponding to the first attribute includes a hierarchical relationship between the first attribute and a sub-attribute of the first attribute; and building a structural framework for the first attribute according to the first hierarchical distribution information includes: A structural framework for the first attribute is built according to a hierarchical relationship between the first attribute and the sub-attributes of the first attribute.

14. The method according to claim 11, characterized in that The first key name includes a key name of the first attribute and a key name of a sub-attribute of the first attribute.

15. The method according to claim 14, characterized in that The target information includes target information corresponding to a sub-attribute of the first attribute; the target information corresponding to the first attribute is obtained from the first database according to the first key name, and the target information is filled into the structure frame to obtain a target structure, including: Acquire target information corresponding to the sub-attribute of the first attribute from the first database according to the key name of the sub-attribute of the first attribute; Fill the target information corresponding to the sub-attribute of the first attribute into the structure frame to obtain a target structure.

16. The method according to claim 1, characterized in that The receiving a request for obtaining information about a first attribute of the server sent by a client includes: When detecting a request for obtaining information of a first attribute of the server sent by a client, performing authentication processing on the request for obtaining information; When the information acquisition request passes the authentication process, the information acquisition request is received.

17. The method according to claim 1, characterized in that The data exchange language includes a json format language; the format conversion of the target structure according to the preset data exchange language to obtain target attribute data corresponding to the first attribute, and feeding back the target attribute data to the client includes: Calling a preset cjson library to convert the format of the target structure to obtain target attribute data in json format corresponding to the first attribute; The target attribute data is fed back to the client.

18. The method according to claim 1, characterized in that The server is a server based on the redfish protocol.

19. A server management device, characterized in that: Applied to a server, the device comprises: A request receiving module, configured to receive an information acquisition request for a first attribute of the server sent by a client, wherein the information acquisition request carries a target resource identifier corresponding to the first attribute; a mapping table calling module, configured to determine, in response to the information acquisition request, from a preset mapping table the first level distribution information of the first attribute corresponding to the target resource identifier and the first key name of the server attribute recorded in the first level distribution information in a preset first database; the first database is used to record server attribute information; A framework building module, used to build a structure framework for the first attribute according to the first hierarchical distribution information; a structure building module, used for acquiring target information corresponding to the first attribute from the first database according to the first key name, and filling the target information into the structure framework to obtain a target structure; The format conversion module is used to perform format conversion on the target structure according to a preset data exchange language, obtain target attribute data corresponding to the first attribute, and feed back the target attribute data to the client.

20. A server management system, characterized in that: The management system comprises: A mapping table generation module, used to build a mapping table, the mapping table is used to record the hierarchical distribution information corresponding to the resource identifier and the server attribute, and the first mapping relationship between the key name of the server attribute in the preset first database; the resource identifier and the server attribute have a one-to-one correspondence; A mapping table integration module, used for importing the mapping table into the memory of the server; A request authentication module, used for authenticating and receiving a request for obtaining information of a first attribute of the server sent by a client; A request parsing module is used to obtain the target attribute data corresponding to the first attribute in response to the information acquisition request. The target attribute data is fed back to the client.

21. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and running on the processor, characterized in that when the processor executes the program, the server management method as described in any one of claims 1-18 is implemented.

22. A non-volatile readable storage medium, characterized in that: When the instructions in the non-volatile readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the server management method described in any one of claims 1-18.

Citation Information

Patent Citations

  • Data processing method and device and electronic equipment

    CN111061743A

  • Redfish-based server out-of-band management method, device and equipment

    CN113672233A

  • Equipment management method and electronic equipment

    CN115268714A

  • Data format conversion method and device and electronic equipment

    CN115686519A

  • Server management method, device and system, electronic equipment and storage medium

    CN116662018A