Method, device and equipment for acquiring in-band data of server and storage medium

Through the substrate management controller and pre-trained optical character recognition model, the problem of single operation and manual recording is solved, and efficient and automated batch acquisition of server in-band data is realized, which is suitable for large-scale server cluster management.

CN120276949APending Publication Date: 2025-07-08INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510322220.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

In the prior art, the method of obtaining in-band data of the server relies on single operation and manual recording of operation and maintenance personnel, and cannot be processed in batches, making it difficult to adapt to the automated management needs of large-scale server clusters.

Method used

The server is connected to the out-of-band network function of the substrate management controller, and the prefabricated guided optical disc system is used to obtain screenshots, and the pre-trained optical character recognition model is used to automatically identify and filter text information, and output server in-band data.

Benefits of technology

It realizes centralized management and batch data acquisition of multiple servers, gets rid of manual operation one by one, improves data processing speed and accuracy, and adapts to the automated management requirements of large-scale server clusters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120276949A_ABST
    Figure CN120276949A_ABST
Patent Text Reader

Abstract

The invention discloses a server in-band data obtaining method, device and equipment and a storage medium, and relates to the technical field of servers, and the method comprises the steps: communicating with a management server in batches by means of a substrate management controller, obtaining screenshots in batches by means of a prefabricated guidable optical disc system, automatically extracting text information through a pre-trained optical character recognition model, and obtaining the in-band data of the server through the pre-trained optical character recognition model. And then the in-band data is automatically screened and output, so that the problem that batch processing cannot be performed due to the fact that manual single operation and recording are depended traditionally is solved, and efficient and automatic acquisition of the in-band data of the large-scale server cluster is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of servers, and in particular, to a method, apparatus, device, and storage medium for obtaining in-band data of a server. Background Art

[0002] In the technical field of servers, before a server is put into use, detailed configurations covering multiple aspects such as hardware, operating system, security policies, and network connections need to be carried out to ensure its security, stability, and performance. In-band data includes information such as the server hardware status, system, and network configurations. Obtaining and analyzing this data in advance helps to optimize the configuration and improve the reliability of the server.

[0003] Currently, there are two solutions for obtaining in-band data: one is to use the Serial Over LAN (SOL) technology, which requires the server to support the Intelligent Platform Management Interface version 2.0 (IPMI v2.0) and complex pre-settings, and does not directly support script execution, resulting in low data transmission efficiency. The other is to create a Live Disc system. This solution has a cumbersome production process, high technical requirements for operators, the Live CD does not support file transfer to the out-of-band environment, and restarting the server is required to obtain information, which affects the hardware life and business operation. Both solutions can only be operated by maintenance personnel on a single server and record information manually, unable to process in batches, and it is difficult to meet the requirements of automated management of large-scale server clusters. Summary of the Invention

[0004] This application provides a method, apparatus, device, and storage medium for obtaining in-band data of a server, so as to at least solve the problem in related technologies that it relies on maintenance personnel to operate and record manually on a single server, unable to process data in batches, and it is difficult to meet the requirements of automated management of large-scale server clusters.

[0005] This application provides a method for obtaining in-band data of a server, including:

[0006] Connect and manage at least one server through the out-of-band network function of the baseboard management controller;

[0007] Mount a prefabricated Live Disc system to at least one server and start the prefabricated Live Disc system on at least one server to obtain screenshots of at least one server; wherein, the prefabricated Live Disc system is made according to the in-band data type selected by the user;

[0008] Input the screenshot of at least one server into a pre-trained optical character recognition model to obtain the text information output by the pre-trained optical character recognition model; wherein, the pre-trained optical character recognition model is trained and converged based on the sample pictures output by simulating terminal commands.

[0009] When the target information is included in the text information, output the in-band data of at least one server in the interactive page.

[0010] This application also provides a device for obtaining the in-band data of a server, including:

[0011] An interaction module, configured to connect and manage at least one server through the out-of-band network function of the baseboard management controller;

[0012] An acquisition module, configured to mount a prefabricated bootable disc system to at least one server and start the prefabricated bootable disc system on at least one server to obtain the screenshots of at least one server; wherein, the prefabricated bootable disc system is made according to the in-band data type selected by the user.

[0013] A recognition module, configured to input the screenshots of at least one server into a pre-trained optical character recognition model to obtain the text information output by the pre-trained optical character recognition model; wherein, the pre-trained optical character recognition model is trained and converged based on the sample pictures output by simulating terminal commands.

[0014] The interaction module is further configured to output the in-band data of at least one server in the interactive page when the target information is included in the text information.

[0015] 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 one of the above methods for obtaining the in-band data of a server when executing the computer program.

[0016] This application also provides a computer-readable storage medium, in which a computer program is stored, and wherein the computer program implements the steps of any one of the above methods for obtaining the in-band data of a server when executed by a processor.

[0017] This application also provides a computer program product, including a computer program, and the computer program implements the steps of any one of the above methods for obtaining the in-band data of a server when executed by a processor.

