Optical switch-based PCIe data exchange method, system and computer readable storage medium

By constructing a centralized optical interconnect network through optical switching technology, the dynamic connection problem of the PCIe bus in multi-node interconnection scenarios is solved, and transparent optical path switching and fault self-healing of the PCIe protocol are realized, thereby improving the flexibility and reliability of the system.

CN122138077APending Publication Date: 2026-06-02HUBEI SILANG WANWEI COMPUTING EQUIPMENT MANUFACTURING CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUBEI SILANG WANWEI COMPUTING EQUIPMENT MANUFACTURING CO LTD
Filing Date
2026-01-12
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

The existing PCIe bus cannot achieve dynamic and reconfigurable connections in multi-node interconnection scenarios, resulting in low efficiency and error-proneness, which cannot meet the flexibility and reliability requirements of high-performance computing and data centers.

Method used

By using optical switching technology, PCIe data links are converted into optical signals, and a centralized optical interconnection network is built using optical switching equipment to dynamically establish optical path connections between any computing nodes, thereby enabling transparent data transmission of the PCIe protocol.

Benefits of technology

It enables dynamic and automated reconfiguration of PCIe connections, improving system flexibility and reliability, supporting microsecond-level hot switching and fault self-healing capabilities, and meeting the efficient resource scheduling needs of high-performance computing and data centers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122138077A_ABST
    Figure CN122138077A_ABST
Patent Text Reader

Abstract

This invention provides a PCIe data exchange method, system, and computer-readable storage medium based on optical switching. The method includes: converting the PCIe data links of multiple computing nodes into optical signal links via an optoelectronic conversion module and connecting them to an optical switching device to form a centralized optical interconnect network; configuring the optical switching device through a control interface to dynamically establish an optical path connection between any pair of computing nodes; and transmitting data between the pair of computing nodes through the established optical path based on the PCIe protocol, wherein the optoelectronic conversion module and the optical switching device are transparent to the PCIe protocol. This invention overcomes the inherent point-to-point physical connection limitations of the PCIe bus, enabling dynamic, automated, and reconfigurable PCIe connection relationships between a single computer and multiple other computers, replacing inefficient and error-prone manual cable plugging and unplugging operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of PCIe data switching based on optical switching, and more particularly to a PCIe data switching method, system, and computer-readable storage medium based on optical switching. Background Technology

[0002] In computing and communication systems based on the PCIe (PCIe High-Speed ​​Peripheral Component Interconnect) bus, the PCIe bus, as a high-speed serial point-to-point interconnect standard, has been widely used for high-speed data transmission within and between computers. However, its inherent point-to-point architecture also brings significant limitations in scalability and flexibility. Specifically, standard PCIe links are strictly limited to establishing exclusive direct connections between two devices (such as two computers or one computer and one peripheral). When a computer needs to interact with multiple other computer nodes and expects to dynamically establish connections with different nodes at different times, existing PCIe technology solutions cannot achieve flexible reconfiguration of connections at the physical layer.

[0003] To address the aforementioned multi-node interconnection requirements, traditional practices typically rely on manual intervention at the physical layer. Operators must manually plug and unplug physical cables (such as copper cables) connecting computer PCIe interfaces to change the connection relationship according to changes in communication objectives. This manual switching method suffers from a series of prominent problems, including inefficiency, error-proneness, inability to achieve rapid dynamic switching, and difficulty in scaling. Especially in application scenarios requiring high-frequency, programmable, or automated adjustments to the interconnection topology (such as dynamic allocation of high-performance computing cluster resources and rapid reconstruction of test and verification environments), manual operation has become a bottleneck for system performance and automation.

[0004] Therefore, the urgent technical problem to be solved in this field is: how to break through the limitations of point-to-point physical connection while maintaining the native compatibility of the PCIe protocol, and provide a method that can dynamically, reconfigurably, and automatically switch the connection between a computer PCIe interface and multiple other computer PCIe interfaces on demand, thereby eliminating the dependence on manual physical intervention and improving the flexibility, efficiency and reliability of the system. Summary of the Invention

[0005] The purpose of this invention is to provide a PCIe data exchange method, system, and computer-readable storage medium based on optical switching, so as to overcome the inherent point-to-point physical connection limitation of the PCIe bus, realize the dynamic, automated, and reconfigurable PCIe connection relationship between a single computer and multiple other computers, and replace the inefficient and error-prone manual cable plugging and unplugging operation.

