A server band internal and external interaction method, device, equipment and storage medium

By generating the target operating system image file and using QR code information recognition, the server's internal and external interaction processes are optimized, solving the problems of unstable baseboard management controller and low image and text recognition accuracy, and achieving an efficient and stable interaction method.

CN120492277BActive Publication Date: 2025-09-23INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510969879.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-15
Publication Date
2025-09-23
Estimated Expiration
2045-07-15

AI Technical Summary

Technical Problem

The existing server internal and external interaction method easily leads to instability of the baseboard management controller, low image and text recognition accuracy, and poor fault tolerance.

Method used

By generating the target operating system image file, controlling the target server to perform in-band and out-of-band interaction tasks, and using QR code information for identification, the interaction process is optimized by combining the baseboard management controller's operation and maintenance capabilities with QR code recognition technology.

Benefits of technology

It simplifies the out-of-band and in-band interaction modes of the server, improves interaction efficiency and fault tolerance, and ensures the accuracy and stability of recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120492277B_ABST
    Figure CN120492277B_ABST
Patent Text Reader

Abstract

The present application discloses a server in-band and out-band interaction method, apparatus, equipment and storage medium, relating to the field of computer technology, including generating a target operating system image file according to an in-band operation and maintenance program, a preset operating system image template and file resources required for executing the server in-band and out-band interaction task; after controlling the target server to execute the server in-band and out-band interaction task by running the target operating system image file, the target server generates QR code information based on the operation and maintenance log obtained by executing the server in-band and out-band interaction task; intercepting the QR code information output by the target server and identifying the QR code information, thereby realizing the server in-band and out-band interaction, solving the technical problems of easily causing instability of the baseboard management controller, the inability to guarantee the accuracy of image and text recognition, and poor fault tolerance, achieving the technical effect of simplifying the server in-band and out-band interaction mode, improving the efficiency of in-band and out-band interaction and improving the fault tolerance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a server in-band and out-band interaction method, apparatus, device, and storage medium. Background Art

[0002] Server operation and maintenance covers a wide range of areas, including hardware management, firmware maintenance, and status monitoring. Most of these operations can be completed through out-of-band management, but system-level operations such as board upgrades, stress testing, and hard drive erasure require in-band management.

[0003] When in-band interaction via the network layer interface is unavailable, two common methods for server in-band and out-of-band interaction exist: one is to implement in-band and out-of-band interaction through the Baseboard Management Controller (BMC) shared area. The other is for in-band applications to print operation logs to the system terminal. The out-of-band management platform then obtains video screenshots from the BMC and uses image and text recognition technology to retrieve the operation logs from the images. However, frequent reading and writing to the BMC shared area can easily lead to BMC instability. Due to the low resolution of BMC video screenshots, the accuracy of image and text recognition cannot be guaranteed, resulting in poor fault tolerance. Summary of the Invention

[0004] The present application provides a server internal and external interaction method, device, equipment and storage medium to at least solve the problems in the related art that easily lead to instability of the baseboard management controller, the accuracy of image and text recognition cannot be guaranteed, and the fault tolerance is poor.

[0005] This application provides a server in-band and out-band interaction method, including:

[0006] Obtain in-band operation and maintenance programs, preset operating system image templates, and file resources required to perform in-band and out-of-band server interaction tasks;

[0007] Generate a target operating system image file according to the in-band operation and maintenance program, the preset operating system image template and the file resources;

[0008] Sending the target operating system image file to a target server, and controlling the target server to execute the server in-band and out-band interaction tasks by running the target operating system image file;

[0009] Intercept the QR code information output by the target server and identify the QR code information to complete the server in-band and out-band interaction; wherein, the QR code information is the QR code information generated by the target server based on the operation and maintenance log obtained by executing the server in-band and out-band interaction task.

[0010] The present application also provides a server with internal and external interaction device, including:

[0011] The data acquisition module is used to obtain in-band operation and maintenance programs, preset operating system image templates, and file resources required to perform in-band and out-of-band interaction tasks on the server;

[0012] An image file generation module, configured to generate a target operating system image file according to the in-band operation and maintenance program, the preset operating system image template, and the file resources;

[0013] A task execution module, configured to send the target operating system image file to a target server, and control the target server to execute the server in-band and out-of-band interaction task by running the target operating system image file;

[0014] The in-band and out-band interaction module is used to intercept the QR code information output by the target server and identify the QR code information to complete the in-band and out-band interaction of the server; wherein, the QR code information is the QR code information generated by the target server based on the operation and maintenance log obtained by executing the in-band and out-band interaction task of the server.

[0015] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned server-band internal and external interaction methods when executing the computer program.

[0016] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned server-in-band and out-band interaction methods are implemented.