[0018] Through the out-of-band network function of the baseboard management controller, this application breaks through the limitation of single-unit operation by traditional operation and maintenance personnel. It can connect and manage multiple servers simultaneously to achieve centralized control. A prefabricated bootable optical disc system is made, mounted and started to batch obtain server screenshots, getting rid of the tediousness of manually obtaining screenshots one by one. An optical character recognition model trained based on sample pictures of simulated terminal command outputs is used to automatically extract the text information in the screenshots, avoiding manual recording. The system can also automatically screen the text containing target information and output the in-band data of the corresponding server. Therefore, it can solve the problems in the related technology that rely on single-unit operation by operation and maintenance personnel and manual recording, cannot process data in batches, and are difficult to meet the requirements of large-scale server cluster automation management, realizing the efficient automation of in-band data acquisition for large-scale server clusters. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] 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.

[0020] Figure 1 Schematic flowchart of a method for obtaining in-band data of a server provided by an embodiment of this application;

[0021] Figure 2 Schematic diagram of the acquisition information selection page provided by an embodiment of this application;

[0022] Figure 3 Schematic diagram of processing type-A output provided by an embodiment of this application;

[0023] Figure 4 Schematic diagram of type-A output provided by an embodiment of this application;

[0024] Figure 5 Pseudo-code schematic diagram for screening valid screenshots and OCR;

[0025] Figure 6 Schematic diagram of the structure of an apparatus for obtaining in-band data of a server provided by an embodiment of this application;

[0026] Figure 7 Schematic flowchart of the working process of an apparatus for obtaining in-band data of a server provided by an embodiment of this application;

[0027] Figure 8 Schematic diagram of the structure of an electronic device provided by an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0028] 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 making creative efforts belong to the protection scope of the present application.

[0029] It should be noted that in the description of the present application, the terms "including", "comprising" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly 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 and are not used to describe a specific order or sequence.

[0030] In order to enable those skilled in the art of the present technology to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0031] In order to more clearly illustrate the embodiments of the present application, the technical terms required in the embodiments will be briefly explained below.

[0032] A Live Disc (Live CD) is a special bootable optical disc or USB drive that contains a complete operating system environment and can run directly without being installed on the hard drive.

[0033] Serial Over LAN (SOL) is a mechanism for redirecting serial I / O in a system through an IP-based Intelligent Platform Management Interface (IPMI) session. Specifically, SOL redirects the serial output of a server to the network through the IPMI protocol, and the startup process, operating system installation interface, system logs, etc. of the server can be viewed and controlled through a network connection.

[0034] IPMI is a standardized hardware management interface designed to provide remote management and monitoring functions for server system hardware, allowing system administrators to remotely manage servers through the network and perform management and monitoring even when the operating system is unavailable.

[0035] Out-of-Band Network refers to a dedicated network used to manage and monitor servers, which is independent of the server's main business network. The out-of-band network communicates through the server's baseboard management controller (BMC) or other dedicated management interfaces (such as integrated remote management iLO, Dell Remote Access Controller DRAC, etc.), allowing administrators to perform remote management and monitoring without interfering with the main business network.

[0036] BMC is a management chip or controller designed specifically for hardware devices such as servers, and is a core component in the IPMI architecture. It runs independently of the server's main processor, Basic Input Output System (BIOS) and operating system, and can monitor, manage and control the server's hardware status even when the server system fails or the operating system fails to work properly.

[0037] BIOS is a set of programs fixed on a read-only memory (ROM) chip on the computer motherboard. It stores the computer's most important basic input and output programs, system settings, self-test programs after power-on, and system self-starting programs.

[0038] In-Band Network refers to a network that is managed and monitored through the server's operating system and network interface. It relies on the normal operation of the server's operating system and performs management operations through the server's primary network interface.

[0039] The Keyboard Video Mouse (KVM) function provides a virtual keyboard, video, and mouse interface through the BMC, allowing administrators to remotely access the server console.

[0040] Optical Character Recognition (OCR) is a technology that converts text in an image into an editable and searchable text format.

[0041] The idea of ​​pre-training is to first train a task to obtain a set of model parameters, then use this set of model parameters to initialize the network model parameters, and then use the initialized network model to train other tasks to obtain models suitable for other tasks.

[0042] Fine-tuning refers to performing small-scale training on the basis of a pre-trained model for specific task objectives (downstream tasks) and task data (downstream data), achieving minor adjustments to the parameters of the pre-trained model, and ultimately obtaining a model adapted to specific tasks and data.

[0043] Combined with the specific application environment architecture or specific hardware architecture on which the execution of the method for obtaining in-band data of the server depends, the specific application environment architecture or specific hardware architecture is described herein.

[0044] Server: As the target device for obtaining in-band data, the number is at least one. The server runs various operating systems and application programs, and the in-band data exists in the internal systems and applications of the server.

[0045] Baseboard Management Controller (BMC): An important component of the server, with out-of-band network capabilities. Through the out-of-band network, the BMC can operate independently of the server's main operating system to achieve remote management and monitoring of the server. It is responsible for connecting and managing at least one server, providing basic connection and management functions for subsequent operations.

[0046] Pre-built bootable optical disc system: This is a bootable system made according to the selected in-band data type. It needs to have the ability to be mounted on the server and started, and be able to run on the server and capture screenshots. The system contains specific drivers and tools to ensure compatibility with the server's hardware and operating system.

[0047] Storage device: Used to store data such as the image file of the pre-built bootable optical disc system and the screenshots of the server. The storage device needs to have sufficient capacity and read / write speed to support data storage and transmission.

[0048] Pre-trained Optical Character Recognition (OCR) model: Runs on a device or platform with a certain computing power, such as a server, workstation, etc. The model is trained and converges based on sample pictures simulating terminal command outputs, and is used to perform text recognition on the input screenshots, converting the text information in the images into processable text data.

