Serial port switching control circuit, method and server

By introducing a serial port switching control circuit with a cache module and an output control module into the artificial intelligence server, the system anomaly caused by hotkey code stream pass-through was solved, and stable switching and reliable transmission of serial port data were achieved, improving the system's debugging and maintenance efficiency.

CN120994595BActive Publication Date: 2026-01-23INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511512238.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2026-01-23
Estimated Expiration
2045-10-22

AI Technical Summary

Technical Problem

In artificial intelligence server systems, the transparent transmission of hotkey code streams to the upper-layer system may cause abnormal system responses or abnormal serial port interface displays.

Method used

By introducing the coordinated work of the buffer module, output control module and switching module, the data output path is immediately shut down when a hotkey switching signal is detected, blocking the hotkey code stream from being passed through to the upper layer system, and the data path is restored after the switching is completed, ensuring the complete transmission of serial port data.

Benefits of technology

This effectively avoids abnormal system responses and garbled characters on the serial port interface, improving the reliability and stability of multi-node debugging of the artificial intelligence server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994595B_ABST
    Figure CN120994595B_ABST
Patent Text Reader

Abstract

The application discloses a serial port switching control circuit and method and a server, relates to the technical field of servers, and through the cooperative work of a buffer module, an output control module and a switching module, when a hot key switching signal is detected, the data output path is immediately turned off, and the hot key code stream is blocked from being transparently transmitted to an upper-layer system, so that abnormal system response and serial port interface random codes are effectively avoided. After switching is completed, the data path is restored, and the buffered serial port data is transmitted. The design solves the signal interference problem during serial port switching from the hardware level, and significantly improves the reliability and stability of multi-node debugging of an artificial intelligence server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of server technology, and in particular to serial port switching control circuits, methods and servers. Background Technology

[0002] In artificial intelligence server systems, the serial port serves as a critical debugging interface, undertaking important functions such as monitoring the computational load of the graphics processor, the data throughput status of the data processor, and the health of the baseboard management controller system. To achieve efficient collaborative debugging of multiple components, a flexible and reliable serial port switching mechanism must be established.

[0003] In related technologies, complex programmable logic devices / field-programmable gate arrays can be used as transparent switches to switch serial communication channels between different upper-layer systems via hotkeys. However, the hotkey code stream will be transparently transmitted to the upper-layer system, which may cause abnormal system responses or abnormal serial interface displays. Summary of the Invention

[0004] This application provides a serial port switching control circuit, method, and server to at least solve the problem in related technologies where hotkey code streams are passed through to the upper-layer system, which may cause abnormal system response or abnormal serial port interface display.

[0005] This application provides a serial port switching control circuit, including:

[0006] The cache module connects to the server's external devices and the output control module. It is used to receive serial port data input from external devices, cache the serial port data, and send the cached serial port data to the output control module.

[0007] The output control module, connected to the switching module, is used to shut down the serial port data output to the switching module after detecting the hotkey switching trigger signal;

[0008] The switching module connects to multiple upper-layer systems within the server and is used to switch the data channel between the serial ports of multiple upper-layer systems based on the hotkey switching trigger signal.

[0009] The output control module is also used to start serial port data output to the switching module after detecting that the switching module has completed serial port switching, and to send the buffered serial port data to the switching module.

[0010] This application provides a server, including: multiple upper-layer systems, a front panel, and a serial port switching control circuit as described above;

[0011] The front panel is connected to the serial port switching control circuit and is used to connect to external devices to transmit serial port data input from external devices to the serial port switching control circuit.

[0012] The serial port switching control circuit is connected to multiple upper-layer systems and is used to switch the serial ports of multiple upper-layer systems according to the hotkey switching trigger signal in the serial port data input by external devices.

[0013] This application provides a serial port switching control method, including:

[0014] Receive serial port data input from external devices on the server and store the serial port data in the cache module;

[0015] If a hotkey switching trigger signal is detected, the data output path of the cache module is shut down;

[0016] If the serial port switching corresponding to the hotkey switching trigger signal is detected to be completed, the data output path of the cache module is opened, and the cached serial port data is sent to the serial port of the upper layer system that has been switched to.

[0017] This application also provides a serial port switching control device, including:

[0018] The receiving module is used to receive serial port data input from external devices of the server and store the serial port data in the buffer module.

[0019] The shutdown module is used to shut down the data output path of the cache module if a hotkey switching trigger signal is detected.

[0020] The enable module is used to enable the data output path of the cache module and send the cached serial port data to the serial port of the upper-layer system when the serial port switching corresponding to the hotkey switching trigger signal is detected to be completed.

[0021] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described serial port switching control methods.

[0022] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of any of the above-described serial port switching control methods.

[0023] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described serial port switching control methods.

[0024] This application utilizes the coordinated operation of the caching module, output control module, and switching module to immediately shut down the data output path upon detecting a hotkey switching signal, blocking the hotkey code stream from being passed through to the upper-layer system. This effectively avoids abnormal system responses and garbled characters on the serial port interface. The data path is restored only after the switching is complete, transmitting the cached serial port data. This design solves the signal interference problem during serial port switching at the hardware level, significantly improving the reliability and stability of multi-node debugging of artificial intelligence servers. Attached Figure Description

