Device management method and electronic device

By generating executable commands and using the management page of the first electronic device to batch manage target devices, the problem of complexity of management of different management program servers is solved, management efficiency is improved and costs are reduced.

CN115268714BActive Publication Date: 2025-01-21LENOVO (BEIJING) LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210905565.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2025-01-21
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

When the management controllers of multiple servers use different types of management programs, managers need to configure management instructions separately, resulting in high learning costs, difficult management and low work efficiency, which increases the technical support costs of server manufacturers.

Method used

By obtaining a management page for managing the first electronic device, performing a management operation based on the page, obtaining an operation record, and generating an executable command that can be executed by the target device to instruct other electronic devices to perform the same management operation.

Benefits of technology

It realizes batch management of servers with different management programs, reduces the management burden and cost of managers, and improves management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115268714B_ABST
    Figure CN115268714B_ABST
Patent Text Reader

Abstract

The present application discloses a device management method and an electronic device, the method comprising: obtaining a management page for managing a first electronic device; performing a first management operation on the first electronic device based on the management page; obtaining an operation record generated during the process of the management page performing the first management operation on the first electronic device; generating an executable command based on the operation record, wherein the executable command is for execution by a target device, and the target device can instruct one or more second electronic devices to perform the first management operation based on the executable command. In this way, by using the management page of the first electronic device, an executable instruction that can be executed by the target device can be generated, and the target device can perform batch management on the second electronic device based on the executable instruction, which can reduce the management burden and management cost of the management personnel and improve the management efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic equipment, and in particular to a device management method and electronic equipment. Background Art

[0002] To facilitate the management of servers, server manufacturers or users (i.e., service providers) usually configure management controllers for servers, such as basic management controllers (BMCs). Service providers can easily perform management operations such as monitoring, configuration, and updating on a single server through BMC. However, in order to ensure the supply chain, service providers usually purchase servers from different server manufacturers, and the management programs of management controllers used by different server manufacturers may be different. For example, some manufacturers use general management tools such as the RedFish management tool and the Intelligent Management Interface (IPMI) management tool. Some server manufacturers can also customize enterprise-level management tools for their products, such as Lenovo's server management tool (LenovoXClarity Essentials OneCLI), etc.

[0003] When the management controllers of multiple servers use different types of management programs, even if the same management operations are to be implemented, the administrator needs to configure management instructions for each management program and develop a matching management plan. This requires the administrator to be familiar with the instructions and parameter configuration methods of various management programs, resulting in high learning costs and management difficulties for the administrator, and low work efficiency. Moreover, when the administrator cannot complete the task on his own, he usually asks the server manufacturer to provide technical support, which also increases the technical support costs of the server manufacturer. Summary of the invention

[0004] The present application provides a device management method and an electronic device. The technical solution adopted in the embodiments of the present application is as follows:

[0005] A device management method, comprising:

[0006] Acquire a management page for managing the first electronic device;

[0007] Performing a first management operation on the first electronic device based on the management page;

[0008] Acquire an operation record generated during the process in which the management page performs the first management operation on the first electronic device;

[0009] An executable command is generated based on the operation record, wherein the executable command is executed by a target device, and the target device can instruct one or more second electronic devices to perform the first management operation based on the executable command.

[0010] In some embodiments, the method further comprises:

[0011] Based on the multiple executable commands, an executable script including the multiple executable commands is generated; wherein the executable script is for execution by the target device, and the target device can instruct the second electronic device to execute the multiple first management operations in sequence based on the executable script.

[0012] In some embodiments, generating an executable script containing a plurality of the executable commands based on the plurality of the executable commands includes:

[0013] Obtaining a plurality of executable commands;

[0014] Determining the operating system type of the target device;

[0015] Based on the operating system type of the target device and the plurality of executable commands, the executable script that can be executed by the target device is generated.

[0016] In some embodiments, performing a first management operation on the first electronic device based on the management page includes:

[0017] receiving an operation instruction for operating an operation object in the management page; wherein the management page includes a plurality of operation objects, each of which is used to implement a corresponding first management operation;