[0049] Network connection: Includes out-of-band network and possible in-band network connections. The out-of-band network is used for communication between the BMC and external management devices to achieve the management and control of the server; while the in-band network is used for data transmission within the server and between the server and other related devices. The network connection needs to have a certain stability and bandwidth to ensure reliable data transmission.

[0050] Management terminal: A device for user operation and management, such as a Personal Computer (PC) or a workstation. The user interacts with the BMC through the management terminal, selects in-band data types, starts the prefabricated bootable optical disc system, etc., and views the finally obtained in-band data.

[0051] In summary, the method for obtaining in-band data of this server depends on a specific application environment architecture and hardware architecture composed of a server, BMC, prefabricated bootable optical disc system, storage device, computing device running the OCR model, network connection, and management terminal. Each part works together to achieve the acquisition of in-band data of the server.

[0052] In the field of server technology, to ensure that the server has good security, stability, and performance after being put into production use, it is extremely crucial to carry out a series of comprehensive and detailed configuration operations before its use. These configuration operations cover multiple aspects such as hardware settings, operating system installation, security policy configuration, and network connection settings. In-band data contains detailed information such as the server's hardware status, system configuration, and network connection. Before performing the above configuration operations, if the administrator can obtain and analyze the in-band data, potential problems can be detected in advance, and then the configuration can be optimized accordingly, effectively improving the reliability and performance of the server.

[0053] At present, the industry has developed various solutions for obtaining in-band data. One is to use the Serial Over LAN (SOL) technology, which allows managers to interact with the in-band environment of the device through the out-of-band network, execute relevant commands in this environment, and obtain the output results. However, the SOL technology has obvious limitations. On the one hand, it depends on the server's support for IPMIv2.0 and complex preliminary settings, including enabling IPMI over LAN in the BMC settings of the server, enabling serial console redirection in UEFI / BIOS, and ensuring that the serial port parameters are set correctly. Any problem in any link may cause SOL to malfunction. On the other hand, SOL itself does not directly support script execution, and it is unable to handle some complex in-band data acquisition requirements, and there is also room for improvement in data transmission efficiency. Especially when facing a large amount of data transmission, delays or even freezes are likely to occur.

[0054] Second, create a Live CD, use ipmitool to send commands to trigger the mounting of the Live CD, then restart the server to boot from the mounted Live CD or USB drive and execute the script, and finally output the in-band information to the screen. However, this solution also has many drawbacks. The process of creating a Live CD is cumbersome, requiring a lot of time and effort, and has high technical requirements for operators. The Live CD itself is mainly used to start and run a temporary operating system environment and usually does not directly support transferring files to the out-of-band environment, greatly limiting the further processing and sharing of data. In addition, restarting the server is required every time in-band information is obtained, which not only increases the wear and tear of the server hardware but may also affect other related services running, reducing the availability of the server. More prominently, both of the above solutions can only be executed by the operation and maintenance personnel one device at a time, and the in-band information of the server is manually recorded, unable to batch process server information, with extremely high time and labor costs, and it is difficult to meet the automation requirements of large-scale server cluster management.

[0055] To solve all or part of the above-mentioned technical problems, embodiments of the present application provide a method for obtaining in-band data of a server. Combining with the execution process of the method for obtaining in-band data of the server, the method will be described in detail.

[0056] As Figure 1 shown, Figure 1 FIG. is a schematic flowchart of a method for obtaining in-band data of a server provided by an embodiment of the present application. The method mainly includes the following steps S101 to S104:

[0057] S101. Through the out-of-band network function of the baseboard management controller, connect and manage at least one server.

[0058] Among them, management means that after successfully connecting at least one server, the administrator can comprehensively manage at least one server, including remotely turning on and off the machine, restarting the server; monitoring the hardware status of the server, such as the temperature of the central processing unit (CPU), the rotation speed of the fan, the power supply voltage, etc.; remotely configuring BIOS parameters; performing system installation and maintenance operations on the server; obtaining in-band data such as the system log and hardware status information of the server to timely discover and solve potential problems.

[0059] In some embodiments, the present application provides an interactive page to support selecting, viewing, and managing servers.

[0060] The above steps only use the out-of-band network to execute operations on at least one server through the Intelligent Platform Management Interface (IPMI) protocol, without affecting the normal operation of the server, and can ensure the stability and security of the main business network of the server.

[0061] S102. Mount the prefabricated bootable optical disc system to at least one server and start the prefabricated bootable optical disc system on at least one server to obtain screenshots of at least one server.

[0062] In some embodiments, a collection information selection page is displayed to support the user in selecting the required in-band data type on the page; in response to the user's selection input of the in-band data type on the collection information selection page, a collection information script is generated, and the collection information script includes terminal commands for instructing at least one server to display in-band data in a preset form. Then, the collection information script is added to the startup script of the bootable optical disc system to obtain the prefabricated bootable optical disc system, so as to ensure that the collection information script can be automatically executed when the prefabricated bootable optical disc system is started. The production of the prefabricated Live CD is completed.

[0063] The collection information script is automatically generated according to the in-band data type selected by the user on the collection information selection page.

[0064] The in-band data is the hardware information of the target server, and the in-band data types include but are not limited to: hardware information, performance data, and log information.

