A data transmission method and related device

CN116489205BActive Publication Date: 2026-10-23XFUSION DIGITAL TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310302128.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-24
Publication Date
2026-10-23
Estimated Expiration
2043-03-24

AI Technical Summary

Technical Problem

[0004]但是ipmitool限制了发送数据的最大值为256字节,导致数据大小较大的raw命令的传输效率过低

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116489205B_ABST
    Figure CN116489205B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a data transmission method and related devices. The data transmission method specifically comprises: a first device obtaining a first command, wherein the first command is a native raw command; then the first device sending the first command to a second device through a second channel in a case where a data size of the first command is less than or equal to a first threshold, or sending the first command to the second device through a first channel in a case where the data size of the first command is greater than the first threshold, wherein the second channel supports a data amount greater than or equal to the first threshold in one transmission, the first channel is a local area network (LAN) channel established based on a first protocol, and the first channel supports a data amount greater than a data amount supported by the second channel in one transmission. By expanding the first channel with a larger data transmission amount, the sending of a long command can be realized, and the efficiency of data transmission is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and more particularly to a data transmission method and related equipment. Background Technology

[0002] With the development of communication technology, the ways of data transmission have also increased, and how to transmit data more efficiently and quickly has become a current research hotspot.

[0003] In data communication with the baseboard management controller (BMC), the intelligent platform management interface (IPMI) tool (ipmitool) can be used to send raw commands via the local area network (LAN).

[0004] However, ipmitool limits the maximum amount of data sent to 256 bytes, resulting in low transmission efficiency for raw commands with larger data sizes. Summary of the Invention

[0005] This application provides a data transmission method to improve data transmission efficiency. This application also provides corresponding computing devices and computer-readable storage media.

[0006] The first aspect of this application provides a data transmission method, the method comprising: a first device acquiring a first command, the first command being a raw command; if the data size of the first command is less than or equal to a first threshold, the first device sending the first command to a second device via a second channel, the second channel supporting a data size greater than or equal to the first threshold in a single transmission; if the data size of the first command is greater than the first threshold, the first device sending the first command to the second device via a first channel, the first channel being a local area network (LAN) channel established based on a first protocol, the first channel supporting a data size greater than the second channel supporting a data size in a single transmission.

[0007] In this application, the first device is a computer device with an IPMI client installed. The user can operate the IPMI client to make the computer device generate a first command, which is a raw command. The second device is a server configured with a BMC or the BMC itself. The first device and the second device communicate with each other via Ethernet.

[0008] This application requires establishing an extended first channel directly between the first device and the second device, where a second channel already exists between them. The first channel is a LAN channel established based on a first protocol that supports 64 kilobytes of data transmission. The second channel is a LAN channel established based on the RMCP / RMCP+ protocol, which only supports 256 bytes of data transmission. The first protocol is a four-layer protocol, including the link layer, network layer, transport layer, and application layer.

[0009] In this application, the first device also needs to determine whether the first command is a long command based on the first command. The data size of the long command is greater than the first threshold, that is, the long command is a raw command with a data size greater than the first threshold, while the short command is a raw command with a data size less than or equal to the first threshold, thereby determining whether the data size of the first command is less than or equal to the first threshold or greater than the first threshold.

[0010] In this first aspect, a first device acquires a first command, which is a raw command. Then, if the data size of the first command is less than or equal to a first threshold, the first device sends the first command to a second device via a second channel; if the data size of the first command is greater than the first threshold, the first device sends the first command to the second device via the first channel. The second channel supports a data transmission volume greater than or equal to the first threshold in a single transmission. The first channel is a local area network (LAN) channel established based on a first protocol, and the data transmission volume supported by the first channel is greater than that supported by the second channel in a single transmission. By extending to a first channel with a larger data transmission capacity, the transmission of long commands can be achieved, improving data transmission efficiency.

[0011] In one possible implementation of the first aspect, the method further includes: the first device determining whether the data size of the first command is greater than a first threshold; the above step: the first device sending the first command to the second device through the first channel includes: if the data size of the first command is greater than the first threshold, the first device sending the first command to the second device through the first channel.

[0012] In this possible implementation, when the first device determines whether the first command is a long command, it can directly determine whether the data size of the first command is greater than a first threshold, thereby improving the feasibility of the solution.

[0013] In one possible implementation of the first aspect, the first command includes indication data, and the method further includes: the first device determining whether the indication data indicates a file path; the above step: the first device sending the first command to the second device through the first channel includes: if the indication data indicates a file path, the first device sending the first command to the second device through the first channel.