[0025] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1a A schematic diagram of a serial port switching system provided for related technologies;

[0027] Figure 1b A schematic diagram illustrating the principle of serial communication in a server provided in this application embodiment;

[0028] Figure 2 A schematic diagram of the serial port switching control circuit provided in the embodiments of this application is shown below;

[0029] Figure 3 A schematic diagram of the serial port switching control circuit provided in the embodiments of this application. Figure 2 ;

[0030] Figure 4 A flowchart illustrating the serial port switching control method provided in an embodiment of this application;

[0031] Figure 5 This is a schematic diagram of the structure of the serial port switching control device provided in the embodiments of this application;

[0032] Figure 6 A schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation

[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

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

[0035] Artificial Intelligence (AI) servers, as the core hardware for training and inference tasks of deep learning models, place far greater demands on data interaction efficiency, real-time performance, and stability than traditional servers. In AI servers, high-frequency data transmission is required between the Graphics Processing Unit (GPU), AI accelerator card, Central Processing Unit (CPU), Data Processing Unit (DPU), and Baseboard Management Controller (BMC). Complex Programmable Logic Devices (CPLDs) / Field-Programmable Gate Arrays (FPGAs), as key components, act as the "bridge" and "scheduleer" for data transmission between devices. For example, during deep learning model training, training data needs to be rapidly transferred from storage to the GPU for computation, and the computation results need to be fed back to the CPU in real time for further processing. CPLDs / FPGAs dynamically adjust the data transmission path through programming to ensure efficient flow between multiple devices.

[0036] Furthermore, as an indispensable debugging interface in the research and development and maintenance of AI servers, serial ports are essential for developers to monitor critical information such as GPU load, model training progress, and data transmission rate in real time. The CPLD / FPGA, acting as a serial port switching switch, must meet the requirements of simultaneous monitoring of multiple devices in AI scenarios, enabling flexible switching and transparent transmission of serial port information from multiple nodes such as GPU, CPU, DPU, and BMC.

[0037] In related technologies, AI servers typically use CPLD / FPGA as a transparent switch for serial port switching, such as... Figure 1aAs shown, the BMC connects to the front panel and GPU via a serial port switching control circuit (which can be implemented using a CPLD). The front panel is used to connect external devices. External devices can switch serial ports via the CPLD to communicate with the BMC or GPU through the serial port. Specifically, the serial port serves as an important medium for information exchange between the upper-layer systems of the server (such as the BMC) and external devices. Users or developers can send information to upper-layer systems in the server, such as the DPU, CPU, or BMC, via the serial port through external devices. The information responded by the upper-layer systems, such as the DPU, CPU, or BMC, will also be displayed on the serial port interface of the external device. Users can switch hotkeys to display multiple serial port information on the serial port interface of the external device. As a DEBUG interface, the CPLD / FPGA usually transmits information transparently, that is, it realizes direct communication between the upper-layer system and the user interface without processing. Since any hotkey will have an American Standard Code for Information Interchange (ASCII) code, when switching serial ports, this ASCII code will be transmitted transparently to the DPU, CPU, or BMC through the CPLD / FPGA, which may cause DPU, CPU, or BMC malfunctions by probability.

[0038] To address the aforementioned issues, the inventors of this application have discovered that during serial port switching, the current serial port data can be delayed to prevent the hotkey code stream of the switching hotkey from being transmitted to upper-layer systems such as the BMC in the server during this switching period. This avoids the situation where the hotkey code stream is immediately transmitted to the upper-layer system during switching, causing abnormal responses in the upper-layer system or unexpected characters being printed on the serial port interface of the external device. Based on this, embodiments of this application provide a serial port switching control circuit.

[0039] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0040] This section describes the specific application environment architecture or hardware architecture upon which the serial port switching control method depends. (References) Figure 1b , Figure 1b This is a schematic diagram illustrating the principle of serial communication in a server. (For example...) Figure 1b As shown, the serial port switching control circuit connects to multiple serial ports (such as multiple system serial ports, front panel serial ports, GPU serial ports, etc.). Through the switching control of the transmission channels, communication connections are established between different serial ports. For example, a communication connection can be established between the front panel serial port and the BMC serial port in the system serial ports, enabling the front panel serial port to send data from the BMC serial port to external devices for display in the external device's serial port interface, facilitating debugging operations for the user.

[0041] Figure 2 A schematic diagram of the serial port switching control circuit provided in the embodiments of this application is shown below. Figure 2 As shown, an embodiment of this application provides a serial port switching control circuit. The circuit is described in detail below, and includes:

[0042] The caching module connects to the server's external devices and the output control module. It receives serial port data input from external devices, caches the serial port data, and sends the cached serial port data to the output control module.

[0043] The output control module, connected to the switching module, is used to shut down the serial port data output to the switching module after detecting the hotkey switching trigger signal.

[0044] The switching module connects to multiple upper-layer systems within the server and is used to switch the data channel between the serial ports of multiple upper-layer systems based on the hotkey switching trigger signal.

[0045] The output control module is also used to start serial port data output to the switching module after detecting that the switching module has completed serial port switching, and to send the buffered serial port data to the switching module.