[0006] To achieve the above objectives, the present invention is implemented as follows: In a first aspect, the present invention provides a PCIe data switching method based on optical switching, characterized in that it includes: The PCIe data links of multiple computing nodes are converted into optical signal links via photoelectric conversion modules and connected to optical switching equipment to form a centralized optical interconnect network. The optical switching device can be configured through the control interface to dynamically establish an optical path connection between any pair of computing nodes; The pair of computing nodes transmit data through the established optical path based on the PCIe protocol, wherein the photoelectric conversion module and the optical switching device are transparent to the PCIe protocol.

[0007] The control interface is a serial communication interface.

[0008] The method is used for dynamic interconnection of computing resources within high-performance computing clusters or data centers.

[0009] Secondly, a PCIe data switching system based on optical switching is provided, including: Multiple compute nodes, each compute node has a PCIe interface; Multiple photoelectric conversion modules are connected to the PCIe interface of the computing node to convert PCIe electrical signals into optical signals. An optical switching device has multiple ports, each of which is connected to one of the photoelectric conversion modules via optical fiber, for receiving optical signals from each computing node and forming a centralized optical interconnect network; A control interface, connected to the optical switching device, is used to receive external configuration commands; The optical switching device includes a switching matrix and a control unit. The control unit is used to receive configuration instructions through the control interface and drive the switching matrix according to the configuration instructions to dynamically establish an optical path connection between any pair of computing nodes. The photoelectric conversion module and the optical switching device are transparent to the PCIe protocol, enabling the pair of computing nodes to transmit data through the established optical path based on the PCIe protocol.

[0010] Thirdly, the present invention also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the method described in the first aspect.

[0011] The beneficial effects of this invention are as follows: The optical switching-based PCIe data exchange method of this invention constructs a centralized PCIe optical interconnect network by introducing an optoelectronic conversion module and a configurable optical switching device. This successfully transforms the originally fixed point-to-point PCIe physical link into a logical connection that can be dynamically reconfigured via commands. This setup solves the problem of relying on manual cable plugging and unplugging to switch connection targets in traditional methods. It enables rapid and automated establishment and switching of PCIe data paths between any pair of computing nodes while maintaining the integrity and timing transparency of the native PCIe protocol. This significantly improves the flexibility, manageability, and operational efficiency of multi-node PCIe interconnect systems.

[0012] Furthermore, by supporting microsecond-level optical path hot switching and automatic link retraining, the connection relationship between computing nodes can be dynamically adjusted without downtime or service interruption, significantly improving the flexibility of resource scheduling and the overall system utilization. It is especially suitable for high-performance computing and data center scenarios that require real-time load balancing or task migration, realizing a truly "software-defined" PCIe interconnect network.

[0013] Furthermore, the system possesses self-healing capabilities by integrating link status monitoring and automatic switching to backup optical paths. When a primary link failure or performance degradation is detected, the system can automatically and quickly reroute the data stream to a pre-configured backup path and trigger PCIe link recovery, greatly enhancing the system's reliability and availability. This meets the high requirements of critical services for continuous and stable operation and overcomes the drawbacks of communication interruptions caused by single-point failures in traditional point-to-point direct connection architectures. Attached Figure Description

[0014] Figure 1 This is a schematic flowchart of a PCIe data switching method based on optical switching according to an embodiment of the present invention; Figure 2 This is a schematic structural diagram of a PCIe data switching system based on optical switching according to an embodiment of the present invention. Figure 3 This is a schematic flowchart of a PCIe data switching method based on optical switching according to another embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the principle of optical path switching implemented by the optical switch of the present invention; Figure 5 This is a schematic flowchart of a PCIe data switching method based on optical switching according to another embodiment of the present invention; Figure 6 This is a schematic flowchart of a PCIe data switching method based on optical switching according to another embodiment of the present invention; Figure 7This is a schematic flowchart of a PCIe data switching method based on optical switching according to another embodiment of the present invention; Figure 8 This is a schematic flowchart of a PCIe data switching method based on optical switching according to another embodiment of the present invention; Figure 9 This is a schematic structural block diagram of a PCIe data switching system based on optical switching according to an embodiment of the present invention; Figure 10 This is a topology diagram of a computer-readable storage medium disclosed in this invention. Detailed Implementation