[0017] Through this application, since the target operating system image file is generated according to the in-band operation and maintenance program, the preset operating system image template and the file resources required to execute the server in-band and out-band interaction tasks, after the target server is controlled to execute the server in-band and out-band interaction tasks by running the target operating system image file, the target server generates QR code information based on the operation and maintenance log obtained by executing the server in-band and out-band interaction tasks, and the QR code information output by the target server is intercepted and the QR code information is identified, thereby realizing the server in-band and out-band interaction. The ability of the commonly used baseboard management controller operation and maintenance is combined with the QR code recognition technology currently widely used in various fields to optimize the server in-band and out-band interaction solution. Therefore, it is possible to solve the technical problems that easily lead to the instability of the baseboard management controller, the accuracy of image and text recognition cannot be guaranteed, and the fault tolerance is poor, thereby simplifying the way of server in-band and out-band interaction, improving the efficiency of in-band and out-band interaction and the technical effect of fault tolerance. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0019] Figure 1 A flowchart of an implementation method of an internal and external interaction between a server and an embodiment of the present application is provided;

[0020] Figure 2 This is a flowchart of another server-band internal and external interaction method provided in an embodiment of the present application;

[0021] Figure 3 This is a structural block diagram of a server with internal and external interaction devices provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0023] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0024] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0025] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the server-band internal and external interaction method depends, the specific application environment architecture or specific hardware architecture is described herein.

[0026] The embodiments of the present application provide a server-band internal and external interaction method, and the method is described in detail in conjunction with the execution flow of the server-band internal and external interaction method.

[0027] See also Figure 1 , Figure 1This is a flowchart of an implementation of a server in-band and out-band interaction method provided in an embodiment of the present application. The method may include the following steps.

[0028] S101: Obtain an in-band operation and maintenance program, a preset operating system image template, and file resources required to execute in-band and out-of-band interaction tasks on the server.

[0029] Before performing in-band or out-of-band server interaction tasks, you need to obtain in-band maintenance programs, preset operating system image templates, and the file resources required to perform these tasks. The out-of-band management module consists of two components: the server management platform, which manages and maintains a batch of servers, and the server BMC, which is installed on each server to provide centralized management. The server management platform is used to obtain in-band maintenance programs, preset operating system image templates, and the file resources required to perform in-band or out-of-band server interaction tasks.

[0030] The server management platform can be application software developed based on JAVA language.

[0031] S102: Generate a target operating system image file according to the in-band operation and maintenance program, a preset operating system image template, and file resources.

[0032] After obtaining the in-band operation and maintenance program, the preset operating system image template and the file resources required to execute the server's in-band and out-of-band interaction tasks, the target operating system image file is generated based on the in-band operation and maintenance program, the preset operating system image template and the file resources, that is, the target operating system image file is obtained by packaging the in-band operation and maintenance program and the file resources into the preset operating system image template.

[0033] S103: Send the target operating system image file to the target server, and control the target server to execute the server in-band and out-of-band interaction task by running the target operating system image file.

[0034] After generating the target operating system image file, the target operating system image file is sent to the target server, and the target server is controlled to execute the server in-band interaction task by running the target operating system image file. If multiple servers need to execute the server in-band interaction task, the target operating system image file can be sent to each server separately, and each server is controlled to execute the server in-band interaction task by running the received target operating system image file.

[0035] S104: intercepting the QR code information output by the target server and identifying the QR code information to complete the server internal and external interaction.

[0036] The QR code information is the QR code information generated by the target server based on the operation and maintenance log obtained by executing the server's internal and external interactive tasks.

[0037] After controlling the target server to execute the server's internal and external interaction task by running the target operating system image file, the target server generates QR code information according to the operation and maintenance log obtained by executing the server's internal and external interaction task, intercepts the QR code information output by the target server, and identifies the QR code information, thereby identifying the operation and maintenance log obtained by the target server according to executing the server's internal and external interaction task, and then realizing the server's internal and external interaction.

[0038] Through this application, since the target operating system image file is generated according to the in-band operation and maintenance program, the preset operating system image template and the file resources required to execute the server in-band and out-band interaction tasks, after the target server is controlled to execute the server in-band and out-band interaction tasks by running the target operating system image file, the target server generates QR code information based on the operation and maintenance log obtained by executing the server in-band and out-band interaction tasks, and the QR code information output by the target server is intercepted and the QR code information is identified, thereby realizing the server in-band and out-band interaction. The ability of the commonly used baseboard management controller operation and maintenance is combined with the QR code recognition technology currently widely used in various fields to optimize the server in-band and out-band interaction solution. Therefore, it is possible to solve the technical problems that easily lead to the instability of the baseboard management controller, the accuracy of image and text recognition cannot be guaranteed, and the fault tolerance is poor, thereby simplifying the way of server in-band and out-band interaction, improving the efficiency of in-band and out-band interaction and the technical effect of fault tolerance.

[0039] See also Figure 2 , Figure 2 This is a flowchart of another implementation of a server-band internal and external interaction method provided in an embodiment of the present application. The method may include the following steps.