[0046] The serial port switching control circuit in this embodiment can be implemented using integrated circuits, discrete components, or programmable devices, depending on the specific application scenario.

[0047] In this embodiment, the cache module can be implemented using a first-in-first-out memory or other devices with data buffering function. Its function is to temporarily store the serial port data stream from the external device to ensure that the data is not lost due to switching operations during transmission.

[0048] The output control module can be implemented using multiplexers, logic gates, or programmable logic devices. Its core function is to isolate the data path between external devices and the upper-level system inside the server during serial port switching, preventing hotkey code streams from being transparently transmitted to the upper-level system at the moment of switching.

[0049] The switching module connects to multiple upper-layer systems within the server. These upper-layer systems include, but are not limited to, system components with independent serial communication capabilities such as the baseboard management controller, central processing unit, graphics processing unit, or data processor. The switching module executes data channel switching operations based on hotkey switching trigger signals, establishing a serial communication link between the external device and the target upper-layer system. The switching module can be implemented using a multiplexer switch or a crosspoint switch matrix, supporting dynamic switching between multiple serial channels.

[0050] In operation, users can input serial port data via external devices, which is received and stored by the buffer module. Under normal operating conditions, the output control module remains active, continuously transmitting serial port data from the buffer module to the switching module, which then forwards it to the currently connected upper-layer system. When a user triggers a serial port switching operation using a hotkey, a corresponding hotkey switching trigger signal is generated. Upon detecting this signal, the output control module immediately shuts off the data output path. At this time, the buffer module continues to receive and store serial port data from external devices, but this data is not transmitted to the switching module. Simultaneously, the switching module performs a channel switching operation based on the hotkey switching trigger signal, switching the data path from the current upper-layer system to the target upper-layer system. After the switching operation is complete, the output control module reopens the data output path, sending the temporarily stored serial port data from the buffer module to the switching module, which then transmits it to the newly switched upper-layer system. By employing this operating method, the circuit ensures that the hotkey code stream is not immediately transmitted to the upper-layer system during serial port switching, thereby avoiding problems such as upper-layer system abnormalities or abnormal characters displayed on the serial port interface caused by hotkey code stream interference.

[0051] This application's embodiments, by introducing a caching mechanism and an output control mechanism, effectively solve the data conflict problem during serial port switching while ensuring the integrity of the serial communication function. This is especially suitable for artificial intelligence server application scenarios with high system stability requirements.

[0052] In some embodiments, the output control module includes a multiplexer; the multiplexer has a first input terminal connected to the output terminal of the buffer module, a second input terminal connected to the target level, and an output terminal connected to the switching module, and is used to select the output target level after detecting a hotkey switching trigger signal, so as to block the output of the buffer module.

[0053] In this embodiment, the target level can be a high level, a low level, or other specific level signal, as long as it can block the output path of the buffer module. In practical applications, the selection of the target level needs to consider level compatibility with other components in the system. For example, in a system that uses active low, a high level can be selected as the target level; conversely, in a system that uses active high, a low level can be selected as the target level. This level compatibility design ensures that while blocking data transmission, it will not adversely affect subsequent circuits.

[0054] In the specific implementation process, when in normal working condition, the multiplexer selects the first input terminal, directly transmitting the serial port data output by the buffer module to the switching module. At this time, the serial communication link between the external device and the upper-layer system remains unobstructed, and serial port data can be transmitted normally.

[0055] When a hotkey switching trigger signal is detected, the multiplexer's control logic responds immediately, switching the input channel from the first input terminal to the second input terminal. At this time, the multiplexer no longer outputs serial port data from the buffer module, but instead continuously outputs a target level signal. Since the target level is a fixed level signal, rather than a valid data stream, this effectively blocks data transmission from the buffer module to the switching module.

[0056] After the switching module completes the serial port switching operation, the multiplexer will re-enable the first input terminal, restoring the data transmission path from the buffer module to the switching module. At this time, the serial port data buffered during the switching period will be transmitted to the newly switched upper-layer system in a first-in-first-out order, ensuring the continuity and integrity of data communication.

[0057] In this embodiment, data path shutdown is achieved through level switching, resulting in a fast response time. Path switching can be completed in microseconds or even less, ensuring that the hotkey code stream does not leak to the upper-layer system during the switching process. Output control is implemented using a multiplexer, resulting in a simple and reliable circuit structure that is easily integrated into existing programmable logic devices. Furthermore, outputting a fixed target level signal maintains the level stability of the transmission line, avoiding signal interference problems that may be caused by floating lines.

[0058] In some embodiments, the switching module is used to perform data frame integrity detection on the transmitted serial port data. After determining that the previous frame of serial port data being transmitted is a complete frame, it switches the data channel between serial ports of multiple upper-layer systems according to the hotkey switching trigger signal.

[0059] Specifically, after receiving the hotkey switching trigger signal, the switching module does not immediately perform channel switching operation. Instead, it first performs frame integrity analysis on the currently transmitted serial port data, enabling the switching module to have data frame integrity detection function, which can significantly improve the reliability of serial port switching and the integrity of data communication.