[0015] The present invention will now be described in detail with reference to the embodiments shown in the accompanying drawings. However, it should be noted that these embodiments are not intended to limit the present invention. Equivalent changes or substitutions in function, method, or structure made by those skilled in the art based on these embodiments are all within the scope of protection of the present invention.

[0016] The technical solutions provided by the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0017] Example One: like Figure 1 As shown, this embodiment provides a PCIe data switching method based on optical switching (for optical switches or PCIe data switching systems based on optical switching), the method comprising: Step 101. Convert the PCIe data links of multiple computing nodes into optical signal links via photoelectric conversion modules and connect them to optical switching equipment to form a centralized optical interconnect network.

[0018] Multiple computing nodes (such as Figure 2 The PCIe data links of CPU1 to CPU16 are converted into optical signals by independent photoelectric conversion modules and then uniformly connected to optical switching equipment (i.e., optical switches), thereby constructing a centralized optical interconnection network. In this way, the originally scattered point-to-point physical connections are aggregated to a central switching node. This not only greatly simplifies the cabling complexity and maintenance difficulty by replacing multiple cables with optical fibers, but also breaks through the distance limitations of electrical signal transmission, laying the necessary physical network foundation for the subsequent realization of software-defined dynamic switching.

[0019] It should be noted that the photoelectric conversion module in this embodiment is a QSFP series optical module.

[0020] like Figure 3 As shown, the operation of "converting the PCIe data links of multiple computing nodes into optical signal links via photoelectric conversion modules" in step 101 includes: Step 301. The PCIe electrical signals from the computing node are transmitted to the electrical interface of the optoelectronic conversion module via printed circuit board traces. Specifically, the high-speed PCIe electrical signals from the computing node are transmitted to the electrical interface of the optoelectronic conversion module through controlled impedance traces on the printed circuit board. In this way, the controllability of the PCB design ensures the integrity of high-frequency signal transmission and reduces reflection and attenuation. It also provides a stable and reliable electrical access point for standardized pluggable optoelectronic conversion modules, which is the primary step in achieving high-quality electro-optical conversion.

[0021] Step 302. Convert the PCIe electrical signal into an optical signal within the photoelectric conversion module. This process is completed within the photoelectric conversion module. The received PCIe electrical signal is precisely converted into an optical signal of a specific wavelength through the integrated drive and modulation circuitry of the module. This achieves a fundamental conversion of the data transmission medium from the electrical domain to the optical domain. This process is strictly limited to the physical layer and does not change any PCIe protocol data, thus ensuring the protocol's complete transparency to upper-layer applications and providing the signal with extremely strong resistance to electromagnetic interference.

[0022] Step 303. Transmit the optical signal to the corresponding port of the optical switching equipment via optical fiber. That is, use optical fiber to connect the optical signal output from the photoelectric conversion module to the designated port of the optical switching equipment to establish a high-speed, low-loss optical transmission channel, giving the system flexibility in physical connection. Based on this fixed physical connection, the network can configure the switching matrix inside the optical switching equipment through subsequent software instructions, thereby realizing arbitrary, dynamic logical reconfiguration of data flow without changing any physical cables.

[0023] Step 102. Configure the optical switching equipment through the control interface to dynamically establish optical path connections between any pair of computing nodes. Specifically, refer to... Figure 4 As shown, configuration commands are issued to the optical switching device through a control interface (e.g., serial port) to dynamically establish point-to-point optical path connections between any pair of source (I1~I16) and target computing nodes (O1~O16). This transforms the traditional fixed and rigid PCIe physical connection into a logical connection that can be flexibly defined and adjusted in real time by software commands. This completely replaces the inefficient and error-prone manual cable plugging and unplugging operations with automated electronic configuration, realizing the "software definition" and dynamic reconfigurability of the system connection topology.

[0024] like Figure 5 As shown, the operations for configuring the optical switching equipment through the control interface include: Step 501. Send a connection establishment command containing the source computing node identifier and the target computing node identifier to the optical switching equipment. Specifically, send a connection establishment command containing specific source computing node identifiers and target computing node identifiers to the control unit of the optical switching equipment. This transforms the connection intent of the user or upper-layer management software (i.e., "who communicates with whom") into a clear control command that the optical switching equipment can recognize and execute. This provides a clear logical objective for the subsequent establishment of the physical path and serves as the trigger point for the entire automated configuration process.

[0025] Step 502. The control unit of the optical switching device parses the instructions and drives its internal switching matrix to perform cross-connection operations. The dedicated control unit (such as a microcontroller) inside the optical switching device parses the received connection instructions and drives its core switching matrix (such as a MEMS optical switch array) to perform the corresponding physical cross-connection operations according to the instruction content. This converts the logical instructions from the previous step into actual physical optical path switching actions. By changing the transmission path of the optical signal within the switching chip, a dedicated optical transmission channel between the two selected computing nodes is truly established at the hardware level.

[0026] Step 503. The optical switching equipment feeds back the status information indicating that the connection has been established. After completing the configuration of the internal switching matrix and the establishment of the optical path, the optical switching equipment feeds back the status information of "connection established" to the command sender through the control interface. This achieves closed-loop control of the configuration process, provides system administrators with confirmation of successful operation, enhances the controllability and reliability of the entire configuration process, and also provides status information for subsequent automated operation and maintenance and fault diagnosis.

[0027] like Figure 6 As shown, after dynamically establishing the optical path connection between any pair of computing nodes, a link initialization step is also included: Step 601. After the physical connection is established, the source and target compute nodes automatically execute the standard PCIe link training and initialization process. Following the establishment of the physical optical path, the source and target compute nodes automatically initiate and complete the standard PCIe link training and initialization negotiation process. This ensures that on the new physical link established in the optical switching network, both ends of the device can adhere to the native PCIe protocol specifications, automatically negotiate common communication rates, link widths, and other parameters, and complete the adjustment and synchronization of electrical characteristics. This ensures complete transparency of the entire switching system to the PCIe protocol, allowing compute nodes to treat the optical switching network as a regular PCIe cable without any special drivers or configurations.

[0028] Step 602. After the link training is successful, both computing nodes enter the normal data transmission state.

[0029] This step is a natural consequence of successful link training. The PCIe controllers of both compute nodes enter normal operating mode (L0 state) and begin application layer data transmission through the established and trained optical path. This step marks the end of a complete connection establishment and initialization cycle, verifying the effectiveness of the entire "configuration-establishment-training" process and ultimately achieving the ultimate goal of high-speed, stable, and standard protocol-compliant PCIe data exchange on a flexible and reconfigurable optical switching network.

[0030] Step 103. A pair of computing nodes transmit data through the established optical path based on the PCIe protocol, wherein the photoelectric conversion module and the optical switching device are transparent to the PCIe protocol.

[0031] In other words, a pair of computing nodes that successfully establish a connection will transmit data at high speed through a transparent optical path constructed by an optoelectronic conversion module and an optical switching device based on the standard PCIe protocol. This verifies and realizes the core promise of the entire switching scheme: the optoelectronic conversion module only performs physical layer signal medium conversion, and the optical switching device only performs physical optical path cross-connection. Neither of them decodes, interferes with, or modifies the PCIe protocol data packets and link management signaling carried. Therefore, for the computing nodes at both ends, the entire optical switching network is functionally completely equivalent to a directly connected PCIe cable, ensuring full compatibility with existing computer hardware, operating systems, and drivers.

[0032] like Figure 7 As shown, in step 103, if a communication target needs to be switched during data transmission between a pair of computing nodes via the established optical path based on the PCIe protocol, a hot-switching step is performed: Step 701. Send a new connection configuration command to the optical switching device via the control interface to establish a new optical path with another target computing node. It should be understood that when a change in communication relationship is required, a new connection configuration command is sent to the optical switching device via a control interface (such as a serial port). This command specifies the source computing node and a new target computing node identifier to request the establishment of a new point-to-point optical path. In this way, a connection switching request can be initiated online via software commands without interrupting the existing computing tasks of the source computing node or physically shutting it down. This provides a direct control means for achieving dynamic resource scheduling and task migration, and is a key operation for achieving high flexibility and programmability in the system.

[0033] Step 702. The optical switching equipment completes the optical path switching within microseconds. After receiving a new configuration command, the optical switching equipment's control unit drives the internal switching matrix (e.g., based on MEMS technology) to complete the physical switching from the old optical path to the new optical path within a microsecond timescale. This setup reconfigures the physical connection at extremely high speed, resulting in very short latency introduced by the connection switching, far lower than that of manual operation or mechanical optical switches. This meets the stringent requirements of high-performance computing, real-time data processing, and other application scenarios with stringent requirements for connection latency and service continuity, and is the core element for ensuring "hot switching" performance.

[0034] Step 703. The source compute node detects the link change and automatically performs PCIe link retraining with the new target compute node. The physical link switch causes the source compute node to detect a change in its PCIe link status (such as a link retraining request). Subsequently, the source compute node and the new target compute node automatically trigger and execute a complete standard PCIe link retraining and initialization process. Thus, after the physical switch of the optical path is completed, the standard PCIe controllers of both ends automatically complete the protocol layer adaptation and synchronization of the new link, ensuring that the connection is fully ready at the protocol level. This not only reaffirms the system's protocol transparency but also ensures that the hot switch process ultimately forms a stable, usable, and standard-compliant data transmission channel, achieving dynamic network reconstruction without the service's awareness.

[0035] like Figure 8 As shown, the method in this embodiment also includes a fault handling step, specifically including: Step 104. Monitor the data transmission status of the optical paths. In this step, the data transmission status of each established optical path is continuously monitored. Specific monitoring indicators include, but are not limited to, optical signal power, bit error rate, or the health status of the link protocol layer. This setup provides the system with real-time link performance awareness, which is a prerequisite for automated fault management. Through proactive monitoring, the system can promptly detect potential physical link degradation (such as fiber bending loss) or sudden interruptions, providing a basis for decision-making for subsequent rapid response and recovery.

[0036] Step 105. When a link failure or performance degradation is detected, the data stream is switched to a pre-configured backup optical path via the control interface. When the monitoring system determines that the current primary optical path has failed or its performance has degraded to an unacceptable level, it sends a predefined switching command to the optical switching equipment via the control interface, rerouting the affected data stream from the faulty path to the pre-configured backup optical path in real time. This achieves high availability of services. By quickly switching physical paths at the hardware level, system communication interruptions caused by single-point link failures are avoided, greatly improving the reliability and robustness of the entire interconnection network.

[0037] Step 106. Trigger the affected compute nodes to execute the PCIe link recovery procedure on the backup optical path. After the data flow is switched to the backup optical path, trigger the affected source and target compute nodes to automatically execute a standard PCIe link recovery procedure (including detection, polling, configuration, etc.) on this new physical link. In this way, ensure that the backup path can complete a complete protocol layer handshake and synchronization like the primary path before carrying actual service data, verifying its end-to-end electrical and logical correctness. This ensures that the fault switching is not only a reconnection of the physical optical path, but also the establishment of a protocol-ready, stable, and usable complete PCIe channel, enabling the system to fully recover from the fault.

[0038] The optical switching device in this embodiment is an optical switch supporting N×N space-division switching, where N is an integer greater than or equal to 2, the number of multiple computing nodes is 16, and the optical switch is configured with 16×16 ports. More specifically, the optical switching device is specifically configured as an optical switch supporting an N×N space-division switching (Space-Switch) architecture, where the number of ports N is an integer greater than or equal to 2. Preferably, the number of multiple computing nodes is 16, and correspondingly, the optical switch adopts a 16×16 port configuration. This configuration, on the one hand, refers to the physical principle of the switching, namely, directly changing the spatial path of the optical signal through an internal switching matrix. This differs from wavelength division or time division switching, and features extremely low switching latency and complete protocol transparency. On the other hand, the symmetrical 16×16 port configuration provides non-blocking full interconnection capability for all 16 computing nodes, ensuring that any pair of nodes can independently establish a dedicated optical path with uninterrupted bandwidth, thereby fully leveraging the flexibility and performance advantages of a centralized switching architecture.

[0039] In a specific embodiment, the implementation process of the PCIe data switching method based on optical switching is as follows: I. System Initialization and Networking 1. Physical connection establishment: Connect the PCIe data links of the 16 computing nodes (CPU1-CPU16) to the electrical interfaces of the corresponding QSFP optoelectronic conversion modules through PCB traces.

[0040] 2. Photoelectric conversion: Each QSFP module internally converts the received PCIe electrical signal into an optical signal.

[0041] 3. Fiber Optic Networking: Use fiber optic cables to connect the optical ports of each QSFP module to the corresponding ports of a 16×16-port space-division optical switch, thereby forming a centralized all-optical interconnection network.

[0042] II. Dynamic Connection Establishment and Data Transmission 4. Software configuration connection: When communication between CPU1 and CPU9 is required, the management host sends a configuration command containing "source: port 1, destination: port 9" to the optical switch via the serial port.

[0043] 5. Optical path switching: The control unit of the optical switch parses the instructions and drives its internal MEMS switching matrix to complete the physical optical path cross-connection between port 1 and port 9 in microseconds.

[0044] 6. Automatic Link Training: After the physical connection is established, CPU1 and CPU9 detect the link and automatically execute the standard PCIe link training and initialization process to negotiate parameters such as speed and bandwidth.

[0045] 7. Transparent Data Transmission: After successful link training, CPU1 and CPU9 enter normal state (L0) and begin high-speed data transmission based on the standard PCIe protocol. Throughout the process, the QSFP module and optical switch are transparent to the PCIe protocol and do not perform any protocol parsing or modification.

[0046] III. Dynamic Reconfiguration and High Availability 8. Hot Switching: If it is necessary to switch the communication target of CPU1 to CPU10, the management host sends a new command through the serial port. The optical switch quickly switches the optical path of CPU1 from port 9 to port 10, and CPU1 and CPU10 automatically complete the PCIe link retraining, realizing uninterrupted service switching.

[0047] 9. Fault Recovery: The system continuously monitors the signal quality of each optical path. If a primary link failure is detected between CPU1 and CPU10, the system automatically configures the optical switch via serial port to switch the data stream to a pre-set backup path (such as connecting to port 11), and triggers CPU1 and CPU11 to execute the link recovery process, achieving rapid self-healing.

[0048] Therefore, the method in this embodiment completely replaces manual cable plugging and unplugging by configuring the optical path via software instructions. This allows the PCIe connection between computing nodes to be dynamically and automatically reconfigured within milliseconds to microseconds according to task requirements, greatly improving system flexibility and resource utilization efficiency. The entire solution operates at the physical layer, and the photoelectric conversion and optical switching equipment are completely transparent to the PCIe protocol. Computing nodes do not need to install special drivers or modify configurations; they can communicate using only the standard PCIe protocol, ensuring perfect compatibility with existing hardware and software. Furthermore, the centralized optical switching architecture simplifies cabling, and the optical fiber has strong anti-interference capabilities. Combined with optional hot-swapping and automatic fault recovery mechanisms, the system possesses high availability and rapid troubleshooting capabilities, significantly improving overall stability and maintainability. In this way, it solves the problems of traditional PCIe point-to-point architectures, which cannot achieve flexible multi-point interconnection and rely on inefficient and error-prone manual cable plugging and unplugging operations.

[0049] In any of the above embodiments, based on the basic dynamic point-to-point connection, it supports the simultaneous establishment of multiple non-conflicting optical paths to form a one-time customized network topology (such as All-to-All, ring, fat tree, etc.) to serve collective communication operations. The specific operation is as follows: 1. Topology Reception Step: The control interface receives a topology request containing multiple sets of computing node pairs and their connection relationships (e.g., configuring a fully connected ring for CPU1-4: 1-2, 2-3, 3-4, 4-1).

[0050] 2. Conflict Detection and Scheduling Steps: The control unit of the optical switching equipment analyzes the request and checks for port contention (such as a port being simultaneously allocated to two different connections). If a conflict exists, it is broken down into multiple time-sequential, conflict-free switching sub-stages (Time-Sliced ​​Stages), and a scheduling table is generated.

[0051] 3. Batch configuration and execution steps: Based on the set of conflict-free connections or the scheduling table, the optical switching device loads the corresponding cross-connection state diagram for its internal switching matrix within a configuration cycle, and establishes all specified optical paths at once or in stages.

[0052] 4. Collaborative training steps: All involved computing nodes execute PCIe link training in parallel, and the management software coordinates the training completion status synchronously.

[0053] It should be understood that through topology-aware scheduling, complex multi-node data exchange patterns can be completed with minimal switching or parallel connections, reducing system-level communication latency by an order of magnitude. Furthermore, through batch and intelligent configuration of the switching matrix, idle and contention for port resources are avoided, fully leveraging the high bandwidth and low latency potential of optical switches. This enables the network topology to be dynamically reshaped according to the needs of upper-layer computing tasks, realizing the advanced architectural concept of "network as computing," demonstrating significant innovation.

[0054] Example Two: Combination Figure 2 and Figure 9 This embodiment provides a PCIe data switching system 900 based on optical switching, including multiple computing nodes (computing node 901a, computing node 901b, etc.), each computing node having a PCIe interface 9011; multiple photoelectric conversion modules 902 (photoelectric conversion module 902a, photoelectric conversion module 902b, etc.), respectively connected to the PCIe interface of the computing node, used to convert PCIe electrical signals into optical signals; an optical switching device 903 having multiple ports (port 9031a, port 9031b, etc.) and at least one control interface 9032, each port being connected to a photoelectric conversion module 902 via optical fiber, used to receive optical signals from each computing node and form a centralized optical interconnect network; the control interface 9032 is integrated on the optical switching device 903, used to receive external configuration commands. The optical switching device 903 may include a switching matrix 9033 and a control unit 9034. The control unit 9034 is used to receive configuration commands through a control interface and drive the switching matrix according to the configuration commands to dynamically establish an optical path connection between any pair of computing nodes. The photoelectric conversion module 902 and the optical switching device 903 are transparent to the PCIe protocol, enabling a pair of computing nodes 901 to transmit data through the established optical path based on the PCIe protocol.

[0055] It is worth noting that the control interface 9034 is a serial communication interface or includes one of UART, I2C, SPI, or Ethernet interfaces. As a preferred embodiment, the optical switching device integrates a serial port based on the RS-232 protocol as the control interface, allowing users to configure the optical path connection by sending text commands via terminal software.

[0056] It should be noted that the scheme or principle involved in the PCIe data switching system 900 based on optical switching in this embodiment is the same as that in Embodiment 1, and the same or similar contents will not be described in detail.

[0057] In the above embodiments, the basic optical switching PCIe system can also be deeply integrated with data center-level resource management software (such as Kubernetes, OpenStack) to form a "composable disaggregated PCIe resource pool" that can be uniformly orchestrated. Its structure specifically includes: an abstraction and publishing layer: the system provides a management plugin that abstracts the PCIe endpoints of each compute node and the connectivity of the optical switches into manageable "PCIe connection resources" and publishes them to the data center resource manager (such as the Kubernetes Device Plugin); a policy-driven configuration engine: receiving "workload scheduling requests" from the resource manager (e.g., "dynamically mount the x16 link of GPU node A to compute node B"), the engine translates these requests into specific optical switch configuration instruction sequences based on policies (e.g., latency optimization, bandwidth guarantee, fault domain isolation); and a state synchronization and assurance module: communicating with the management software and agents on the compute nodes before and after the optical path is established to coordinate the device's I / O memory management unit (IOMMU) configuration, driver status, etc., ensuring that the "hot migration" of PCIe devices between hosts is fully ready at the protocol and system levels. Health and Service Level Agreement (SLA) monitoring module: continuously monitors the performance metrics (bandwidth, latency, bit error rate) of each dynamic PCIe link and compares them with the SLA commitments, triggering automatic optimization or reconstruction when performance fails to meet the standards.

[0058] This embodiment enables expensive PCIe devices (such as GPUs, FPGAs, and NVMe storage) to break free from the constraints of a single host and become shared resources that can be allocated on demand and delivered in seconds across the data center, greatly improving asset utilization and business agility. Furthermore, through integration with an application scheduler, it enables connection guarantees based on business priorities, automatic device migration in case of failure, and load-based elastic scaling, elevating system reliability from the hardware level to the service level.

[0059] This invention also provides a terminal device, which may include a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the above-described functionality. Figure 1 The various processes of the PCIe data exchange method embodiment based on optical switching shown can achieve the same technical effect, and will not be described again here to avoid repetition.

[0060] Combination Figure 10 As shown, this embodiment also discloses a specific implementation of a computer-readable storage medium 1000. The computer-readable storage medium 1000 can be configured wholly or partially in a physical computer, server, cluster server, or data center.

[0061] In this embodiment, the computer-readable storage medium 1000 stores computer program instructions 1001, which are read and executed by a processor 1002 to perform the steps in the optical switching-based PCIe data switching method disclosed in Embodiment 1.

[0062] Optionally, the computer-readable storage medium 1000 can be configured as a server, and the server runs on a physical device used to build a private cloud, hybrid cloud, or public cloud. The computer-readable storage medium 1000 can also be configured as random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0063] The computer-readable storage medium 1000 is used to store a program, and the processor 1002, upon receiving an execution instruction, executes the PCIe data exchange method based on optical switching disclosed in Embodiment 1.