[0014] In this possible implementation, the first command includes instruction data. When the first device determines whether the first command is a long command, it can determine whether the instruction data indicates a file path, thereby improving the feasibility of the solution.

[0015] In one possible implementation of the first aspect, the above steps: the first device sends a first command to the second device through the first channel, including: the first device determines whether the data size of the first command is greater than a second threshold; if the data size of the first command is greater than the second threshold, the first device divides the first command into N second commands and sends them to the second device through the first channel, where N is a positive integer greater than 1.

[0016] In this possible implementation, when the first device determines that the first command is a long command, since a long command may be less than 64k bytes, the first device also needs to determine whether the data size of the first command is greater than 64k bytes. If the data size of the first command is greater than 64k bytes, it is divided into N second commands and then sent sequentially to achieve the transmission of long commands with larger data sizes. If the data size of the first command is less than 64k bytes, the first device can directly send the first command to the second device through the first channel without dividing or truncating it, and the second device does not need to recover the data, thus improving transmission efficiency.

[0017] In one possible implementation of the first aspect, the first device includes a cache, the storage space of which is a second threshold. The above steps, namely, the first device dividing the first command into N second commands and sending them to the second device through the first channel, include: the first device dividing the first command into N second commands and storing them sequentially in the cache; and the first device sending the second commands in the cache to the second device through the first channel.

[0018] In this possible implementation, a 64KB buffer is set up in the computer device with the IPMI client installed for data transmission. This buffer can send data to the second device using the first protocol. Specifically, the first device divides the first command into N second commands and stores them into the buffer in sequence. Then, the second commands in the buffer are sent to the second device through the first channel, which improves the feasibility of the solution.

[0019] In one possible implementation of the first aspect, the first threshold is 256 bytes and the second threshold is 64 kilobytes.

[0020] In this possible implementation, the first threshold is the maximum data transmission size supported by the second channel established based on the RMCP / RMCP+ protocol, and the second threshold is the maximum data transmission size supported by the first channel established based on the UDP protocol, which improves the feasibility of the solution.

[0021] In one possible implementation of the first aspect, the first protocol is derived from an extension of the User Datagram Protocol (UDP).

[0022] In this possible implementation, the user modifies and extends the UDP protocol in advance to obtain a first protocol, and writes the first protocol into the computer device and BMC. The transmission path based on the first protocol is the extended first channel, which improves the feasibility of the solution.

[0023] In one possible implementation of the first aspect, the second device includes a UDP protocol module for receiving the first command.

[0024] In this possible implementation, the UDP protocol module in the second device supports receiving data sent through the first channel established based on the first protocol, which improves the feasibility of the solution.

[0025] In a second aspect, this application provides a computing device for performing the method described in the first aspect or any possible implementation thereof. Specifically, the computing device includes modules or units for performing the method described in the first aspect or any possible implementation thereof, such as: an acquisition unit, a judgment unit, a sending unit, and a receiving unit.

[0026] A third aspect of this application provides a computing device including a processor, memory, and a computer-readable storage medium storing a computer program; the processor is coupled to the computer-readable storage medium, and computer execution instructions run on the processor. When the computer execution instructions are executed by the processor, the processor performs a method as described in the first aspect or any possible implementation thereof. Optionally, the computing device may further include an input / output (I / O) interface, and the computer-readable storage medium storing the computer program may be a memory.

[0027] The fourth aspect of this application provides a computer-readable storage medium storing one or more computer-executable instructions, wherein when the computer-executable instructions are executed by a processor, the processor performs a method as described in the first aspect or any possible implementation thereof.

[0028] The fifth aspect of this application provides a computer program product that stores one or more computer-executable instructions, wherein when the computer-executable instructions are executed by a processor, the processor executes a method as described in the first aspect or any possible implementation thereof.

[0029] A sixth aspect of this application provides a chip system including at least one processor and an interface for receiving data and / or signals. The interface is used to support a computer device in implementing the functions described in the first aspect or any possible implementation thereof. In one possible design, the chip system may further include a memory for storing necessary program instructions and data for the computer device. This chip system may be composed of chips or may include chips and other discrete devices. Attached Figure Description

[0030] Figure 1 This is a schematic diagram of the BMC's communication system architecture;

[0031] Figure 2 This is a schematic diagram of the structure of a computing device in a communication system;