[0018] Based on the operation instruction, the first electronic device is controlled to perform the corresponding first management operation.

[0019] In some embodiments, obtaining an operation record generated during the process of the management page performing the first management operation on the first electronic device includes:

[0020] Determine the operation object pointed to by the operation instruction and the operation content performed on the operation object.

[0021] In some embodiments, generating an executable command based on the operation record includes:

[0022] Based on the operation record, acquiring a command template corresponding to the first management operation;

[0023] Acquire device information of the second electronic device; wherein the device information at least includes address information of the second electronic device;

[0024] Based on the device information and the command template, the executable command including at least part of the device information is generated.

[0025] In some embodiments, acquiring a command template corresponding to the first management operation based on the operation record includes:

[0026] Based on the operation record, obtaining a plurality of command templates respectively applicable to different types of devices;

[0027] determining a device type of the second electronic device;

[0028] A target command template matching the device type of the second electronic device is selected from the plurality of command templates.

[0029] In some embodiments, performing a first management operation on the first electronic device based on the management page includes:

[0030] Sending a first management instruction to the first electronic device based on the management page to instruct the first electronic device to perform a first management operation;

[0031] Accordingly, the executable command is configured to be executable by the target device, and the target device can send a second management instruction to one or more of the second electronic devices based on the executable command to instruct the second electronic device to perform the first management operation;

[0032] The first management instruction matches a first management tool used by the first electronic device, and the second management instruction matches a second management tool used by the second electronic device, and the second management tool is different from the first management tool.

[0033] An electronic device, comprising:

[0034] A first acquisition module, used to acquire a management page for managing the first electronic device;

[0035] A management module, configured to perform a first management operation on the first electronic device based on the management page;

[0036] A second acquisition module, configured to acquire an operation record generated when the management page performs the first management operation on the first electronic device;

[0037] A generating module is used to generate an executable command based on the operation record, wherein the executable command is for execution by a target device, and the target device can instruct one or more second electronic devices to perform the first management operation based on the executable command.

[0038] An electronic device includes at least a memory and a processor, wherein the memory stores a program, and the processor implements the following steps when executing the program in the memory:

[0039] Acquire a management page for managing the first electronic device;

[0040] Performing a first management operation on the first electronic device based on the management page;

[0041] Acquire an operation record generated during the process in which the management page performs the first management operation on the first electronic device;

[0042] An executable command is generated based on the operation record, wherein the executable command is executed by a target device, and the target device can instruct one or more second electronic devices to perform the first management operation based on the executable command.

[0043] The device management method of the embodiment of the present application obtains a management page for managing a first electronic device, performs a first management operation on the first electronic device based on the management page, obtains an operation record generated during the process of the management page performing the first management operation on the first electronic device, and generates an executable command based on the operation record, the executable command can be executed by the target device, and the target device can instruct one or more second electronic devices to perform the first management operation based on the executable command. In this way, by using the management page of the first electronic device, an executable command that can be executed by the target device can be generated, and the target device can perform batch management on the second electronic device based on the executable command, which can reduce the management burden and management cost of the management personnel and improve management efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A flowchart of a device management method according to an embodiment of the present application;

[0045] Figure 2 This is a flowchart of step S120 in the device management method of an embodiment of the present application;

[0046] Figure 3 This is a flowchart of step S150 in the device management method of an embodiment of the present application;

[0047] Figure 4 This is a flowchart of step S140 in the device management method of an embodiment of the present application;

[0048] Figure 5 A structural block diagram of an embodiment of an electronic device according to an embodiment of the present application;

[0049] Figure 6 This is a structural block diagram of another embodiment of the electronic device of the embodiment of the present application. DETAILED DESCRIPTION

[0050] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0051] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0052] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0053] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0054] It should also be understood that, although the present application has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the present application that have the features described in the claims and are therefore within the scope of protection defined thereby.

[0055] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0056] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0057] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0058] The embodiment of the present application provides a device management method for implementing batch management of devices such as servers, routers, switches, firewalls, and computer room power systems. Figure 1 This is a flowchart of the device management method of the embodiment of the present application, see Figure 1 As shown, the device management method of the embodiment of the present application may specifically include the following steps.