[0040] S201: Obtain an in-band operation and maintenance program, a preset operating system image template, and file resources required to execute in-band and out-of-band interaction tasks on the server.

[0041] The in-band operation and maintenance module consists of a base (i.e., a pre-set operating system image template), in-band operation and maintenance programs, and file resources. The base is typically an editable in-memory operating system, also known as LiveOS. LiveOS is typically small, typically around a few hundred megabytes, but it possesses some of the basic capabilities of a complete operating system, such as executing scripts and programs. Furthermore, it can run directly in memory without requiring installation, which is why the out-of-band management module can quickly start it when it is delivered to the server. The in-band operation and maintenance programs are typically shell or Python scripts that can be configured to automatically execute at startup by modifying the LiveOS system configuration. The script content and required file resources vary depending on the operation and maintenance operation. Once the in-band operation and maintenance module is packaged, it is delivered to each server.

[0042] S202: Generate a target operating system image file according to the in-band operation and maintenance program, a preset operating system image template, and file resources.

[0043] S203: Send the target operating system image file to the target server, and control the target server to execute the server in-band and out-of-band interaction task by running the target operating system image file.

[0044] For example, during a card upgrade, the server management platform packages the in-band maintenance program and the file resources required for the card upgrade into an in-band maintenance pedestal. The server management platform then batch-calls the BMC interface and distributes the packaged pedestals to each server using a remote media mount technique. Next, the server management platform controls the server restart through the BMC, booting the server into the distributed pedestal. The in-band maintenance program then automatically starts executing.

[0045] S204: intercepting the QR code information corresponding to each log data segment output by the target server.

[0046] Each log data segment contains a preset number of characters.

[0047] Due to the resolution limitation of the server video screenshot, it is impossible to transmit all the data of the operation and maintenance log through a QR code. Therefore, the operation and maintenance log needs to be cut into pieces and transmitted in batches. Each log data segment is pre-set to contain a preset number of characters. The target server generates a corresponding QR code information according to each log data segment, and intercepts the QR code information corresponding to each log data segment output by the target server.

[0048] It should be noted that the preset number can be set and adjusted according to actual conditions, and the embodiment of the present application does not limit this. For example, it can be set to 500.

[0049] S205: Recognize each QR code information respectively to obtain each log data segment, and merge each log data segment to complete the interaction within and outside the server band.

[0050] The QR code information is the QR code information generated by the target server based on the operation and maintenance log obtained by executing the server's internal and external interactive tasks.

[0051] After intercepting the QR code information corresponding to each log data segment output by the target server, each QR code information is identified to obtain each log data segment. These log data segments are then merged to obtain the operation and maintenance log, allowing for in-band and out-of-band interaction with the server. By segmenting the operation and maintenance log, the QR code information corresponding to each log data segment is generated. Each QR code information is then identified to obtain each log data segment, and these log data segments are merged to obtain the operation and maintenance log. This significantly improves the accuracy of the identified log data segments and the accuracy of the merged operation and maintenance log.

[0052] In a specific implementation of the present application, step S204 may include the following steps:

[0053] When the positioning light is detected to be on, the QR code information corresponding to the current log data segment output by the target server is intercepted;

[0054] Accordingly, identifying each QR code information separately to obtain each log data segment and merging each log data segment may include the following steps:

[0055] Step 1: Identify the QR code information corresponding to the current log data segment to obtain the current log data segment;

[0056] Step 2: Determine whether the operation and maintenance log recognition is complete based on the total number of log data segments stored in the data header of the current log data segment and the current number of log data segments. If so, execute step 3; if not, execute step 4.

[0057] Step 3: Merge each log data segment;

[0058] Step 4: Set the positioning light to the off state to enter the process of generating the QR code information corresponding to the next log data segment. After generating the QR code information corresponding to the next log data segment, determine the next log data segment as the new current log data segment, and return to execute the step of intercepting the QR code information corresponding to the current log data segment output by the target server when the positioning light is detected to be on.

[0059] For the convenience of description, the above steps can be combined for explanation.

[0060] A positioning light is pre-set, and its on / off status indicates whether the system is currently in the QR code generation or recognition phase. When the positioning light is on, it indicates the system is in the QR code recognition phase. The system intercepts the QR code corresponding to the current log data segment output by the target server, recognizes the QR code corresponding to the current log data segment, and obtains the current log data segment.