[0032] Figure 3 This is a schematic diagram illustrating the transmission of raw commands via a LAN channel.

[0033] Figure 4 A schematic diagram of an embodiment of the data transmission method provided in this application;

[0034] Figure 5 A schematic diagram of the extended protocol provided in an embodiment of this application;

[0035] Figure 6 A schematic flowchart illustrating the recovery of the first command provided in an embodiment of this application;

[0036] Figure 7 A schematic diagram of the architecture of the first device and the second device provided in the embodiments of this application;

[0037] Figure 8 A schematic diagram of another embodiment of the data transmission method provided in this application;

[0038] Figure 9 A flowchart illustrating the first division command provided in an embodiment of this application;

[0039] Figures 10-12 A schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation

[0040] The embodiments of this application are described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. As those skilled in the art will understand, with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0041] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0042] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0043] Furthermore, to better illustrate this application, numerous specific details are provided in the following detailed embodiments. Those skilled in the art should understand that this application can be implemented without certain specific details. In some instances, methods, means, components, and circuits well-known to those skilled in the art have not been described in detail in order to highlight the main points of this application.

[0044] The following provides an exemplary description of the application scenarios involved in the embodiments of this application.

[0045] like Figure 1 As shown, current servers commonly include a baseboard management controller (BMC). The BMC can perform operations such as firmware upgrades and viewing server device information. For example, on a computer device with a client installed, the user can access the server's BMC via the client and the local area network (LAN).

[0046] Furthermore, in BMC data communication, users need to send commands to the BMC via a computer device equipped with an Intelligent Platform Management Interface (IPMI) client to perform operations such as secure remote restart, secure power-on, LAN warnings, and system health monitoring of the server. Both the IPMI client and the BMC support the IPMI standard. IPMI is cross-platform compatible across different operating systems, firmware, and hardware, intelligently monitoring, controlling, and automatically reporting the operational status of a large number of servers to reduce server system costs. IPMI is a standalone, agentless management subsystem running within the system. It can begin operating as long as the BMC and IPMI firmware are present, and the BMC is typically a separate board installed on the server motherboard. During operation, all IPMI functions are accomplished by sending commands to the BMC using instructions defined in the IPMI specification. The BMC receives the commands and processes them accordingly.

[0047] like Figure 2 As shown, the computer device carrying the IPMI client, the server, and the BMC within the server can all be a type of computing device. For example, the server is a computing device 300, which includes a processor 301, a communication interface 302, a storage system 303, a bus 304, and a BMC 305. The processor 301, communication interface 302, storage system 303, and BMC 305 are interconnected via the bus 304. The processor 301 is used to control and manage the operation of the computing device 300. The communication interface 302 is used to support communication within the computing device 300. The storage system 303 is used to store the program code and data of the computing device 300. The BMC 305 is used to perform operations such as firmware upgrades and viewing information on the computing device 300. Specifically, the BMC 305 can control the processor 301, access data in the storage system 303, or communicate via the communication interface 302.

[0048] The processor 301 can be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The processor 301 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, etc. The bus 304 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 2 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0049] For example, when the computer device 300 is a computer device carrying an IPMI client, the storage system 303 is used to store the data to be sent, the communication interface 302 can be the IPMI firmware, and the processor 301 sends the data in the storage system 303 to the communication interface 302 through the bus 304, and sends it to the BMC in the server through the communication interface 302.

[0050] Users can send commands using the IPMI tool (ipmitool) via an IPMI client. One way to send commands is through a local area network (LAN) to send raw commands. However, when using raw commands over a LAN, ipmitool limits the maximum data sent to 256 bytes. Exceeding this limit requires the IPMI client to send portions of the data multiple times using ipmitool. For example, sending a 1KB file via ipmi commands would require at least five command sends. Each data send via ipmitool involves a handshake process using the Remote Management Control Protocol (RMCP) / RCMP+ protocol, resulting in a low effective data transfer rate.

[0051] Furthermore, when an IPMI client needs to transfer a file to the BMC, the IPMI client must first send the file to the BMC's file directory, that is, first send the file via the file transfer protocol (FTP), and then the IPMI client sends a command to the BMC so that the BMC can execute the file transferred by the IPMI client last time based on the command. This multiple data transfer will result in low communication efficiency.