[0059] S110: Acquire a management page for managing the first electronic device.

[0060] Optionally, the first electronic device includes but is not limited to devices such as servers, routers, switches, firewalls, and computer room power supply systems. Taking the first electronic device as a server as an example, the first electronic device can be various types of servers such as a file server, a database server, a mail server, and a file transfer protocol (FTP) server. The management page is a page for managing the first electronic device, which can be matched with the operating system of the first electronic device. For example, the management page can be a management page for a baseboard management controller (BMC) to manage the server.

[0061] Optionally, the management page can be obtained in a variety of ways. For example, the management page can be obtained through a browser based on the uniform resource locator (URL) of the management page. For another example, the management page can be obtained by starting a management program.

[0062] S120: Perform a first management operation on the first electronic device based on the management page.

[0063] Optionally, the first management operation includes but is not limited to obtaining a device list, task management, remote control, firmware update, server configuration, etc. Among them, obtaining a device list includes but is not limited to obtaining a central processing unit (CPU) list, a memory (DIMM) list, a disk (DISK) list, a power supply (PSU) list, a fan (fan) list, etc. Server configuration includes but is not limited to adapter configuration, startup configuration, power control, etc. It can be understood that the above management operations are only examples of the first management operation, not exhaustive, and the first management operation may include various management operations on the first electronic device.

[0064] Optionally, the management page may include multiple operation objects, each of which may be used to implement a corresponding first management operation. For example, the first-level page of the management page includes a menu bar, which may include options such as device list, task management, remote control, firmware update, and server configuration. After selecting a corresponding option, the management page may also display a second-level page, a third-level page, etc. The second-level page and the third-level page may be provided with configuration options or a dialog box for inputting configuration information for a specific first management operation.

[0065] On this basis, with Figure 2 As shown, step S120, performing a first management operation on the first electronic device based on the management page, may include the following steps.

[0066] S121, receiving an operation instruction for operating an operation object in the management page.

[0067] Optionally, the operation instruction may be an operation instruction sent by the administrator to the electronic device through an input device. For example, the operation instruction may be an operation instruction sent by the administrator to the electronic device through an input device such as a mouse, keyboard, touch panel, or voice recognition device. The operation instruction may instruct the selection of an operation object, or may be used to instruct the input of content into the operation object. For example, the operation instruction may be used to instruct the selection of an option in a menu bar, or may be used to instruct the input of a command or information into a dialog box in a secondary page or a tertiary page.

[0068] S122: Based on the operation instruction, control the first electronic device to execute the corresponding first management operation.

[0069] Optionally, when the operation instruction is obtained, the first electronic device may be controlled to perform a first management operation corresponding to the operation object pointed to by the operation instruction. For example, if the operation instruction is used to select the device list option in the menu bar, then the operation of obtaining the device list of the first electronic device is performed. For another example, if the operation instruction not only instructs to select the startup configuration option in the menu bar, but also instructs to input configuration information into the startup configuration interface, then the startup configuration may be performed on the first electronic device based on the startup configuration option and the configuration information.

[0070] It should be noted that performing the first management operation on the first electronic device based on the management page should include: sending a management instruction to the first electronic device based on the management page, indicating that the first electronic device has performed the first management operation, and should also include: generating an operation record by simulating the execution of the first management operation on the first electronic device based on the management page. For example, only the selection and configuration of the operation options are performed, and the action of sending the management instruction is not triggered.

[0071] S130: Obtain an operation record generated when the management page performs the first management operation on the first electronic device.

[0072] Optionally, when the management page includes multiple operation objects, obtaining the operation record may include: determining the operation object pointed to by the operation instruction, and the operation content performed on the operation object. For example, determining which option in the menu bar the operation instruction points to, and determining the specific operation content performed on the corresponding option, the operation content including but not limited to selecting content and inputting content, etc.

[0073] Optionally, the management page may also include a dialog box for inputting an operation instruction, and the administrator may perform the first management operation on the first electronic device by inputting the operation instruction into the dialog box. On this basis, obtaining the operation record may include: obtaining the operation instruction input into the dialog box.