[0065] Among them, the hardware information includes: basic device information, CPU information, Graphics Processing Unit (GPU) information, network adapter information, power supply information, fan information, Disk Array Controller Card (RAID card) information, physical disk information, logical disk information, and other peripheral device information, etc.

[0066] The performance data includes: CPU performance data, memory performance data, Input / Output (IO) performance data, disk performance data, etc.

[0067] The log information includes: system log, Self-Monitoring, Analysis and Reporting Technology (SMART) log, RAID log, BMC log, and other information.

[0068] Exemplarily, the collection information selection page is as Figure 2As shown, for example, if the user selects the device basic information and CPU information in the collection of hardware information, the initial collection script adds commands such as the dmidecode command for reading and parsing the Desktop Management Interface (DMI) information of the system, and the lscpu command for displaying CPU-related information; if the user selects the disk performance data in the collection of performance data, the initial collection script adds commands such as the iostat command for monitoring the system input / output devices and CPU usage.

[0069] Based on the different output characteristics of different types of in-band data, when the user selects different types of in-band data, the corresponding server will have different types of outputs, and the output types can be divided into three categories: A, B, and C. Among them, the data volume of category A is huge, the text is dense, and it fills the entire screen. For example, the dmidecode command, the disk usage command for displaying the disk space size occupied by a specified file or directory, etc. The data volume of category B is medium or small, the output does not paginate, the alphanumeric characters are scattered, and there are special characters. For example, the lscpu command, the free command for viewing the usage of system memory, the vmstat command for providing the usage of virtual memory, the top command for real-time displaying the resource occupancy of each process in the system, etc. The data volume of category C is moderately large, the output may paginate, there are special characters, and it is displayed in a table, such as the lspci command for listing all Peripheral Component Interconnect (PCI) devices in the system, the netstat command for displaying the network status, the lsblk command for listing all block devices in the system, etc.

[0070] This application guides the server to display in different preset forms according to different types of outputs. According to the type of in-band data selected by the user, a terminal command is generated to instruct at least one server to display the selected in-band data in a preset form, this terminal command is added to the collection information script, and then the collection information script is uploaded to the startup script of the Live CD to obtain a prefabricated Live CD.

[0071] Optionally, for type A output, the terminal command instructs to perform sharding processing first, then add a preset string at a preset position in the shard, and then format it to obtain the final output.

[0072] Specifically, such as Figure 3As shown, first, slice the Class A output to obtain multiple slices. Among them, the characters of each slice are ASCII binary. A carriage return and line feed character are added every preset first number of characters (such as 25 characters), and a preset second number of space characters (such as 10 space characters) are added before each line as a leading indent. When slicing, an interval string is added every time the cumulative output reaches a preset third number of characters (1000 characters) (counting 25 characters per line, that is, 40 lines), and the current page display is maintained for a preset first time (such as 5 seconds). When the preset first time ends, a screen clearing operation is performed, and then an interval string is added again. The slices are separated by "STILL" to indicate that the content has not been completely output.

[0073] For the first slice, a start string such as "XXX_FUNCTION_START" is added at the beginning to clarify that the output is data information about "XXX", and an interval string such as "STILL" is added at the end; for the middle slices, an interval string is added at the end; for the last slice, an end string such as "XXX_END_FUNCTION" is added to clarify that all information related to "XXX" has been output.

[0074] As Figure 4 shown, through slicing the Class A output, a carriage return and line feed character are added every 25 characters and 10 space characters are added as a leading indent, making the data presented in a more neat and standardized format, avoiding the problem of corner recognition. This formatting process helps to quickly locate and identify key information in the data, reducing the difficulty of information extraction. When slicing, an interval string is added, and "STILL" is used to indicate that the content has not been completely output. At the same time, a start string is added at the beginning of the first slice, an end string is added at the end of the last slice, and an interval string is added to the middle slices. This method ensures the integrity and logic of the data during transmission and display. The subsequent pre-trained OCR model can clearly understand the segmentation of the data and whether all of it has been output, avoiding data loss or confusion.

[0075] Optionally, for the Class B output, due to its sparse data volume and non-paging characteristics, the terminal command instructs to first perform a screen clearing operation, output a start string such as "XXX_FUNCTION_START", and maintain the continuous display of the start string for a preset second time (such as 5 seconds). When the preset second time ends, the Class B output content is output, and then the continuous display of the Class B output content is maintained for a preset second time (such as five seconds). After the preset second time ends, an end string such as "XXX_END_FUNCTION" is output.

[0076] Class B makes full use of its data characteristics by first clearing the screen, displaying the start string, displaying the data content, and then displaying the end string, clearly showing the data information in a concise manner. Defining the use of the start string and the end string, as well as specific display time control, makes the start and end boundaries of the data clear, enabling the subsequent pre-trained OCR model to intuitively understand the scope and content of the data, improving the readability and comprehensibility of the data.

[0077] Optionally, for Class C output, the terminal command instructs to first perform a screen clearing operation, output a start string such as "XXX_FUNCTION_START", and keep the start string continuously displayed for a preset third time (such as 5 seconds). When the preset third time ends, the Class C output content is sliced, and the slices are separated by an interval string such as "STILL". Each slice is continuously displayed for the preset third time. An end string such as "XXX_END_FUNCTION" is added to the last slice.

[0078] The Class C output, through the settings of slicing, interval string, and end string, ensures the integrity and orderliness of the data, enabling the subsequent pre-trained OCR model to accurately grasp the structure and content of the data.