[0052] For example, such as Figure 3 As shown, when a user needs to send hexadecimal data to the BMC, the IPMI client needs to use the ipmitool tool to truncate the hexadecimal data into multiple parts (offset 0 data, offset x data, ..., offset nx data). Each part consists of a raw command plus the truncated data content, and then sent sequentially to the BMC via the LAN. Each time the IPMI client sends a raw command, it needs to establish an RMCP / RMCP+ short connection. After receiving the multiple truncated data parts, the BMC needs to parse and reassemble them. Specifically, it reassembles the transmitted command by parsing fixed fields such as whether it is the last frame, the start offset, and the write length, before finally receiving the hexadecimal data. However, the RMCP / RMCP+ protocol handshake process is complex, and establishing a short connection requires a lot of protocol data exchange, resulting in only a small portion of the actual effective data transmission.

[0053] Based on this, this application provides a data transmission method to improve data transmission efficiency. In this application, both the computer device carrying the IPMI client and the BMC are equipped with IPMI firmware or ipmitool. Optionally, to support the UDP protocol used in this application and the transmission of larger amounts of data, the communication interface 202 or storage system 203 of the computer device is further configured with a 64 kilobyte (k) buffer, and the BMC is further configured with a UDP protocol module that supports the UDP protocol. The data transmission method provided by this application embodiment will be described in detail below with reference to the above application scenario.

[0054] like Figure 4 As shown, one embodiment of the data transmission method provided in this application includes:

[0055] 101. The first device receives the first command.

[0056] In this embodiment of the application, the first device is a computer device with an IPMI client installed. The user can operate the IPMI client to make the computer device generate a first command, which is a raw command. The second device is a server configured with a BMC or the BMC itself. The first device and the second device communicate with each other based on Ethernet.

[0057] This application embodiment requires establishing an extended first channel directly between the first device and the second device, and a second channel originally exists between the first device and the second device. The first channel is a LAN channel established based on the User Datagram Protocol (UDP), and the corresponding protocol is extended to obtain the first protocol. That is, a 64k-byte buffer is set up in the computer device with the IPMI client installed for data transmission. The user modifies and extends the UDP protocol in advance to obtain the first protocol, and writes the first protocol into the computer device and BMC, so that the buffer can use the first protocol to send data to the UDP protocol module in the second device. This transmission path is the extended first channel. The first protocol supports 64k-byte data transmission. The second channel is a LAN channel established based on the RMCP / RMCP+ protocol. The RMCP / RMCP+ protocol only supports 256-byte data transmission.

[0058] Specifically, such as Figure 5 As shown, Figure 5 This indicates the data format transmitted based on the first protocol of the first channel. In some examples, the first protocol is a four-layer protocol, including the link layer, network layer, transport layer, and application layer. The link layer data includes a 6-byte destination physical address, a 6-byte source physical address, a 2-byte type, 46-1500 bytes of data, and a 4-byte cyclic redundancy check (CRC). The network layer data includes a 20-byte Internet Protocol (IP) header and 26-1480 bytes of data. The IP header and data of the network layer correspond to the data of the link layer. The transport layer data includes an 8-byte UDP header and 18-1472 bytes of data. The UDP header and data of the transport layer correspond to the data of the network layer. The application layer data includes a 22-byte RMCP+ header, 0-234 bytes of data, and 1216-1450 bytes of extended channel data. The RMCP+ header, data, and extended channel data of the application layer correspond to the data of the transport layer.

[0059] In addition, the protocol also supports data truncation (fragmentation). The data size of the application layer corresponds to the maximum buffer size of 64k supported by the UDP protocol. After subtracting the size occupied by RMCP+ header, data and extended channel data in the application layer from 64k, the remaining space can carry the data that needs to be fragmented.

[0060] In the embodiments of this application, when the data size of the first command is less than or equal to a first threshold, the first device determines the first command as a short command and sends the first command to the second device through a second channel. When the data size of the first command is greater than the first threshold, the first device determines the first command as a long command and sends the first command to the second device through a first channel. The second channel supports a data transmission volume greater than or equal to the first threshold. The first channel is a local area network (LAN) channel established based on a first protocol, and the data transmission volume supported by the first channel is greater than that supported by the second channel. A detailed description follows.

[0061] 102. The first device determines whether the first command is a long command based on the first command.

[0062] After the first device receives the first command, it can determine whether the first command is a long command. A long command is a raw command with a data size greater than a first threshold, while a short command is a raw command with a data size less than or equal to the first threshold. There are several specific methods for this determination, which will be explained below.