[0074] Optionally, obtaining the operation record may be to selectively obtain the required operation record according to the needs of the user. That is, the administrator may perform multiple first management operations on the first electronic device based on the management page, and may obtain a portion of the operation records of the multiple first management operations as needed, but it is not necessary to obtain the operation record of each first management operation. For example, a smart management option may be provided in the management page, and after the user completes a first management operation, the user may select the corresponding smart management option to obtain the operation record of executing the first management operation.

[0075] For example, the management page may also be provided with a start recording option and an end recording option. After selecting the start recording option, the administrator may perform one or more first management operations on the first electronic device based on the management page, and may continuously obtain operation records of the one or more first management operations. After selecting the end recording option, the acquisition of the operation record sheet is ended.

[0076] S140: Generate an executable command based on the operation record, wherein the executable command is for execution by a target device, and the target device can instruct one or more second electronic devices to execute the first management operation based on the executable command.

[0077] Optionally, a command set may be pre-built, and the command set may include executable commands or command templates for generating executable commands. The operation objects in the management page may have a mapping relationship with the command templates in the command set. When the operation record is obtained, the executable command may be obtained from the command set based on the operation record, or the command template may be obtained and the executable command may be generated based on the command template.

[0078] Optionally, the executable command may be configured to be recognized and executed by the target device, and the target device executing the executable command may send a management instruction to one or more second electronic devices, and the one or more second electronic devices may perform the first management operation based on the management instruction. For example, the executable command should not only be executable by the target device, but also enable the target device to send a management instruction matching the management program of the second electronic device to the one or more second electronic devices, and the management program of the second electronic device may control the second electronic device to perform the first management operation based on the management instruction.

[0079] Optionally, the target device is an electronic device for batch management of one or more second electronic devices, and may include various electronic devices that can be communicatively connected with the second electronic device. For example, a desktop computer, a laptop computer, a tablet computer, a smart car, or another baseboard management controller, etc. Optionally, the target device may send a management instruction to the second electronic device based on an out-of-band management system, or may send a management instruction to the second electronic device based on an in-band management system.

[0080] Optionally, taking the example of executing the executable command through the operating system level of the target device, and the target device has a Linux operating system or a Windows operating system, the executable command may be a command that complies with the Uniform Resource Locator (URL) protocol, and the target device may execute the executable command through, for example, a browser. It should be noted that the target device is not limited to executing the executable command through a browser, but may also execute the executable command through a hard disk operating system (DOS) or a specific application.

[0081] Optionally, the second electronic device includes but is not limited to devices such as servers, routers, switches, firewalls, and computer room power supply systems. Taking the second electronic device as a server as an example, the second electronic device can be various types of servers such as file servers, database servers, mail servers, and file transfer protocol (FTP) servers. Taking the second electronic device as an example, the second electronic device can include a server and a management controller for managing the server. The management instruction can be matched with the management program of the management controller. The target device can send the management instruction to the management controller based on the executable command, instructing the management controller to perform a first management operation on the server based on the management instruction. The management controller includes but is not limited to a baseboard management control (BMC). The management program of the management controller can be a general management tool such as a RedFish management tool and an intelligent management interface (IPMI) management tool. Server manufacturers can also customize enterprise-level management tools for their respective products, such as Lenovo's server management tool (Lenovo XClarity Essentials OneCLI), etc.

[0082] Optionally, a first management instruction may be sent to the first electronic device based on the management page to instruct the first electronic device to perform a first management operation, the executable command may be configured to be executable by the target device, and the target device may send a second management instruction to one or more second electronic devices based on the executable command to instruct the second electronic device to perform the first management operation. The first management instruction matches the first management tool used by the first electronic device, the second management instruction matches the second management tool used by the second electronic device, and the second management tool is different from the first management tool. For example, the first management instruction is applicable to the OneCLI management tool, and the second management instruction is applicable to the RedFish management tool. In this way, even if the management tool used by the second electronic device is different from the management tool used by the first electronic device, batch management of the second electronic device can also be achieved.