[0061] Each log data segment contains a data header, which stores the total number of log data segments and the current number of log data segments. After identifying the current log data segment, the total number of log data segments stored in the data header of the current log data segment and the current number of log data segments are used to determine whether the operation and maintenance log has been identified, that is, whether the current number of log data segments is equal to the total number of log data segments. If so, it means that all log data segments have been identified, and the log data segments are merged to obtain the operation and maintenance log. If not, it means that there are still unidentified log data segments, and the positioning light is set to the off state, thereby entering the process of generating the QR code information corresponding to the next log data segment. After generating the QR code information corresponding to the next log data segment, the next log data segment is determined as the new current log data segment, and the process returns to execute the step of intercepting the QR code information corresponding to the current log data segment output by the target server when the positioning light is detected to be on. By segmenting the operation and maintenance log, the QR code information corresponding to each log data segment is generated, and then by identifying each QR code information, each log data segment is obtained, and the operation and maintenance log is merged to obtain the log data segment. Significantly improves the accuracy of identified log data segments and the accuracy of merged operation and maintenance logs. By setting up positioning lights to indicate the generation and identification of each log data segment, the accuracy of identified log data segments and the accuracy of merged operation and maintenance logs are further improved.

[0062] In a specific implementation of the present application, after merging the log data segments, the method may further include the following steps:

[0063] Step 1: When data loss is detected in the merged operation and maintenance log, return to the step of intercepting the QR code information corresponding to each log data segment output by the target server;

[0064] Step 2: Compare the log data segments obtained by re-identification with the log data segments obtained by initial identification to obtain comparison results;

[0065] Step 3: Filter out the re-identified log data segments with different comparison results from the re-identified log data segments, and use the filtered re-identified log data segments to replace the corresponding log data segments obtained by the first identification;

[0066] Step 4: After the log data segments are replaced, the log data segments are merged again to obtain a merged operation and maintenance log;

[0067] Step 5: When data loss occurs in the operation and maintenance log after re-merging, perform redundancy fault tolerance processing.

[0068] For the convenience of description, the above five steps can be combined for explanation.

[0069] In daily QR code usage, if a small amount of the QR code image is unclear or missing, the information stored in the QR code can still be recognized. However, in server operation and maintenance scenarios, the amount of data required for QR code storage is relatively large, and the generation and recognition operations are more frequent. Therefore, a QR code information generation retry mechanism is set up.

[0070] After merging each log data segment, when it is detected that there is data loss in the merged operation and maintenance log, the step of intercepting the QR code information corresponding to each log data segment output by the target server is returned to execute, and each log data segment obtained by re-identification is compared with each log data segment obtained by the first identification to obtain each comparison result, and the re-identified log data segment with different comparison results is screened out from each re-identified log data segment, and the corresponding log data segment obtained by the first identification is replaced with the screened re-identified log data segment. After the replacement of the log data segment is completed, each log data segment is re-merged to obtain a re-merged operation and maintenance log. When there is data loss in the re-merged operation and maintenance log, redundant fault tolerance processing is performed. By re-generating the QR code information corresponding to each log data segment when it is determined that there is data loss in the merged operation and maintenance log, and screening out the re-identified log data segment with different comparison results from each re-identified log data segment for re-merging, the accuracy of log data segment identification is further improved, thereby improving the accuracy of the merged operation and maintenance log. If data is still missing after retrying the QR code information generation, redundant fault-tolerant processing is performed. By setting up a redundant fault-tolerant processing mechanism, the accuracy of log data segment identification is further improved, thereby improving the accuracy of the merged operation and maintenance log.

[0071] In a specific embodiment of the present application, when data loss occurs in the operation and maintenance log after re-merging, redundancy fault tolerance processing may include the following steps:

[0072] Step 1: Determine whether there is data loss in the operation and maintenance log after the re-merge. If not, proceed to step 2. If so, proceed to step 3.

[0073] Step 2: Confirm that the server has completed internal and external interaction;

[0074] Step 3: Determine whether the preset retry limit has been reached. If not, return to the step of intercepting the QR code information corresponding to each log data segment output by the target server. If so, execute step 4.

[0075] Step 4: Perform redundant fault-tolerant processing.

[0076] For the convenience of description, the above four steps can be combined for explanation.

[0077] After merging each log data segment, determine whether there is any data loss in the re-merged operation and maintenance log. If not, it means that the merged operation and maintenance log is complete, thereby confirming that the server's internal and external interaction is complete. If so, it means that the current merged operation and maintenance log is incomplete. Pre-set the upper limit of the number of retries and determine whether the preset upper limit of retries has been reached. If not, return to the step of executing the QR code information corresponding to each log data segment output by the target server. If so, perform redundant fault tolerance processing. By setting the upper limit of the number of retries, it avoids unlimited retries when there is data missing in the merged operation and maintenance log, thereby improving the efficiency of internal and external interaction of the server.

[0078] It should be noted that the number of retries can be set and adjusted according to actual conditions. This embodiment of the present application does not limit this. For example, it can be set to 3 times.

[0079] It can be set that when the positioning light is intermittently on, it indicates whether there is data loss in the operation and maintenance log after re-merging, triggering the QR code information regeneration process, thereby achieving timely reminders of abnormalities in the merged operation and maintenance log, thereby improving the efficiency of internal and external interaction of the server.