[0060] In practical applications, the switching module can determine the integrity of data frames by monitoring the frame structure characteristics of serial port data in real time. For data transmission using asynchronous serial communication protocols, the switching module will detect the complete sequence of start bits, data bits, parity bits, and stop bits; for data frames based on specific communication protocols, it will verify the integrity of the frame header and trailer identifiers and the conformity of the data length. Only when the switching module confirms that the previous frame of serial port data has been completely transmitted, i.e., after detecting a complete frame end identifier, will it initiate the actual channel switching operation.

[0061] To further improve reliability, the switching module can integrate frame detection logic circuitry, which can identify the frame structure characteristics of specific communication protocols. In some implementations, the switching module can also be configured with a timeout protection mechanism, which automatically triggers an error handling process when an abnormal frame structure or transmission timeout is detected, ensuring that the system can recover from abnormal states.

[0062] In this embodiment, the introduction of a frame integrity detection switching mechanism effectively avoids data truncation issues that may occur during data frame transmission. The frame integrity detection mechanism and the output control module form a collaborative protection system. The output control module physically blocks data transmission, while the frame integrity detection of the switching module ensures the rationality of the switching timing at the protocol level. Together, they construct a multi-layered data protection mechanism, significantly improving the stability and reliability of the entire serial port switching system.

[0063] In some embodiments, the switching module is also connected to an external device for transmitting serial port data received from the corresponding upper-layer system to the external device via a target data channel.

[0064] Specifically, the switching module adopts a bidirectional data transmission architecture, which not only forwards serial port data from external devices to the upper-layer system, but also undertakes the important function of sending response data from the upper-layer system back to the external devices. The switching module establishes a bidirectional communication link between the upper-layer system and external devices through the established target data channel.

[0065] In this configuration, a dedicated data return path is established between the switching module and external devices. When the upper-layer system generates serial port data that needs to be output, such as system status information sent by the baseboard management controller, load monitoring data output by the graphics processor, or task processing results fed back by the central processing unit, this data is first transmitted to the switching module. Based on the currently active data channel configuration, the switching module accurately routes the serial port data from the corresponding upper-layer system to the external device through the established target data channel.

[0066] In practical applications, from a circuit implementation perspective, the switching module can be implemented using a bidirectional data buffer or a multiplexer with direction control functionality. During data transmission, the switching module automatically identifies the data flow direction, ensuring that data is transmitted in the correct direction. When performing serial port switching, the switching module synchronously updates the configuration of the bidirectional data channel, ensuring that a complete bidirectional communication link can be established between the external device and the new target upper-level system.

[0067] In this embodiment, in the debugging and monitoring scenario of the artificial intelligence server, by switching the bidirectional data transmission function of the module, the serial port interface of the external device can fully display the operating information of each component inside the server, including the real-time load of the GPU, model training progress, memory usage status and system temperature and other key parameters, providing comprehensive data support for system optimization and fault diagnosis.

[0068] Furthermore, it works well with the aforementioned data frame integrity detection mechanism. During the data transmission process from the upper-layer system to external devices, the switching module also performs data frame integrity verification to ensure that important system monitoring data can be presented completely and accurately on the serial port interface of the external device.

[0069] Furthermore, while enabling bidirectional data transmission, the switching module maintains coordinated operation with the output control module. Even when the output control module temporarily blocks data transmission from external devices to the upper-level system due to hotkey switching, data transmission from the upper-level system to external devices remains uninterrupted. This asymmetric data flow control ensures the continuity of system monitoring functions; even during serial port switching, developers can still observe the system's operating status in real time without losing important system feedback information due to the switching operation.

[0070] In some embodiments, such as Figure 3 As shown, the circuit also includes an instruction storage module; the instruction storage module is connected to the cache module and the switching module.

[0071] The instruction storage module is used to store multiple artificial intelligence task instructions and compare the received serial port data with the multiple artificial intelligence task instructions in the instruction storage module.

[0072] If the serial port data is a hotkey code stream for switching hotkeys, and it does not overlap with multiple AI task instructions, then the serial port data will be stored in the cache module.

[0073] If the serial port data is a hotkey code stream for switching hotkeys and overlaps with the AI ​​task instructions, the context of the serial port data is analyzed. If the context of the serial port data includes a prefix or suffix identifier of the AI ​​task instructions, the serial port data is determined to be an AI task instruction, and the serial port data is sent to the switching module.

[0074] If the serial port data exists in multiple AI task instructions, then the serial port data will be sent to the switching module.

[0075] The switching module is also used to pass serial port data through to the serial port of the currently switched upper-layer system.

[0076] Specifically, the serial port switching control circuit also includes an instruction storage module, which pre-stores a rich set of artificial intelligence task instructions. These instructions cover control commands in typical AI application scenarios such as deep learning model training, inference task scheduling, and hardware resource allocation.

[0077] The core function of the instruction storage module is to intelligently identify and classify the received serial port data. When serial port data is input, the module first compares its features with the stored artificial intelligence task instructions. If the serial port data is identified as belonging to the hotkey code stream of a switching hotkey and has no feature overlap with any of the artificial intelligence task instructions, it is determined to be a pure switching instruction and stored in the cache module for further processing.