[0083] Optionally, multiple different executable commands can be obtained, and the multiple different executable commands are configured to be executable by the target device, and the target device can send management instructions matching the corresponding management programs to multiple second electronic devices respectively based on the multiple different executable commands to instruct the multiple second electronic devices to perform the same first management operation.

[0084] The device management method of the embodiment of the present application obtains a management page for managing a first electronic device, performs a first management operation on the first electronic device based on the management page, obtains an operation record generated during the process of the management page performing the first management operation on the first electronic device, and generates an executable command based on the operation record, the executable command can be executed by the target device, and the target device can instruct one or more second electronic devices to perform the first management operation based on the executable command. In this way, by using the management page of the first electronic device, an executable command that can be executed by the target device can be generated, and the target device can perform batch management on the second electronic device based on the executable command, which can reduce the management burden and management cost of the management personnel and improve management efficiency.

[0085] In some embodiments, the method may further include:

[0086] S150, based on the multiple executable commands, generate an executable script including the multiple executable commands; wherein the executable script is for execution by the target device, and the target device can instruct the second electronic device to execute the multiple first management operations in sequence based on the executable script.

[0087] Optionally, multiple first management operations can be performed on the first electronic device based on the management page, for example, task management of the first electronic device, startup configuration of the first electronic device, firmware update of the first electronic device, etc. On this basis, multiple executable commands can be generated based on the operation record, and the target device executes the multiple executable commands to instruct the second electronic device to perform multiple first management operations, such as task management, startup configuration, and firmware update. By generating an executable script containing multiple executable commands based on the multiple executable commands, the target device can automatically execute multiple executable commands in sequence, eliminating the burden of managers entering executable commands one by one, and can further simplify management operations and improve management efficiency.

[0088] Cooperate Figure 3 As shown, in some embodiments, step S150, based on the multiple executable commands, generating an executable script containing the multiple executable commands, may include the following steps.

[0089] S151, obtaining a plurality of executable commands.

[0090] S152: Determine the operating system type of the target device.

[0091] S153: Generate the executable script that can be executed by the target device based on the operating system type of the target device and the plurality of executable commands.

[0092] In specific implementation, the operating system type of the target device can be determined in a variety of ways. Since the types of operating systems are limited, the most widely used ones are usually only Windows operating system, Linux operating system, Unix operating system, Mac operating system, etc., and the operating system type option can be set on the management page for the administrator to select. Alternatively, a dialog box can be set on the management page for the administrator to enter the operating system type. In addition, when the electronic device to which the device management method is applied is connected to the target device for communication, a query request can also be sent to the target device to request the target device to feedback the operating system type.

[0093] When the operating system type of the target device has been determined, an executable script matching the operating system type of the target device can be generated based on the operating system type of the target device and multiple executable names. For example, when the target device uses a Windows operating system or a DOS operating system, a batch script can be generated. When the target device uses a Linux operating system, a Bash script can be generated, which can be executed by a Shell program in the Linux operating system.

[0094] Cooperate Figure 4 As shown, in some embodiments, step S140, generating an executable command based on the operation record, may include the following steps.

[0095] S141: Based on the operation record, obtain a command template corresponding to the first management operation.

[0096] S142, acquiring device information of the second electronic device; wherein the device information at least includes address information of the second electronic device.

[0097] S143: Based on the device information and the command template, generate the executable command that at least includes part of the device information.

[0098] Optionally, command sets may be constructed in advance for different management tools. For example, corresponding command sets may be constructed for RedFish management tools, IPMI management tools, OneCLI management tools, and other management tools. The operation objects in the management page and the command templates in the command set may have a multi-level mapping relationship. In the case where the operation record has been obtained, the operation object in the management page pointed to by the operation instruction during the execution of the first management operation on the first electronic device, as well as the operation content performed on the operation object, may be determined based on the operation record, and the command template may be obtained based on the mapping relationship between the operation object and the command template in the command set.