[0079] In the above embodiments, in various output processes, by setting the display time and screen clearing operation, sufficient time is provided for taking screenshots, avoiding the situation where data scrolls or is overwritten quickly and information cannot be obtained in time. The use of the start string and the end string facilitates the subsequent pre-trained OCR model to quickly distinguish and locate specific data information when processing various types of data, improving the efficiency and accuracy of data processing.

[0080] In some embodiments, when performing step S102, first mount and start a prefabricated Live CD on at least one server through the out-of-band network function, and then obtain the power status and system logs of at least one server, so as to determine whether the server has started based on the power status and system logs of at least one server. In the case of at least one service starting, take screenshots of at least one server at a preset frequency.

[0081] In the process of mounting and starting a prefabricated Live CD on at least one server through the out-of-band network function, use the IPMI protocol to mount the prefabricated Live CD on at least one server through the out-of-band network and start at least one server. Ensure that the collection script is automatically executed when the server starts. This automated mechanism improves the efficiency and reliability of the collection task.

[0082] In the process of obtaining the power status and system logs of at least one server, use commands to view the power status and system logs of at least one server to determine whether at least one server is started. Exemplarily, the commands for viewing the power status and system logs of at least one server are as follows:

[0083]

[0084] The first command is to use the ipmitool tool to connect to the IP address <BMC_IP> of the specified baseboard management controller (BMC) through the lanplus interface method, using the given username <username>and password <password>Authenticate and then query and obtain the power status of the server. The second command is to use the ipmitool tool to connect to the IP address <BMC_IP> of the target Baseboard Management Controller (BMC) in lanplus interface mode, relying on the provided username <username>and password <password>Complete the authentication, and then list all the entry information in the system event log (SEL) of the server. By monitoring the power status and system log of the server in real time, it is possible to confirm in a timely manner whether the server has been successfully started and smoothly entered the acquisition state. This real-time status monitoring mechanism effectively ensures that the acquisition task can be carried out at an appropriate time and greatly improves the accuracy of the acquired data.

[0085] When at least one server is started, take screenshots of at least one server at a preset frequency. Among them, the preset frequency can be once every 3 seconds. The screen images can be named according to a preset naming format, which indicates a certain task, a certain function, a certain target device BMC IP, and a timestamp, such as "TASKID_XXX_BMC IP_TIME".

[0086] Specifically, when at least one service is started, obtain the screen images currently displayed on at least one server through the keyboard, display, and mouse KVM screenshot function of the baseboard management controller (BMC) of at least one server. In the case where the server cannot be operated on-site, the user can remotely view the server screen content through the KVM screenshot, so as to intuitively understand the in-band data of the server after OCR recognition.

[0087] S103: Input the screenshots of at least one server into a pre-trained optical character recognition model to obtain the text information output by the pre-trained optical character recognition model.

[0088] Among them, the pre-trained optical character recognition (OCR) model converges based on the sample pictures output by the simulated terminal commands. The terminal commands support modification and can generate diverse sample pictures. Training the OCR model with the sample pictures output by the simulated terminal commands can make the OCR model better adapt to the specific format and content of the in-band data of the server. When processing screenshots, it can more accurately recognize the text information therein. The font of the sample pictures can be a unified monospace font, which makes it easier for the model to capture the characteristic patterns of the characters, understand the context of the characters during the learning process, converge to a better recognition performance faster, and thus improve the recognition accuracy.

[0089] The batch screen images received from at least one server contain a large number of special characters, have no natural language semantics, and have a unified font and font size.

[0090] In some embodiments, first, in the order of the timestamps of the screenshots, it is identified whether the screenshots contain a preset string, where the preset string includes a start string, an interval string located at the beginning or the end, and an end string; then the screenshots that do not contain the preset string are deleted, and the screenshots that contain the preset string are used as the input of the preset OCR model. Furthermore, valid screenshots are accurately screened out and used as the input data of the pre-trained OCR model, thereby effectively ensuring the high purity and effectiveness of the model input data.

[0091] In the process of deleting the screenshots that do not contain the preset string, the following situations are involved: when the screenshot contains the start string, other screenshots with timestamps less than that of the screenshot are deleted, and a start identifier is added to the screenshot that contains the start string. When the screenshot contains an interval string located at the beginning or the end, the screenshot is retained. When the screenshot contains the end string, other screenshots with timestamps greater than that of the screenshot are deleted, and an end identifier is added to the screenshot that contains the end string, so that the screenshots from the start identifier to the end identifier are used as the input of the pre-trained OCR model. It can be understood that screenshots whose beginning is neither the start string nor the interval string, and whose end is neither the interval string nor the end string are deleted, and such screenshots are invalid.

[0092] Specifically, when the text information corresponding to the screen image contains the preset string, the pre-trained OCR model outputs an instruction corresponding to the preset string. For example, when "FNCTION_START” is included in the screen image, a marking instruction is output, which is used to indicate adding a start identifier to the screen image and deleting other screenshots with timestamps less than that of the screenshot. When the screenshot contains an interval string located at the beginning or the end, the screenshot is retained. When "END_FUNCTION” is included in the screen image, a stop instruction is output, which is used to indicate stopping the screenshot and deleting other screenshots with timestamps greater than that of the screenshot.