[0080] In a specific implementation of the present application, performing redundancy fault tolerance processing may include the following steps:

[0081] Step 1: Obtain each preset structured data template;

[0082] Step 2: Calculate the text similarity between the re-merged operation and maintenance log and each preset structured data template;

[0083] Step 3: Selecting a preset structured data template with the highest similarity to the re-merged operation and maintenance log from each preset structured data template based on the similarity of each text;

[0084] Step 4: Use the keywords in the preset structured data template with the highest similarity to the re-merged operation and maintenance log to intercept the valid content in the re-merged operation and maintenance log, and fill the intercepted valid content into the preset structured data template with the highest similarity to the re-merged operation and maintenance log to obtain standard structured data.

[0085] For the convenience of description, the above four steps can be combined for explanation.

[0086] Pre-set multiple structured data templates, obtain each preset structured data template, calculate the text similarity between the re-merged operation and maintenance log and each preset structured data template respectively, select the preset structured data template with the highest similarity to the re-merged operation and maintenance log from each preset structured data template according to each text similarity, use the keywords in the preset structured data template with the highest similarity to the re-merged operation and maintenance log to intercept the valid content in the re-merged operation and maintenance log, and fill the intercepted valid content into the preset structured data template with the highest similarity to the re-merged operation and maintenance log to obtain standard structured data.

[0087] In the process of in-band and out-band interactions, the operation and maintenance logs may be missing after the re-merger, but this does not mean that the data obtained through the interaction is completely wrong. Usually, the operation and maintenance logs are saved as structured data. If this structured data is missing, the overall structure will be destroyed, but most of the data will still be available. By pre-setting multiple structured data templates, using the keywords in the preset structured data template with the highest similarity to the re-merged operation and maintenance log to intercept the valid content in the re-merged operation and maintenance log, and filling the intercepted valid content into the preset structured data template with the highest similarity to the re-merged operation and maintenance log, you can get a standard structured data with some data missing but available as a whole, thereby improving the availability of the merged operation and maintenance log.

[0088] In a specific embodiment of the present application, respectively calculating the text similarity between the re-merged operation and maintenance log and each preset structured data template may include the following steps:

[0089] Step 1: Obtain the first occurrence count of each term in the re-merged operation and maintenance logs;

[0090] Step 2: Obtain the second occurrence count of each term in each preset structured data template;

[0091] Step 3: Calculate the quotient of the first number corresponding to each entry and the second number in the corresponding preset structured data template, and take the logarithm of the obtained quotient to obtain each first value;

[0092] Step 4: multiply the first data corresponding to each entry by the weight value corresponding to each entry to obtain each second value;

[0093] Step 5: Sum the second values ​​and divide the sum by the total number of entries in the corresponding preset structured data template to obtain the text similarity between the re-merged operation and maintenance log and the corresponding preset structured data template.

[0094] For the convenience of description, the above five steps can be combined for explanation.

[0095] After merging each log data segment, the first occurrence count of each term in the re-merged operation and maintenance log is obtained, and the second occurrence count of each term in each preset structured data template is obtained. The quotient of the first occurrence count corresponding to each term and the second occurrence count in the corresponding preset structured data template is calculated, and the logarithm of the obtained quotient is taken to obtain each first value. The first data corresponding to each term is multiplied by the weight value corresponding to each term to obtain each second value. The second values ​​are summed and the sum is divided by the total number of terms in the corresponding preset structured data template to obtain the text similarity between the re-merged operation and maintenance log and the corresponding preset structured data template. This improves the accuracy of the calculated text similarity between the re-merged operation and maintenance log and the corresponding preset structured data template.

[0096] The text similarity between the re-merged operation and maintenance log and the corresponding preset structured data template can be calculated using the following formula:

[0097] ;

[0098] in, 、 ,……, Indicates the number of times each entry appears in the operation and maintenance log after re-merging. 、 ,……, Indicates the number of times each term appears in the corresponding preset structured data template. 、 ,……, Indicates the weight corresponding to each term. Indicates the total number of entries in the corresponding preset structured data template. Indicates the text similarity between the re-merged operation and maintenance log and the corresponding preset structured data template.

[0099] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0100] The embodiment of the present application also provides a server with internal and external interaction device.

[0101] See also Figure 3 , Figure 3 This is a structural block diagram of a server-band internal and external interaction device provided in an embodiment of the present application. The device may include:

[0102] Data acquisition module 31, used to obtain in-band operation and maintenance programs, preset operating system image templates and file resources required to perform in-band and out-of-band interaction tasks on the server;

[0103] An image file generation module 32 is configured to generate a target operating system image file based on an in-band operation and maintenance program, a preset operating system image template, and file resources;

[0104] The task execution module 33 is used to send the target operating system image file to the target server and control the target server to execute the server in-band and out-band interactive tasks by running the target operating system image file;