[0099] Optionally, the device information of the second electronic device includes at least the address information of the second electronic device, and the address information may include the IP address and port number of the second electronic device. The device information of the second electronic device may also include the account name and password of the second electronic device. The account name and password may be the account name and password of the management program of the management controller. The management page may be provided with a dialog box for inputting the device information of the second electronic device.

[0100] Taking the command template of the startup configuration of the RedFish management tool as an example, the command template specifically includes: / curl–data-raw "{"BootModes_SystemBootMode":"UEFI Mode or Legacy Mode"}...PATCHhttps: / / IP address and port number / redfish / v1 / Systems / 1 / Bios / Pending. The startup configuration option in the management page can have a mapping relationship with the command template in the command set. When the startup configuration option is selected, the command template is hit. At the same time, the management page pops up a secondary page, which also provides two options, "UEFI boot" and "Legacy boot". These two options are mapped to the "UEFI Mode" and "Legacy Mode" command segments in the command template respectively. If the "UEFI boot" option is selected, it is determined that the "UEFI boot" option is selected in the command template. Mode" command segment. Taking the IP address and port number of the second electronic device as: 10.240.199.88:6443 as an example, adding the IP address and port number to the corresponding position in the command template forms the final executable command, and the executable command is specifically: / curl–data-raw"{"BootModes_SystemBootMode":"UEFI Mode"}…PATCH https: / / 10.240.199.88:6443 / redfish / v1 / Systems / 1 / Bios / Pending. The target device executes the executable command and can instruct the second electronic device to perform startup configuration based on the address information, and set it to boot using UEFI.

[0101] In some embodiments, step S141, based on the operation record, obtaining a command template corresponding to the first management operation, may include the following steps.

[0102] Based on the operation record, a plurality of command templates respectively applicable to different types of devices are obtained.

[0103] A device type of the second electronic device is determined.

[0104] A target command template matching the device type of the second electronic device is selected from the plurality of command templates.

[0105] Optionally, the command templates applicable to different types of devices mainly include command templates applicable to different types of second electronic devices. For example, applicable to servers with different types of management controllers, different types of management controllers may use different types of management programs, such as the management controller may use the RedFish management tool as the management program, or the OneCLI management tool. Correspondingly, the device type of the second electronic device may include the type of management program used by the management controller of the second electronic device.

[0106] Optionally, the operation objects in the management page may have a multi-level mapping relationship with the command templates in the command set. In the case where the operation record of the management page has been obtained, multiple command templates that are respectively suitable for different types of devices can be obtained from the command set based on the operation record and the mapping relationship. The management page may also be provided with a dialog box for the device type of the second electronic device, or an option for the administrator to select the device type. Then, based on the device type of the second electronic device, a target command template that matches the device type of the second electronic device can be selected from multiple command templates. For example, a target command template suitable for the RedFish management tool, or a target command template suitable for the OneCLI management tool.

[0107] For example, a menu bar may be provided in the main page of the management page, and the menu bar may include multiple options such as firmware upgrade, server configuration, BMC configuration, etc. When the administrator selects the option of firmware update, the management page displays the secondary page of firmware upgrade, and the configuration of information such as firmware version can be performed based on the secondary page. Afterwards, you can choose to upgrade the firmware (Update Firmware) to perform a firmware upgrade operation on the first electronic device, or you can choose to generate an executable command (Save As Command). The management page can display a third-level page, and the third-level page can display command templates suitable for RedFish management tools, command templates suitable for OneCLI management tools, and other command templates suitable for different types of management tools. At the same time, the third-level page can provide options corresponding to management tools such as RedFish management tools and OneCLI management tools. When the user selects the corresponding option, the device type of the second electronic device is determined, and the corresponding command template is also selected.

[0108] See also Figure 5 As shown, the embodiment of the present application also provides an electronic device, including:

[0109] A first acquisition module 201 is used to acquire a management page for managing a first electronic device;

[0110] A management module 202, configured to perform a first management operation on the first electronic device based on the management page;

[0111] A second acquisition module 203 is used to acquire an operation record generated during the process of the management page performing the first management operation on the first electronic device;