[0093] In some embodiments, when the screenshot contains an interval string located at the beginning or the end, it is further checked whether the content of this screenshot is different from that of the previous screenshot, where the previous screenshot refers to the adjacent screenshot with a timestamp less than that of this screenshot. If the content of this screenshot is the same as that of the previous screenshot, this screenshot is deleted; if the content of this screenshot is different from that of the previous screenshot, this screenshot is retained. Thereby, screenshots with duplicate content are deleted, reducing the subsequent processing volume of redundant data, improving the overall efficiency of data processing, and saving processing time and computing resources. Retaining screenshots with differences can avoid being interfered by a large number of repeated images and obtain valuable information more quickly.

[0094] After the screening of the screenshots is completed, multiple screenshots from the start identifier to the end identifier are input into the pre-trained OCR model. The pre-trained OCR model sequentially identifies them according to the time stamp order to obtain the text information of each screenshot. When the start identifier is recognized, prepare to store the subsequent content.

[0095] As Figure 5 shown, Figure 5 The pseudo-code for screening valid screenshots and OCR is shown. It means that first, two empty sets are created: the "invalidFiles" set is used to store the screenshots determined to be invalid information, and the "validFiles" set is used to store the valid screenshots after screening. Then, the OCR recognition operation is looped to perform text recognition on multiple screenshots (pic_i), and the recognized text information is stored in the variable "content". According to the content of the variable "content", it is processed in different cases. In the first case, if the variable "content" contains the start string "FUNCTION_START", then after deleting the start string "FUNCTION_START" from it, add it to the "validFiles" set after marking it with the start identifier. In the second case, if the variable "content" starts with the interval string "STILL" and ends with the interval string "STILL", then check whether the content corresponding to the variable "content" is different from that of the previous screenshot. If it is different, then delete the interval string "STILL" from the variable "content" and then add it to the "validFiles" set. This is to avoid adding the same information repeatedly and ensure the accuracy of the valid information. In the third case, if the variable "content" contains the end string "FUNCTION_END", then delete the string "FUNCTION_END" from the variable "content", add it to the "validFiles" set after marking it with the end identifier, and stop taking screenshots, indicating that the complete in-band data of the server has been collected and there is no need to continue taking screenshots. If the variable "content" does not meet any of the above conditions, then add the screenshot (pic_i) corresponding to the variable "content" to the "invalidFiles" set, and then empty the "invalidFiles" set to clean up the invalid information and release the memory space. Furthermore, use the valid screenshots stored in the "validFiles" set as the input of the pre-trained OCR model to enable the pre-trained OCR model to recognize the screenshots marked with the start identifier to the end identifier to obtain the corresponding text information.

[0096] S104. In the case of recognizing the target information, output the in-band data of at least one server on the interaction page.

[0097] In some embodiments, the target information is an end identifier. When performing step S104, character restoration and splicing are performed on the text information corresponding to the screenshot from the start identifier to the end identifier output by the pre-trained OCR model to obtain the in-band data of at least one server.

[0098] Exemplarily, as Figure 5 shown, the "validFiles" set is returned. At this time, the valid data after screening is stored in this set. Restore the ASCII data in the "validFiles" set to character form and splice these characters together to finally obtain the complete in-band data output of the server.

[0099] In the above embodiments, the text information in the screenshot is recognized by OCR technology, the valid information segments are screened out, the invalid information is removed, and finally the valid binary ASII data is restored to characters and spliced to obtain the complete in-band data of the server.

[0100] In summary, the method for obtaining the in-band data of the server provided by this application can connect and manage at least one server simultaneously by means of the out-of-band network function of the baseboard management controller. Compared with the traditional operation and maintenance personnel operating one by one, this method breaks through the limitation of single operation, can centrally manage a large number of servers, and lays a foundation for subsequent batch data processing. For example, in a cluster with hundreds of servers, the operation and maintenance personnel can establish connections with many servers at one time through the baseboard management controller, greatly improving the management efficiency.

[0101] In this application, a prefabricated bootable optical disc system is made according to the in-band data type selected by the user and mounted on multiple servers. The system is started on each server to obtain screenshots. This method gets rid of the cumbersome operation of manually obtaining screen information one by one, can batch collect the visualization data of the servers, and provides a unified and large amount of original materials for subsequent data processing. Taking a data center as an example, only one prefabricated bootable optical disc system that meets the requirements of a specific in-band data type needs to be made, and it can be quickly mounted and screenshot on many servers.

[0102] In this application, the optical character recognition model automatically processes data: A large number of obtained screenshots are input into a pre-trained optical character recognition model trained and converged based on sample pictures output by simulation terminal commands, and the text information in the pictures is automatically extracted. There is no need for manual recognition and recording of the text content on the screen, which greatly improves the data processing speed and accuracy, and can batch process these screenshot data. For example, in the face of hundreds or thousands of server screenshots, the model can complete the extraction of text information in a short time, far beyond what manual recording can do.

[0103] In this application, the system can automatically determine whether the extracted text information contains the target information. If it does, the in-band data of the corresponding server will be output. This automated process does not require manual intervention for screening, which meets the requirements of automated management of large-scale server clusters and can efficiently and accurately obtain the required in-band data. In a large-scale server cluster, it can quickly locate and output the in-band data of the server containing specific target information, greatly improving the efficiency and automation degree of data acquisition.

[0104] 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 method.

[0105] The embodiment of this application also provides a device for obtaining in-band data of a server, as Figure 6 shown. The device includes:

[0106] An interaction module 601, configured to connect and manage at least one server through the out-of-band network function of the baseboard management controller;