[0105] The in-band and out-band interaction module 34 is used to intercept the QR code information output by the target server and identify the QR code information to complete the server in-band and out-band interaction; wherein the QR code information is the QR code information generated by the target server based on the operation and maintenance log obtained by executing the server in-band and out-band interaction task.

[0106] Through this application, since the target operating system image file is generated according to the in-band operation and maintenance program, the preset operating system image template and the file resources required to execute the server in-band and out-band interaction tasks, after the target server is controlled to execute the server in-band and out-band interaction tasks by running the target operating system image file, the target server generates QR code information based on the operation and maintenance log obtained by executing the server in-band and out-band interaction tasks, and the QR code information output by the target server is intercepted and the QR code information is identified, thereby realizing the server in-band and out-band interaction. The ability of the commonly used baseboard management controller operation and maintenance is combined with the QR code recognition technology currently widely used in various fields to optimize the server in-band and out-band interaction solution. Therefore, it is possible to solve the technical problems that easily lead to the instability of the baseboard management controller, the accuracy of image and text recognition cannot be guaranteed, and the fault tolerance is poor, thereby simplifying the way of server in-band and out-band interaction, improving the efficiency of in-band and out-band interaction and the technical effect of fault tolerance.

[0107] In a specific embodiment of the present application, the in-band and out-band interaction module 34 may include:

[0108] The QR code information interception submodule is used to intercept the QR code information corresponding to each log data segment output by the target server; wherein each log data segment contains a preset number of characters;

[0109] The log data segment merging submodule is used to identify each QR code information separately, obtain each log data segment, and merge each log data segment.

[0110] In a specific embodiment of the present application, the QR code information interception submodule is specifically a module that intercepts the QR code information corresponding to the current log data segment output by the target server when the positioning light is detected to be in the on state;

[0111] The log data segment merging submodule may include:

[0112] A QR code information recognition unit is used to recognize the QR code information corresponding to the current log data segment to obtain the current log data segment;

[0113] a judging unit, configured to judge whether the operation and maintenance log is identified based on the total number of log data segments stored in the data header of the current log data segment and the current number of log data segments;

[0114] The log data segment merging unit is used to merge the log data segments when it is determined that the operation and maintenance log is identified.

[0115] The return execution unit is used to set the positioning light to the off state when it is determined that the operation and maintenance log has not been identified, so as to enter the process of generating the QR code information corresponding to the next log data segment, and after generating the QR code information corresponding to the next log data segment, determine the next log data segment as the new current log data segment, and return to the execution step of intercepting the QR code information corresponding to the current log data segment output by the target server when it is detected that the positioning light is in the on state.

[0116] In a specific embodiment of the present application, the device may further include:

[0117] The return execution module is used to return to the step of intercepting the QR code information corresponding to each log data segment output by the target server when detecting that data loss exists in the merged operation and maintenance log after the merging of the log data segments;

[0118] A comparison result obtaining module is used to compare each log data segment obtained by re-identification with each log data segment obtained by initial identification to obtain each comparison result;

[0119] A log data segment replacement module is used to filter out the re-identified log data segments with different comparison results from the re-identified log data segments, and replace the corresponding log data segments obtained by the first identification with the filtered re-identified log data segments;

[0120] The re-merging module is used to re-merge the log data segments after the replacement of the log data segments is completed to obtain the re-merged operation and maintenance log;

[0121] The redundant fault-tolerant processing module is used to perform redundant fault-tolerant processing when data loss occurs in the operation and maintenance log after re-merging.

[0122] In a specific embodiment of the present application, the redundant fault-tolerant processing module may include:

[0123] The first judgment submodule is used to determine whether there is data loss in the operation and maintenance log after re-merging;

[0124] The interaction completion confirmation submodule is used to confirm that the server in-band and out-band interaction is completed when it is determined that there is no data loss in the operation and maintenance log after the re-merge;

[0125] The second judgment submodule is used to judge whether the preset retry limit is reached when it is determined that there is data loss in the operation and maintenance log after the re-merge;

[0126] The return execution submodule is used to return to the step of intercepting the QR code information corresponding to each log data segment output by the target server when it is determined that the preset retry limit has not been reached;

[0127] The redundant fault-tolerant processing submodule is used to perform redundant fault-tolerant processing when it is determined that the preset upper limit of the number of retries has been reached.

[0128] In a specific embodiment of the present application, the redundant fault-tolerant processing module may include:

[0129] The structured data template acquisition submodule is used to obtain each preset structured data template;

[0130] The text similarity calculation submodule is used to calculate the text similarity between the re-merged operation and maintenance log and each preset structured data template;

[0131] The structured data template selection submodule is used to select the preset structured data template with the highest similarity to the re-merged operation and maintenance log from the preset structured data templates according to the similarity of each text;

