Data transmission method, device, equipment and medium
By reversibly encrypting in-band data and generating a visual encoding pattern, and using the baseboard management controller to intercept and decode it, the data transmission problem that the BMC out-of-band interface does not support is solved, achieving efficient in-band and out-of-band data transmission and the universality of management software.
Patent Information
- Application Number
- CN202411748838.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-30
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-11-30
AI Technical Summary
In the existing technology, the out-of-band interface of BMC does not support some practical functions, such as board upgrades and hard drive erasure, resulting in low data transmission rate and lack of universality, making it impossible to achieve effective in-band and out-of-band data transmission without connecting the server's in-band network.
The target data is encrypted using a pre-set reversible encryption algorithm to generate a visual coded pattern (such as a QR code), which is then printed onto the display interface of the target device. The baseboard management controller then captures and decodes the coded pattern to obtain the target data.
It improves the efficiency and versatility of in-band and out-of-band data transmission without relying on in-band networks, solves the problems of low data transmission rate and lack of versatility, and enhances the applicability of management software.
Smart Images

Figure CN119402286A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data communication technology, and in particular to a data transmission method, device, equipment and medium. Background Art
[0002] BMC (Baseboard Management Controller) is usually integrated on the server motherboard and is used to monitor and manage the status and health of the server hardware. It has its own processor, memory and storage and can run independently of the server's main processor. The main functions of BMC include monitoring the system's power supply, temperature, fan speed, etc., and restarting the system when a failure occurs. Currently, managing servers through an out-of-band network is a common management method in the industry, but due to the hardware capabilities of BMC, some more practical functions such as board upgrades, stress testing, and hard disk erasure cannot be fully met by BMC. If management is performed by mounting images, data communication problems will inevitably occur.
[0003] At present, in order to solve this problem, the shared area in the server baseboard management controller can be used to communicate by dividing the shared area of the BMC into blocks, allowing in-band and out-band data interaction, so that the in-band data can be communicated with the out-band through the shared area. However, the data transmission rate is low and it is more dependent on the writing speed of the shared area. However, the shared area can only write 50 characters at most at a time. For longer data, the writing is relatively slow, and it depends on the specific BMC version of the specific model. It is not universal. If the shared area cannot be identified, it cannot be used.
[0004] It can be seen that how to transmit in-band data to an out-of-band network without opening up the in-band network of the server is a problem that needs to be solved by those skilled in the art. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a data transmission method, apparatus, device and medium, which can solve the problem that the out-of-band management software cannot manage the device when the out-of-band interface of the baseboard management controller does not support it.
[0006] In order to solve the above technical problems, in a first aspect, an embodiment of the present invention provides a data transmission method, including:
[0007] Determine the corresponding target in-band data to be transmitted according to the configuration information of the target device, and encrypt the target in-band data by a preset reversible encryption algorithm to obtain the encrypted target data;
[0008] Generate a visual coding pattern carrying the target data through a preset coding pattern generation program;
[0009] The visual coding pattern is printed to the preset display interface of the target device, so that the out-of-band management software corresponding to the target device can intercept the visual coding pattern on the preset display interface through the baseboard management controller, decode the visual coding pattern to obtain the target data, and decrypt the target data to obtain the target in-band data in the target device.
[0010] In some embodiments, determining corresponding target in-band data to be transmitted according to configuration information of the target device includes:
[0011] Acquire configuration parameters of the target device, and configure corresponding configuration items of the target device according to the configuration parameters;
[0012] The configuration information of the configured configuration item is read, and the corresponding target in-band data to be transmitted is determined according to the configuration information.
[0013] In some embodiments, determining the corresponding target in-band data to be transmitted according to the configuration information includes:
[0014] The configuration information of each of the configuration items is verified according to the configuration parameters to generate a corresponding initial verification string, and the initial verification string is determined as the target in-band data to be transmitted.
[0015] In some embodiments, encrypting the target in-band data by using a preset reversible encryption algorithm to obtain encrypted target data includes:
[0016] Determine the spaces in the target in-band data, and replace the spaces with preset characters to obtain corresponding preprocessed data;
[0017] The pre-processed data is encrypted using the preset reversible encryption algorithm to obtain the encrypted target data.
[0018] In some embodiments, encrypting the preprocessed data by using the preset reversible encryption algorithm to obtain the encrypted target data includes:
[0019] Determining the length of a string of the preprocessed data, and determining a first encryption parameter according to the length of the string;
[0020] Randomly generate a second encryption parameter for the preprocessed data based on a preset parameter generation range;
[0021] Encoding the preprocessed data according to a preset encoding format to generate a corresponding encoded character string;
[0022] adding the second encryption parameter to the encoded character string based on the first encryption parameter to obtain a first target character string;
[0023] Adding the first encryption parameter and the second encryption parameter to the header of the first target character string to generate a corresponding second target character string;
[0024] A hash value of the second target string is determined, and a corresponding check code is generated according to the hash value, and the check code is added to the end of the second target string to obtain the encrypted target data.
[0025] In some embodiments, the generating of the visual coding pattern carrying the target data by a preset coding pattern generating program includes:
[0026] Preprocessing the characters in the encrypted target data by the preset coding pattern generation program;
[0027] Based on the preset visual coding pattern library, the corresponding visual coding pattern is generated in a preset command line according to the preprocessed target data.
[0028] In some embodiments, the printing of the visual coding pattern to a preset display interface of the target device so that the out-of-band management software corresponding to the target device intercepts the visual coding pattern on the preset display interface through a baseboard management controller, decodes the visual coding pattern to obtain the target data, and decrypts the target data to obtain the target in-band data in the target device, including:
[0029] The visual coding pattern is printed to the preset display interface of the target device, so that the out-of-band management software calls the baseboard management controller through the collector to intercept the visual coding pattern on the preset display interface, decodes the visual coding pattern through the decoding function in the preset coding pattern decoding program, and determines the second target string and the verification code in the target data obtained after decoding, and after verifying the target data according to the hash value of the second target string and the verification code, decrypts the second target string to obtain the target in-band data.
[0030] In a second aspect, the present invention discloses a data transmission device, comprising:
[0031] A data encryption module is used to determine the corresponding target in-band data to be transmitted according to the configuration information of the target device, and encrypt the target in-band data by a preset reversible encryption algorithm to obtain the encrypted target data;
[0032] A pattern generation module, used to generate a visual coding pattern carrying the target data through a preset coding pattern generation program;
[0033] A pattern display module is used to print the visual coding pattern to a preset display interface of the target device, so that the out-of-band management software corresponding to the target device can intercept the visual coding pattern on the preset display interface through a baseboard management controller, decode the visual coding pattern to obtain the target data, and decrypt the target data to obtain the target in-band data in the target device.
[0034] In a third aspect, the present invention discloses an electronic device, comprising:
[0035] Memory for storing computer programs;
[0036] A processor is used to execute the computer program to implement the steps of the aforementioned data transmission method.
[0037] In a fourth aspect, the present invention discloses a computer-readable storage medium having a computer program stored thereon, and the computer program implements the steps of the aforementioned data transmission method when executed by a processor.
[0038] It can be seen that the present invention can determine the corresponding target in-band data to be transmitted according to the configuration information of the target device, and encrypt the target in-band data through a preset reversible encryption algorithm to obtain the encrypted target data, and then generate a visual coding pattern carrying the target data through a preset coding pattern generation program, and print the visual coding pattern to the preset display interface of the target device, so that the out-of-band management software corresponding to the target device can intercept the visual coding pattern on the preset display interface through the baseboard management controller, and decode the visual coding pattern to obtain the target data, and decrypt the target data to obtain the target in-band data in the target device.
[0039] It can be seen from the above technical scheme that the present invention can obtain in-band data through the baseboard management controller through the out-of-band management software. Specifically, the data to be transmitted by the in-band system can be encrypted by a reversible algorithm, and the generated coding pattern can be printed to the display interface of the target device through a preset coding pattern generation program. In this way, the management software host computer can intercept the printed coding pattern through the baseboard management controller and parse and decrypt it, thereby completing the purpose of transmitting the in-band data without directly connecting to the management software. At the same time, the present invention is suitable for various scenarios in which in-band data is transmitted through an out-of-band network, which can effectively improve the transmission efficiency of in-band and out-of-band data, and help to improve the versatility of management software. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 A flow chart of a data transmission method provided by an embodiment of the present invention;
[0042] Figure 2 A schematic diagram of in-band and out-band data transmission provided by an embodiment of the present invention;
[0043] Figure 3 A two-dimensional code generation flow chart provided in an embodiment of the present invention;
[0044] Figure 4 A schematic diagram of a specific QR code before encryption provided by an embodiment of the present invention;
[0045] Figure 5 A two-dimensional code analysis flow chart provided by an embodiment of the present invention;
[0046] Figure 6 A specific data transmission method flow chart provided by an embodiment of the present invention;
[0047] Figure 7 A schematic diagram of a specific encrypted QR code provided by an embodiment of the present invention;
[0048] Figure 8 A schematic diagram of the structure of a data transmission device provided by an embodiment of the present invention;
[0049] Fig. 9 A structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.
[0052] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0053] At present, when managing a server through an out-of-band network, due to the limitation of the hardware capabilities of the BMC, some functions of the BMC cannot be fully satisfied. In this case, the shared area in the server baseboard management controller can be used for communication, thereby allowing in-band and out-of-band data interaction. However, the data transmission rate is low and it is not universal. The present invention can obtain in-band data through the baseboard management controller through out-of-band management software, achieve the purpose of transmitting in-band data without direct connection with the management software, and can effectively improve the transmission efficiency and universality of in-band and out-of-band data transmission.
[0054] See also Figure 1 As shown, an embodiment of the present invention discloses a data transmission method, the method comprising:
[0055] Step S11: determining corresponding target in-band data to be transmitted according to the configuration information of the target device, and encrypting the target in-band data by a preset reversible encryption algorithm to obtain encrypted target data.
[0056] It is understandable that the management software can only connect to the servers to be managed through the out-of-band management network. However, in some special configurations, the memory operating system LiveCD (Live Compact Disc, self-starting CD) is used, and the configuration verification data needs to be pulled to the management software side to analyze whether the configuration is legal. Figure 2 As shown, for the server to be managed by the out-of-band management software, it includes a configured base operating system (LiveCD), and in order to support the transmission of data, this embodiment implants a Client in the LiveCD, which is specifically used to process the data, specifically, to obtain the configuration parameters of the target device, and configure the corresponding configuration items of the target device according to the configuration parameters, and then read the configuration information of the configured configuration items, and determine the corresponding target in-band data to be transmitted according to the configuration information. For example, Figure 3As shown, firstly, the server is configured according to the parameters passed in, and after the configuration is completed, the configuration items of the server are read, and the existing data is verified according to the parameters passed in by the configuration to obtain the target in-band data to be transmitted, that is, to verify the original string A. That is to say, in this embodiment, when determining the corresponding target in-band data to be transmitted according to the configuration information, the configuration information of each configuration item can be verified according to the configuration parameters to generate a corresponding initial verification string, and the initial verification string is determined as the target in-band data to be transmitted. At the same time, it should be pointed out that in this embodiment, the data transmission process needs to be encrypted to prevent data leakage. Therefore, the original string A can be pre-processed according to the encryption program, the spaces therein are replaced, and the string A is encrypted to obtain the encrypted reversible string B as the target in-band data to be transmitted.
[0057] Step S12: Generate a visual coding pattern carrying the target data through a preset coding pattern generation program.
[0058] In this embodiment, a visual coding pattern carrying target data can be generated according to the target data through a preset coding pattern generation program. Specifically, the characters in the encrypted target data can be preprocessed by the preset coding pattern generation program, and a corresponding visual coding pattern can be generated in a preset command line according to the preprocessed target data based on a preset visual coding pattern library. In a specific embodiment, the above-mentioned visual coding pattern can be a QR code (Quick Response Code). Figure 2 As shown, in this embodiment, according to the QR code generation program, the string B can be converted into a QR code C and C can be directly printed into the KVM (Keyboard Video Mouse). It can be understood that the above-mentioned QR code C can arbitrarily include a check code to ensure the consistency of the text during the transmission process.
[0059] And in this embodiment, if Figure 2 As shown in the figure, in order to transmit data through QR code, it is necessary to design a QR code generation program on the Client side and a decoding program on the Collector side. On the Client side, you can install the qrencode QR code library by default in the LiveCD, and then write the lscode code custom command to pre-process the input string, process special characters such as spaces, and then call the system command to directly generate the following in the command line: Figure 4 As shown in the QR code, in this way, the corresponding QR code can be generated based on the target in-band data to be transmitted for transmission, and a small batch of system data can be transmitted to the out-of-band network without opening the server in-band network.
[0060] Step S13: Print the visual coding pattern to the preset display interface of the target device, so that the out-of-band management software corresponding to the target device can intercept the visual coding pattern on the preset display interface through the baseboard management controller, decode the visual coding pattern to obtain the target data, and decrypt the target data to obtain the target in-band data in the target device.
[0061] In this embodiment, the visual coding pattern generated in the previous step can be printed to the preset display interface of the target device, so that the out-of-band management software corresponding to the target device can intercept the visual coding pattern on the preset display interface through the baseboard management controller, decode the visual coding pattern to obtain the target data, and decrypt the target data to obtain the target in-band data in the target device. Figure 5 As shown, the out-of-band management software is used to collect data executed on each managed server, and in the management software system, the program specifically used to collect and parse data is referred to as Collector in this article. Collector can call the screenshot function of BMC to obtain the QR code C printed on the screen by the Client, and then decrypt the QR code to obtain the string B contained therein, and verify the integrity of B to determine whether to allow the next step. If it is determined that there is no problem with the integrity of string B, B is decrypted to obtain the original string A, so as to determine the progress and completion degree of the current configuration in the server based on the original string A. It should also be pointed out that when the out-of-band management software parses the QR code on the Collector side, it can specifically integrate the google.zxing package, and then obtain the QR code image of the Client through the KVM screenshot function of BMC, so as to input the obtained QR code into the decoding function shown below to obtain the text stored therein:
[0062] public static String decodeQRCode(File qrCodeimage) throwsIOException, NotFoundException {
[0063] BufferedImage bufferedImage = ImageIO.read(qrCodeimage);
[0064] BufferedImageLuminanceSource source = newBufferedImageLuminanceSource(bufferedImage);
[0065] BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
[0066] Result result = new MultiFormatReader().decode(bitmap);
[0067] return result.getText();
[0068] }.
[0069] And if Figure 3 , Figure 5 As shown, in this embodiment, each process in the above steps has added a corresponding failure retry mechanism, such as configuration execution, text preprocessing and encryption, QR code decoding and other processes. If there is a step that fails to execute, it can continue to execute according to the corresponding failure retry mechanism.
[0070] In this embodiment, the corresponding target in-band data to be transmitted can be determined according to the configuration information of the target device, and the target in-band data is encrypted by a preset reversible encryption algorithm to obtain the encrypted target data, and then a visual coding pattern carrying the target data is generated by a preset coding pattern generation program, and the visual coding pattern is printed to the preset display interface of the target device, so that the out-of-band management software corresponding to the target device can intercept the visual coding pattern on the preset display interface through the baseboard management controller, and decode the visual coding pattern to obtain the target data, and decrypt the target data to obtain the target in-band data in the target device. Through the above technical scheme, this embodiment can encrypt the text to be transmitted by the in-band system through a reversible algorithm, and then print the QR code directly to KVM in the shell through a QR code generation program, and the management software host computer intercepts the printed QR code through the KVM screenshot function of the BMC and parses and decodes it, thereby completing the purpose of transmitting the in-band data without direct connection, and allowing the upper-layer application to manage the server in an in-band manner by relying on a pure management network without relying on the in-band network. That is to say, this embodiment solves the problems of universality and transmission speed of data transmission within and outside the band. Compared with data transmission by shared area interaction, the universal function of BMC capturing KVM screen is used to solve the problem of universality of transmission, and the method of QR code generation and reading is used to solve the problem of low data reading rate.
[0071] Based on the previous embodiment, it can be known that the present invention can obtain in-band data through the baseboard management controller through the out-of-band management software. Next, this embodiment will describe in detail the process of encrypting in-band data and decrypting the encrypted data after the out-of-band management software obtains it. Figure 6 As shown, an embodiment of the present invention discloses a specific data transmission method, which includes:
[0072] Step S21: determining corresponding target in-band data to be transmitted according to the configuration information of the target device, and encrypting the target in-band data by a preset reversible encryption algorithm to obtain encrypted target data.
[0073] In this embodiment, when the target in-band data is encrypted by a preset reversible encryption algorithm to obtain the encrypted target data, based on the previous embodiment, it can be known that the input string needs to be preprocessed first to process special characters such as spaces. Therefore, the spaces in the target in-band data can be first determined, and the spaces can be replaced by preset characters to obtain the corresponding preprocessed data, and then the preprocessed data can be encrypted by the preset reversible encryption algorithm to obtain the encrypted target data. Specifically, the string length of the preprocessed data can be determined, and the first encryption parameter can be determined according to the string length, and then the second encryption parameter of the preprocessed data can be randomly generated based on the preset parameter generation range, and the preprocessed data can be encoded according to the preset encoding format to generate the corresponding encoded string, and then the second encryption parameter can be added to the encoded string based on the first encryption parameter to obtain the first target string, and the first encryption parameter and the second encryption parameter can be added to the header of the first target string to generate the corresponding second target string, and the hash value of the second target string can be determined, and after the corresponding check code is generated according to the hash value, the check code is added to the tail of the second target string to obtain the encrypted target data.
[0074] In a specific embodiment, Figure 4 When the QR code used to indicate a successful server upgrade is encrypted, the original string p is obtained as follows:
[0075] p=Upgrade_Successfully;
[0076] First, calculate the length of the original string p and divide it by 8 to determine whether the remainder is an even number. For example, the length is l=20 and the remainder is r=4. Then take a random integer n, which can be in the range of [1, f], where f is a preset value. For example, n=5 can be taken this time. Then convert p to base64 data and get b=VXBncmFkZV9TdWNjZXNzZnVsbHk=. Next, for b, add 1 n(5) every r(4) bits. The transformed string is y:
[0077] VXBn5cmFkZ5V9TdW5NjZXN5zZnVs5bHk=;
[0078] Then add r(4) and n(5) to the front of the string to get z:
[0079] 45VXBn5cmFkZ5V9TdW5NjZXN5zZnVs5bHk=;
[0080] In order to ensure successful parsing after the QR code is read, a verification code needs to be generated for z. The specific method is to calculate the md5 value of the z string, take the last 8 bits to get MD5(z)=ebe2a793, and concatenate it to the last 8 bits of z to get q:
[0081] 45VXBn5cmFkZ5V9TdW5NjZXN5zZnVs5bHk=ebe2a793.
[0082] Then you can write q into the QR code and get Figure 7 The encrypted QR code shown. It can be understood that the above embodiment adopts the method of intercepting the md5 value of the string for verification. In this embodiment, when verifying the string, the specific implementation method is not limited. Any verification algorithm with similar effects can be used. For example, the CRC (Cyclic Redundancy Check) method can also be used to implement the verification before and after the string transmission. And it should be pointed out that since the out-of-band management software in this embodiment can correspond to several servers, after the out-of-band management software determines the corresponding managed server, different in-band data encryption algorithms and corresponding encrypted in-band data verification methods can be assigned to it according to different server identifiers. In this way, when the out-of-band management software obtains the in-band data corresponding to different servers, the corresponding encryption algorithm and verification method can be determined according to the identifiers carried by the out-of-band management software. After parsing the QR codes of different servers, the corresponding verification and decryption operations are performed, so that when the data of a single server is leaked, it will not affect the data transmitted by other servers, further improving the security of in-band and out-of-band data transmission.
[0083] Step S22: Generate a visual coding pattern carrying the target data through a preset coding pattern generation program.
[0084] Step S23: Print the visual coding pattern to the preset display interface of the target device, so that the out-of-band management software can call the baseboard management controller through the collector to intercept the visual coding pattern on the preset display interface, decode the visual coding pattern through the decoding function in the preset coding pattern decoding program, and determine the second target string and the verification code in the target data obtained after decoding, and after verifying the target data according to the hash value of the second target string and the verification code, decrypt the second target string to obtain the target in-band data.
[0085] In this embodiment, based on the two-dimensional code encryption process of the above steps, after this embodiment prints the visual coding pattern to the preset display interface of the target device, the out-of-band management software can call the baseboard management controller through the collector to intercept the visual coding pattern on the preset display interface, and decode the visual coding pattern through the decoding function in the preset coding pattern decoding program, and then determine the second target string and the verification code in the target data obtained after decoding, and after verifying the target data according to the hash value and the verification code of the second target string, decrypt the second target string to obtain the target in-band data. For example, use the built-in method of zxing to decode the screenshot QR code and get the original string q=45VXBn5cmFkZ5V9TdW5NjZXN5zZnVs5bHk=ebe2a793, then intercept the string from the last 8 bits of q, divide q into z and the last 8 bits of the string m, and calculate the last 8 bits of md5(z) to determine whether it is consistent with the string m. If not, this indicates that data is lost during the transmission of the QR code, or the screenshot is incomplete, so it is discarded and reported as a failure; if consistent, retain z=45VXBn5cmFkZ5V9TdW5NjZXN5zZnVs5bHk=. Then take the first digit 4 and the second digit 5 of z, which means removing one 5 every 4 digits, and get y=VXBncmFkZV9TdWNjZXNzZnVsbHk=, and reverse the base64 of y to the original string x=Upgrade_Successfully.
[0086] In this way, since the execution progress and results of the Client need to be displayed on the screen, in order to prevent process data leakage, this embodiment can encrypt the data in the QR code to prevent it from being scanned and read by irrelevant personnel. Specifically, the original data can be encrypted through a matching reversible encryption algorithm to form a QR code. In this way, through the encryption and decryption of the original string and the legality verification design, it can be ensured that there are no errors in the process of QR code generation and decoding, which can effectively eliminate the risk of information leakage, ensure data consistency and confidentiality, and ensure that the transmitted data can be parsed normally.
[0087] For a more specific processing procedure of the above step S22, reference may be made to the corresponding contents disclosed in the above embodiments, which will not be described in detail here.
[0088] Through the above technical solution, in this embodiment, before the in-band data is written into the QR code, the string can be encrypted by the above string reversible encryption algorithm and the algorithm for legitimacy verification, and the string can be decrypted after reading the QR code. Specifically, the string can be directly generated into a QR code in the shell and an algorithm for decoding the QR code image to read the string therein can be matched. In this way, because BMC intercepting KVM screenshots is a standard function of general servers and has universality, this embodiment can pre-process the incoming string and directly generate a QR code in the shell through the QR code custom generation program lscode, so that the Collector side can read the screenshot QR code and read out the data contained therein, thereby improving the universality of in-band and out-of-band data transmission. In other words, this embodiment is suitable for most scenarios where in-band data is transmitted through an out-of-band network. It can be directly used in many scenarios in the field of server management software, and can be applied to most functions of mounting LiveCD for configuration, which can effectively improve the efficiency of in-band and out-of-band data transmission and improve the universality of management software.
[0089] See also Figure 8 As shown, an embodiment of the present invention discloses a data transmission device, the device comprising:
[0090] The data encryption module 11 is used to determine the corresponding target in-band data to be transmitted according to the configuration information of the target device, and encrypt the target in-band data by a preset reversible encryption algorithm to obtain the encrypted target data;
[0091] A pattern generating module 12, configured to generate a visual coding pattern carrying the target data through a preset coding pattern generating program;
[0092] The pattern display module 13 is used to print the visual coding pattern to the preset display interface of the target device, so that the out-of-band management software corresponding to the target device can intercept the visual coding pattern on the preset display interface through the baseboard management controller, decode the visual coding pattern to obtain the target data, and decrypt the target data to obtain the target in-band data in the target device.
[0093] Since the embodiments of the device part correspond to the above embodiments, please refer to the description of the embodiments of the method part for the embodiments of the device part, and will not be repeated here.
[0094] It can be seen that the present embodiment can determine the corresponding target in-band data to be transmitted according to the configuration information of the target device, and encrypt the target in-band data through a preset reversible encryption algorithm to obtain the encrypted target data, and then generate a visual coding pattern carrying the target data through a preset coding pattern generation program, and print the visual coding pattern to the preset display interface of the target device, so that the out-of-band management software corresponding to the target device can intercept the visual coding pattern on the preset display interface through the baseboard management controller, and decode the visual coding pattern to obtain the target data, and decrypt the target data to obtain the target in-band data in the target device. In this way, the data to be transmitted by the in-band system can be encrypted through a reversible algorithm, and the generated coding pattern can be printed to the display interface of the target device through a preset coding pattern generation program. In this way, the management software host computer can intercept the printed coding pattern through the baseboard management controller, parse and decrypt it, and complete the purpose of transmitting the in-band data without directly connecting to the management software. It is possible to realize the exchange of large text data between the management software and the server in-band system without relying on the in-band network and without increasing the hardware cost. Based on the above embodiments, after actual testing, the overall process is stable and reliable, simple to use, convenient and fast, with a high success rate. The server management software can manage the server in an in-band manner through the out-of-band network even when the BMC out-of-band interface does not support it, thereby greatly improving the capabilities of the server management software.
[0095] Furthermore, an embodiment of the present invention also discloses an electronic device, Fig. 9 It is a structural diagram of an electronic device according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of the present invention. The electronic device may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the data transmission method disclosed in any of the aforementioned embodiments. In addition, the electronic device in this embodiment may specifically be an electronic computer.
[0096] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present invention, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0097] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0098] The operating system 221 is used to manage and control various hardware devices on the electronic device and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the data transmission method performed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0099] Furthermore, the present invention also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed data transmission method. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.
[0100] Furthermore, an embodiment of the present application also discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the data transmission method disclosed in any of the aforementioned embodiments.
[0101] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0102] 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 composition and steps of each example have been generally described in the above description according to function. 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 to be beyond the scope of the present invention.
[0103] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0104] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0105] The technical solution provided by the present invention is introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A data transmission method, characterized in that: include: Determine the corresponding target in-band data to be transmitted according to the configuration information of the target device, and encrypt the target in-band data by a preset reversible encryption algorithm to obtain the encrypted target data; Generate a visual coding pattern carrying the target data through a preset coding pattern generation program; The visual coding pattern is printed to the preset display interface of the target device, so that the out-of-band management software corresponding to the target device can intercept the visual coding pattern on the preset display interface through the baseboard management controller, decode the visual coding pattern to obtain the target data, and decrypt the target data to obtain the target in-band data in the target device.
2. The data transmission method according to claim 1, characterized in that: The determining corresponding target in-band data to be transmitted according to the configuration information of the target device includes: Acquire configuration parameters of the target device, and configure corresponding configuration items of the target device according to the configuration parameters; The configuration information of the configured configuration item is read, and the corresponding target in-band data to be transmitted is determined according to the configuration information.
3. The data transmission method according to claim 2, characterized in that: The determining, according to the configuration information, the corresponding target in-band data to be transmitted includes: The configuration information of each of the configuration items is verified according to the configuration parameters to generate a corresponding initial verification string, and the initial verification string is determined as the target in-band data to be transmitted.
4. The data transmission method according to any one of claims 1 to 3, characterized in that: The step of encrypting the target in-band data by using a preset reversible encryption algorithm to obtain encrypted target data includes: Determine the spaces in the target in-band data, and replace the spaces with preset characters to obtain corresponding preprocessed data; The pre-processed data is encrypted using the preset reversible encryption algorithm to obtain the encrypted target data.
5. The data transmission method according to claim 4, characterized in that: The step of encrypting the preprocessed data by using the preset reversible encryption algorithm to obtain the encrypted target data includes: Determining the length of a string of the preprocessed data, and determining a first encryption parameter according to the length of the string; Randomly generate a second encryption parameter for the preprocessed data based on a preset parameter generation range; Encoding the preprocessed data according to a preset encoding format to generate a corresponding encoded character string; adding the second encryption parameter to the encoded character string based on the first encryption parameter to obtain a first target character string; Adding the first encryption parameter and the second encryption parameter to the header of the first target character string to generate a corresponding second target character string; A hash value of the second target string is determined, and a corresponding check code is generated according to the hash value, and the check code is added to the end of the second target string to obtain the encrypted target data.
6. The data transmission method according to claim 5, characterized in that: The generating of the visual coding pattern carrying the target data by a preset coding pattern generating program includes: Preprocessing the characters in the encrypted target data by the preset coding pattern generation program; Based on the preset visual coding pattern library, the corresponding visual coding pattern is generated in a preset command line according to the preprocessed target data.
7. The data transmission method according to claim 5, characterized in that: Printing the visual coding pattern to a preset display interface of the target device so that the out-of-band management software corresponding to the target device intercepts the visual coding pattern on the preset display interface through a baseboard management controller, decodes the visual coding pattern to obtain the target data, and decrypts the target data to obtain the target in-band data in the target device, including: The visual coding pattern is printed to the preset display interface of the target device, so that the out-of-band management software calls the baseboard management controller through the collector to intercept the visual coding pattern on the preset display interface, decodes the visual coding pattern through the decoding function in the preset coding pattern decoding program, and determines the second target string and the verification code in the target data obtained after decoding, and after verifying the target data according to the hash value of the second target string and the verification code, decrypts the second target string to obtain the target in-band data.
8. A data transmission device, characterized in that: include: A data encryption module is used to determine the corresponding target in-band data to be transmitted according to the configuration information of the target device, and encrypt the target in-band data by a preset reversible encryption algorithm to obtain the encrypted target data; A pattern generation module, used to generate a visual coding pattern carrying the target data through a preset coding pattern generation program; A pattern display module is used to print the visual coding pattern to a preset display interface of the target device, so that the out-of-band management software corresponding to the target device can intercept the visual coding pattern on the preset display interface through a baseboard management controller, decode the visual coding pattern to obtain the target data, and decrypt the target data to obtain the target in-band data in the target device.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the data transmission method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
A method for symmetric asynchronous generative encryption
CA3167530A1
Intranet-extranet physical isolation high-safety data exchange method based on two-dimensional code
CN108270792A
Data transmission method, out-of-band controller and electronic equipment
CN115905066A
Data transmission method and device of intelligent network card, equipment and storage medium
CN116633521A
Server management method and device, equipment and storage medium
CN116860440A
Cited By
Server in-band and out-band interaction method, device and equipment and storage medium
CN120492277A
A server band internal and external interaction method, device, equipment and storage medium
CN120492277B