[0064] Meanwhile, the processor 1002 disclosed in this embodiment may be an integrated circuit chip with signal processing capabilities. The processor 1002 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor.

[0065] The technical solution of the same part in the computer-readable storage medium 1000 disclosed in this embodiment as in Embodiment 1 and / or Embodiment 2 is described in Embodiment 1 and / or Embodiment 2, and will not be repeated here.

[0066] The detailed descriptions listed above are merely specific descriptions of feasible embodiments of the present invention, and are not intended to limit the scope of protection of the present invention. All equivalent embodiments or modifications made without departing from the spirit of the present invention should be included within the scope of protection of the present invention.

[0067] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0068] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A PCIe data switching method based on optical switching, characterized in that, include: The PCIe data links of multiple computing nodes are converted into optical signal links via photoelectric conversion modules and connected to optical switching equipment to form a centralized optical interconnect network. The optical switching device can be configured through the control interface to dynamically establish an optical path connection between any pair of computing nodes; The pair of computing nodes transmit data through the established optical path based on the PCIe protocol, wherein the photoelectric conversion module and the optical switching device are transparent to the PCIe protocol.

2. The method according to claim 1, characterized in that, The process of converting the PCIe data links of multiple computing nodes into optical signal links via a photoelectric conversion module includes: The PCIe electrical signals of the computing node are transmitted to the electrical interface of the photoelectric conversion module through the printed circuit board traces. The PCIe electrical signal is converted into an optical signal inside the photoelectric conversion module; The optical signal is transmitted to the corresponding port of the optical switching device via optical fiber.