[0078] When encountering serial port data that is both a hotkey code stream and overlaps in characteristics with AI task instructions, the instruction storage module will activate a context analysis mechanism. This mechanism makes a comprehensive judgment by detecting whether the serial port data stream contains specific AI task instruction prefix or suffix identifiers, combined with the timing characteristics and semantic environment of the data packets. For example, some AI training instructions may contain specific start and end symbols, or have a fixed data frame structure. Only when the complete characteristics of the AI ​​task instruction are confirmed to exist in the context will it be determined as a valid working instruction and directly sent to the switching module for pass-through processing.

[0079] For serial port data that is clearly present in the AI ​​task instruction set, the instruction storage module will identify it as a valid working instruction and transmit it directly to the switching module. After receiving these verified instructions, the switching module will pass them through to the corresponding upper-layer system currently connected, ensuring that the normal execution of the AI ​​task is not affected by the serial port switching operation.

[0080] In practical applications, the instruction storage module can be implemented using programmable read-only memory or flash memory devices, supporting online updates and expansions of the instruction set. This design enables the system to adapt to the changing needs of different artificial intelligence application scenarios, providing flexible and reliable instruction support for various deep learning frameworks and computing tasks.

[0081] This embodiment further effectively solves the technical problem of conflicts between hotkey code streams and work instructions by employing an intelligent recognition mechanism. In the complex working environment of an artificial intelligence server, some task instructions may happen to contain the same character sequence as the hotkey code stream. By introducing context analysis and multiple verification mechanisms, both the normal operation of the serial port switching function and the complete transmission of artificial intelligence task instructions are ensured, achieving dual protection for system control and business execution.

[0082] In some embodiments, the circuit further includes an instruction storage module; the instruction storage module is connected to the output control module and is used to store multiple artificial intelligence task instructions; the output control module is also used to compare the received serial port data with the multiple artificial intelligence task instructions in the instruction storage module, and control the output of the serial port data according to the comparison result.

[0083] Specifically, the instruction storage module pre-stores a complete set of artificial intelligence task instructions, covering operation instructions for typical AI application scenarios such as model training control, inference task scheduling, and hardware resource management.

[0084] In this architecture, the output control module plays a crucial role in instruction recognition. When serial port data is received, the output control module compares it in real time with the task instructions in the instruction storage module. If it is identified as an AI task instruction, the data path remains open to ensure timely transmission of the instruction to the switching module; if it is confirmed as a hotkey code stream, a blocking mechanism is activated to prevent it from interfering with the upper-layer system.

[0085] In this embodiment, by centrally processing instruction recognition in the output control module, the system architecture is simplified and the response efficiency is improved. The intelligent recognition mechanism effectively distinguishes between actual operation instructions and switching control signals, ensuring both the continuous execution of artificial intelligence tasks and the stable and reliable switching of serial ports.

[0086] This design achieves intelligent management of serial port data streams through hardware-level instruction recognition and processing, ensuring both the reliability of system control functions and the complete transmission of business instructions, thus providing a more stable and efficient serial communication solution for artificial intelligence servers.

[0087] In some embodiments, the circuit further includes a hotkey switching storage module; the hotkey switching storage module is connected to the output control module and is used to store hotkey code streams of multiple hotkeys; the output control module is also used to compare the received serial port data with the multiple hotkey code streams in the hotkey switching storage module, and control the output of serial port data according to the comparison result.

[0088] Specifically, the serial port switching control circuit is also equipped with a hotkey storage module, which is dedicated to storing and managing the hotkey code streams corresponding to multiple switching hotkeys. The hotkey storage module can be configured as a non-volatile memory to ensure that the stored hotkey code streams remain valid after a system restart, and also supports dynamic updates of hotkey configurations through the system interface.

[0089] In the specific implementation, the output control module plays a crucial role in hotkey identification within this architecture. When a serial data stream enters, the output control module compares the received data in real time with the pre-stored hotkey code stream in the hotkey switching storage module. This comparison uses a character-by-character matching algorithm, which can accurately identify the specific code stream patterns of various switching hotkeys. When it detects that the input data completely matches any stored hotkey code stream, the output control module immediately triggers the corresponding control logic: first, it generates a hotkey switching trigger signal to notify the switching module, and at the same time, it temporarily blocks the current data output path to prevent the hotkey code stream from being passed through to the upper-layer system.

[0090] In practical applications, this module also supports adaptive learning of hotkey code streams. When the system detects a new hotkey pattern, it can add it to the storage module through an authorization mechanism, thus flexibly adapting to the habits of different users and the needs of different application scenarios. This scalable design enables the serial port switching control system to maintain stability while possessing good adaptability and maintainability.

[0091] In this embodiment, a dedicated hotkey storage module supports multiple different switching hotkey configurations to meet diverse needs in complex application scenarios. For example, independent switching hotkeys can be assigned to different upper-layer systems such as BMC, GPU, and CPU, allowing users to quickly switch between serial ports of different systems using different hotkey combinations. Simultaneously, based on a precise code stream comparison mechanism, the system can effectively distinguish between genuine switching commands and randomly appearing similar character sequences in ordinary data streams, significantly reducing the probability of false triggering.