[0112] The generating module 204 is used to generate an executable command based on the operation record, wherein the executable command is for execution by a target device, and the target device can instruct one or more second electronic devices to execute the first management operation based on the executable command.

[0113] In some embodiments, the generating module 204 is further configured to:

[0114] Based on the multiple executable commands, an executable script including the multiple executable commands is generated; wherein the executable script is for execution by the target device, and the target device can instruct the second electronic device to execute the multiple first management operations in sequence based on the executable script.

[0115] In some embodiments, the generating module 204 is specifically used for:

[0116] Obtaining a plurality of executable commands;

[0117] Determining the operating system type of the target device;

[0118] Based on the operating system type of the target device and the plurality of executable commands, the executable script that can be executed by the target device is generated.

[0119] In some embodiments, the management module 202 is specifically used to:

[0120] receiving an operation instruction for operating an operation object in the management page; wherein the management page includes a plurality of operation objects, each of which is used to implement a corresponding first management operation;

[0121] Based on the operation instruction, the first electronic device is controlled to perform the corresponding first management operation.

[0122] In some embodiments, the second acquisition module 203 is specifically used to:

[0123] Determine the operation object pointed to by the operation instruction and the operation content performed on the operation object.

[0124] In some embodiments, the generating module 204 is specifically used for:

[0125] Based on the operation record, acquiring a command template corresponding to the first management operation;

[0126] Acquire device information of the second electronic device; wherein the device information at least includes address information of the second electronic device;

[0127] Based on the device information and the command template, the executable command including at least part of the device information is generated.

[0128] In some embodiments, the generating module 204 is specifically used for:

[0129] Based on the operation record, obtaining a plurality of command templates respectively applicable to different types of devices;

[0130] determining a device type of the second electronic device;

[0131] A target command template matching the device type of the second electronic device is selected from the plurality of command templates.

[0132] In some embodiments, the management module 202 is specifically used to:

[0133] Sending a first management instruction to the first electronic device based on the management page to instruct the first electronic device to perform a first management operation;

[0134] Accordingly, the executable command is configured to be executable by the target device, and the target device can send a second management instruction to one or more of the second electronic devices based on the executable command to instruct the second electronic device to perform the first management operation;

[0135] The first management instruction matches a first management tool used by the first electronic device, and the second management instruction matches a second management tool used by the second electronic device, and the second management tool is different from the first management tool.

[0136] See also Figure 6 As shown, an embodiment of the present application further provides an electronic device, comprising at least a memory 301 and a processor 302, wherein the memory 301 stores a program, and the processor 302 implements the method described in any of the above embodiments when executing the program on the memory 301.

[0137] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, electronic equipment, computer-readable storage media or computer program products. Therefore, the present application may adopt the form of complete hardware embodiments, complete software embodiments or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media that include computer-usable program code. When implemented by software, these functions may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.

[0138] The processor may be a general purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. The general purpose processor may be a microprocessor or any conventional processor.

[0139] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0140] The above-mentioned readable storage medium can be a disk, an optical disk, a DVD, a USB, a read-only memory (ROM) or a random access memory (RAM), etc. This application does not limit the specific form of the storage medium.

[0141] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. A device management method, comprising: Acquire a management page for managing the first electronic device; Performing a first management operation on the first electronic device based on the management page; Acquire an operation record generated during the process in which the management page performs the first management operation on the first electronic device; Generate an executable command based on the operation record, wherein the executable command is executed by a target device, and the target device can instruct one or more second electronic devices to perform the first management operation based on the executable command; The generating an executable command based on the operation record includes: Based on the operation record, a plurality of command templates respectively applicable to different types of devices are obtained; determining a device type of the second electronic device; Selecting a target command template matching the device type of the second electronic device from the plurality of command templates; Acquire device information of the second electronic device; wherein the device information at least includes address information of the second electronic device; Based on the device information and the command template, generate the executable command including at least part of the device information; Among them, in the case where there are multiple executable commands, the multiple executable commands are all different, and the multiple different executable commands can be executed by the target device, and the target device can send management instructions matching the corresponding management programs to multiple second electronic devices respectively based on the multiple different executable instructions to instruct the multiple second electronic devices to perform the same first management operation.