3. The method according to claim 1, characterized in that, The configuration of the optical switching device via the control interface includes: Send a connection establishment command containing the source computing node identifier and the target computing node identifier to the optical switching device; The control unit of the optical switching device parses the instructions and drives its internal switching matrix to perform cross-connection operations; The optical switching device provides feedback on the status of the connection establishment being completed.

4. The method according to claim 1 or 3, characterized in that, After dynamically establishing the optical path connection between any pair of computing nodes, a link initialization step is also included: After the physical connection is established between the source computing node and the target computing node, the standard PCIe link training and initialization process is automatically executed. After the link training is successful, both computing nodes enter the normal data transmission state.

5. The method according to claim 1, characterized in that, In step three, if a communication target needs to be switched during data transmission between a pair of computing nodes via the established optical path based on the PCIe protocol, a hot-switching step is performed: The control interface is used to send new connection configuration commands to the optical switching device to establish a new optical path with another target computing node; The optical switching device completes optical path switching within microseconds. The source computing node senses the link change and automatically performs PCIe link retraining with the new target computing node.

6. The method according to claim 1, characterized in that, The photoelectric conversion module is a QSFP series optical module.

7. The method according to claim 1, characterized in that, The method also includes fault handling steps: Monitor the data transmission status of the optical path; When a link failure or performance degradation is detected, the data stream is switched to a pre-configured backup optical path via the control interface. The affected compute nodes are triggered to perform a PCIe link recovery procedure on the backup optical path.

8. The method according to claim 1, characterized in that, The optical switching device is an optical switch that supports N×N space-division switching, where N is an integer greater than or equal to 2, the number of the plurality of computing nodes is 16, and the optical switch is configured with 16×16 ports.

9. A PCIe data switching system based on optical switching, characterized in that, include: Multiple compute nodes, each compute node has a PCIe interface; Multiple photoelectric conversion modules are connected to the PCIe interface of the computing node to convert PCIe electrical signals into optical signals. An optical switching device has multiple ports, each of which is connected to one of the photoelectric conversion modules via optical fiber, for receiving optical signals from each computing node and forming a centralized optical interconnect network; A control interface, connected to the optical switching device, is used to receive external configuration commands; The optical switching device includes a switching matrix and a control unit. The control unit is used to receive configuration instructions through the control interface and drive the switching matrix according to the configuration instructions to dynamically establish an optical path connection between any pair of computing nodes. The photoelectric conversion module and the optical switching device are transparent to the PCIe protocol, enabling the pair of computing nodes to transmit data through the established optical path based on the PCIe protocol.

10. A computer-readable storage medium storing a computer program thereon, the computer program, when executed by a processor, implementing the steps of the method as described in any one of claims 1-9.