[0107] A collection module 602, configured to mount a prefabricated bootable disc system to at least one server and start the prefabricated bootable disc system on at least one server to obtain screenshots of at least one server; wherein, the prefabricated bootable disc system is made according to the type of in-band data selected by the user;

[0108] An identification module 603, configured to input the screenshots of at least one server into a pre-trained optical character recognition model to obtain the text information output by the pre-trained optical character recognition model; wherein, the pre-trained optical character recognition model converges based on the sample pictures output by the simulated terminal commands;

[0109] The interaction module 601 is further configured to output the in-band data of at least one server on the interaction page when the text information contains the target information.

[0110] As Figure 7 As shown in the figure, the above-mentioned in-band data acquisition device of the server breaks through the limitation of single-server operation by traditional operation and maintenance personnel through the out-of-band network function of the baseboard management controller in the interaction module. It can connect and manage multiple servers simultaneously to achieve centralized control. A prefabricated bootable optical disc system is made, mounted and started to batch obtain screenshots of the servers by the acquisition module, getting rid of the cumbersome process of manually obtaining screenshots one by one. The recognition module uses an optical character recognition model trained based on sample pictures of simulated terminal command outputs to automatically extract the text information of the screenshots, avoiding manual recording. The system can also automatically screen the text containing the target information and output the in-band data of the corresponding server. It comprehensively solves the problems of the related technology relying on single-server operation and manual recording, being unable to process data in batches, and being difficult to meet the requirements of automated management of large-scale server clusters. It realizes the efficient automation of in-band data acquisition for large-scale server clusters.

[0111] As an alternative implementation provided by an embodiment of the present application, after the interaction module 601 connects and manages at least one server through the out-of-band network function of the baseboard management controller BMC, and before mounting the prefabricated bootable optical disc system to at least one server and starting the prefabricated bootable optical disc system on at least one server to obtain screenshots of at least one server, it is further used for: displaying a collection information selection page; in response to the user's selection input of the in-band data type on the collection information selection page, generating a collection information script, where the collection information script includes terminal commands for instructing at least one server to display the selected in-band data in a preset format; adding the collection information script to the startup script of the bootable optical disc system to obtain the prefabricated bootable optical disc system.

[0112] As an alternative implementation provided by an embodiment of the present application, the acquisition module 602 is specifically used for: mounting and starting the prefabricated bootable optical disc system on at least one server through the out-of-band network function; obtaining the power status and system logs of at least one server; judging whether at least one server is started according to the power status and system logs; and collecting screenshots of at least one server at a preset frequency when at least one server is started.

[0113] As an alternative implementation provided by an embodiment of the present application, after the recognition module 603 mounts the prefabricated bootable optical disc system to at least one server and starts the prefabricated bootable optical disc system on at least one server to obtain screenshots of at least one server, and before inputting the screenshots of at least one server into the pre-trained optical character recognition model to obtain the text information output by the pre-trained optical character recognition model, it is further configured to: identify whether the screenshots contain a preset string in the order of the timestamps of the screenshots; wherein the preset string includes a start string, an interval string at the beginning or end, and an end string; delete the screenshots that do not contain the preset string, and use the screenshots that contain the preset string as the input of the pre-trained optical character recognition model.

[0114] As an alternative implementation provided by an embodiment of the present application, the recognition module 603 deletes the screenshots that do not contain the preset string and uses the screenshots that contain the preset string as the input of the pre-trained optical character recognition model. Specifically, it is configured to: when the screenshot contains the start string, delete the other screenshots with timestamps less than that of the screenshot, and add a start identifier to the screenshot that contains the start string; when the screenshot contains an interval string at the beginning or end, retain the screenshot; when the screenshot contains the end string, delete the other screenshots with timestamps greater than that of the screenshot, and add an end identifier to the screenshot that contains the end string, so as to use the screenshots from the start identifier to the end identifier as the input of the pre-trained optical character recognition model.

[0115] As an alternative implementation provided by an embodiment of the present application, when the screenshot contains an interval string at the beginning or end, the recognition module 603 retains the screenshot. Specifically, it is configured to: when the screenshot contains an interval string at the beginning or end, check whether the content of the screenshot is different from that of the previous screenshot, and the previous screenshot is the adjacent screenshot with a timestamp less than that of the screenshot; if the content of the screenshot is different from that of the previous screenshot, retain the screenshot.

[0116] As an alternative implementation provided by an embodiment of the present application, the target information is the end identifier. When the text information contains the target information, the interaction module 601 outputs the in-band data of at least one server on the interaction page. Specifically, it is configured to: perform character restoration and splicing on the text information corresponding to the screenshots from the start identifier to the end identifier to obtain the in-band data of at least one server.

[0117] For the description of the features in the embodiment corresponding to the device for obtaining the in-band data of the server, reference can be made to the relevant description in the embodiment corresponding to the method for obtaining the in-band data of the server, which will not be elaborated here one by one.

[0118] An embodiment of the present application further provides an electronic device, such as Figure 8 shown, including a memory 802 and a processor 801. A computer program is stored in the memory 802, and the processor 801 is configured to run the computer program to execute the steps in any of the above embodiments of the method for obtaining in-band data of a server.

[0119] 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 embodiments of the method for obtaining in-band data of a server when running.

[0120] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media that can store computer programs such as USB flash drives, read-only memories (ROM), random access memories (RAM), mobile hard disks, magnetic disks, or optical discs.