[0092] By integrating the hotkey recognition function into the output control module, this embodiment achieves real-time monitoring and intelligent control of the serial port data stream. This ensures the accuracy and timeliness of serial port switching operations, effectively prevents interference from the hotkey code stream to the upper-layer system, and significantly improves the reliability and user experience of the entire serial communication system.

[0093] This application also provides a server, including: multiple upper-layer systems, a front panel, and a serial port switching control circuit as described in the above embodiments.

[0094] The front panel connects to the serial port switching control circuit and is used to connect to external devices, transmitting serial port data input from external devices to the serial port switching control circuit.

[0095] The serial port switching control circuit is connected to multiple upper-layer systems and is used to switch the serial ports of multiple upper-layer systems according to the hotkey switching trigger signal in the serial port data input by external devices.

[0096] The server provided in this application embodiment integrates an innovative serial port switching control circuit, which can delay the transmission of hotkey code streams through a hotkey code stream intelligent blocking mechanism. This eliminates the interference of switching operations on the upper-layer system, ensuring the continuous and stable operation of artificial intelligence tasks. It also supports quick switching of multiple upper-layer system serial ports through the front panel, greatly improving the efficiency of system debugging and maintenance. In addition, the standardized interface design ensures good compatibility with various hardware components, providing a reliable and cost-optimized solution for large-scale AI cluster deployment.

[0097] Figure 4 This is a flowchart illustrating the serial port switching control method provided in the embodiments of this application, as shown below. Figure 4 As shown, an embodiment of this application provides a serial port switching control method, which is described in detail below:

[0098] 401. Receive serial port data input from external devices on the server and store the serial port data in the cache module.

[0099] Specifically, the system receives serial port data from external devices connected to the server and stores this data in the cache module. These external devices connect via a front panel serial port, and the serial port data includes user-input debugging commands, parameter configuration information, or system query commands. The cache module can use a first-in, first-out (FIFO) memory or other storage units with temporary data storage capabilities to temporarily store the serial port data, ensuring that data is not lost during transmission.

[0100] 402. If a hotkey switching trigger signal is detected, the data output path of the cache module is shut down.

[0101] Specifically, if a hotkey switching trigger signal is detected, the data output path of the buffer module is immediately shut down. The hotkey switching trigger signal is generated by the user inputting a specific hotkey combination via an external device. After this signal is recognized by the serial port switching control circuit, the system immediately interrupts the data transmission channel between the buffer module and the upper-layer system. This operation effectively prevents the ASCII code stream corresponding to the hotkey from being transparently transmitted to the upper-layer system during the switching process, thereby avoiding problems such as abnormal system responses or garbled characters displayed on the serial port interface due to misinterpretation of the hotkey code stream.

[0102] 403. If the serial port switching corresponding to the hotkey switching trigger signal is detected to be completed, the data output path of the cache module is opened, and the cached serial port data is sent to the serial port of the upper layer system to which it has been switched.

[0103] Specifically, when the serial port switching operation corresponding to the hotkey switching trigger signal is detected as complete, the system will reopen the data output path of the buffer module and send the buffered serial port data to the corresponding serial port of the upper-layer system after the switch. The determination of the completion of the serial port switching can be based on hardware status signals or a preset delay mechanism to ensure that data transmission is only resumed after the new communication link is stably established. This design ensures seamless data link conversion during serial port switching while avoiding interference to the upper-layer system caused by the switching action.

[0104] The serial port switching control method provided in this application can effectively isolate the impact of hotkey code streams on the upper-layer system by temporarily storing and controlling the path of serial port data during serial port switching, thereby improving the reliability and stability of system debugging and maintenance. Furthermore, this method is applicable to AI server architectures containing multiple components such as GPU, CPU, DPU, and BMC, and can meet the needs of multi-node serial port management in complex environments.

[0105] In some embodiments, the method includes: receiving serial port data input from an external device of the server, and comparing the serial port data with multiple artificial intelligence task instructions.

[0106] Specifically, by comparing the input data with features from multiple pre-stored AI task instructions, the system accurately distinguishes between normal operation instructions and switching control signals. This identification process can employ multiple verification mechanisms, including instruction format analysis, feature code matching, and contextual semantic detection, to ensure the accuracy of the identification.

[0107] If the serial port data is a hotkey code stream for switching hotkeys and does not overlap with multiple AI task instructions, the serial port data is stored in the cache module. If a hotkey switching trigger signal is detected, the data output path of the cache module is turned off. If the serial port switching corresponding to the hotkey switching trigger signal is detected to be completed, the data output path of the cache module is turned on, and the cached serial port data is sent to the serial port of the upper-layer system that has been switched to.

[0108] Specifically, differentiated processing strategies can be implemented based on the identification results: when it is confirmed to be a pure hotkey code stream, the data is first temporarily stored in the cache module to avoid data loss; then, when a hotkey switching trigger signal is detected, data output to the switching module is immediately shut off to prevent the hotkey code stream from being immediately passed through to the upper-layer system during the switching process, thus avoiding abnormal responses from the upper-layer system or unexpected characters being printed on the serial port interface of external devices. After the serial port switching operation is completed, the data path is restored in a timely manner, and the complete cached data is sent to the newly switched upper-layer system serial port.

