Server operation and maintenance method, electronic equipment, storage medium and product
By integrating KVM functions and automation script engine at the BMC level, generating structured instruction files and combining screen image verification, the problem of low automation in server operation and maintenance is solved, and efficient and reliable operation and maintenance is achieved when the system crashes.
Patent Information
- Application Number
- CN202510828071.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-06-19
AI Technical Summary
In the prior art, the server operation and maintenance solution has the problem that KVM functions lack automation and automation tools rely on the system environment, resulting in low operation and maintenance efficiency, poor operation consistency and inability to perform tasks when the system crashes.
By integrating the KVM function of the substrate management controller (BMC) and the automated script engine, structured instruction files are generated and automated operation and maintenance are combined with screen images, and closed-loop operations from trigger verification to input execution and then to result verification are realized.
Operation and maintenance tasks can still be automatically executed when the operating system crashes or is not started, improving operation and maintenance efficiency and operation consistency, and adapting to the intelligent management needs of large-scale server clusters.
Smart Images

Figure CN120353630A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to server operation and maintenance methods, electronic devices, storage media, and products. Background Art
[0002] In the current situation where the intelligent operation and maintenance requirements of modern data centers are continuously increasing, server remote management faces many challenges. The operation and maintenance scenarios of large-scale server clusters are becoming increasingly common, and there is an urgent need for efficient, consistent, and reliable operation and maintenance methods.
[0003] Currently, the server operation and maintenance solutions in related technologies mainly include the Keyboard Video Mouse (KVM) function based on the Baseboard Management Controller (BMC) and automation tools that rely on the operating system to run. However, KVM can only be manually operated for a single node, lacks the ability of automation scripts, has low operation and maintenance efficiency, and is difficult to be deployed in batches; the automation tools rely on the system environment, and tasks cannot be deployed when the system crashes or fails to start, which affects the handling of underlying hardware failures. Summary of the Invention
[0004] This application provides server operation and maintenance methods, electronic devices, storage media, and products to at least solve the problems that the KVM function in related technologies lacks automation and the automation tools rely on the system environment.
[0005] This application provides a server operation and maintenance method, including: Based on the operation and maintenance tasks of the target server submitted by the user, parsing the structured instruction file corresponding to the operation and maintenance tasks. The structured instruction file is pre-generated based on the user's operation behavior, and the structured instruction file includes atomic actions. The atomic actions include trigger conditions, input sequences, and expected feedback; Based on the trigger conditions, input sequences, and expected feedback of the atomic actions in the structured instruction file, combined with the screen image of the target server, performing a verification execution operation on the atomic actions. The screen image is intercepted from the target server through a hardware interface; When the atomic action is completed, it is determined that the operation and maintenance task of the target server is successfully executed.
[0006] This application also provides a server operation and maintenance device, including: A parsing unit, configured to parse the structured instruction file corresponding to the operation and maintenance tasks of the target server submitted by the user. The structured instruction file is pre-generated based on the user's operation behavior, and the structured instruction file includes atomic actions. The atomic actions include trigger conditions, input sequences, and expected feedback; An operation and maintenance unit, configured to perform a verification execution operation on an atomic action based on the triggering condition, input sequence, and expected feedback of the atomic action in a structured instruction file, in combination with the screen image of the target server, where the screen image is intercepted from the target server through a hardware interface; A determination unit, configured to determine that the operation and maintenance task of the target server is successfully executed when the atomic action is completed.
[0007] This application also provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the steps of any of the above server operation and maintenance methods when executing the computer program.
[0008] This application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above server operation and maintenance methods are implemented.
[0009] This application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of any of the above server operation and maintenance methods are implemented.
[0010] Through this application, based on the operation and maintenance task of the target server submitted by the user, a structured instruction file corresponding to the operation and maintenance task is parsed. The structured instruction file is pre-generated based on the user's operation behavior and includes atomic actions. The atomic actions include triggering conditions, input sequences, and expected feedback. Based on the triggering conditions, input sequences, and expected feedback of the atomic actions in the structured instruction file, in combination with the screen image of the target server, a verification execution operation is performed on the atomic actions. The screen image is intercepted from the target server through a hardware interface. When the atomic action is completed, it is determined that the operation and maintenance task of the target server is successfully executed. It realizes the decomposition of the operation and maintenance task into atomic actions including triggering conditions, input sequences, and expected feedback by parsing the structured instruction file generated based on the user's operation behavior, and realizes a closed-loop automated operation from trigger verification to input execution and then to result verification in combination with the screen image intercepted by the hardware interface, and can accurately execute the operation and maintenance task in an out-of-band management scenario (such as when the system crashes) without the operating system, improving the operation and maintenance efficiency. Description of the Drawings
[0011] To more clearly illustrate the embodiments of this application, the following will briefly introduce the drawings required for the embodiments. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0012] Figure 1 It is a schematic flowchart of a server operation and maintenance method provided by an embodiment of this application; Figure 2 It is a schematic flowchart of another server operation and maintenance method provided by an embodiment of the present application; Figure 3 It is a schematic flowchart of generating a structured instruction file during a specific server operation and maintenance process provided by an embodiment of the present application; Figure 4 It is an architecture diagram of a BMC-side instruction generation system provided by an embodiment of the present application; Figure 5 It is a schematic diagram of batch server cluster operation and maintenance provided by an embodiment of the present application; Figure 6 It is a schematic structural diagram of a server operation and maintenance device provided by an embodiment of the present application. Detailed implementation manners
[0013] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0014] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device including a series of elements includes not only those elements but also other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0015] At present, with the continuous improvement of the intelligent operation and maintenance requirements of modern data centers, server remote management faces many challenges. The operation and maintenance scenarios of large-scale server clusters are becoming increasingly common, and there is an urgent need for an efficient, consistent and reliable operation and maintenance method. However, the traditional operation and maintenance mode and related technologies have obvious deficiencies and are difficult to adapt to this trend.
[0016] Currently, the server operation and maintenance solutions of related technologies mainly include the keyboard display mouse (KVM, Keyboard Video Mouse) function based on the baseboard management controller (BMC, Baseboard Managerment Controller) and automation tools that rely on the operating system to run.
[0017] Among them, the BMC-based KVM function means that the baseboard management controller (BMC) has the KVM function, which can support real-time visual manual operation of a single node, allowing administrators to intuitively operate and manage a single server node.
[0018] Automation tools (such as ClickSkill) refer to the use of automation tools such as ClickSkill to achieve certain automated operations at the operating system level, aiming to improve the efficiency of some operation and maintenance tasks.
[0019] It can be seen that the KVM function can only support manual operation of a single node and lacks the ability to execute automated scripts. When faced with complex operation and maintenance tasks for multiple servers, such as system configuration modification and BIOS parameter adjustment, they can only rely on manual operation one by one, resulting in extremely low operation and maintenance efficiency and difficulty in batch deployment. In addition, the automation tool is highly dependent on the operating environment at the operating system level. When the server system crashes or has not yet started, it is impossible to deploy automated operation and maintenance tasks, and thus it is impossible to detect and repair the underlying hardware failures in a timely manner, which greatly affects the timeliness of fault handling.
[0020] At the same time, the related technologies also have the problem of large-scale cluster operation and maintenance, that is, the use of purely manual operation mode to operate and maintain large-scale server clusters not only has low maintenance efficiency, but also has extremely poor operation consistency due to differences in operation habits of different administrators. At the same time, the fault tolerance rate is also very low, which cannot meet the needs of intelligent operation and maintenance of modern data centers. In addition, the integration of out-of-band management channels and automated operation processes in related technologies is seriously insufficient. When the operating system is unavailable, full-stack automated control from the hardware layer to the system layer cannot be achieved, which greatly limits the flexibility and reliability of operation and maintenance.
[0021] In order to solve the problems existing in the relevant solutions, the embodiment of the present application proposes to deeply integrate the KVM function of BMC with the automation script engine to realize the construction of an automated management system at the BMC level. As the core technology of remote server management, the KVM function of BMC can break through the limitations of the operating system and support remote control when the server is not started; and the automation script engine can convert complex operation and maintenance processes into executable instruction sequences. After the two are combined, even if the operating system crashes or is not running, the system can automatically perform operation and maintenance tasks such as diagnosis and repair according to the preset script. For example, in a large-scale data center scenario, the server operation and maintenance method of the present application can replace manual operation of each server, automatically complete batch maintenance and troubleshooting of servers, significantly improve operation and maintenance efficiency and operation consistency, enhance system reliability, and achieve more intelligent and efficient server remote management.
[0022] The server operation and maintenance method of the present application relates to the technical field of server management. By deeply integrating the KVM function of the baseboard management controller (BMC) with the automated script engine, out-of-band automated operation and maintenance control is achieved, which is applicable to the remote host (HOST) configuration scenario in the baseboard management controller (BMC) environment.
[0023] In order to enable those skilled in the art of this technology to better understand the solution of the present application, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0024] Figure 1 It is a schematic flowchart of a server operation and maintenance method provided by an embodiment of the present disclosure.
[0025] As Figure 1 shown, the method includes the following steps: Step 101, based on the operation and maintenance tasks of the target server submitted by the user, parse the structured instruction file corresponding to the operation and maintenance tasks.
[0026] In the present application, the structured instruction file is pre-generated based on the user's operation behavior. The structured instruction file includes atomic actions, and the atomic actions include trigger conditions, input sequences, and expected feedback.
[0027] In some embodiments, the present application parses the pre-generated structured instruction file according to the operation and maintenance tasks (such as "configuring BIOS startup items") submitted by the user.
[0028] The structured instruction file is a standardized configuration file (such as JSON, XML format) generated based on the user's operation behavior (such as mouse clicks, keyboard inputs), including atomic actions, and is used to describe the operation and maintenance process under the complete current operation and maintenance tasks.
[0029] The atomic action is the smallest operation unit, which consists of three elements: trigger conditions, input sequences, and expected feedback.
[0030] The trigger condition represents the environmental status that needs to be verified before execution; the input sequence represents the specific operation instructions; the expected feedback represents the result that should be presented after the operation.
[0031] Step 102, based on the trigger conditions, input sequences, and expected feedback of the atomic actions in the structured instruction file, combined with the screen image of the target server, perform a verification execution operation on the atomic actions.
[0032] In the present application, the screen image is intercepted from the target server through a hardware interface.
[0033] In some embodiments, a real-time screen image of the target server is obtained through a hardware interface, the trigger condition is verified by combining an image matching algorithm, an input sequence is executed, and the operation result is verified through an expected feedback, forming a closed loop from condition verification to operation execution and then to result confirmation.
[0034] The hardware interface is a low-level communication channel that does not depend on the operating system (such as the VGA capture interface of BMC), ensuring that screen information can still be obtained when the system crashes.
[0035] The screen image is a server interface screen captured at a fixed frame rate (such as 30fps), and is used to: compare the similarity between the current image and the preset trigger image and the difference between the image after the operation and the expected feedback image.
[0036] Step 103, when the atomic action is completed, it is determined that the operation and maintenance task of the target server is successfully executed.
[0037] In some embodiments, when the input events in the input sequence of the atomic action in the current structured instruction file are executed in sequence and pass the verification, it is determined that the operation and maintenance task of the current target server is successful.
[0038] It should be noted that the operation and maintenance task of the target server in this application is applicable to the maintenance operation of a single target server, and can also be extended to the clustered operation and maintenance scenario of a batch of target servers. For the maintenance operation of a single target server, its structured instruction file can be uploaded by the user or directly generated and stored by the baseboard management system according to the user's operation behavior in advance. For the clustered operation and maintenance scenario of a batch of target servers, the user can batch upload the structured instruction file corresponding to the current operation and maintenance task to multiple target servers, so that multiple target servers can execute the operation and maintenance task synchronously, improving the operation and maintenance efficiency.
[0039] Through this application, based on the operation and maintenance task of the target server submitted by the user, the corresponding structured instruction file of the operation and maintenance task is parsed. The structured instruction file is pre-generated based on the user's operation behavior and includes atomic actions. The atomic actions include trigger conditions, input sequences, and expected feedback. Based on the trigger conditions, input sequences, and expected feedback of the atomic actions in the structured instruction file, combined with the screen image of the target server, verification and execution operations are performed on the atomic actions. The screen image is intercepted from the target server through a hardware interface. When the atomic action is completed, it is determined that the operation and maintenance task of the target server is successfully executed. It realizes the closed-loop automation operation from trigger verification to input execution and then to result verification by parsing the structured instruction file generated based on the user's operation behavior, decomposing the operation and maintenance task into atomic actions including trigger conditions, input sequences, and expected feedback, and combining the screen image intercepted by the hardware interface. It can accurately execute the operation and maintenance task in the out-of-band management scenario without the operating system (such as when the system crashes), improving the operation and maintenance efficiency.
[0040] Figure 2 Further shown is a flowchart of another server operation and maintenance method proposed by the present disclosure. Based on Figure 1 the illustrated embodiments, steps 101 and 102 are further explained, Figure 2 which may include the following steps.
[0041] Step 201, obtain an input event sent by a browser and a screen image corresponding to the input event.
[0042] In this application, the input event refers to the user operation behavior of the browser-recorded user for the operation and maintenance task of the target server through the browser side in the remote control interface of the baseboard management controller. The screen image includes the trigger screen image and the feedback screen image of the target server intercepted at a fixed frame rate through the hardware interface when the user triggers the input event and after executing the input event.
[0043] In some embodiments, during the server operation and maintenance automation process, this application dynamically captures the user operation behavior and converts it into a reusable instruction script.
[0044] Specifically, when the user logs in to the remote KVM control page through the Web interface of the BMC and starts the "instruction recording" function, the user begins to perform target operations such as power on, power off, and BIOS setting. At this time, the browser and the BMC establish a two-way communication channel through the WebSocket protocol to transmit the input event of the user performing the target operation and the video stream data of the server corresponding to the input event in real time.
[0045] Among them, to ensure the accuracy and reliability of data transmission, all messages transmitted by both parties follow a specific format, including a magic number (Magic Number) with a fixed value, a message type (HID mouse input, HID keyboard input, etc.), a packet status (reply requirement, encryption flag, CRC check, etc.), a CRC check value of the message body, a message body length, and a variable-length message body content.
[0046] The KVM function in the BMC utilizes the USB interface (i.e., the hardware interface of this application) connected to the HOST (i.e., the target server host to be managed), and uses the HID (i.e., the human-machine interface device of this application) driver to virtualize input devices such as a mouse and a keyboard for the HOST, and simultaneously obtains the video image information output by the VGA graphics card (i.e., the screen image of the target server of this application). This enables the BMC to simulate real user operations and monitor the changes in the server interface state.
[0047] In the recording mode, the BMC encodes the captured input event and screen image. For the input event, it is subdivided into a mouse event and a keyboard event, and the corresponding timestamp is recorded.
[0048] For mouse events, operations such as mouse movement, clicks, and drags can be captured via WebSocket, and the coordinates (using relative coordinates to adapt to different resolutions), timestamps, and operation types are recorded; for keyboard events, key press and release events can be captured, and the unified USB HID key codes and timestamps are recorded to eliminate the impact caused by operating system differences.
[0049] In terms of screen image processing, the present application can capture the HOST - side screen image at a fixed frame rate of 15fps through a VGA capture module and save it as an RGB bitmap or in a compressed format such as JPEG / PNG. Based on the hardware clock of BMC, a high - precision timestamp in microseconds is added to each input event and screen image to ensure that the timing of operation events and image frames is strictly consistent.
[0050] Step 202: In response to the user - completed operation triggered by the user in the remote control interface, align the input events with the triggered screen image and the feedback evaluation image in time sequence to obtain a structured instruction file for the operation and maintenance task.
[0051] In some embodiments, based on the timestamps with a preset precision, for each input event, align the input event with the triggered screen image and the feedback screen image corresponding to the input event in time sequence; combine the multiple triggered screen images after time - sequence alignment into trigger conditions, combine the multiple input events after time - sequence alignment into multiple input sequences, and combine the multiple feedback screen images after time - sequence alignment into multiple expected feedbacks to obtain atomic actions corresponding to the operation and maintenance task; encapsulate the atomic actions in a preset format to obtain a structured instruction file.
[0052] Among them, the present application can adopt the Delta Encoding technology to only store the different parts between consecutive frames, greatly reducing the data storage volume. In other words, before aligning the input event with the triggered screen image and the feedback screen image corresponding to the input event in time sequence based on the timestamps with a preset precision, the present application includes: performing Delta Encoding on the triggered screen image and the feedback screen image respectively to obtain the trigger image difference data between each triggered screen image and its adjacent image and the feedback image difference data between each feedback screen image and its adjacent image; based on the trigger image difference data and the feedback image difference data, obtain the triggered screen image and the feedback screen image to be processed.
[0053] Specifically, after completing the recording of the user operation, the present application can perform difference encoding processing on the trigger screen image and the feedback screen image respectively before timing alignment. By calculating the difference between each trigger screen image and the adjacent image, the trigger image difference data is obtained; similarly, the feedback image difference data between the feedback screen image and the adjacent image is obtained. Based on these difference data, the trigger screen image and feedback screen image to be processed are generated to reduce the amount of data and improve the efficiency of subsequent processing.
[0054] After that, each input event can be accurately associated with its corresponding trigger screen image (before operation) and feedback screen image (after operation) using a timestamp with preset precision. Subsequently, multiple trigger screen images with time alignment are combined into trigger conditions, multiple input events are sequentially integrated into input sequences, and multiple feedback screen images are aggregated into expected feedback, thus forming the smallest operation unit of the operation and maintenance task - atomic action.
[0055] For example, the atomic action "click BIOS menu item A" has its triggering condition dependent on the matching of the BIOS main interface image, the input sequence includes mouse movement and click events, and the expected feedback is the appearance of the "Save&Exit" dialog box.
[0056] The atomic actions are encapsulated in a preset format (such as YAML) to form a structured instruction file that includes operation type, coordinate positioning, input sequence, and image matching conditions.
[0057] When the user terminates the recording, the BMC completes the timing alignment and logical association between the input event and the image frame, and generates a structured instruction file. The user can download this file and upload it to the target server that needs to perform the operation and maintenance task. The BMC script engine automatically replays the instructions in subsequent configuration tasks to achieve batch replication of server configurations, such as uniformly performing BIOS parameter modification operations on multiple servers.
[0058] Step 203: based on the operation and maintenance task of the target server submitted by the user, parse the structured instruction file corresponding to the operation and maintenance task.
[0059] In some embodiments, after the BMC receives the target server operation and maintenance task submitted by the user, the present application may parse and execute the structured instruction file corresponding to the operation and maintenance task.
[0060] Specifically, this application can obtain the structured instruction file uploaded by the user and verify its legitimacy through the Redfish interface. The structured instruction file (including operation sequence, image matching conditions, etc.) is encapsulated in JSON format that complies with the Redfish Schema specification, and the operation type is defined as POST.
[0061] Users can upload files to the Redfish endpoint of the BMC (such as ` / redfish / v1 / Managers / bmc / Actions / Oem / UploadScript`) through the HTTPS protocol, enabling the BMC to obtain the structured instruction file.
[0062] Before parsing the structured instruction file, this application needs to first obtain the structured instruction file corresponding to the operation and maintenance task and perform a security check on the structured instruction file. When the security check result of the security check meets the preset security conditions, the structured instruction file is parsed. Specifically, the BMC will perform a dual security check on the structured instruction file: on the one hand, verify the file integrity through digital signatures to prevent malicious tampering; on the other hand, verify the user permissions (the user needs to have an administrator role) to ensure that the operation is legal. If the security check passes, the BMC will parse the structured instruction file.
[0063] Among them, after the check passes, this application can trigger the instruction execution through the Action interface of Redfish (such as ` / redfish / v1 / Managers / bmc / Action / Oem / RunScript`) and use the TaskService interface of Redfish (such as ` / redfish / v1 / TaskService / Tasks / {TaskID}`) to track the task progress in real time.
[0064] Step 204, when it is determined to trigger the atomic action in the structured instruction file, determine the first input event in the input sequence that needs to be triggered currently.
[0065] In this application, the trigger conditions and expected feedback are related to the input sequence. The input sequence includes multiple input events that need to be executed. The trigger conditions include multiple preset trigger screen images before the execution of the multiple input events, and the expected feedback includes multiple preset feedback screen images after the execution of the multiple input events.
[0066] In some embodiments, after the BMC parses the structured instruction file, this application can call the virtual input device driver and image matching module according to the preset time sequence: by simulating input events of input devices such as mice and keyboards, and comparing the real-time captured screen image of the target server with the preset trigger screen image and preset feedback screen image, dynamically adjust the instruction execution conditions to ensure that the operation is triggered only in the target interface state (such as when the BIOS main menu is loaded).
[0067] Specifically, after the BMC parses the structured instruction file, when the BMC determines that it is necessary to trigger the atomic actions in the structured instruction file, it will first locate the first input event in the input sequence to be executed currently. In this mechanism, the trigger conditions and expected feedback are deeply associated with the input sequence: the input sequence contains multiple input events executed in sequence (such as mouse clicks, keyboard inputs, etc.), the trigger conditions are composed of preset trigger screen images before the execution of multiple input events (for example, the interface state to be verified before the operation), and the expected feedback is composed of preset feedback screen images after the execution of multiple input events (for example, the result interface to be verified after the operation). Through this association mechanism, it is ensured that the execution of each input event is based on the correct interface state, and the effectiveness of the operation is verified through image matching after the execution, forming a closed-loop control logic of "trigger condition verification to input event execution to expected feedback verification".
[0068] Step 205: According to the first preset trigger screen image in the trigger condition corresponding to the first input event and the first preset feedback screen image in the expected feedback, execute the first input event and verify whether the first input event is successfully executed.
[0069] In some embodiments, when determining to trigger the first input event in the input sequence, compare the first screen image with the first preset trigger screen image to determine whether there is a match between the first screen image and the first preset trigger screen image. The first screen image is the screen image of the target server when the first input event is triggered; when there is a match between the first screen image and the first preset trigger screen image, call the virtual human-machine interface device driver to execute the first input event; compare the second screen image with the first preset feedback screen image to determine whether there is a match between the second screen image and the first preset feedback screen image. The second screen image is the screen image of the target server after the first input event is executed; when there is a match between the second screen image and the first preset feedback screen image, determine that the first input event is successfully executed.
[0070] In other words, when the BMC triggers the first input event in the input sequence, the following verification and execution process needs to be followed: Trigger condition verification: Compare the current screen image (the first screen image) with the preset trigger image, and only execute the input event when the match is successful; Input event execution: Call the virtual HID driver to simulate mouse / keyboard operations (such as clicking the coordinates (300, 200)); Expected feedback verification: After execution, compare the new screen image (the second screen image) with the preset feedback image to confirm that the operation takes effect.
[0071] Among them, comparing the first screen image with the first preset trigger screen image to determine whether there is a match between the first screen image and the first preset trigger screen image includes: preprocessing the first screen image and the first preset trigger screen image to obtain the preprocessed first screen image and the first preset trigger screen image; through a matching algorithm, determining the normalized cross-correlation value between the preprocessed first screen image and the first preset trigger screen image; when the normalized cross-correlation value is greater than or equal to the preset cross-correlation threshold, respectively extracting the feature points of the preprocessed first screen image and the first preset trigger screen image, and performing feature point matching based on the feature points to obtain the Hamming distance; when the Hamming distance is less than or equal to the preset distance threshold, determining that there is a match between the first screen image and the first preset trigger screen image.
[0072] Among them, comparing the second screen image with the first preset feedback screen image to determine whether there is a match between the second screen image and the first preset feedback screen image includes: preprocessing the second screen image and the first preset feedback screen image to obtain the preprocessed second screen image and the first preset feedback screen image; through a matching algorithm, determining the normalized cross-correlation value between the preprocessed second screen image and the first preset feedback screen image; when the normalized cross-correlation value is greater than or equal to the preset cross-correlation threshold, respectively extracting the feature points of the preprocessed second screen image and the first preset feedback screen image, and performing feature point matching based on the feature points to obtain the Hamming distance; when the Hamming distance is less than or equal to the preset distance threshold, determining that there is a match between the second screen image and the first preset feedback screen image.
[0073] Specifically, when comparing the first screen image with the first preset trigger screen image and comparing the second screen image with the second preset trigger image, a two-layer verification of "template matching + feature point matching" is adopted.
[0074] Among them, before performing the matching, it is necessary to preprocess the image, that is, unify the image resolution (such as scaling to 720p), adjust the brightness and contrast; focus on the key areas (such as the BIOS menu button, the OS login box, etc.) to reduce the calculation amount.
[0075] In an optional embodiment of the present application, the template matching of the present application may adopt the NCC algorithm to calculate the normalized cross-correlation value between the first screen image and the first preset trigger screen image. The NCC algorithm is as follows:
[0076] Among them, I is the input first screen image, (x, y) is the pixel point coordinate, I(x, y) is the pixel value of the pixel point (x, y), and T is the first preset trigger screen image. is the mean value of the pixel points of the first screen image. The mean value of the pixel points of the first preset trigger screen image, the NCC value is the normalized cross-correlation value, and the range of the normalized cross-correlation value is [-1, 1]. The closer the normalized cross-correlation value is to 1, the higher the matching degree. According to the scenario, a preset cross-correlation threshold is set (such as NCC≥0.85), and if it exceeds the preset cross-correlation threshold, it is considered a successful match.
[0077] When the normalized cross-correlation value is greater than or equal to the preset cross-correlation threshold, feature point matching is performed. Among them, the feature point matching uses the ORB (Oriented FAST and Rotated BRIEF, improved FAST corner detection + BRIEF descriptor) algorithm, which is faster and suitable for real-time systems. First, 256-bit binary descriptors of the second screen image and the first preset feedback screen image need to be extracted based on the BRIEF algorithm respectively, and the Hamming distance (XOR operation) is calculated for matching. Among them, the present application can dynamically adjust the number of feature points according to the scene complexity (such as only 50 feature points are required for the BIOS interface, and 500 feature points are required for the complex OS interface).
[0078] When the Hamming distance is less than or equal to the preset distance threshold, it is determined that there is a match between the second screen image and the first preset feedback screen image.
[0079] It can be understood that the matching of the second screen image and the first preset feedback screen image of the present application can also be implemented with reference to the above steps, which will not be elaborated here.
[0080] In addition, if the trigger condition or feedback verification fails, retry according to the preset strategy (such as retry 3 times after waiting for 5 seconds), and if it still fails, trigger hardware-level repair (such as power reset).
[0081] In other words, when there is no match between the first screen image and the first preset trigger screen image or there is no match between the second screen image and the first preset feedback screen image, it is determined that the first input event is executed abnormally, and an exception handling mechanism is triggered. Among them, triggering the exception handling mechanism includes: repeating the trigger of the first input event according to the preset waiting time (such as waiting for 5 seconds for the first time and doubling it subsequently) and the preset number of retries (such as at most 3 retries); when there is no match between the first screen image after the first input event is repeatedly triggered and the first preset trigger screen image or there is no match between the second screen image after the first input event is repeatedly triggered and the first preset feedback screen image, perform a repair operation through the hardware interface (such as restarting the fan, resetting the power supply).
[0082] Specifically, during the execution of the input event, the BMC can also continuously monitor the operation status: if abnormal situations such as VGA image matching failure or HOST unresponsiveness occur, an alarm event will be immediately triggered. At the same time, the BMC can also collect server hardware sensor data (such as temperature and voltage) in real time. If hardware abnormalities are detected, automatic repair operations (such as fan speed regulation and power reset) will be initiated.
[0083] For recoverable errors (such as communication interruption caused by network jitter), an exponential backoff strategy is adopted to automatically retry the operation, that is, the retry interval time increases exponentially each time (such as 5 seconds for the first time and 10 seconds for the second time), until the operation is successful or the maximum number of retries is reached, ensuring the reliability and stability of the operation and maintenance tasks.
[0084] Step 206, when the first input event is executed successfully, the second input event is determined to be triggered according to the arrangement order of multiple input events in the input sequence until multiple input events are executed successfully.
[0085] In some embodiments, when the first input event is executed successfully (i.e., passing the trigger condition verification and matching the expected feedback), the BMC will automatically trigger subsequent events in the preset order of the input sequence. For example, if the input sequence is "click the BIOS menu → select advanced options → modify the boot order", the next operation will be immediately executed after the previous operation is completed until all input events are executed. This chained execution mechanism ensures the complete implementation of complex operation and maintenance tasks (such as multi-step BIOS configuration).
[0086] Among them, during the execution of the input event, the BMC can also obtain the key task status after the input event in the input sequence and the server parameters of the target server corresponding to the key task status at a preset period (such as every 30 seconds).
[0087] The key task status data includes the recorded operation execution progress, image matching success rate, abnormal retry times, etc.; the server parameters include hardware metrics such as CPU temperature, memory usage rate, and power status obtained through the BMC interface (i.e., the preset interface of this application), as well as configuration parameters such as BIOS version and boot order.
[0088] The key task status data and server parameter data can be used to evaluate the operation impact in real time and provide a basis for report generation.
[0089] Among them, when generating the operation and maintenance report, the total number of tasks, the number of successes / failures, and the average execution time can also be counted; the trigger time, execution result, image matching score of each input event, the temperature change curve before and after the operation, and the power stability analysis can be determined; and the comparison table of the target parameters and the actual effective values (such as the expected BIOS version vs. the actual version) can be determined.
[0090] After obtaining the operation and maintenance report, it can be pushed to the administrator's email (i.e., the target email of this application) or the enterprise storage server (i.e., the storage server of this application) through the Redfish EventDestination interface; and locally stored in the BMC log partition (i.e., the target storage area of this application), supporting retrieval of historical operation and maintenance reports by timestamp, task ID, or error type.
[0091] Step 207, when all input events are executed, determine that the operation and maintenance tasks of the target server are successfully executed.
[0092] In some embodiments, when all input events in the input sequence are successfully executed in order, the BMC will confirm that the operation and maintenance tasks of the target server are successfully executed, and at the same time, it can also feedback information about the successful execution of the tasks to the user.
[0093] For the automated operation and maintenance scenario of the server cluster, users can batch submit operation and maintenance tasks of multiple servers through the Redfish interface or the Web management interface. Since the structured instruction file is encapsulated into a batch execution format that conforms to the Redfish protocol, each server can use the structured instruction file for batch operation and maintenance, realizing efficient automated management of large-scale server operation and maintenance.
[0094] In summary, this application generates reusable structured instruction files by recording user operation behaviors, completely revolutionizing the repetitive manual configuration mode in related technologies and greatly improving the server deployment efficiency; accurately identifying screen images such as BIOS menus and OS login pages with the help of image matching technology to ensure that the instructions are executed in the correct environment; supporting cross-platform operation recording and widely adapting to various server types and operating system environments; the structured instruction file supports parameterized modification and can be flexibly adjusted according to different server configuration requirements; through the exception detection and automatic recovery mechanism, effectively ensuring the task success rate in large-scale deployment scenarios.
[0095] Based on Figure 1 、 Figure 2 the embodiments shown, as Figure 3 shown, this application provides a schematic flow diagram for generating structured instruction files during the specific server operation and maintenance process.
[0096] Referring to Figure 3 , the user logs in to the BMC web page in the PC browser, which is the starting entry of the operation, just like building a bridge for interacting with the server management module. After entering, open the KVM page. KVM can realize remote control of the server and provide an environmental basis for subsequent operations.
[0097] Click the "Instruction Generation - Start" button to start recording. Then, perform actual operations on the HOST (host) through KVM. The operation process will be recorded for generating instructions. After completing the operations, click the "Instruction Generation - End" button to terminate the recording. Finally, click the "Instruction Download" button to obtain a structured instruction file containing the operation logic, which can be used for subsequent server configuration reuse to improve the deployment efficiency.
[0098] Logging in to the BMC web page and opening the KVM page in a PC browser is to establish a remote control channel. In this step, the browser needs to continuously capture the user's operations on the KVM interface (i.e., input events, the user's operation behaviors for the target server's operation and maintenance tasks), and at the same time, the user needs to perform a preparatory action of intercepting the screen image at a fixed frame rate through the hardware interface (trigger / feedback screen image).
[0099] Clicking the "Instruction Generation - Start" button is to start the data collection mark. At this time, the browser starts recording, and BMC starts to obtain the behaviors (input events) of the user operating the HOST through KVM recorded by the browser. At the same time, BMC intercepts the screen images before and after the operation according to the rules (trigger / feedback images).
[0100] The stage of operating the HOST through KVM means that BMC obtains the input events recorded by the browser while collecting the screen images at the time of operation trigger and after execution, and also performs differential coding on the images (compressing redundant data and retaining differential information) to make the data lighter. Clicking "Instruction Generation - End" is to terminate the collection mark. At this time, BMC obtains a complete sequence of input events and the corresponding sequence of screen images, and performs temporal alignment on the input events, trigger / feedback screen images based on timestamps. These data are split into "trigger conditions (trigger image combinations), input sequences (operation event combinations), expected feedbacks (feedback image combinations)", encapsulated into atomic actions, and finally a structured instruction file is generated for download and reuse. At this time, the user clicks the "Instruction Download Button" to download.
[0101] For ease of understanding, as Figure 4 shown, the present application also provides an architecture diagram of a BMC-side instruction generation system.
[0102] Referring to Figure 4 , the PC browser is the user operation entry, running the "Instruction Generation" and "Instruction Download" functions, and communicating with the BMC through network protocols to achieve remote operation and maintenance control.
[0103] The BMC is the core module for server management, responsible for the functions of "KVM (remote control)" and "recording operations". It simulates user operations to the HOST (the host, i.e., the target server of this application) while recording operation data for generating a structured instruction file.
[0104] The HOST is the actual server entity to be operated and maintained, receiving user operations (such as configuration, debugging, etc.) simulated by the BMC.
[0105] Among them, for the stage of generating the structured instruction file, after the user clicks "instruction generation" in the PC browser, the user operation behavior (i.e., the input event of this application) is sent to the KVM module of the BMC through the Websocket protocol (real-time two-way communication, suitable for operation stream transmission); the KVM module of the BMC executes the input event on the HOST side through the USB channel (simulating local USB operations to make remote operations execute like local ones), realizing remote control of the server (such as BIOS configuration, system debugging, etc.); At the same time, the recording operation module of the BMC will synchronously capture and record the operation behavior executed by the user through the KVM, accumulating data for generating structured instructions.
[0106] For the stage of downloading the structured instruction file, when the user completes the operation and needs to reuse the structured instruction file, the user can click "instruction download" in the PC browser. The BMC uses the Redfish protocol (a standardized RESTful protocol for server hardware management, suitable for structured data transmission) to send the structured instruction file (including input sequence, trigger conditions, expected feedback) sorted out by the previous recording operation module back to the PC browser for the user to download and save for subsequent batch deployment or repeated operation and maintenance of the server.
[0107] Furthermore, as Figure 5 shown, this application provides a schematic diagram of batch server cluster operation and maintenance.
[0108] Referring to Figure 5 , after obtaining the structured instruction file, batch operation and maintenance of the server cluster can be carried out based on the structured instruction file.
[0109] In other words, when the subsequent servers start after the first server obtains the structured instruction file corresponding to the current operation and maintenance task, the BMC can directly load the structured instruction file uploaded by the user or stored by itself, automatically triggering the operation and maintenance task (such as the BIOS configuration process) without manual intervention.
[0110] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation manner.
[0111] An embodiment of the present application further provides a server operation and maintenance device 600. Figure 6 As shown in the structural schematic diagram of a server operation and maintenance device provided by an embodiment of the present disclosure, Figure 6 as shown, it includes: A parsing unit 610, configured to parse a structured instruction file corresponding to an operation and maintenance task based on an operation and maintenance task of a target server submitted by a user. The structured instruction file is pre-generated based on user operation behaviors, and the structured instruction file includes atomic actions. The atomic actions include trigger conditions, input sequences, and expected feedbacks. An operation and maintenance unit 620, configured to perform a verification execution operation on an atomic action based on the trigger condition, input sequence, and expected feedback of the atomic action in the structured instruction file, in combination with a screen image of the target server. The screen image is intercepted from the target server through a hardware interface. A determination unit 630, configured to determine that the operation and maintenance task of the target server is successfully executed when the atomic action is executed.
[0112] Further, in a possible implementation manner of an embodiment of the present disclosure, the trigger condition and the expected feedback are related to the input sequence. The input sequence includes multiple input events to be executed. The trigger condition includes multiple preset trigger screen images before the execution of the multiple input events, and the expected feedback includes multiple preset feedback screen images after the execution of the multiple input events. The operation and maintenance unit 620 is configured to: when it is determined that an atomic action in the structured instruction file is triggered, determine a first input event in the input sequence that needs to be triggered currently; according to the first preset trigger screen image in the trigger condition corresponding to the first input event and the first preset feedback screen image in the expected feedback, execute the first input event and verify whether the first input event is successfully executed; when the first input event is successfully executed, then determine to trigger a second input event according to the arrangement order of the multiple input events in the input sequence until the multiple input events are successfully executed.
[0113] Further, in a possible implementation manner of the embodiments of the present disclosure, the operation and maintenance unit 620 is configured to: when determining that the first input event in the trigger input sequence is triggered, compare the first screen image with the first preset trigger screen image to determine whether there is a match between the first screen image and the first preset trigger screen image, where the first screen image is the screen image of the target server when the first input event is triggered; when there is a match between the first screen image and the first preset trigger screen image, call the virtual human-machine interface device driver to execute the first input event; compare the second screen image with the first preset feedback screen image to determine whether there is a match between the second screen image and the first preset feedback screen image, where the second screen image is the screen image of the target server after the first input event is executed; when there is a match between the second screen image and the first preset feedback screen image, determine that the execution of the first input event is successful.
[0114] Further, in a possible implementation manner of the embodiments of the present disclosure, the operation and maintenance unit 620 is configured to: preprocess the first screen image and the first preset trigger screen image to obtain the preprocessed first screen image and the first preset trigger screen image; determine the normalized cross-correlation value between the preprocessed first screen image and the first preset trigger screen image through a matching algorithm; when the normalized cross-correlation value is greater than or equal to a preset cross-correlation threshold, respectively extract the feature points of the preprocessed first screen image and the first preset trigger screen image, and perform feature point matching based on the feature points to obtain the Hamming distance; when the Hamming distance is less than or equal to a preset distance threshold, determine that there is a match between the first screen image and the first preset trigger screen image.
[0115] Further, in a possible implementation manner of the embodiments of the present disclosure, the operation and maintenance unit 620 is configured to: preprocess the second screen image and the first preset feedback screen image to obtain the preprocessed second screen image and the first preset feedback screen image; determine the normalized cross-correlation value between the preprocessed second screen image and the first preset feedback screen image through a matching algorithm; when the normalized cross-correlation value is greater than or equal to a preset cross-correlation threshold, respectively extract the feature points of the preprocessed second screen image and the first preset feedback screen image, and perform feature point matching based on the feature points to obtain the Hamming distance; when the Hamming distance is less than or equal to a preset distance threshold, determine that there is a match between the second screen image and the first preset feedback screen image.
[0116] Further, in a possible implementation manner of the embodiments of the present disclosure, the operation and maintenance unit 620 is configured to: after comparing the second screen image with the first preset feedback screen image to determine whether there is a match between the second screen image and the first preset feedback screen image, when there is no match between the first screen image and the first preset trigger screen image or there is no match between the second screen image and the first preset feedback screen image, determine that the execution of the first input event is abnormal and trigger an exception handling mechanism.
[0117] Further, in a possible implementation manner of the embodiments of the present disclosure, the operation and maintenance unit 620 is configured to: repeatedly trigger a first input event according to a preset waiting time and a preset number of retry times; when the first screen image after the repeated triggering of the first input event does not match the first preset trigger screen image or the second screen image after the repeated triggering of the first input event does not match the first preset feedback screen image, perform a repair operation through a hardware interface.
[0118] Further, in a possible implementation manner of the embodiments of the present disclosure, the parsing unit 610 is configured to: obtain a structured instruction file corresponding to an operation and maintenance task; perform a security check on the structured instruction file; when the security check result of the security check meets a preset security condition, parse the structured instruction file.
[0119] Further, in a possible implementation manner of the embodiments of the present disclosure, the operation and maintenance unit 620 is configured to: obtain the key task status after the triggering of an input event in an input sequence and the server parameters of the target server corresponding to the key task status according to a preset period; generate an operation and maintenance report based on the key task status and the server parameters; store the operation and maintenance report in a target storage area, and push it to a target mailbox or a storage server through a preset interface.
[0120] Further, in a possible implementation manner of the embodiments of the present disclosure, the operation and maintenance unit 620 is configured to: before parsing the structured instruction file corresponding to the operation and maintenance task of the target server submitted by the user, obtain the input event sent by the browser and the screen image corresponding to the input event, where the input event refers to the user operation behavior performed by the user on the remote control interface of the baseboard management controller for the operation and maintenance task of the target server through the browser side, and the screen image includes the trigger screen image and the feedback screen image of the target server intercepted at a fixed frame rate through the hardware interface when the user triggers the input event and after executing the input event; in response to the user completion operation triggered by the user in the remote control interface, perform temporal alignment on the input event, the trigger screen image, and the feedback evaluation image to obtain a structured instruction file of the operation and maintenance task.
[0121] Further, in a possible implementation manner of the embodiments of the present disclosure, the operation and maintenance unit 620 is configured to: based on a time stamp with a preset precision, perform temporal alignment on each input event, the trigger screen image corresponding to the input event, and the feedback screen image; combine the temporally aligned multiple trigger screen images into trigger conditions, combine the temporally aligned multiple input events into multiple input sequences, and combine the temporally aligned multiple feedback screen images into multiple expected feedbacks to obtain atomic actions corresponding to the operation and maintenance task; encapsulate the atomic actions in a preset format to obtain a structured instruction file.
[0122] Further, in a possible implementation manner of the embodiments of the present disclosure, the operation and maintenance unit 620 is configured to: before aligning the input event with the trigger screen image and the feedback screen image corresponding to the input event in time sequence according to a time stamp with a preset precision for each input event, perform differential encoding on the trigger screen image and the feedback screen image respectively to obtain trigger image difference data between each trigger screen image and its adjacent image, and feedback image difference data between each feedback screen image and its adjacent image; and obtain the trigger screen image and the feedback screen image to be processed based on the trigger image difference data and the feedback image difference data.
[0123] For the descriptions of the features in the corresponding embodiments of the server operation and maintenance device, reference may be made to the relevant descriptions in the corresponding embodiments of the server operation and maintenance method, which will not be elaborated here one by one.
[0124] An embodiment of the present application further provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned embodiments of the server operation and maintenance method.
[0125] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any of the above-mentioned embodiments of the server operation and maintenance method when running.
[0126] In an exemplary embodiment, the above-mentioned computer-readable storage medium may include, but is not limited to: USB flash drive, read-only memory (ROM for short), random access memory (RAM for short), mobile hard disk, magnetic disk or optical disc, etc., all kinds of media that can store computer programs.
[0127] An embodiment of the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned embodiments of the server operation and maintenance method are implemented.
[0128] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned embodiments of the server operation and maintenance method are implemented.
[0129] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0130] The above has introduced in detail a server operation and maintenance method, an electronic device, a storage medium, and a product provided by this application. Specific examples are used herein to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A server operation and maintenance method, characterized in that, Including: Based on the operation and maintenance tasks of the target server submitted by the user, parse the structured instruction file corresponding to the operation and maintenance tasks. The structured instruction file is pre-generated based on the user's operation behavior. The structured instruction file includes atomic actions, and the atomic actions include trigger conditions, input sequences, and expected feedback; Based on the trigger conditions, input sequences, and expected feedback of the atomic actions in the structured instruction file, combined with the screen image of the target server, perform a verification execution operation on the atomic actions. The screen image is intercepted from the target server through a hardware interface; When the atomic action is executed successfully, determine that the operation and maintenance task of the target server is executed successfully.
2. The method according to claim 1, wherein The trigger conditions and the expected feedback are related to the input sequence. The input sequence includes multiple input events to be executed. The trigger conditions include multiple preset trigger screen images before the execution of the multiple input events, and the expected feedback includes multiple preset feedback screen images after the execution of the multiple input events. The performing a verification execution operation on the atomic actions based on the trigger conditions, input sequences, and expected feedback of the atomic actions in the structured instruction file, combined with the screen image of the target server, includes: When it is determined that an atomic action in the structured instruction file is triggered, determine the first input event in the input sequence that needs to be triggered currently; According to the first preset trigger screen image in the trigger conditions corresponding to the first input event and the first preset feedback screen image in the expected feedback, execute the first input event and verify whether the first input event is executed successfully; When the first input event is executed successfully, then according to the arrangement order of the multiple input events in the input sequence, determine to trigger the second input event until the multiple input events are executed successfully.
3. The method according to claim 2, wherein The executing the first input event and verifying whether the first input event is executed successfully according to the first preset trigger screen image in the trigger conditions corresponding to the first input event and the first preset feedback screen image in the expected feedback includes: When it is determined that the first input event in the input sequence is triggered, compare the first screen image with the first preset trigger screen image to determine whether there is a match between the first screen image and the first preset trigger screen image. The first screen image is the screen image of the target server when the first input event is triggered; When there is a match between the first screen image and the first preset trigger screen image, then call the virtual human-machine interface device driver to execute the first input event; Compare the second screen image with the first preset feedback screen image to determine whether there is a match between the second screen image and the first preset feedback screen image. The second screen image is the screen image of the target server after the first input event is executed; When there is a match between the second screen image and the first preset feedback screen image, determine that the first input event is executed successfully.
4. The method according to claim 3, wherein Comparing the first screen image and the first preset trigger screen image to determine whether there is a match between the first screen image and the first preset trigger screen image includes: Preprocessing the first screen image and the first preset trigger screen image to obtain the preprocessed first screen image and the first preset trigger screen image; Determining the normalized cross-correlation value between the preprocessed first screen image and the first preset trigger screen image through a matching algorithm; When the normalized cross-correlation value is greater than or equal to a preset cross-correlation threshold, respectively extract the feature points of the preprocessed first screen image and the first preset trigger screen image, and perform feature point matching based on the feature points to obtain a Hamming distance; When the Hamming distance is less than or equal to a preset distance threshold, it is determined that there is a match between the first screen image and the first preset trigger screen image.
5. The method according to claim 3, characterized in that Comparing the second screen image with the first preset feedback screen image to determine whether there is a match between the second screen image and the first preset feedback screen image includes: Preprocessing the second screen image and the first preset feedback screen image to obtain the preprocessed second screen image and the first preset feedback screen image; Determining the normalized cross-correlation value between the preprocessed second screen image and the first preset feedback screen image through a matching algorithm; When the normalized cross-correlation value is greater than or equal to a preset cross-correlation threshold, respectively extract the feature points of the preprocessed second screen image and the first preset feedback screen image, and perform feature point matching based on the feature points to obtain a Hamming distance; When the Hamming distance is less than or equal to a preset distance threshold, it is determined that there is a match between the second screen image and the first preset feedback screen image.
6. The method according to claim 3, wherein After comparing the second screen image with the first preset feedback screen image to determine whether there is a match between the second screen image and the first preset feedback screen image, the method includes: When there is no match between the first screen image and the first preset trigger screen image or there is no match between the second screen image and the first preset feedback screen image, it is determined that the execution of the first input event is abnormal, and an exception handling mechanism is triggered.
7. The method according to claim 6, characterized in that Triggering the exception handling mechanism includes: Repeatedly triggering the first input event according to a preset waiting time and a preset number of retries; When there is no match between the first screen image after the first input event is repeatedly triggered and the first preset trigger screen image or there is no match between the second screen image after the first input event is repeatedly triggered and the first preset feedback screen image, a repair operation is performed through the hardware interface.
8. The method according to claim 1, wherein Parsing the structured instruction file corresponding to the operation and maintenance task of the target server based on the operation and maintenance task of the target server submitted by the user includes: Obtaining the structured instruction file corresponding to the operation and maintenance task; Performing a security check on the structured instruction file; When the security check result of the security check meets a preset security condition, the structured instruction file is parsed.
9. The method according to any one of claims 1 to 8, characterized in that, The method further includes: Obtain the key task status after the input event is triggered in the input sequence and the server parameters of the target server corresponding to the key task status according to a preset period; Generate an operation and maintenance report based on the key task status and the server parameters; Store the operation and maintenance report in a target storage area and push it to a target email or storage server through a preset interface.
10. The method according to claim 1, wherein Before parsing the structured instruction file corresponding to the operation and maintenance task of the target server submitted by the user, the method includes: Obtain an input event sent by a browser and a screen image corresponding to the input event. The input event refers to the user operation behavior performed by the user on the remote control interface of the baseboard management controller for the operation and maintenance task of the target server recorded by the browser. The screen image includes the trigger screen image and the feedback screen image of the target server intercepted at a fixed frame rate through the hardware interface when the user triggers the input event and after executing the input event; In response to the user completion operation triggered by the user on the remote control interface, align the input event with the trigger screen image and the feedback evaluation image in time sequence to obtain the structured instruction file of the operation and maintenance task.
11. The method according to claim 10, wherein The aligning the input event with the trigger screen image and the feedback evaluation image in time sequence to obtain the structured instruction file of the operation and maintenance task includes: Based on timestamps with a preset precision, for each input event, align the input event with the trigger screen image and the feedback screen image corresponding to the input event in time sequence; Combine the multiple trigger screen images after time sequence alignment into trigger conditions, combine the multiple input events after time sequence alignment into multiple input sequences, and combine the multiple feedback screen images after time sequence alignment into multiple expected feedbacks to obtain the atomic actions corresponding to the operation and maintenance task; Package the atomic actions in a preset format to obtain the structured instruction file.
12. The method according to claim 10, wherein Before aligning the input event with the trigger screen image and the feedback screen image corresponding to the input event in time sequence based on timestamps with a preset precision, the method includes: Perform differential coding on the trigger screen image and the feedback screen image respectively to obtain trigger image difference data between each trigger screen image and its adjacent image and feedback image difference data between each feedback screen image and its adjacent image; Based on the trigger image difference data and the feedback image difference data, obtain the trigger screen image and the feedback screen image to be processed.
13. An electronic device, characterized in that, Includes: A memory for storing a computer program; A processor for implementing the steps of the server operation and maintenance method according to any one of claims 1 to 12 when executing the computer program.
14. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of the server operation and maintenance method according to any one of claims 1 to 12 when executed by a processor.
15. A computer program product comprising a computer program, characterized in that, The computer program implements the steps of the server operation and maintenance method according to any one of claims 1 to 12 when executed by a processor.
Citation Information
Patent Citations
Robotic process automation
CN107666987A
Installation stage identification method and device, electronic equipment and storage medium
CN118210687A
System, method and device for executing atomic operation
CN118377741A
Method and apparatus for providing auto-completion of information using strings
US20090119581A1
System and method for automating cloud financial operations management optimizations
US20250139101A1
Cited By
BIOS automatic configuration method for large-scale server cluster
CN121833068A
BIOS automatic configuration method for large-scale server cluster
CN121833068B