[0132] The structured data acquisition submodule is used to use the keywords in the preset structured data template with the highest similarity to the re-merged operation and maintenance log to intercept the valid content in the re-merged operation and maintenance log, and fill the intercepted valid content into the preset structured data template with the highest similarity to the re-merged operation and maintenance log to obtain standard structured data.

[0133] In a specific embodiment of the present application, the text similarity calculation submodule may include:

[0134] A first occurrence number obtaining unit is used to obtain the first occurrence number of each term in the re-merged operation and maintenance log;

[0135] A second number acquisition unit is used to respectively acquire the second number of times each entry appears in each preset structured data template;

[0136] a first value obtaining unit, configured to calculate a quotient of the first number corresponding to each entry and the second number in the corresponding preset structured data template, and take a logarithm of the obtained quotient to obtain each first value;

[0137] A second value obtaining unit is configured to obtain second values ​​by multiplying the first data corresponding to each entry by the weight value corresponding to each entry;

[0138] The text similarity obtaining unit is used to sum the second values ​​and divide the sum result by the total number of entries in the corresponding preset structured data template to obtain the text similarity between the re-merged operation and maintenance log and the corresponding preset structured data template.

[0139] For the description of the features in the embodiment corresponding to the server-band internal and external interaction device, please refer to the relevant description of the embodiment corresponding to the server-band internal and external interaction method, which will not be repeated here.

[0140] An embodiment of the present application further provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps of any of the above-mentioned server in-band and out-of-band interaction method embodiments.

[0141] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above-mentioned server in-band and out-of-band interaction method embodiments when running.

[0142] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0143] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned server in-band and out-of-band interaction method embodiments are implemented.

[0144] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of any of the above-mentioned server in-band and out-of-band interaction method embodiments.

[0145] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0146] The above is a detailed introduction to the server in-band and out-band interaction method, device, equipment and storage medium provided by this application. This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the scope of protection of this application.

Claims

1. A server-band internal and external interaction method, characterized in that: include: Obtain in-band operation and maintenance programs, preset operating system image templates, and file resources required to perform in-band and out-of-band server interaction tasks; Generate a target operating system image file according to the in-band operation and maintenance program, the preset operating system image template and the file resources; Sending the target operating system image file to a target server, and controlling the target server to execute the server in-band and out-band interaction tasks by running the target operating system image file; Intercepting the QR code information output by the target server and identifying the QR code information to complete the server in-band and out-band interaction; wherein the QR code information is the QR code information generated by the target server based on the operation and maintenance log obtained by executing the server in-band and out-band interaction task; Intercepting the QR code information output by the target server and identifying the QR code information, including: Intercepting the QR code information corresponding to each log data segment output by the target server; wherein each log data segment contains a preset number of characters; Identify each QR code information separately to obtain each log data segment, and merge each log data segment; Intercept the QR code information corresponding to each log data segment output by the target server, including: When the positioning light is detected to be on, intercepting the QR code information corresponding to the current log data segment output by the target server; Accordingly, each QR code information is identified to obtain each log data segment, and each log data segment is merged, including: Identify the QR code information corresponding to the current log data segment to obtain the current log data segment; Determining whether the operation and maintenance log is identified according to the total number of log data segments stored in the data header of the current log data segment and the current number of log data segments; If so, merge the log data segments; If not, the positioning light is set to the off state to enter the process of generating the QR code information corresponding to the next log data segment, and after generating the QR code information corresponding to the next log data segment, the next log data segment is determined as the new current log data segment, and the process returns to the step of intercepting the QR code information corresponding to the current log data segment output by the target server when the positioning light is detected to be on; After merging the log data segments, it also includes: When it is detected that there is data loss in the merged operation and maintenance log, returning to the step of intercepting the QR code information corresponding to each log data segment output by the target server; Compare the log data segments obtained by re-identification with the log data segments obtained by initial identification to obtain comparison results; Filtering out re-identified log data segments with different comparison results from the re-identified log data segments, and replacing the corresponding log data segments obtained by the first identification with the filtered re-identified log data segments; After the log data segments are replaced, the log data segments are re-merged to obtain the re-merged operation and maintenance log; When data is lost in the re-merged operation and maintenance log, the positioning light is set to light intermittently and redundant fault tolerance processing is performed; Perform redundant fault-tolerant processing, including: Get each preset structured data template; Calculating the text similarity between the re-merged operation and maintenance log and each preset structured data template respectively; Selecting, from each preset structured data template, a preset structured data template having the highest similarity to the re-merged operation and maintenance log according to the similarity of each text; The valid content in the re-merged operation and maintenance log is intercepted using the keywords in the preset structured data template with the highest similarity to the re-merged operation and maintenance log, and the intercepted valid content is filled into the preset structured data template with the highest similarity to the re-merged operation and maintenance log to obtain standard structured data.