[0109] If the serial port data exists in multiple AI task instructions, the serial port data will be passed through to the serial port of the currently switched upper-layer system; if the serial port data is a hotkey code stream of a switching hotkey and overlaps with the AI ​​task instructions, the context of the serial port data will be analyzed to determine the data type of the serial port data.

[0110] Specifically, the serial port switching control method also includes steps for intelligent identification and classification of serial port data to accurately distinguish between AI task instructions and switching hotkeys. Specifically, when serial port data is received from an external device, the system first compares the data with multiple AI task instructions pre-stored in the instruction storage module. These AI task instructions include, but are not limited to, control commands in typical AI application scenarios such as deep learning model training control instructions, inference task scheduling instructions, and hardware resource allocation instructions.

[0111] If, after comparison, the serial port data is identified as clearly existing within multiple AI task instruction sets, the system determines that the data is a valid AI work instruction. In this case, the serial port data is directly transmitted to the serial port of the currently switched upper-layer system. This approach ensures that the normal execution of AI tasks is not affected by serial port switching operations, guaranteeing the continuity of AI server operations.

[0112] If the serial port data is identified as a hotkey stream for switching hotkeys, and feature comparison reveals overlap between the hotkey stream and AI task instructions, the system will initiate a context analysis mechanism. This mechanism analyzes and judges the data stream by detecting specific feature identifiers, including but not limited to detecting whether the data stream contains prefix or suffix identifiers unique to AI task instructions. It also combines the timing characteristics, frame structure characteristics, and semantic environment of the data packets for a comprehensive judgment. Based on the results of the context analysis, the system ultimately determines the data type of the serial port data. If it is confirmed to be an AI task instruction, it is passed through to the current upper-layer system as described above; if it is confirmed to be a pure hotkey switch, it proceeds to the corresponding caching and delay processing flow.

[0113] The method provided in this embodiment effectively distinguishes between AI task commands and switching hotkeys through a precise command recognition mechanism, avoiding functional abnormalities caused by misjudgment. Employing a three-stage processing strategy of caching, blocking, and recovery, it ensures reliable execution of hotkey switching while completely preventing the hotkey code stream from being passed through to the upper-layer system, eliminating system response anomalies and serial port interface garbled characters caused by this. This method maintains the integrity of data transmission while ensuring the stability of serial port switching, significantly improving the debugging reliability and operational efficiency of the AI ​​server system.

[0114] In some embodiments, if a hotkey switching trigger signal is detected, the data output path of the cache module is shut down, including: after detecting the hotkey switching trigger signal, strobe the output target level to block the output of the cache module.

[0115] In some embodiments, the method further includes: performing data frame integrity detection on the transmitted serial port data; after determining that the previous frame of transmitted serial port data is a complete frame, switching the data channel between serial ports of multiple upper-layer systems according to a hotkey switching trigger signal.

[0116] In some embodiments, the method further includes sending serial port data received from the corresponding upper-layer system to an external device.

[0117] In some embodiments, the received serial port data is compared with multiple artificial intelligence task instructions in the instruction storage module, and the cached serial port data is sent to the serial port of the switched upper-layer system according to the comparison result.

[0118] In some embodiments, the received serial port data is compared with multiple pre-stored hotkey code streams, and the cached serial port data is sent to the serial port of the switched upper-layer system according to the comparison result.

[0119] For a description of the features in the embodiment corresponding to the serial port switching control method, please refer to the relevant description of the embodiment corresponding to the serial port switching control device, which will not be repeated here.

[0120] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0121] Figure 5 This is a schematic diagram of the structure of the serial port switching control device provided in an embodiment of this application. Figure 5 As shown, embodiments of this application also provide a serial port switching control device 50, comprising:

[0122] The receiving module 501 is used to receive serial port data input from external devices of the server and store the serial port data in the buffer module.

[0123] The shutdown module 502 is used to shut down the data output path of the cache module if a hotkey switching trigger signal is detected.

[0124] The enabling module 503 is used to enable the data output path of the cache module and send the cached serial port data to the serial port of the upper-layer system to which the hotkey switching trigger signal is switched if the serial port switching is detected to complete.

[0125] The serial port switching control method provided in this application can effectively isolate the impact of hotkey code streams on the upper-layer system by temporarily storing and controlling the path of serial port data during serial port switching, thereby improving the reliability and stability of system debugging and maintenance. Furthermore, this method is applicable to AI server architectures containing multiple components such as GPU, CPU, DPU, and BMC, and can meet the needs of multi-node serial port management in complex environments.

[0126] For a description of the features in the embodiment corresponding to the serial port switching control device, please refer to the relevant description of the embodiment corresponding to the serial port switching control method, which will not be repeated here.

[0127] Figure 6 A schematic diagram of the structure of the electronic device provided in this application. Figure 6 As shown, the electronic device 60 provided in this embodiment includes at least one processor 601 and a memory 602. Optionally, the electronic device 60 further includes a communication component 603. The processor 601, memory 602, and communication component 603 are connected via a bus.

[0128] In the specific implementation process, at least one processor 601 executes computer execution instructions stored in memory 602, causing at least one processor 601 to execute the above-described serial port switching control method embodiment.