2. The method according to claim 1, wherein: The method further comprises: Based on the multiple executable commands, an executable script including the multiple executable commands is generated; wherein the executable script is for execution by the target device, and the target device can instruct the second electronic device to execute the multiple first management operations in sequence based on the executable script.

3. The method according to claim 2, wherein: The step of generating an executable script including the plurality of executable commands based on the plurality of executable commands comprises: Obtaining a plurality of executable commands; Determining the operating system type of the target device; Based on the operating system type of the target device and the plurality of executable commands, the executable script that can be executed by the target device is generated.

4. The method according to claim 1, wherein: The performing a first management operation on the first electronic device based on the management page includes: receiving an operation instruction for operating an operation object in the management page; wherein the management page includes a plurality of operation objects, each of which is used to implement a corresponding first management operation; Based on the operation instruction, the first electronic device is controlled to perform the corresponding first management operation.

5. The method according to claim 4, wherein: The acquiring the operation record generated in the process of the management page performing the first management operation on the first electronic device includes: Determine the operation object pointed to by the operation instruction and the operation content performed on the operation object.

6. The method according to claim 1, wherein: The performing a first management operation on the first electronic device based on the management page includes: Sending a first management instruction to the first electronic device based on the management page to instruct the first electronic device to perform a first management operation; Accordingly, the executable command is configured to be executable by the target device, and the target device can send a second management instruction to one or more of the second electronic devices based on the executable command to instruct the second electronic device to perform the first management operation; The first management instruction matches a first management tool used by the first electronic device, and the second management instruction matches a second management tool used by the second electronic device, and the second management tool is different from the first management tool.

7. An electronic device comprising: A first acquisition module, used to acquire a management page for managing the first electronic device; A management module, configured to perform a first management operation on the first electronic device based on the management page; A second acquisition module, configured to acquire an operation record generated when the management page performs the first management operation on the first electronic device; A generating module, configured to generate an executable command based on the operation record, wherein the executable command is for execution by a target device, and the target device can instruct one or more second electronic devices to perform the first management operation based on the executable command; The generation module is specifically used for: Based on the operation record, a plurality of command templates respectively applicable to different types of devices are obtained; determining a device type of the second electronic device; Selecting a target command template matching the device type of the second electronic device from the plurality of command templates; Acquire device information of the second electronic device; wherein the device information at least includes address information of the second electronic device; Based on the device information and the command template, generate the executable command including at least part of the device information; Among them, in the case where there are multiple executable commands, the multiple executable commands are all different, and the multiple different executable commands can be executed by the target device, and the target device can send management instructions matching the corresponding management programs to multiple second electronic devices respectively based on the multiple different executable instructions to instruct the multiple second electronic devices to perform the same first management operation.

8. An electronic device comprising at least a memory and a processor, wherein the memory stores a program, and the processor implements the following steps when executing the program on the memory: Acquire a management page for managing the first electronic device; Performing a first management operation on the first electronic device based on the management page; Acquire an operation record generated during the process in which the management page performs the first management operation on the first electronic device; Generate an executable command based on the operation record, wherein the executable command is executed by a target device, and the target device can instruct one or more second electronic devices to perform the first management operation based on the executable command; The generating an executable command based on the operation record includes: Based on the operation record, a plurality of command templates respectively applicable to different types of devices are obtained; determining a device type of the second electronic device; Selecting a target command template matching the device type of the second electronic device from the plurality of command templates; Acquire device information of the second electronic device; wherein the device information at least includes address information of the second electronic device; Based on the device information and the command template, generate the executable command including at least part of the device information; Among them, in the case where there are multiple executable commands, the multiple executable commands are all different, and the multiple different executable commands can be executed by the target device, and the target device can send management instructions matching the corresponding management programs to multiple second electronic devices respectively based on the multiple different executable instructions to instruct the multiple second electronic devices to perform the same first management operation.

Citation Information

Patent Citations

  • Full-network-based centralized control system and method

    CN104702386A