[0063] I. Based on data size

[0064] After receiving the first command, the first device determines whether the data size of the first command is greater than a first threshold, where the first threshold can be 256 bytes. When the data size of the first command is greater than 256 bytes, the first device determines that the first command is a long command. When the data size of the first command is less than or equal to 256 bytes, the first device determines that the first command is not a long command, that is, the first command is a short command.

[0065] II. Based on instruction information

[0066] The first command includes instruction data. After obtaining the first command, the first device determines whether the instruction data indicates a file path. If the instruction data indicates a file path, the first device determines that the first command is a long command. If the instruction data does not indicate a file path, the first device determines that the first command is a short command.

[0067] Specifically, the instruction data of the first command includes a network number and a function code / sub-function code. The network number and function code / sub-function code can represent or indicate a file path. For example, the function code / sub-function code is represented by the American Standard Code for Information Interchange (ASCII), specifically 0x30 0xXX 0xcmd 0xXX…0xXX. The first device will parse 0xcmd as a command related to file transfer, used to indicate the file path. At this time, the first device can determine that the first command is a long command. When the first device parses the instruction data and does not indicate a file path, the first device can determine that the first command is a short command.

[0068] When the first command is a long command, execute steps 103 and 1031; when the first command is a short command, execute step 104.

[0069] 103. The first device divides the first command into N second commands and sends them to the second device through the first channel.

[0070] 1031. The second device restores N second commands to the first command.

[0071] When the first command is a long command, the first device can use an IPMI tool to divide the first command into N second commands, and then send the N second commands to the second device through an extended first channel. When the second device receives the N second commands, it needs to reconstruct the N second commands into the first command. Specifically, the first device includes a cache with a storage space size equal to a second threshold. The first device divides the first command into N second commands, stores them sequentially in the cache, and then sends the second commands from the cache to the second device through the first channel.

[0072] Among the N second commands, the data size of the first N-1 second commands is 64k bytes, and the data size of the last second command is less than or equal to 64k bytes.

[0073] like Figure 6As shown, for example, when the BMC's business is updated (e.g., a server tenant update), and the second device needs to change the BMC's logo, the first device needs to send the image data that serves as the logo to the second device. The first device parses the indicated file path from the instruction data of the first command. This file path corresponds to the BMC's logo as a hexadecimal image. The first device also parses this image data into the format of a raw command, which is part of the first command. The first command is then divided into N second commands, which are sent to the second device multiple times through the extended LAN channel (first channel) based on a 64k-byte cache. After receiving the multiple second commands, the second device parses and concatenates them to restore the N second commands to the first command, thus restoring the image data. Then, the IPMI in the BMC instructs the BMC to update the hexadecimal image data to the BMC's logo.

[0074] 104. The first device sends the first command to the second device through the second channel.

[0075] When the first command is a short command, the first device can send the first command to the second device through the existing second channel.

[0076] Optionally, when the first command is a short command, step 2033 can also be executed to complete the sending of the first command. Users can select or adjust this based on the actual network conditions. For example, if the second channel fails or data transmission occurs on the second channel, the first device can also send a short command through the first channel simultaneously to further improve data transmission efficiency.

[0077] The second device also includes a UDP protocol module, which is used to receive a first command or N second commands sent by the first device.

[0078] Optionally, data transmission reliability can be guaranteed in various ways. For example, when the first device sends the first command to the second device, if only one data packet is transmitted at a time, the reliability of data transmission can be guaranteed by sending a response confirmation mechanism and retransmitting if a transmission error occurs. When the first command is very large, a sliding window layer can be encapsulated to ensure the reliability of data transmission. For details, refer to the sliding window in the Transmission Control Protocol (TCP) when transmitting files.

[0079] In this embodiment, a first device acquires a first command, which is a raw command. Then, if the data size of the first command is less than or equal to a first threshold, the first device sends the first command to a second device via a second channel; if the data size of the first command is greater than the first threshold, the first device sends the first command to the second device via the first channel. The second channel supports a data transmission volume greater than or equal to the first threshold. The first channel is a local area network (LAN) channel established based on a first protocol, and the data transmission volume supported by the first channel is greater than that supported by the second channel. By extending to a first channel with a larger data transmission capacity, long commands can be sent, improving data transmission efficiency.