[0129] The specific implementation process of processor 601 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0130] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0131] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0132] The bus can be an Industry Standard Architecture (ISA) bus, 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 illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0133] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described embodiments of the serial port switching control method when it is run.

[0134] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0135] The embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described serial port switching control method embodiments.

[0136] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described serial port switching control method embodiments.

[0137] Those skilled in the art will further 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, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. 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 this application.

[0138] The serial port switching control method provided in this application has been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only intended to help understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A serial port switching control circuit, characterized in that, include: The caching module is connected to the server's external devices and the output control module. It is used to receive serial port data input from the external devices, cache the serial port data, and send the cached serial port data to the output control module. The output control module is connected to the switching module and is used to shut down the serial port data output to the switching module after detecting the hotkey switching trigger signal. The switching module is connected to multiple upper-layer systems within the server and is used to switch the data channel between the serial ports of the multiple upper-layer systems according to the hotkey switching trigger signal. The output control module is also used to start serial port data output to the switching module after detecting that the switching module has completed serial port switching, and send the buffered serial port data to the switching module. The output control module includes a multiplexer; The multiplexer has a first input terminal connected to the output terminal of the buffer module, a second input terminal connected to the target level, and an output terminal connected to the switching module. It is used to select and output the target level after detecting a hotkey switching trigger signal, thereby blocking the output of the buffer module.

2. The circuit according to claim 1, characterized in that, The switching module is used to perform data frame integrity detection on the transmitted serial port data. After determining that the previous frame of serial port data is a complete frame, it switches the data channel between the serial ports of the multiple upper-layer systems according to the hotkey switching trigger signal.

3. The circuit according to claim 1, characterized in that, The switching module is also connected to the external device and is used to send serial port data received from the corresponding upper-layer system to the external device.

4. The circuit according to any one of claims 1-3, characterized in that, The circuit also includes an instruction storage module; The instruction storage module is connected to the cache module and the switching module; The instruction storage module is used to store multiple artificial intelligence task instructions and compare the received serial port data with the multiple artificial intelligence task instructions in the instruction storage module. If the serial port data is a hotkey code stream for switching hotkeys, and does not overlap with the multiple artificial intelligence task instructions, then the serial port data is stored in the cache module; If the serial port data is a hotkey code stream for switching hotkeys and overlaps with the artificial intelligence task instruction, then the context of the serial port data is analyzed. If the context of the serial port data includes a prefix or suffix identifier of the artificial intelligence task instruction, then the serial port data is determined to be an artificial intelligence task instruction, and the serial port data is sent to the switching module. If the serial port data exists in the multiple artificial intelligence task instructions, then the serial port data is sent to the switching module; The switching module is also used to pass the serial port data to the serial port of the currently switched upper-layer system.

5. The circuit according to any one of claims 1-3, characterized in that, The circuit also includes an instruction storage module; The instruction storage module is connected to the output control module and is used to store multiple artificial intelligence task instructions; The output control module is also used to compare the received serial port data with multiple artificial intelligence task instructions in the instruction storage module, and control the output of the serial port data according to the comparison result.

6. The circuit according to any one of claims 1-3, characterized in that, The circuit also includes a hotkey switching storage module; The hotkey switching storage module is connected to the output control module and is used to store the hotkey code stream of multiple hotkey switching keys; The output control module is also used to compare the received serial port data with multiple hotkey code streams in the switching hotkey storage module, and control the output of the serial port data according to the comparison result.

7. A server, characterized in that, include: Multiple upper-layer systems, a front panel, and a serial port switching control circuit as described in any one of claims 1 to 6; The front panel is connected to the serial port switching control circuit and is used to connect to external devices to transmit serial port data input from external devices to the serial port switching control circuit. The serial port switching control circuit is connected to multiple upper-layer systems and is used to switch the serial ports of multiple upper-layer systems according to the hotkey switching trigger signal in the serial port data input by external devices.

8. A serial port switching control method, characterized in that, The method, applied to the serial port switching control circuit as described in any one of claims 1 to 6, comprises: Receive serial port data input from external devices of the server and store the serial port data in the cache module; If a hotkey switching trigger signal is detected, the data output path of the cache module is shut down; If the serial port switching corresponding to the hotkey switching trigger signal is detected to be completed, the data output path of the cache module is opened, and the cached serial port data is sent to the serial port of the upper-layer system that has been switched to.

9. The method according to claim 8, characterized in that, The step of storing the serial port data in the cache module includes: The serial port data is compared with multiple artificial intelligence task instructions; If the serial port data is a hotkey code stream for switching hotkeys and does not overlap with the multiple artificial intelligence task instructions, then the serial port data is stored in the cache module. If the serial port data exists in the multiple artificial intelligence task instructions, then the serial port data is passed through to the serial port of the currently switched upper-layer system; If the serial port data is a hotkey code stream for switching hotkeys and overlaps with the artificial intelligence task instructions, then the context of the serial port data is analyzed to determine the data type of the serial port data.

Citation Information

Patent Citations

  • Multi-serial-port intelligent switching method and system and storage medium

    CN120561052A

  • Control method of computing system, computing system, and switch

    JP2013156968A