[0121] An embodiment of the present application further provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the method for obtaining in-band data of a server.

[0122] 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, it implements the steps in any of the above embodiments of the method for obtaining in-band data of a server.

[0123] Those skilled in the art can 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 the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to their 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. Skilled professionals 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 the present application.

[0124] The above has introduced in detail a method, apparatus, device, and storage medium for obtaining in-band data of a server. Specific examples are used in this article 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.< / password> < / username> < / password> < / username>

Claims

1. A method for obtaining in-band data of a server, characterized in that, Including: Connecting and managing at least one server through the out-of-band network function of the baseboard management controller; Mounting a prefabricated bootable optical disc system to the at least one server and starting the prefabricated bootable optical disc system on the at least one server to obtain a screenshot of the at least one server; wherein, the prefabricated bootable optical disc system is made according to the in-band data type selected by the user; Inputting the screenshot of the at least one server into a pre-trained optical character recognition model to obtain the text information output by the pre-trained optical character recognition model; wherein, the pre-trained optical character recognition model is trained and converged based on the sample pictures output by the simulated terminal commands; When the target information is included in the text information, outputting the in-band data of the at least one server on the interactive page.

2. The method according to claim 1, characterized in that, After connecting and managing at least one server through the out-of-band network function of the baseboard management controller and before mounting the prefabricated bootable optical disc system to the at least one server and starting the prefabricated bootable optical disc system on the at least one server to obtain a screenshot of the at least one server, the method further includes: Displaying a collection information selection page; Responding to the user's selection input of the in-band data type on the collection information selection page, generating a collection information script, and the collection information script includes terminal commands for instructing the at least one server to display the selected in-band data in a preset form; Adding the collection information script to the startup script of the bootable optical disc system to obtain the prefabricated bootable optical disc system.

3. The method according to claim 1, characterized in that The step of mounting the prefabricated bootable optical disc system to the at least one server and starting the prefabricated bootable optical disc system on the at least one server to obtain a screenshot of the at least one server includes: Mounting and starting the prefabricated bootable optical disc system on the at least one server through the out-of-band network function; Obtaining the power status and system log of the at least one server; Judging whether the at least one server starts according to the power status and the system log; When the at least one server starts, collecting screenshots of the at least one server at a preset frequency.

4. The method according to claim 1, characterized in that, After mounting the prefabricated bootable optical disc system to the at least one server and starting the prefabricated bootable optical disc system on the at least one server to obtain a screenshot of the at least one server and before inputting the screenshot of the at least one server into a pre-trained optical character recognition model to obtain the text information output by the pre-trained optical character recognition model, the method further includes: Identifying whether the screenshot contains a preset string according to the timestamp order of the screenshot; wherein, the preset string includes a start string, an interval string located at the beginning or end, and an end string; Deleting the screenshots that do not contain the preset string and using the screenshots that contain the preset string as the input of the pre-trained optical character recognition model.

5. The method according to claim 4, characterized in that Deleting screenshots that do not contain the preset string and using the screenshots that contain the preset string as the input to the pre-trained optical character recognition model includes: When the screenshot contains the start string, deleting other screenshots with a timestamp less than that of the screenshot and adding a start identifier to the screenshot that contains the start string; When the screenshot contains the spacer string at the beginning or end, keeping the screenshot; When the screenshot contains the end string, deleting other screenshots with a timestamp greater than that of the screenshot and adding an end identifier to the screenshot that contains the end string, so as to use the screenshots from the start identifier to the end identifier as the input to the pre-trained optical character recognition model.

6. The method according to claim 5, wherein The step of keeping the screenshot when the screenshot contains the spacer string at the beginning or end includes: When the screenshot contains the spacer string at the beginning or end, checking whether the content of the screenshot is different from that of the previous screenshot, where the previous screenshot is an adjacent screenshot with a timestamp less than that of the screenshot; If the content of the screenshot is different from that of the previous screenshot, keeping the screenshot.

7. The method according to claim 5, characterized in that When the target information is the end identifier and the text information contains the target information, outputting the in-band data of the at least one server on the interactive page includes: Performing character restoration and splicing on the text information corresponding to the screenshots from the start identifier to the end identifier to obtain the in-band data of the at least one server.

8. An apparatus for obtaining in-band data of a server, characterized in that It includes: An interaction module for connecting and managing at least one server through the out-of-band network function of the baseboard management controller; An acquisition module for mounting a prefabricated bootable disc system to the at least one server and starting the prefabricated bootable disc system on the at least one server to obtain screenshots of the at least one server; wherein, the prefabricated bootable disc system is made according to the in-band data type selected by the user; An identification module for inputting the screenshots of the at least one server into a pre-trained optical character recognition model to obtain the text information output by the pre-trained optical character recognition model; wherein, the pre-trained optical character recognition model is trained and converged based on the sample pictures output by the simulated terminal commands; The interaction module is further configured to output the in-band data of the at least one server on the interactive page when the text information contains the target information.

9. An electronic device, characterized in that, It includes: A memory for storing a computer program; A processor for implementing the steps of the method for obtaining the in-band data of the server according to any one of claims 1 to 7 when executing the computer program.

10. 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 method for obtaining the in-band data of the server according to any one of claims 1 to 7 when executed by a processor.

Citation Information

Cited By

  • Optical character recognition system and method

    CN121459365A