Data transmission method and device of server, electronic equipment and readable storage medium
By dividing the main core board and the sub-core board in the server and using wider bandwidth channels for data transmission, the problem of low transmission efficiency during firmware upgrade is solved, and the efficiency of firmware upgrade is improved.
Patent Information
- Application Number
- CN202310542205.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-11
- Publication Date
- 2024-11-12
AI Technical Summary
During the firmware upgrade process of existing servers, the transmission efficiency is low, which affects the firmware upgrade efficiency. It is mainly due to the bandwidth limitation of USB2.0 channels, resulting in the same serial or parallel transmission time, which cannot effectively improve the transmission speed.
Divide the core board in the server into the main core board and the sub-core board, write the upgrade firmware data to the upgrade package storage area of the main core board through the first channel, and pass through the second channel (wider bandwidth) between the sub-core board data transmission to increase the transmission rate.
By using wider bandwidth channels for data transmission, the transmission efficiency of firmware upgrade data on the core board is significantly improved, the problem of low transmission efficiency is solved, and the efficiency of firmware upgrade is improved.
Smart Images

Figure CN118945056A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of servers, and in particular to a data transmission method, device, electronic device and readable storage medium of a server. Background Art
[0002] The server includes two boards: BMC (Baseboard Management Controller) and core board. BMC is responsible for controlling and obtaining core board device information and data, and core board supports specific business functions. BMC is used to update and upgrade the server firmware version during OTA (Over-the-Air Technology) upgrade. Specifically, the firmware can be upgraded by transmitting the upgrade package to the core board (or business board), thereby realizing the update and upgrade of the server. Generally speaking, a server includes multiple core boards. At present, the upgrade package is usually written to each core board one by one through the USB2.0 channel in a serial transmission mode, or the upgrade package is written to each core board at the same time in a parallel transmission mode. However, when the size of the transmitted upgrade package is consistent and the number of core boards that need to receive the transmission package is consistent, the transmission efficiency is only related to the bandwidth of the USB2.0 channel. Therefore, in this case, whether it is serial transmission or parallel transmission, the transmission time consumed is the same. Therefore, the transmission efficiency of the current transmission method is low, which affects the efficiency of firmware upgrade. Summary of the invention
[0003] The main purpose of the present application is to provide a data transmission method, device, electronic device and readable storage medium of a server, aiming to solve the technical problem that the existing transmission method has low transmission efficiency and affects the efficiency of firmware upgrade.
[0004] To achieve the above object, the present application provides a data transmission method of a server, wherein the server includes multiple core boards, each of which is divided into a main core board and a sub-core board, and the data transmission method of the server includes:
[0005] Acquire upgrade firmware data, and write the upgrade firmware data into an upgrade package storage area of at least one of the main core boards through a first channel;
[0006] Establishing a communication connection through the main core board and the sub-core board corresponding to the main core board, so as to carry a second channel between the main core board and each of the sub-core boards as a data transmission channel, wherein one main core board corresponds to at least two sub-core boards, and the bandwidth of the first channel is less than the bandwidth of the second channel;
[0007] The upgrade firmware data is transmitted from the main core board to the upgrade package storage area of each sub-core board through the second channel.
[0008] Optionally, the step of establishing a communication connection between the main core board and a sub-core board corresponding to the main core board includes:
[0009] The enabling object of the main core board is set as the server end, and the enabling object of each sub-core board is set as the user end, so as to establish a communication connection between the main core board and the sub-core board corresponding to the main core board.
[0010] Optionally, before the step of setting the enabling object of the main core board to the server side and setting the enabling object of each sub-core board to the user side, the data transmission method of the server further includes:
[0011] Transmitting the identification information of the main core board to the sub-core board corresponding to the main core board through the first channel;
[0012] After the sub-core board receives the identification information, the steps of setting the enabling object of the main core board to the server end and setting the enabling object of each sub-core board to the user end are performed.
[0013] Optionally, before the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each sub-core board through the second channel, the data transmission method of the server further includes:
[0014] Obtaining the connection duration of establishing a communication connection between the main core board and the sub-core board corresponding to the main core board;
[0015] Determine whether the connection duration is greater than a preset duration threshold;
[0016] If so, reacquire the identification information of the main core board, and return to execute the step of transmitting the identification information of the main core board to the sub-core board corresponding to the main core board through the first channel;
[0017] If not, the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each of the sub-core boards through the second channel is performed.
[0018] Optionally, after the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each of the sub-core boards through the second channel, the data transmission method of the server further includes:
[0019] Check whether the working status of each core board is idle;
[0020] If so, each core board is triggered to retrieve the upgrade firmware data from the upgrade package storage area to perform firmware upgrade.
[0021] Optionally, before the step of verifying whether the working states of the core boards are all in an idle state, the data transmission method of the server further includes:
[0022] Acquire a first data length of the upgrade firmware data and a second data length of the upgrade firmware data received by each of the sub-core boards;
[0023] Checking whether the first data length is equal to the second data length;
[0024] If yes, then executing the step of verifying whether the working status of each core board is in an idle state;
[0025] If not, return to the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each sub-core board through the second channel.
[0026] Optionally, the server includes at least one switching chip, and before the step of obtaining the upgrade firmware data and writing the upgrade firmware data into the upgrade package storage area of at least one of the main core boards through the first channel, the data transmission method of the server further includes:
[0027] Obtain the number of switch chips and the total number of core boards in the server;
[0028] According to the number of the switching chips and the total number of core boards, a core board set corresponding to each of the switching chips is constructed;
[0029] For any of the core board sets, one core board is selected from the core board set as the main core board, and the remaining core boards in the core board set are used as sub-core boards corresponding to the main core board in the core board set.
[0030] The present application also provides a data transmission device of a server, the server comprising a plurality of core boards, each of the core boards being divided into a main core board and a sub-core board, the data transmission device of the server comprising:
[0031] An acquisition module, used for acquiring upgrade firmware data, and writing the upgrade firmware data into an upgrade package storage area of at least one of the main core boards through a first channel;
[0032] A communication module, used to establish a communication connection through the main core board and the sub-core board corresponding to the main core board, so as to carry a second channel between the main core board and each of the sub-core boards as a data transmission channel, wherein one main core board corresponds to at least two sub-core boards, and the bandwidth of the first channel is less than the bandwidth of the second channel;
[0033] A transmission module is used to transmit the upgrade firmware data from the main core board to the upgrade package storage area of each sub-core board through the second channel.
[0034] The present application also provides an electronic device, which is a physical device, and includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the steps of the data transmission method of the server as described above.
[0035] The present application also provides a readable storage medium, which is a computer-readable storage medium, on which is stored a program for implementing the data transmission method of the server, and the program for implementing the data transmission method of the server is executed by a processor to implement the steps of the data transmission method of the server as described above.
[0036] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned server data transmission method when executed by a processor.
[0037] The present application provides a data transmission method of a server, wherein the server includes multiple core boards, each of which is divided into a main core board and a sub-core board. The present application obtains upgrade firmware data, and writes the upgrade firmware data into an upgrade package storage area of at least one of the main core boards through a first channel; establishes a communication connection through the main core board and the sub-core board corresponding to the main core board, so as to carry a second channel between the main core board and each of the sub-core boards as a data transmission channel, wherein one main core board corresponds to at least two sub-core boards, and the bandwidth of the first channel is smaller than the bandwidth of the second channel; and transmits the upgrade firmware data from the main core board to the upgrade package storage area of each of the sub-core boards through the second channel. The present application first divides the core board in the server into a main core board and a sub-core board. After obtaining the upgrade firmware data, the upgrade firmware data is first written to the upgrade package storage area of all the main core boards through the first channel, and then each main core board is controlled to establish a communication connection with its corresponding sub-core board, so as to carry a second channel with a wider width between the main core board and each sub-core board as a data transmission channel. Since the bandwidth of the second channel is greater than the bandwidth of the first channel, the upgrade firmware data is transmitted from the main core board to the upgrade package storage area of each sub-core board through the second channel with a wider bandwidth, which can increase the transmission rate of the upgrade firmware data to each sub-core board, thereby improving the transmission efficiency of the upgrade firmware data on the core board in the server, thereby solving the technical problem of low transmission efficiency of the existing transmission method and affecting the efficiency of firmware upgrade by changing the transmission channel. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0040] Figure 1 A schematic diagram of parallel transmission of the first embodiment of the data transmission method of the server of this application;
[0041] Figure 2 This is a flow chart of a first embodiment of a data transmission method of a server of the present application;
[0042] Figure 3 This is a transmission diagram of a serial-parallel combination of the first embodiment of the data transmission method of the server of this application;
[0043] Figure 4This is a flow chart of Embodiment 2 of the data transmission method of the server of this application;
[0044] Figure 5 This is a schematic diagram of the module structure of the data transmission device of the server in the embodiment of the present application;
[0045] Figure 6 This is a schematic diagram of the equipment structure of the hardware operating environment involved in the data transmission device of the server in the embodiment of the present application.
[0046] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 belong to the scope of protection of the present invention.
[0048] Embodiment 1
[0049] Firmware upgrade refers to the manufacturer upgrading the embedded firmware of electronic devices to improve device functions, enhance device stability, and patch device vulnerabilities.
[0050] The server includes two single boards: BMC (Baseboard Management Controller) and core board. BMC is responsible for controlling and obtaining core board device information, data, etc., and core board supports specific business functions. BMC is used for updating and upgrading the server's firmware version during OTA (Over-the-Air Technology) upgrade. Specifically, the firmware can be upgraded by transmitting the upgrade package to the core board (or business board), thereby realizing the update and upgrade of the server. Generally speaking, a server includes multiple core boards. At present, the upgrade package is usually written to each core board one by one through the USB2.0 channel in a serial transmission mode, or the upgrade package is written to each core board at the same time in a parallel transmission mode. However, when the size of the transmitted upgrade package is consistent and the number of core boards that need to receive the transmission package is consistent, the transmission efficiency is only related to the bandwidth of the USB2.0 channel. Therefore, in this case, whether it is serial transmission or parallel transmission, the transmission time consumed is the same. Therefore, the transmission efficiency of the current transmission method is low, which affects the efficiency of firmware upgrade.
[0051] Reference Figure 1, Figure 1 The upgrade package is simultaneously written into core boards 1 to 14 by parallel transmission through the USB 2.0 channel.
[0052] Based on this, the present application proposes a data transmission method of a server of the first embodiment, please refer to Figure 2 The server includes a plurality of core boards, each of which is divided into a main core board and a sub-core board. The data transmission method of the server includes:
[0053] Step S10, acquiring upgrade firmware data, and writing the upgrade firmware data into an upgrade package storage area of at least one of the main core boards through a first channel;
[0054] The execution subject of the data transmission method of the server in this embodiment may be a BMC (Baseboard Management Controller).
[0055] It should be noted that the upgrade firmware data is an upgrade package for upgrading the firmware of the core board, and the upgrade package can be a full upgrade package or a differential upgrade package, which is not specifically limited in this embodiment. Specifically, the upgrade firmware data is used to upgrade the current firmware version of the core board to the target firmware version.
[0056] In addition, it should be noted that the upgrade package storage area is a storage area for storing upgrade firmware data.
[0057] Step S20, establishing a communication connection through the main core board and the sub-core board corresponding to the main core board, so as to carry a second channel as a data transmission channel between the main core board and each of the sub-core boards, wherein one main core board corresponds to at least two sub-core boards, and the bandwidth of the first channel is less than the bandwidth of the second channel;
[0058] It should be noted that the communication connection may be a TCP communication connection, which is not specifically limited in this embodiment.
[0059] As an example, the step of establishing a communication connection through the main core board and the sub-core board corresponding to the main core board can be to establish a communication connection by matching the communication IP of the main core board and the communication IP of the sub-core board, or to establish a communication connection by matching the number of the main core board and the number of the sub-core board. This example does not make specific limitations on this.
[0060] Step S30: transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each of the sub-core boards through the second channel.
[0061] It is known to those skilled in the art that the transmission efficiency of a channel is limited by the bandwidth of the channel. The wider the bandwidth, the higher the transmission efficiency. Therefore, the second channel in this example has a higher transmission efficiency than the first channel, thereby further improving the transmission efficiency of the upgraded firmware data on the core board. The first channel can be a USB2.0 channel (low-speed channel), and the second channel can be a USB3.0 channel (high-speed channel). In general, the time calculation formula for data transmission on the core board using the channel is as follows:
[0062]
[0063] Among them, T is the transmission time, B is the upgrade firmware data size, D is the number of core boards, and L is the bandwidth of the transmission channel.
[0064] As an example, the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each of the sub-core boards through the second channel includes: transmitting the upgrade firmware data from the data header to the data tail from the main core board to the upgrade package storage area of each of the sub-core boards through the second channel; the upgrade firmware data may also be divided into multiple data segments, and then the upgrade firmware data is transmitted from the main core board to the upgrade package storage area of each of the sub-core boards in the order of arrangement of the data segments through the second channel. This example does not make specific limitations on this.
[0065] An embodiment of the present application provides a data transmission method of a server, wherein the server includes multiple core boards, each of which is divided into a main core board and a sub-core board. The present application obtains upgrade firmware data and writes the upgrade firmware data to an upgrade package storage area of at least one of the main core boards through a first channel; establishes a communication connection through the main core board and the sub-core board corresponding to the main core board, so as to carry a second channel between the main core board and each of the sub-core boards as a data transmission channel, wherein one main core board corresponds to at least two sub-core boards, and the bandwidth of the first channel is smaller than the bandwidth of the second channel; and transmits the upgrade firmware data from the main core board to the upgrade package storage area of each of the sub-core boards through the second channel. The embodiment of the present application first divides the core board in the server into a main core board and a sub-core board. After acquiring the upgrade firmware data, the upgrade firmware data is first written to the upgrade package storage area of all the main core boards through the first channel, and then each main core board is controlled to establish a communication connection with its corresponding sub-core board, so as to carry a second channel with a wider width between the main core board and each sub-core board as a data transmission channel. Since the bandwidth of the second channel is greater than the bandwidth of the first channel, the upgrade firmware data is transmitted from the main core board to the upgrade package storage area of each sub-core board through the second channel with a wider bandwidth, which can increase the transmission rate of the upgrade firmware data to each sub-core board, thereby improving the transmission efficiency of the upgrade firmware data on the core board in the server, thereby solving the technical problem of low transmission efficiency of the existing transmission method and affecting the efficiency of firmware upgrade by changing the transmission channel.
[0066] In a possible implementation, the step of establishing a communication connection between the main core board and a sub-core board corresponding to the main core board includes:
[0067] Step S21, setting the enabling object of the main core board to the server end, and setting the enabling object of each sub-core board to the user end, so as to establish a communication connection between the main core board and the sub-core board corresponding to the main core board.
[0068] It should be noted that the enabling object is used to characterize the object of the core board TCP communication. When the enabling object is the server side, the core board will establish TCP communication with the server. When the enabling object is the user side, the core board will establish TCP communication with the user side.
[0069] In this embodiment, by setting the enabling object of the main core board to the server side, TCP communication between the main core board and the server is established, and by setting the enabling object of the sub-core board to the user side, TCP communication between the sub-core board and the user side is established, so as to establish TCP communication between the main core board and the sub-core board through the server side and the user side, and can ensure that the TCP communication between the main core board and the sub-core board is between the server and the user side, so as to ensure the stability of communication.
[0070] In a possible implementation, before the step of setting the enabling object of the main core board to the server side and setting the enabling object of each sub-core board to the user side, the data transmission method of the server further includes:
[0071] Step S211, transmitting the identification information of the main core board to the sub-core board corresponding to the main core board through the first channel;
[0072] It should be noted that the identification information refers to information used to characterize the attribute characteristics of the core board, and the identification information may include the core board number, the core board IP address, the port number, etc., wherein one core board corresponds to one core board IP address, one core board corresponds to one core board number, and one core board corresponds to multiple port numbers. The BMC can record the core board IP address during the core board startup process. The core board number can be determined by the drawer number of the core board location, or by the slot number of the core board location. This embodiment does not make specific limitations on this. The port number of the core board can be set according to the number of sub-core boards that need to establish communication connections, wherein the port number of the main core board corresponding to each sub-core board is different.
[0073] As an example, the identification information includes the core board IP address and the available port number, and the step of transmitting the identification information of the main core board to the sub-core board corresponding to the main core board through the first channel includes: transmitting the core board IP address and the available port number of the main core board to the sub-core board corresponding to the main core board through the first channel. This example does not limit this.
[0074] Step S212, after the sub-core board receives the identification information, execute the step of setting the enabling object of the main core board to the server end, and setting the enabling object of each sub-core board to the user end.
[0075] In this embodiment, before establishing a communication connection through the main core board and the sub-core board, the core board IP address and available port number of the main core board are first transmitted to the sub-core board through the first channel, thereby establishing a preliminary connection between the main core board and the sub-core board, ensuring that when establishing a communication connection later, multiple sub-core boards will not use the same connection port of the main core board, thereby causing data transmission disorder, and the main core communication connection will not be connected to a sub-core board that does not belong to itself, thereby further improving the reliability of the communication connection.
[0076] In a possible implementation manner, before the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each of the sub-core boards through the second channel, the data transmission method of the server further includes:
[0077] Step S201, obtaining the connection duration of the main core board and the sub-core board corresponding to the main core board to establish a communication connection;
[0078] As an example, the connection duration can be the connection duration spent by the main core board and each sub-core board to establish a communication connection, or it can be the total connection duration spent by the main core board and each sub-core board to establish a communication connection. This example does not limit this.
[0079] Furthermore, the step of obtaining the connection duration for establishing a communication connection between the main core board and the sub-core board corresponding to the main core board may include: obtaining an initial time point for establishing a communication connection between the main core board and the sub-core board, and verifying whether the main core board and the sub-core board have completed the communication connection; if the main core board and the sub-core board have completed the communication connection, obtaining an end time point for establishing a communication connection between the main core board and the sub-core board; calculating the difference between the initial time point and the end time point to obtain the connection duration for establishing a communication connection between the main core board and the sub-core board corresponding to the main core board; if the main core board and the sub-core board have not completed the communication connection, calculating the difference between the initial time point and the current time point to obtain the connection duration for establishing a communication connection between the main core board and the sub-core board corresponding to the main core board.
[0080] Step S202, determining whether the connection duration is greater than a preset duration threshold;
[0081] Step S203: if yes, reacquire the identification information of the main core board, and return to execute the step of transmitting the identification information of the main core board to the sub-core board corresponding to the main core board through the first channel;
[0082] Step S204: if not, then executing the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each of the sub-core boards through the second channel.
[0083] In this embodiment, before transmitting the upgraded firmware data from the main core board to each sub-core board through the second channel, it is necessary to first record the connection duration for the main core board and each sub-core board to establish a communication connection to verify the rationality of the communication connection. If any connection duration or the total connection duration for the main core board and each sub-core board to establish a communication connection exceeds a preset duration threshold, it is necessary to re-acquire the identification information of the main core board and re-transmit the re-acquired identification information to each sub-core board through the first channel to re-establish the communication connection between the main core board and the sub-core boards, thereby ensuring the rationality of the communication connection.
[0084] In a possible implementation manner, after the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each of the sub-core boards through the second channel, the data transmission method of the server further includes:
[0085] Step S40, checking whether the working status of each core board is an idle state;
[0086] As an example, the working state includes an idle state and an occupied state. The idle state refers to the state of the core board when there is no running task in the core board. At this time, the step of verifying whether the working state of each core board is an idle state includes: verifying whether there is a running task in the core board; if there is a running task in the core board, the working state of the core board is an occupied state; if there is no running task in the core board, the working state of the core board is an idle state.
[0087] As another example, a task tag can be inserted into the core board, and the task tag is used to record whether the core board is occupied, so that the idle state refers to the state of the core board when the task tag of the core board is not occupied. At this time, the step of verifying whether the working states of each of the core boards are in an idle state includes: verifying whether the task tag in the core board is occupied; if the task tag in the core board is occupied, the working state of the core board is an occupied state; if the task tag in the core board is not occupied, the working state of the core board is an idle state, and this example does not limit this.
[0088] Step S50: If yes, each core board is triggered to retrieve the upgrade firmware data from the upgrade package storage area to perform firmware upgrade.
[0089] In this embodiment, it is necessary to ensure that all core boards are in an idle state before triggering the core board to retrieve the upgrade firmware data from the upgrade package storage area for firmware upgrade. This can prevent the firmware upgrade process from being affected by the existence of running tasks in the core board, or the firmware upgrade process from causing the current running tasks of the core board to be interrupted, so as to avoid process conflicts during the firmware upgrade process and improve the stability of the firmware upgrade.
[0090] In a possible implementation, the server includes at least one switching chip, and before the step of obtaining the upgrade firmware data and writing the upgrade firmware data into the upgrade package storage area of at least one of the main core boards through the first channel, the data transmission method of the server further includes:
[0091] Step S11, obtaining the number of switch chips and the total number of core boards in the server;
[0092] Step S12, constructing a core board set corresponding to each switching chip according to the number of switching chips and the total number of core boards;
[0093] It should be noted that the number of core board sets is related to the number of switch chips, that is, as many core board sets as there are switch chips, they need to be constructed accordingly.
[0094] As an example, the step of constructing a core board set corresponding to each switching chip based on the number of switching chips and the total number of core boards includes: determining the number of core board sets based on the number of switching chips, and determining the number of core boards included in the core board set based on the number of core board sets and the total number of core boards, so as to construct a core board set corresponding to each switching chip. This example does not limit this.
[0095] Step S13, for any of the core board sets, selecting a core board in the core board set as the main core board, and using the remaining core boards in the core board set as sub-core boards corresponding to the main core board in the core board set.
[0096] It should be noted that the number of the main core boards is related to the number of switching chips, that is, there are several main core boards corresponding to several switching chips. The main core boards can be selected arbitrarily or according to the core board number.
[0097] As an example, when selecting the main core board according to the core board number, for any of the core board sets, the step of selecting a core board in the core board set as the main core board, and using the remaining core boards in the core board set as sub-core boards corresponding to the main core board in the core board set includes: for any of the core board sets, selecting the core board with the smallest core board number in the core board set as the main core board, and using the remaining core boards in the core board set as sub-core boards corresponding to the main core board in the core board set, or for any of the core board sets, selecting the core board with the largest core board number in the core board set as the main core board, and using the remaining core boards in the core board set as sub-core boards corresponding to the main core board in the core board set. This example does not limit this.
[0098] In this embodiment, after obtaining the number of switching chips and the total number of core boards contained in the server, a core board set is constructed under each switching chip, and then any core board in the core board set is selected as the main core board to be used as the transmission medium for upgrading the firmware data through the second channel, and the remaining core boards in the core board set are used to receive the upgraded firmware data transmitted by the main core board through the second channel.
[0099] In order to help understand the technical concept or technical principle of the present application, a specific embodiment is listed:
[0100] Reference Figure 3 , taking 14 core boards as an example, the upgrade process in this specific embodiment is:
[0101] 1. BMC writes the upgrade file (i.e. the upgrade firmware data mentioned above) into the upgrade package storage area of core board 1 and core board 8 (i.e. the main core board mentioned above);
[0102] 2. BMC notifies core board 1 and core board 8 to enable the server side, and notifies the remaining core boards (i.e., the above-mentioned sub-core boards) to enable the user side, so that core board 1 and core boards 2 to 7 establish a TCP communication connection between the user side and the server side, and core board 8 and core boards 9 to 14 establish a TCP communication connection between the user side and the server side;
[0103] 3. Core board 1 and core board 8 send the upgrade file to the corresponding core board through the USB3.0 channel via TCP connection;
[0104] 4. After the core board 1 and the core board 8 complete the sending event of the upgrade file, they notify the BMC. The BMC records the working status of all the core boards. When all the core boards are idle, the BMC immediately triggers the upgrade action of all the core boards.
[0105] It should be noted that the above specific embodiments are only used to understand the present application and do not constitute a limitation on the data transmission method of the server of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.
[0106] Embodiment 2
[0107] Based on the first embodiment of the present application, in another embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 4 Before the step of verifying whether the working states of the core boards are all in an idle state, the data transmission method of the server further includes:
[0108] Step A10, obtaining the first data length of the upgrade firmware data and the second data length of the upgrade firmware data received by each of the sub-core boards;
[0109] Step A20, checking whether the first data length is equal to the second data length;
[0110] Step A30: If yes, then execute the step of verifying whether the working status of each core board is in an idle state;
[0111] Step A40: If not, return to the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each sub-core board through the second channel.
[0112] In this embodiment, by obtaining the first data length of the upgrade firmware data and the second data length of the upgrade firmware data received by each sub-core board, and verifying whether the two are equal, it is determined whether each sub-core board has received the complete upgrade firmware data. If the two are equal, it is determined that each sub-core board has received the complete upgrade firmware data. At this time, each core board can be triggered normally to perform firmware upgrade. If the two are not equal, it is determined that there is a sub-core board that has not received the complete upgrade firmware data. At this time, the upgrade firmware data needs to be re-transmitted until each sub-core board has received the complete upgrade firmware data, thereby avoiding the technical problem of incomplete upgrade firmware data stored in the upgrade storage area of some core boards during the upgrade process, affecting the upgrade stability.
[0113] In a possible implementation, the step of obtaining the first data length of the upgrade firmware data and the second data length of the upgrade firmware data received by each of the sub-core boards includes:
[0114] Step A11, obtaining the first data length of the upgrade firmware data, and obtaining the start time point when each of the sub-core boards receives the upgrade firmware data;
[0115] Step A12, querying the transmission time period corresponding to the upgrade firmware data according to the first data length;
[0116] It should be noted that the transmission time period is used to indicate that the upgrade firmware data is in a normal transmission time range.
[0117] Step A13, determining the end time point at which each sub-core board receives the upgrade firmware data based on the start time point and the transmission time period, and obtaining the second data length of the upgrade firmware data received by the sub-core board at the end time point.
[0118] In this embodiment, the transmission time period corresponding to the upgrade firmware data is determined by acquiring the first data length of the upgrade firmware data, so that the end time point at which each sub-core board is in normal reception of the upgrade firmware data can be determined, and the data length of the upgrade firmware data received by the sub-core board at the end time point is obtained, which is the data length of the upgrade firmware data finally received by the sub-core board.
[0119] In a possible implementation, after returning to execute the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each of the sub-core boards through the second channel, the data transmission method of the server further includes:
[0120] Step A41, recording the number of returns of returning to execute the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each sub-core board through the second channel;
[0121] Step A42, checking whether the number of returns is greater than a preset return threshold;
[0122] It should be noted that the preset return threshold refers to the maximum number of times the same sub-core board can re-receive the upgrade firmware data when receiving the same upgrade firmware data but the data reception is incomplete.
[0123] Step A43: if yes, return to execute the step of transmitting the identification information of the main core board to the sub-core board corresponding to the main core board through the first channel;
[0124] In this embodiment, the transmission efficiency of the upgraded firmware data is ensured by limiting the number of returns. When the number of returns exceeds the preset return threshold, it is necessary to re-establish the communication connection between the main core board and the sub-core board, thereby solving the technical problem that the data transmission between the main core board and the sub-core board enters an infinite loop and affects the data transmission efficiency.
[0125] Embodiment 3
[0126] The embodiment of the present invention also provides a data transmission device of a server, please refer to Figure 5 The server includes a plurality of core boards, each of which is divided into a main core board and a sub-core board, and the data transmission device of the server includes:
[0127] An acquisition module 10, used for acquiring upgrade firmware data, and writing the upgrade firmware data into an upgrade package storage area of at least one of the main core boards through a first channel;
[0128] A communication module 20, for establishing a communication connection through the main core board and the sub-core board corresponding to the main core board, so as to carry a second channel between the main core board and each of the sub-core boards as a data transmission channel, wherein one main core board corresponds to at least two sub-core boards, and the bandwidth of the first channel is less than the bandwidth of the second channel;
[0129] The transmission module 30 is used to transmit the upgrade firmware data from the main core board to the upgrade package storage area of each sub-core board through the second channel.
[0130] Optionally, the communication module 20 further includes:
[0131] The enabling object of the main core board is set as the server end, and the enabling object of each sub-core board is set as the user end, so as to establish a communication connection between the main core board and the sub-core board corresponding to the main core board.
[0132] Optionally, the data transmission device of the server further includes:
[0133] Transmitting the identification information of the main core board to the sub-core board corresponding to the main core board through the first channel;
[0134] After the sub-core board receives the identification information, the steps of setting the enabling object of the main core board to the server end and setting the enabling object of each sub-core board to the user end are performed.
[0135] Optionally, the data transmission device of the server further includes:
[0136] Obtaining the connection duration of establishing a communication connection between the main core board and the sub-core board corresponding to the main core board;
[0137] Determine whether the connection duration is greater than a preset duration threshold;
[0138] If so, reacquire the identification information of the main core board, and return to execute the step of transmitting the identification information of the main core board to the sub-core board corresponding to the main core board through the first channel;
[0139] If not, the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each of the sub-core boards through the second channel is performed.
[0140] Optionally, the data transmission device of the server further includes:
[0141] Check whether the working status of each core board is idle;
[0142] If so, each core board is triggered to retrieve the upgrade firmware data from the upgrade package storage area to perform firmware upgrade.
[0143] Optionally, the data transmission device of the server further includes:
[0144] Acquire a first data length of the upgrade firmware data and a second data length of the upgrade firmware data received by each of the sub-core boards;
[0145] Checking whether the first data length is equal to the second data length;
[0146] If yes, then executing the step of verifying whether the working status of each core board is in an idle state;
[0147] If not, return to the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each sub-core board through the second channel.
[0148] Optionally, the server includes at least one switching chip, and the data transmission device of the server further includes:
[0149] Obtain the number of switch chips and the total number of core boards in the server;
[0150] According to the number of the switching chips and the total number of core boards, a core board set corresponding to each of the switching chips is constructed;
[0151] For any of the core board sets, one core board is selected from the core board set as the main core board, and the remaining core boards in the core board set are used as sub-core boards corresponding to the main core board in the core board set.
[0152] The data transmission device of the server provided by the present invention adopts the data transmission method of the server in the above-mentioned embodiment 1 or embodiment 2, which can solve the technical problem that the transmission efficiency of the existing transmission method is low and affects the efficiency of firmware upgrade. Compared with the prior art, the beneficial effect of the data transmission device of the server provided by the embodiment of the present invention is the same as the beneficial effect of the data transmission method of the server provided by the above-mentioned embodiment, and the other technical features of the data transmission device of the server are the same as the features disclosed in the method of the above-mentioned embodiment, which will not be repeated here.
[0153] Embodiment 4
[0154] An embodiment of the present invention provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data transmission method of the server in the above-mentioned embodiment one.
[0155] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present disclosure. The electronic device in the embodiment of the present disclosure may be a BMC (Baseboard Management Controller) or the like. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0156] like Figure 6 As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0157] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0158] The electronic device provided by the present invention adopts the data transmission method of the server in the above embodiment, which can solve the technical problem that the transmission efficiency of the existing transmission method is low and affects the efficiency of firmware upgrade. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of the present invention are the same as the beneficial effects of the data transmission method of the server provided by the above embodiment, and other technical features in the electronic device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0159] It should be understood that the various parts of the present disclosure can be implemented with hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0160] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0161] Embodiment 5
[0162] An embodiment of the present invention provides a computer-readable storage medium having computer-readable program instructions stored thereon, and the computer-readable program instructions are used to execute the data transmission method of the server in the above-mentioned embodiment 1.
[0163] The computer-readable storage medium provided in the embodiment of the present invention may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0164] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0165] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by an electronic device, the electronic device: obtains upgrade firmware data, and writes the upgrade firmware data to the upgrade package storage area of at least one of the main core boards through a first channel; establishes a communication connection through the main core board and the sub-core board corresponding to the main core board, so as to carry a second channel between the main core board and each of the sub-core boards as a data transmission channel, wherein one main core board corresponds to at least two sub-core boards, and the bandwidth of the first channel is smaller than the bandwidth of the second channel; and transmits the upgrade firmware data from the main core board to the upgrade package storage area of each of the sub-core boards through the second channel.
[0166] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0167] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0168] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of the module does not limit the unit itself in some cases.
[0169] The readable storage medium provided by the present invention is a computer-readable storage medium, which stores computer-readable program instructions for executing the data transmission method of the above-mentioned server, and can solve the technical problem that the transmission efficiency of the existing transmission method is low and affects the efficiency of firmware upgrade. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the embodiment of the present invention are the same as the beneficial effects of the data transmission method of the server provided in the above-mentioned embodiment 1 or embodiment 2, and will not be repeated here.
[0170] Embodiment 6
[0171] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the steps of the above-mentioned server data transmission method when executed by a processor.
[0172] The computer program product provided by the present application can solve the technical problem that the existing transmission method has low transmission efficiency and affects the efficiency of firmware upgrade. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present invention are the same as the beneficial effects of the data transmission method of the server provided by the above-mentioned embodiment 1 or embodiment 2, and will not be repeated here.
[0173] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A data transmission method of a server, characterized in that: The server includes a plurality of core boards, each of which is divided into a main core board and a sub-core board. The data transmission method of the server includes: Acquire upgrade firmware data, and write the upgrade firmware data into an upgrade package storage area of at least one of the main core boards through a first channel; Establishing a communication connection through the main core board and the sub-core board corresponding to the main core board, so as to carry a second channel between the main core board and each of the sub-core boards as a data transmission channel, wherein one main core board corresponds to at least two sub-core boards, and the bandwidth of the first channel is less than the bandwidth of the second channel; The upgrade firmware data is transmitted from the main core board to the upgrade package storage area of each sub-core board through the second channel.
2. The data transmission method of the server according to claim 1, characterized in that: The step of establishing a communication connection between the main core board and the sub-core board corresponding to the main core board includes: The enabling object of the main core board is set as the server end, and the enabling object of each sub-core board is set as the user end, so as to establish a communication connection between the main core board and the sub-core board corresponding to the main core board.
3. The data transmission method of the server according to claim 2, characterized in that: Before the step of setting the enabling object of the main core board to the server side and setting the enabling object of each sub-core board to the user side, the data transmission method of the server further includes: Transmitting the identification information of the main core board to the sub-core board corresponding to the main core board through the first channel; After the sub-core board receives the identification information, the steps of setting the enabling object of the main core board to the server end and setting the enabling object of each sub-core board to the user end are performed.
4. The data transmission method of the server according to claim 3, characterized in that: Before the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each sub-core board through the second channel, the data transmission method of the server further includes: Obtaining the connection duration of establishing a communication connection between the main core board and the sub-core board corresponding to the main core board; Determine whether the connection duration is greater than a preset duration threshold; If so, reacquire the identification information of the main core board, and return to execute the step of transmitting the identification information of the main core board to the sub-core board corresponding to the main core board through the first channel; If not, the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each of the sub-core boards through the second channel is performed.
5. The data transmission method of the server according to claim 1, characterized in that: After the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each sub-core board through the second channel, the data transmission method of the server further includes: Check whether the working status of each core board is idle; If so, each core board is triggered to retrieve the upgrade firmware data from the upgrade package storage area to perform firmware upgrade.
6. The data transmission method of the server according to claim 5, characterized in that: Before the step of verifying whether the working states of each of the core boards are in an idle state, the data transmission method of the server further includes: Acquire a first data length of the upgrade firmware data and a second data length of the upgrade firmware data received by each of the sub-core boards; Checking whether the first data length is equal to the second data length; If yes, then executing the step of verifying whether the working status of each core board is in an idle state; If not, return to the step of transmitting the upgrade firmware data from the main core board to the upgrade package storage area of each sub-core board through the second channel.
7. The data transmission method of a server according to any one of claims 1 to 6, characterized in that: The server includes at least one switching chip. Before the step of obtaining the upgrade firmware data and writing the upgrade firmware data into the upgrade package storage area of at least one of the main core boards through the first channel, the data transmission method of the server also includes: Obtain the number of switch chips and the total number of core boards in the server; According to the number of the switching chips and the total number of core boards, a core board set corresponding to each of the switching chips is constructed; For any of the core board sets, one core board is selected from the core board set as the main core board, and the remaining core boards in the core board set are used as sub-core boards corresponding to the main core board in the core board set.
8. A data transmission device for a server, characterized in that: The server includes a plurality of core boards, each of which is divided into a main core board and a sub-core board, and the data transmission device of the server includes: An acquisition module, used for acquiring upgrade firmware data, and writing the upgrade firmware data into an upgrade package storage area of at least one of the main core boards through a first channel; A communication module, used to establish a communication connection through the main core board and the sub-core board corresponding to the main core board, so as to carry a second channel between the main core board and each of the sub-core boards as a data transmission channel, wherein one main core board corresponds to at least two sub-core boards, and the bandwidth of the first channel is less than the bandwidth of the second channel; A transmission module is used to transmit the upgrade firmware data from the main core board to the upgrade package storage area of each sub-core board through the second channel.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the data transmission method of the server according to any one of claims 1 to 7.
10. A readable storage medium, characterized in that: The readable storage medium is a computer-readable storage medium, on which is stored a program for implementing the data transmission method of the server, and the program for implementing the data transmission method of the server is executed by a processor to implement the steps of the data transmission method of the server as described in any one of claims 1 to 7.