2. The server in-band and out-band interaction method according to claim 1, characterized in that: When data loss occurs in the re-merged operation and maintenance log, redundancy fault tolerance processing is performed, including: Determine whether there is data loss in the operation and maintenance log after the re-merger; If not, it is determined that the server-band internal and external interaction is completed; If so, determine whether the preset upper limit of retries has been reached; If not, return to the step of intercepting the QR code information corresponding to each log data segment output by the target server; If so, perform redundant fault tolerance processing.

3. The server in-band and out-band interaction method according to claim 1, characterized in that: Calculating the text similarity between the re-merged operation and maintenance log and each preset structured data template respectively, including: Obtain the first occurrence number of each entry in the re-merged operation and maintenance log respectively; Obtain the second number of occurrences of each term in each preset structured data template; Calculating the quotient of the first number corresponding to each entry and the second number in the corresponding preset structured data template, and taking the logarithm of the obtained quotient to obtain each first value; Multiplying the first data corresponding to each entry by the weight value corresponding to each entry to obtain each second value; The second values ​​are summed and the summed result is divided by the total number of entries in the corresponding preset structured data template to obtain the text similarity between the re-merged operation and maintenance log and the corresponding preset structured data template.

4. A server with internal and external interaction device, characterized in that: include: The data acquisition module is used to obtain in-band operation and maintenance programs, preset operating system image templates, and file resources required to perform in-band and out-of-band interaction tasks on the server; An image file generation module, configured to generate a target operating system image file according to the in-band operation and maintenance program, the preset operating system image template, and the file resources; A task execution module, configured to send the target operating system image file to a target server, and control the target server to execute the server in-band and out-of-band interaction task by running the target operating system image file; an in-band and out-band interaction module, configured to intercept the QR code information output by the target server and identify the QR code information to complete the in-band and out-band interaction of the server; wherein the QR code information is the QR code information generated by the target server based on the operation and maintenance log obtained by executing the in-band and out-band interaction task of the server; In-band and out-band interaction modules include: The QR code information interception submodule is used to intercept the QR code information corresponding to each log data segment output by the target server; wherein each log data segment contains a preset number of characters; The log data segment merging submodule is used to identify each QR code information, obtain each log data segment, and merge each log data segment; The QR code information interception submodule is specifically a module that intercepts the QR code information corresponding to the current log data segment output by the target server when the positioning light is detected to be in the on state; The log data segment merging submodule includes: A QR code information recognition unit is used to recognize the QR code information corresponding to the current log data segment to obtain the current log data segment; a judging unit, configured to judge whether the operation and maintenance log is identified based on the total number of log data segments stored in the data header of the current log data segment and the current number of log data segments; The log data segment merging unit is used to merge the log data segments when it is determined that the operation and maintenance log is identified. Returning to the execution unit, when it is determined that the operation and maintenance log has not been recognized, setting the positioning light to the off state to enter the process of generating the QR code information corresponding to the next log data segment, and after generating the QR code information corresponding to the next log data segment, determining the next log data segment as the new current log data segment, and returning to the execution of the step of intercepting the QR code information corresponding to the current log data segment output by the target server when it is detected that the positioning light is in the on state; Also includes: The return execution module is used to return to the step of intercepting the QR code information corresponding to each log data segment output by the target server when detecting that data loss exists in the merged operation and maintenance log after the merging of the log data segments; A comparison result obtaining module is used to compare each log data segment obtained by re-identification with each log data segment obtained by initial identification to obtain each comparison result; A log data segment replacement module is used to filter out the re-identified log data segments with different comparison results from the re-identified log data segments, and replace the corresponding log data segments obtained by the first identification with the filtered re-identified log data segments; The re-merging module is used to re-merge the log data segments after the replacement of the log data segments is completed to obtain the re-merged operation and maintenance log; A redundant fault-tolerant processing module, configured to set the positioning light to light intermittently and perform redundant fault-tolerant processing when data is lost in the re-merged operation and maintenance log; The redundant fault-tolerant processing module includes: The structured data template acquisition submodule is used to obtain each preset structured data template; The text similarity calculation submodule is used to calculate the text similarity between the re-merged operation and maintenance log and each preset structured data template; The structured data template selection submodule is used to select the preset structured data template with the highest similarity to the re-merged operation and maintenance log from the preset structured data templates according to the similarity of each text; The structured data acquisition submodule is used to use the keywords in the preset structured data template with the highest similarity to the re-merged operation and maintenance log to intercept the valid content in the re-merged operation and maintenance log, and fill the intercepted valid content into the preset structured data template with the highest similarity to the re-merged operation and maintenance log to obtain standard structured data.

5. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the server in-band and out-band interaction method as claimed in any one of claims 1 to 3 when executing the computer program.

6. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the server in-band and out-band interaction method according to any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Cross-domain mirror image generation method and device, cross-domain mirror image installation method and device and electronic equipment

    CN113791796A

  • Data transmission method, device, equipment and medium

    CN119402286A