[0080] As can be seen from the above embodiments, as Figure 7 As shown, the first device needs to be configured with ipmitool and a 64KB buffer, while the second device needs to be configured with a UDP protocol module, IPMI, and a restoration module to convert N second commands back into a first command. When the first device determines that the raw command is a short command, it uses ipmitool to transmit it through the existing second channel (RMCP / RMCP+ channel). When the first device determines that the raw command is a long command, it uses ipmitool to divide the long command and then uses the buffer to transmit it sequentially through the first channel (extended RMCP channel). Since the first protocol of the first channel supports a maximum data transmission of 64KB, it can avoid sending the same data multiple times, achieving efficient transmission of long commands, and it does not require using other file transfer protocols to put the file in the BMC directory before sending the raw command for execution.

[0081] like Figure 8 As shown, another embodiment of the data transmission method provided in this application includes:

[0082] 201. The first device receives the first command.

[0083] 202. The first device determines whether the first command is a long command based on the first command.

[0084] If the first command is a long command, proceed to step 203; if the first command is a short command, proceed to step 204.

[0085] 203. The first device determines whether the data size of the first command is greater than the second threshold.

[0086] When the first device determines that the first command is a long command, the first device also needs to determine whether the data size of the first command is greater than the second threshold.

[0087] Since the UDP protocol supports a data transmission size of 64k bytes, the second threshold can be 64k bytes.

[0088] In this embodiment, the first threshold is 256 bytes, and the second threshold is 64KB. Optionally, to ensure stable and lossless data transmission, the first threshold can be set to less than 256 bytes, such as 250 bytes. That is, when the data size of the first command is less than or equal to 250 bytes, the second channel is used for transmission; when it is greater than 250 bytes, the first channel is used for transmission. Similarly, the second threshold can be set to less than 64KB, such as 63KB. When the data size of the first command is less than or equal to 63KB, the first command is sent directly through the first channel; when the data size of the first command is greater than 63KB, the first command is divided and then sent through the first channel.

[0089] It should be understood that the setting of the first threshold is based on the maximum amount of data that the second channel supports, and the setting of the second threshold is based on the maximum amount of data that the first channel supports. When the first protocol used by the first channel or the second protocol used by the second channel changes, the maximum amount of data that it supports will also change, and the first and second thresholds will also change accordingly.

[0090] When the data size of the first command is greater than the second threshold, step 2031 is executed; when the data size of the first command is less than or equal to the second threshold, step 2033 is executed.

[0091] 2031. The first device divides the first command into N second commands and sends them to the second device through the first channel.

[0092] When the data size of the first command is greater than the second threshold, it means that the first command cannot be sent to the second device in one go through the first channel. In this case, the first device needs to divide the first command into N second commands and then send them to the second device through the first channel, where N is a positive integer greater than 1.

[0093] The first device includes a cache, the storage space of which is a second threshold. The first device divides the first command into N second commands and stores them into the cache in sequence. Then, the second commands in the cache are sent to the second device through the first channel.

[0094] Specifically, such as Figure 9As shown, the first device needs to copy the first command from user space to kernel space, that is, put it into the buffer allocated by the first device before it can be sent. The partitioning process can be regarded as a process of cyclical judgment. When the data to be sent in the first command is greater than 64k bytes, the first device truncates the first command from the 64k byte part, obtaining a second command and the unsent data in the first command, and sends the obtained second command. The unsent data in the first command is put into the send buffer. When the unsent data in the first command has an end marker, the unsent data in the first command is directly sent as a new second command. When the unsent data in the first command does not have an end marker, the unsent data in the first command is regarded as the data to be sent, and the judgment on whether the data to be sent is greater than 64k bytes is re-judged. This process is repeated until the data with an end marker is sent as the second command.

[0095] 2032. The second device restores N second commands to the first command.

[0096] When the second device receives N second commands, it needs to restore the N second commands to the first command.

[0097] 2033. The first device sends the first command to the second device through the first channel.

[0098] When the data size of the first command is less than or equal to the second threshold, the first device can directly send the first command to the second device through the first channel.

[0099] 204. The first device sends the first command to the second device through the second channel.

[0100] When the first command is a short command, the first device can send the first command to the second device through the existing second channel.

[0101] Optionally, when the first command is a short command, step 2033 can also be executed to complete the sending of the first command. Users can choose or adjust this based on the actual network conditions.

[0102] In this embodiment of the application, when the first device determines that the first command is a long command, since a long command may be less than 64k bytes, the first device also needs to determine whether the data size of the first command is greater than 64k bytes. If the data size of the first command is less than 64k bytes, the first device can directly send the first command to the second device through the first channel without dividing or truncating it, and the second device does not need to recover the data, thus improving the transmission efficiency.

[0103] The data transmission method provided in the embodiments of this application has been described above. The related equipment provided in the embodiments of this application will be described below with reference to the accompanying drawings.

[0104] like Figure 10 As shown, one embodiment of the computing device 1000 provided in this application includes:

[0105] The acquisition unit 1001 is used to acquire a first command, which is a native raw command; the acquisition unit 1001 can execute step 101 in the above method embodiment.

[0106] The judgment unit 1002 is used to determine whether the first command is a long command based on the first command, and the data size of the long command is greater than the first threshold; the judgment unit 1002 can execute step 102 in the above method embodiment.

[0107] The sending unit 1003 is configured to, if the first command is a long command, send the first command from the first device to the second device through a first channel, wherein the first channel is a local area network (LAN) channel established based on a first protocol, and the first protocol supports data transmission of 64 kilobytes. The sending unit 1003 can execute step 103 in the above method embodiment.

[0108] The sending unit 1003 is specifically used to send the first command to the second device through the second channel when the data size of the first command is less than or equal to the first threshold, wherein the second channel supports a data amount that is greater than or equal to the first threshold in one transmission; and to send the first command to the second device through the first channel when the data size of the first command is greater than the first threshold, wherein the first channel supports a data amount that is greater than the second channel supports a data amount that is greater in one transmission.

[0109] Optionally, the judgment unit 1002 is specifically used to judge whether the data size of the first command is greater than the first threshold; the sending unit 1003 is specifically used to send the first command to the second device through the first channel if the data size of the first command is greater than the first threshold.

[0110] Optionally, the first command includes instruction data, and the judgment unit 1002 is specifically used to determine whether the instruction data indicates a file path; the sending unit 1003 is specifically used to send the first command to the second device through the first channel if the instruction data indicates a file path.

[0111] Optionally, the judging unit 1002 is further used to judge whether the data size of the first command is greater than the second threshold; the sending unit 1003 is further used to divide the first command into N second commands and send them to the second device through the first channel if the data size of the first command is greater than the second threshold, where N is a positive integer greater than 1.

[0112] Optionally, the computing device 1000 includes a cache, the storage space of which is a second threshold. The sending unit 1003 is specifically used to divide the first command into N second commands and store them into the cache in sequence; and to send the second commands in the cache to the second device through the first channel.

[0113] Optionally, the first protocol is derived from an extension of the User Datagram Protocol (UDP).

[0114] Optionally, the second device includes a UDP protocol module for receiving the first command.

[0115] like Figure 11 As shown, one embodiment of the computing device 1100 provided in this application includes:

[0116] The receiving unit 1101 is configured to receive a first command sent by a first device through a first channel. The first command is a raw command and is a long command with a data size greater than a first threshold. The first channel is a LAN channel established based on a first protocol. The receiving unit 1101 can execute step 103 in the above method embodiment.

[0117] The receiving unit 1101 is specifically used to receive the first command through a second channel when the data size of the first command is less than or equal to the first threshold, wherein the second channel supports a data transmission amount greater than or equal to the first threshold; and to receive the first command through a first channel when the data size of the first command is greater than the first threshold, wherein the first channel supports a data transmission amount greater than the second channel supports a data transmission amount greater than the second channel supports a data transmission amount greater than the first threshold.

[0118] Optionally, the computing device 1100 further includes a recovery unit 1102. The first command is greater than the second threshold. The receiving unit 1101 is also used to receive N second commands sent by the first device through the first channel. The N second commands are obtained by the first device dividing the first command, and N is a positive integer greater than 1. The recovery unit 1102 is used to restore the N second commands to the first command.

[0119] Optionally, the receiving unit 1101 is further configured to receive a first command sent by the first device through a second channel, wherein the first command is not a long command, and the second channel is a LAN channel established based on a second protocol.

[0120] Optionally, the first protocol is derived from an extension of the User Datagram Protocol (UDP).

[0121] Optionally, the computing device 1100 includes a UDP protocol module for receiving the first command.

[0122] The computer device 1000 and computing device 1100 provided in this application embodiment can be understood by referring to the corresponding content in the aforementioned data transmission method embodiment section. For example, computing device 1000 is a first device, specifically a computer device, and computing device 1100 is a second device, specifically a server or BMC. Further details will not be repeated here.

[0123] like Figure 12 As shown, another embodiment of the computing device 1200 provided in this application includes: a processor 1201, a communication interface 1202, a storage system 1203, and a bus 1204. The processor 1201 may include a CPU, or at least one of a CPU, a GPU, an NPU, and other types of processors. The processor 1201, the communication interface 1202, and the storage system 1203 are interconnected via the bus 1204. In the embodiments of this application, the processor 1201 is used to control and manage the operation of the computing device 1200. For example, the processor 1201 is used to execute... Figure 4 Steps 101 to 104 in the process, and Figure 8 Steps 201 to 204, and / or other processes used in the techniques described herein. Communication interface 1202 is used to support communication by computing device 1200. Storage system 1203 is used to store program code and data of computing device 1200.

[0124] The processor 1201 can be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, etc. The bus 1204 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 12 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0125] The computing device can be the first device or the second device described in the above data transmission method embodiments, specifically a computer device, server, or BMC, etc., which will not be repeated here.

[0126] In another embodiment of this application, a computer-readable storage medium is also provided, which stores computer-executable instructions. When at least one processor of the device executes the computer-executable instructions, the device executes the data transmission method described in the above embodiments.

[0127] In another embodiment of this application, a computer program product is also provided, the computer program product including computer-executable instructions stored in a computer-readable storage medium; at least one processor of the device can read the computer-executable instructions from the computer-readable storage medium, and the at least one processor executes the computer-executable instructions to cause the device to perform the data transmission method described in the above embodiments.

[0128] In another embodiment of this application, a chip system is also provided, comprising at least one processor and an interface for receiving data and / or signals, wherein the at least one processor is used to support the data transmission method described in the above embodiments. In one possible design, the chip system may further include a memory for storing program instructions and data necessary for the computer device. This chip system may be composed of chips or may include chips and other discrete devices.

[0129] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this application.

[0130] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0131] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0132] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0133] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0134] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A data transmission method, characterized in that, include: The first device acquires a first command, which is a raw command. If the data size of the first command is less than or equal to the first threshold, the first device sends the first command to the second device through the second channel, where the second channel supports a data size greater than or equal to the first threshold for a single transmission. The second channel is a local area network (LAN) channel established based on the RMCP / RMCP+ protocol; If the data size of the first command is greater than the first threshold, the first device sends the first command to the second device through the first channel. The first channel is a local area network (LAN) channel established based on the first protocol. The data volume that the first channel supports in one transmission is greater than the data volume that the second channel supports in one transmission. The first protocol includes an application layer, and the application layer data includes RMCP+ header, data, and extended channel data. Before obtaining the first command, the user extends the UDP protocol through the first device to obtain the first protocol, and writes the first protocol into the first device and the second device.

2. The method according to claim 1, characterized in that, The method further includes: The first device determines whether the data size of the first command is greater than the first threshold; The first device sends the first command to the second device through the first channel, including: If the data size of the first command is greater than the first threshold, the first device sends the first command to the second device through the first channel.

3. The method according to claim 1, characterized in that, The first command includes instruction data, and the method further includes: The first device determines whether the indication data indicates a file path; The first device sends the first command to the second device through the first channel, including: If the indicated data indicates a file path, the first device sends the first command to the second device through the first channel.

4. The method according to claim 1, characterized in that, The first device sends the first command to the second device through the first channel, including: The first device determines whether the data size of the first command is greater than the second threshold; If the data size of the first command is greater than the second threshold, the first device divides the first command into N second commands and sends them to the second device through the first channel, where N is a positive integer greater than 1.

5. The method according to claim 4, characterized in that, The first device includes a cache, the storage space of which is the second threshold. The first device divides the first command into N second commands and sends them to the second device through a first channel, including: The first device divides the first command into N second commands and stores them sequentially into the cache; The first device sends the second command in the cache to the second device through the first channel.

6. The method according to claim 4, characterized in that, The first threshold is 256 bytes, and the second threshold is 64 kilobytes.

7. The method according to any one of claims 1-6, characterized in that, The first protocol is derived from the User Datagram Protocol (UDP) extension.

8. The method according to claim 7, characterized in that, The second device includes a UDP protocol module, which is used to receive the first command.

9. A computing device, characterized in that, The device includes a processor having computer execution instructions running on it, which, when executed by the processor, perform the method as described in any one of claims 1-8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Data transmission method and device and related equipment

    CN113452475A