An interface matching method and device, computer equipment and a storage medium

By using a main control automated cross-board port status switching and information matching method in the chassis gateway device, the problems of low efficiency and low accuracy of manual verification are solved, achieving fast and accurate interface pair matching and improving the reliability of data forwarding.

CN122496478APending Publication Date: 2026-07-31HANGZHOU DPTECH TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU DPTECH TECH
Filing Date
2026-04-29
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing technologies, the number of cross-board ports between the switching network board and the interface board in the chassis gateway device is large and the connection order is different. This makes the manual port-by-port verification method cumbersome, time-consuming and prone to errors, and it is difficult to quickly and accurately determine the interface pair matching relationship.

Method used

The main control receives the interface matching command and performs state switching operations on the cross-board ports in a preset traversal order. Combined with the status information reported by the interface board, the corresponding relationship of the cross-board ports is automatically determined, and interface pair matching information is generated.

Benefits of technology

It reduces manual operation and recording processes, improves interface matching efficiency and accuracy, reduces the probability of errors, and ensures the reliability of data forwarding between gateway device boards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122496478A_ABST
    Figure CN122496478A_ABST
Patent Text Reader

Abstract

This application provides an interface pair matching method, apparatus, computer device, and storage medium. Upon receiving an interface pair matching instruction, the main controller can identify the target switching network board and its multiple first cross-ports to be matched, and sequentially perform closed and open state switching operations on each first cross-port according to a preset traversal order. Since each state switching operation corresponds to one first cross-port, the main controller can combine the on / off states and / or state change records of multiple second cross-ports reported by the interface board to determine the target second cross-port whose state has changed for each first cross-port, thereby automatically generating interface pair matching information. This reduces manual operation and recording processes, improving interface pair matching efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and more specifically, to an interface pair matching method, apparatus, computer device, and storage medium. Background Technology

[0002] As network service scale and data forwarding demands increase, gateway devices are increasingly adopting a chassis-based architecture. A chassis-based gateway typically includes a main control unit, switching boards, and interface cards. The switching boards and interface cards are connected via multiple cross-ports. Correct interface pairings must be established between the cross-ports on the switching board side and the cross-ports on the interface card side to ensure accurate data forwarding between boards.

[0003] In related technologies, interface pair matching typically relies on manual port-by-port verification. For example, a cross-board port is manually closed, and the status of which cross-board port on the peer board changes, then the correspondence between the two is recorded. However, chassis gateway devices have a large number of cross-board ports, and the connection order between different switching network boards and interface boards may be different. Manual port-by-port verification is cumbersome, time-consuming, and prone to observation or recording errors.

[0004] Therefore, how to quickly and accurately determine the interface pair matching relationship between the cross-port on the switching network board side and the cross-port on the interface card side has become an urgent technical problem to be solved. Summary of the Invention

[0005] In view of this, this application provides an interface pair matching method, apparatus, computer device, and storage medium to solve the problems of low efficiency and low accuracy in determining interface pair matching relationships.

[0006] Specifically, this application is implemented through the following technical solution: In a first aspect, this application provides an interface pair matching method applied to the main control of a gateway device, the gateway device including a main control, at least one switching network board and at least one interface board, wherein any of the switching network boards and at least one of the interface boards are connected through multiple cross-board ports, the method comprising: Receive interface pair matching instruction, determine the target switching network board indicated by the interface pair matching instruction, and the multiple first cross-board ports on the target switching network board to be matched with the interface pair; According to a preset traversal order, a state switching operation is performed on each of the plurality of first span openings in sequence; wherein, performing a state switching operation on any first span opening includes: closing any first span opening and opening any first span opening after a preset time. Receive cross-port status information reported by the at least one interface board; wherein, the cross-port status information includes the switch status and / or status change records of multiple second cross-ports on the at least one interface board during the process of the multiple first cross-ports being sequentially subjected to status switching operations; Based on the cross-board port status information and the preset traversal order, determine the target second cross-board port among the plurality of second cross-board ports that has undergone a state change corresponding to the state switching operation of each first cross-board port; Each first cross-board port is associated with its corresponding target second cross-board port to obtain interface pair matching information; wherein, the interface pair matching information indicates the second cross-board port corresponding to each first cross-board port, and the interface pair matching information is used to configure the cross-board port connection correspondence between the target switching network board and the at least one interface board.

[0007] In some implementations, determining the target switching board indicated by the interface pair matching command, and the plurality of first cross-board ports on the target switching board to be matched, includes: Parse the interface pair matching command to obtain the slot identifier of the target switching board; The target switching network board is determined based on the slot identifier; Obtain the port status information of multiple candidate cross-board ports on the target switching network board; Based on the port status information, the cross-board port that is in the open state is determined from the plurality of candidate cross-board ports and is used as the plurality of first cross-board ports.

[0008] In some implementations, the preset traversal order is one of the port identification order, port physical location order, or preset port list order of the plurality of first cross-board ports.

[0009] In some implementations, a state switching operation is performed on any first cross-board port, including: Send a shutdown command carrying the port identifier of any of the first cross-board ports to the target switching network board; After the preset time has elapsed, an open command carrying the port identifier of any of the first cross-board ports is sent to the target switching network board.

[0010] In some implementations, the cross-board port status information includes the on / off status of the plurality of second cross-board ports at multiple acquisition times; The step of determining the target second cross-port that has undergone a state change corresponding to the state switching operation of each first cross-port, based on the cross-port state information and the preset traversal order, includes: Based on the on / off states of the multiple second cross-panel ports at multiple acquisition times, determine the state change sequence of the multiple second cross-panel ports; Based on the state change sequence and the preset traversal sequence, the target second span opening corresponding to each first span opening is determined.

[0011] In some implementations, the cross-board port status information includes status change records of the plurality of second cross-board ports, and the status change records include the port identifier of the second cross-board port where the status change occurred and the time of the status change; The step of determining the target second cross-port that has undergone a state change corresponding to the state switching operation of each first cross-port, based on the cross-port state information and the preset traversal order, includes: Determine the time window during which each first span opening is closed; From the state change record, determine the second span opening where the state change time is within the time window, and use it as the target second span opening to match the corresponding first span opening.

[0012] In some implementations, receiving the cross-port status information reported by the at least one interface board includes: During the state switching operation of each first cross-board port, the cross-board port status information reported in real time or periodically by the at least one interface board is received. Alternatively, after all the first cross-board ports have completed the state switching operation, the cross-board port status information uniformly reported by the at least one interface board can be received.

[0013] Secondly, this application provides an interface pairing device for the main control of a gateway device, the gateway device including a main control, at least one switching network board and at least one interface board, wherein any one of the switching network boards and at least one of the interface boards are connected through multiple cross-board ports, the device comprising: The first receiving module is used to receive an interface pair matching instruction, determine the target switching network board indicated by the interface pair matching instruction, and the multiple first cross-board ports on the target switching network board to be matched. The switching module is used to perform a state switching operation on each of the plurality of first cross-board ports in a preset traversal order; wherein, performing a state switching operation on any first cross-board port includes: closing any first cross-board port and opening any first cross-board port after a preset time. The second receiving module is used to receive cross-port status information reported by the at least one interface board; wherein, the cross-port status information includes the switch status and / or status change records of multiple second cross-ports on the at least one interface board during the process of the multiple first cross-ports being sequentially subjected to status switching operations. The determination module is used to determine, based on the cross-board port status information and the preset traversal order, the target second cross-board port among the plurality of second cross-board ports that has undergone a state change corresponding to the state switching operation of each first cross-board port; The association module is used to associate each first cross-board port with the corresponding target second cross-board port to obtain interface pair matching information; wherein, the interface pair matching information indicates the second cross-board port corresponding to each first cross-board port, and the interface pair matching information is used to configure the cross-board port connection correspondence between the target switching network board and the at least one interface board.

[0014] In some implementations, the first receiving module is specifically used for: Parse the interface pair matching command to obtain the slot identifier of the target switching board; The target switching network board is determined based on the slot identifier; Obtain the port status information of multiple candidate cross-board ports on the target switching network board; Based on the port status information, the cross-board port that is in the open state is determined from the plurality of candidate cross-board ports and is used as the plurality of first cross-board ports.

[0015] In some implementations, the preset traversal order is one of the port identification order, port physical location order, or preset port list order of the plurality of first cross-board ports.

[0016] In some implementations, the switching module is specifically used for: Send a shutdown command carrying the port identifier of any of the first cross-board ports to the target switching network board; After the preset time has elapsed, an open command carrying the port identifier of any of the first cross-board ports is sent to the target switching network board.

[0017] In some implementations, the cross-board port status information includes the on / off status of the plurality of second cross-board ports at multiple acquisition times; The determining module is specifically used for: Based on the on / off states of the multiple second cross-panel ports at multiple acquisition times, determine the state change sequence of the multiple second cross-panel ports; Based on the state change sequence and the preset traversal sequence, the target second span opening corresponding to each first span opening is determined.

[0018] In some implementations, the cross-board port status information includes status change records of the plurality of second cross-board ports, and the status change records include the port identifier of the second cross-board port where the status change occurred and the time of the status change; The determining module is specifically used for: Determine the time window during which each first span opening is closed; From the state change record, determine the second span opening where the state change time is within the time window, and use it as the target second span opening to match the corresponding first span opening.

[0019] In some implementations, the second receiving module is specifically used for: During the state switching operation of each first cross-board port, the cross-board port status information reported in real time or periodically by the at least one interface board is received. Alternatively, after all the first cross-board ports have completed the state switching operation, the cross-board port status information uniformly reported by the at least one interface board can be received.

[0020] Thirdly, this application also provides a computer device including a processor and a memory, the memory storing machine-readable instructions executable by the processor, the processor executing the machine-readable instructions stored in the memory, the machine-readable instructions being executed by the processor performing the steps of the first aspect above, or any possible implementation of the first aspect.

[0021] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when run, performs the steps of the first aspect or any possible implementation thereof.

[0022] The interface pair matching method, apparatus, computer equipment, and storage medium provided in this application embodiment enable the main controller to determine the target switching network board and its multiple first cross-ports to be matched after receiving the interface pair matching instruction. The main controller then sequentially performs a state switching operation (closing and opening) on ​​each of the first cross-ports according to a preset traversal order. Since each state switching operation corresponds to one first cross-port, the main controller can combine the on / off status and / or state change records of multiple second cross-ports reported by the interface board to determine the target second cross-port that has undergone a state change corresponding to each first cross-port, thereby automatically generating interface pair matching information. Therefore, this application eliminates the need for manual closing of each cross-port and observation of the state changes of the peer cross-ports, reducing manual operation and recording processes and improving interface pair matching efficiency. Simultaneously, by having the main controller perform state switching according to a preset traversal order and perform correlation judgment based on the cross-port state information, the probability of errors in manual observation, recording, or configuration can be reduced, improving the accuracy of the interface pair matching results. Furthermore, since the interface pair matching information can be used to configure the cross-board port connection correspondence between the target switching network board and the interface board, it can reduce problems such as traffic forwarding path errors, traffic loss or traffic loops caused by incorrect interface pair configuration, thereby improving the reliability of data forwarding between gateway device boards. Attached Figure Description

[0023] Figure 1 This is a schematic diagram of a gateway device shown in an exemplary embodiment of this application; Figure 2 This is a schematic diagram illustrating the cross-port connection relationship between the switching network board and the interface board in an exemplary embodiment of this application; Figure 3 This application provides an exemplary embodiment illustrating an interface pair matching method. Figure 4 This is a timing diagram of the interaction between the main control unit, the switching network board, and the interface board provided in an exemplary embodiment of this application; Figure 5 This is a schematic diagram illustrating an interface-to-matching device according to an exemplary embodiment of this application; Figure 6 This is a schematic diagram illustrating a computer device according to an exemplary embodiment of this application. Detailed Implementation

[0024] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0025] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0026] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0027] Research has revealed that interface pairing typically relies on manual port-by-port verification. For example, manually closing a cross-port and observing which cross-port on the peer board changes status, then recording the correspondence between the two. However, chassis-type gateway devices have a large number of cross-ports, and the connection order between different switching boards and interface boards may differ. Manual port-by-port verification is cumbersome, time-consuming, and prone to errors in observation or recording.

[0028] In view of this, this application provides an interface pair matching method, apparatus, computer device, and storage medium to solve the problems of low efficiency and low accuracy in determining interface pair matching relationships.

[0029] To facilitate understanding of this embodiment, the application scenarios of the interface-to-matching method disclosed in this application embodiment will first be introduced. The execution subject of the interface-to-matching method provided in this application embodiment can be a computer device. In some possible implementations, the interface-to-matching method can be implemented by a processor calling computer-readable instructions stored in memory. The computer device can be the main controller in a gateway device; this application does not limit this.

[0030] The interface pair matching method provided in this application can be applied to gateway devices. See also... Figure 1 The diagram shown is a schematic of a gateway device provided in an exemplary embodiment of this application. The gateway device 10 can be a chassis-type gateway device, including a main controller 11, at least one switching network board 12, and at least one interface board 13. The main controller 11 manages and controls the switching network board 12 and interface board 13 in the gateway device 10. For example, the main controller 11 can receive externally input interface pair matching instructions, determine the target switching network board for which interface pair matching is required, and issue cross-port closing or opening instructions to the target switching network board. The switching network board 12 is used to implement data exchange between different interface boards 13. The interface boards 13 are used to access external service traffic and forward service traffic to other interface boards 13 or other processing modules through the switching network board 12.

[0031] In some implementations, the number of switching network boards 12 can be one or more; the number of interface boards 13 can also be one or more. Different switching network boards 12 can have different numbers, different arrangements, or different internal connection sequences of cross-board ports. Therefore, when the same interface board 13 is used with different switching network boards 12, the correspondence between its interface board-side cross-board ports and its switching network board-side cross-board ports may be different.

[0032] See Figure 2The diagram illustrates the cross-port connection relationship between a switching network board and an interface board 13, as shown in an exemplary embodiment of this application. The switching network board 12 and the interface board 13 can be connected via multiple cross-ports. For ease of explanation, the cross-port located on the switching network board 12 side can be referred to as the first cross-port, and the cross-port located on the interface board 13 side can be referred to as the second cross-port. The corresponding connection relationship between a first cross-port and a second cross-port can constitute an interface pair. The interface pair matching information is used to indicate the second cross-port corresponding to each first cross-port, thereby providing a basis for subsequently configuring the cross-port connection correspondence between the switching network board 12 and the interface board 13.

[0033] Figure 2 In this circuit, the switching network board 12 includes multiple first cross-ports, such as first cross-port A1, first cross-port A2, first cross-port A3, and first cross-port A4; the interface board 13 includes multiple second cross-ports, such as second cross-port B1, second cross-port B2, second cross-port B3, and second cross-port B4. First cross-ports A1 to A4 and second cross-ports B1 to B4 can form interface pairs according to their actual hardware connection relationships. Since the hardware connection methods of different switching network boards 12 may differ, the first cross-ports and second cross-ports do not necessarily correspond one-to-one in physical order. For example, first cross-port A1 can correspond to second cross-port B2, first cross-port A2 can correspond to second cross-port B4, first cross-port A3 can correspond to second cross-port B1, and first cross-port A4 can correspond to second cross-port B3.

[0034] See Figure 3 The diagram shown is a flowchart of an interface pair matching method provided in an exemplary embodiment of this application. The method includes steps S301-S305, wherein: S301. Receive an interface pair matching instruction, determine the target switching network board indicated by the interface pair matching instruction, and the multiple first cross-board ports on the target switching network board to be matched.

[0035] In some embodiments, the master controller can receive interface pair matching instructions. These instructions trigger the master controller to execute the interface pair matching process. The interface pair matching instructions can be input by the user through a command-line interface, management page, debugging tools, or other management interfaces, or they can be generated and sent to the master controller by the configuration management module, debugging management module, or automated testing module in the gateway device; this application does not limit the specific implementation of these instructions.

[0036] The interface pairing command can carry the target switching board's board identifier. The target switching board refers to the switching board that needs to be matched in this interface pairing. The board identifier can include at least one of the following: slot identifier, board number, device internal management identifier, or switching board type identifier. For example, in a chassis-type gateway device, different switching boards can be installed in different slots. The interface pairing command can carry the target switching board's slot identifier, and the main controller can parse the slot identifier and determine the corresponding target switching board based on the slot identifier.

[0037] After identifying the target switching network board, the main controller can determine multiple first cross-board ports on the target switching network board that are to be matched for interface pairing. The first cross-board port refers to the cross-board port located on the target switching network board side, used for connecting to the cross-board ports on the interface card side. The first cross-board ports to be matched for interface pairing can be the cross-board ports on the target switching network board that participate in this interface pairing process.

[0038] In some embodiments, the master controller can obtain port status information of multiple candidate cross-board ports on the target switching network board, and based on the port status information, determine multiple first cross-board ports to be matched for interface pairs from the multiple candidate cross-board ports. The port status information may include at least one of the following: port identifier, open state, closed state, link state, available state, or fault state of the candidate cross-board port. The master controller can determine the candidate cross-board ports that are in the open state, link normal state, or available state as the first cross-board ports to avoid performing subsequent state switching operations on cross-board ports that are in a fault state, unavailable state, or not involved in inter-board connections.

[0039] In other embodiments, the interface pair matching instruction may also carry a range of cross-board ports to be matched. This range may include at least one of a range of port numbers, a port list, a port group identifier, or a switching chip identifier. Based on this range, the main controller can determine multiple first cross-board ports from multiple candidate cross-board ports on the target switching network board. For example, the interface pair matching instruction may instruct interface pair matching to be performed on a group of cross-board ports corresponding to a specific switching chip on the target switching network board, and the main controller can determine this group of cross-board ports as multiple first cross-board ports.

[0040] In some other embodiments, the main controller can determine multiple candidate cross-ports on the target switching network board based on pre-stored board configuration files, device topology information, or port management tables, and determine multiple first cross-ports by combining the port status information of the candidate cross-ports. The board configuration files, device topology information, or port management tables can record information such as the slot identifier of the switching network board, the switching network board type, the cross-port port identifier, the switching chip to which the cross-port belongs, the port group to which the cross-port belongs, and whether the cross-port is used to connect interface boards.

[0041] Therefore, after receiving the interface pair matching instruction, the main controller can determine the target switching network board for this interface pair matching, and determine the multiple first cross-board ports on the target switching network board that need to be sequentially subjected to state switching operations, thus providing the object basis for generating interface pair matching information based on the state switching of the first cross-board ports and the state changes of the second cross-board ports on the interface board side.

[0042] For example, the main controller can parse the interface pair matching instruction to obtain the slot identifier of the target switching network board; then, based on the slot identifier, determine the target switching network board; next, obtain the port status information of multiple candidate cross-board ports on the target switching network board; finally, based on the port status information, determine the cross-board port that is in the open state from the multiple candidate cross-board ports as the multiple first cross-board ports.

[0043] S302. Perform a state switching operation on each of the plurality of first cross-board ports in a preset traversal order; wherein, performing a state switching operation on any first cross-board port includes: closing any first cross-board port and opening any first cross-board port after a preset time.

[0044] In some embodiments, after determining the multiple first cross-ports on the target switching network board, the master controller can sequentially perform state switching operations on each of the multiple first cross-ports according to a preset traversal order. The preset traversal order is used to define the sequential relationship between the multiple first cross-ports, enabling the master controller to correlate the state changes of subsequent interface board-side second cross-ports with the operated first cross-ports.

[0045] The preset traversal order can be one of the following: the port identifier order of multiple first cross-board ports, the port physical location order, or the preset port list order. For example, in one implementation, the main controller can perform state switching operations on multiple first cross-board ports sequentially according to the port numbers in ascending order; in another implementation, the main controller can perform state switching operations sequentially according to the physical arrangement order of the cross-board ports on the target switching network board; and in yet another implementation, the main controller can perform state switching operations sequentially according to the order recorded in the pre-configured port list.

[0046] For any first cross-port, the main controller can first issue a shutdown command for that first cross-port to the target switching network board. This shutdown command can carry the port identifier of the first cross-port, so that the target switching network board can shut down the corresponding first cross-port according to the port identifier. After the first cross-port is shut down, the on / off state of the second cross-port on the interface board side connected to the first cross-port may change accordingly, for example, from the on state to the off state.

[0047] After closing the first cross-port, the main controller can wait for a preset time. After the preset time has elapsed, it sends an opening command for the first cross-port to the target switching network board. This opening command can carry the port identifier of the first cross-port, so that the target switching network board can reopen the first cross-port based on the port identifier. The preset time is used to allow the interface board time to detect the status change of the second cross-port and to generate or report cross-port status information. The preset time can be determined based on the status detection cycle of the interface board, the information transmission delay between the main controller and the interface board, the time required for the cross-port status to stabilize, or actual debugging requirements. For example, the preset time can be 3 seconds, or other durations; this application does not limit this.

[0048] In some embodiments, the master controller performs a shutdown operation on only one first cross-port at a time. That is, the master controller can close a first cross-port, wait a preset time, then open it again, and then perform a state switching operation on the next first cross-port in a preset traversal order. This single-port state switching method ensures that the state changes of the second cross-ports on the interface board side correspond to the state switching operation of a single first cross-port, avoiding confusion caused by the simultaneous closure of multiple first cross-ports and the resulting interference between the state changes of multiple second cross-ports on the interface board side.

[0049] In some embodiments, the master controller can record operation information during the execution of a state switching operation. The operation information may include at least one of the following: the port identifier of the first cross-board port undergoing the state switching operation, the traversal sequence number of the first cross-board port in a preset traversal order, the time when the close command was issued, the time when the open command was issued, and the state switching result. This operation information can be used for subsequent matching and analysis with the cross-board port status information reported by the interface board to determine the second cross-board port corresponding to each first cross-board port.

[0050] Therefore, by performing closing and opening operations on each first cross-port in a preset traversal order, the main controller can create a distinguishable port state disturbance on the target switching network board side, causing the second cross-port connected to the first cross-port on the interface board side to produce a corresponding state change, thereby providing a basis for subsequently determining the interface pair matching relationship between the first cross-port and the second cross-port.

[0051] S303. Receive cross-port status information reported by the at least one interface board; wherein, the cross-port status information includes the switch status and / or status change records of multiple second cross-ports on the at least one interface board during the process of sequentially performing status switching operations on the multiple first cross-ports.

[0052] In some embodiments, during the process of sequentially performing state switching operations on multiple first cross-ports according to a preset traversal order, the master controller can receive cross-port status information reported by at least one interface board. Here, a second cross-port refers to a cross-port located on the interface board side and used to connect to the first cross-port on the switching network board side. The cross-port status information is used to reflect the switching status and / or status changes of multiple second cross-ports on at least one interface board during the process of sequentially performing state switching operations on multiple first cross-ports.

[0053] In some embodiments, the interface board can perform status detection on its multiple second cross-ports to obtain the on / off status of the multiple second cross-ports. The on / off status may include an on state and an off state, or at least one of a link connected state, a link disconnected state, a port available state, or a port unavailable state. The interface board can encapsulate the on / off status of the multiple second cross-ports into cross-port status information and report the cross-port status information to the main controller.

[0054] In some embodiments, the cross-port status information may include the on / off status of multiple second cross-ports at multiple acquisition times. For example, the interface board may detect the on / off status of multiple second cross-ports according to a preset detection cycle and report the status snapshots corresponding to each acquisition time to the main controller. Each status snapshot may include the interface board identifier, the acquisition time, the port identifiers of the multiple second cross-ports, and the on / off status corresponding to each port identifier. After receiving the above status snapshots, the main controller may determine the second cross-port corresponding to the status switching operation of each first cross-port based on the status changes at multiple acquisition times.

[0055] In other embodiments, the cross-port status information may include status change records of multiple second cross-ports. The status change record may include the port identifier of the second cross-port where the status change occurred, its state before the change, its state after the change, the time of the change, and / or the order of the changes. For example, when a second cross-port changes from an open state to a closed state, the interface card can generate a corresponding status change record and report it to the main control. As another example, the interface card may, after multiple first cross-ports have completed their state switching operations, uniformly report multiple status change records generated during the current interface pair matching process to the main control.

[0056] In some embodiments, the interface board can report cross-port status information in real time, periodically, or uniformly after multiple first cross-ports have completed their state switching operations. That is, this embodiment does not require cross-port status information to be reported while the second cross-port is in a closed state. As long as the cross-port status information reflects the on / off state or state change of the second cross-port during the state switching process of the first cross-port, the main controller can determine the interface pair matching relationship based on this cross-port status information.

[0057] In some embodiments, when the gateway device includes multiple interface cards, each interface card can report its own cross-port status information for its second cross-port to the main controller. In this case, the cross-port status information may also include an interface card identifier, enabling the main controller to determine the interface card to which the second cross-port whose status has changed belongs. The interface card identifier may include at least one of the following: the interface card slot identifier, the card number, or the device's internal management identifier.

[0058] In some embodiments, the interface board can generate and report cross-port status information when it detects a change in the status of any second cross-port; alternatively, it can poll multiple second cross-ports according to a fixed detection cycle and report the polling detection results as cross-port status information to the main controller. The cross-port status information can be transmitted to the main controller through the inter-board communication link between the main controller and the interface board, the management channel, or the device's internal message channel; this application does not limit this.

[0059] In the above manner, the main controller can obtain the switching status and / or status change records of multiple second cross-ports on the interface board side during the process of multiple first cross-ports on the target switching network board side performing state switching operations in sequence, providing a data foundation for subsequently determining the interface pair matching relationship between the first cross-ports and the second cross-ports based on the status changes of the second cross-ports.

[0060] S304. Based on the cross-board port status information and the preset traversal order, determine the target second cross-board port among the plurality of second cross-board ports that has undergone a state change corresponding to the state switching operation of each first cross-board port.

[0061] In some embodiments, after receiving the cross-port status information, the main controller can combine the preset traversal order of multiple first cross-ports to analyze the switch status and / or status change records of multiple second cross-ports on the interface board side in order to determine the target second cross-port corresponding to each first cross-port.

[0062] In one implementation, the cross-port status information includes the on / off states of multiple second cross-ports at multiple acquisition times. The master controller can determine the second cross-port whose state changes during the state switching operation of each first cross-port based on the on / off states at multiple acquisition times. For example, after the master controller closes the first first cross-port according to a preset traversal order, if a second cross-port changes from an open state to a closed state, the master controller can determine this second cross-port as the target second cross-port corresponding to the first first cross-port. For subsequent first cross-ports, the master controller can sequentially determine the corresponding target second cross-ports in the same manner.

[0063] In another implementation, the cross-port status information includes status change records of multiple second cross-ports. The master controller can determine the correspondence between the first and second cross-ports based on the order of status changes in the status change records and the preset traversal order of the multiple first cross-ports. For example, the nth first cross-port in the preset traversal order corresponds to the nth second cross-port in the status change order that undergoes a closed state change, where n is a positive integer.

[0064] In another implementation, the state change record includes the time of the state change. The master controller can determine the state change record corresponding to the operation period during which a state switching operation is performed on each first cross-board port, and determine the second cross-board port indicated by the state change record as the corresponding target second cross-board port. For example, the second cross-board port whose state change time is within the closing period of a certain first cross-board port can be determined as the target second cross-board port corresponding to that first cross-board port.

[0065] In some embodiments, to reduce the interference of state recovery during the opening phase on the matching results, the master controller can preferentially determine the target second cross-board port based on the record of the second cross-board port changing from an open state to a closed state. Accordingly, after a first cross-board port is closed, if the cross-board port status information indicates that a certain second cross-board port has changed to a closed state, the master controller can determine the second cross-board port as the target second cross-board port corresponding to the first cross-board port.

[0066] In some embodiments, if the same first cross-board port corresponds to multiple second cross-board ports that have changed to a closed state, or if no second cross-board port that has changed to a closed state is identified, the main controller can mark the first cross-board port as an abnormal matching object. For abnormal matching objects, the main controller can generate abnormal matching prompt information, or subsequently re-perform a state switching operation on the first cross-board port to re-acquire the corresponding cross-board port state information.

[0067] Therefore, the main controller can automatically identify the target second cross-port corresponding to each first cross-port based on the traversal order of the first cross-port on the switching network board side and the status change of the second cross-port on the interface board side, thereby avoiding the need to rely on manual observation to determine the interface pair relationship.

[0068] S305. Associate each first cross-board port with the corresponding target second cross-board port to obtain interface pair matching information; wherein, the interface pair matching information indicates the second cross-board port corresponding to each first cross-board port, and the interface pair matching information is used to configure the cross-board port connection correspondence between the target switching network board and the at least one interface board.

[0069] In some embodiments, after determining the target second cross-board port corresponding to each first cross-board port, the master controller can establish a correspondence between the first cross-board port and the target second cross-board port, and generate interface pair matching information based on multiple correspondences.

[0070] In one implementation, the interface pair matching information may include the port identifier of the first cross-board port, the port identifier of the target second cross-board port, and the board identifier of the interface board to which the target second cross-board port belongs. Thus, the main controller can determine which second cross-board port on which interface board corresponds to each of the first cross-board ports on the target switching network board.

[0071] In another implementation, the interface pair matching information may include connection order identifiers corresponding to the first cross-board port and the second cross-board port. For example, the first cross-board port and the second cross-board port may each have identifiers indicating the connection order, and the main controller can generate a connection order mapping relationship between the two based on the determined correspondence.

[0072] In some embodiments, the master controller can output interface pair matching information for subsequent configuration of cross-port connection mappings between target switching network boards and interface cards. For example, the master controller can print the interface pair matching information as configuration parameters, write it to a configuration file, store it in device memory, or send it to the relevant cards. After the interface pair matching information is applied, the gateway device can determine the inter-board data forwarding path based on the interface pair matching information, reducing data forwarding anomalies caused by incorrect cross-port mappings.

[0073] In the above manner, the main controller can convert the correspondence between the first cross-board port and the second cross-board port identified during the state switching process into configurable, storable or callable interface pair matching information, thereby providing a basis for cross-board port connection configuration between the target switching network board and the interface board.

[0074] like Figure 4 As shown, Figure 4This is a timing diagram illustrating the interaction between the main control unit, the switching network board, and the interface cards in an exemplary embodiment of this application. The timing diagram explains the command issuance, status detection, status reporting, and matching result generation processes among the main control unit, the switching network board, and the interface cards during the interface pair matching process.

[0075] In some embodiments, after receiving the interface pair matching instruction, the master control parses the instruction to determine the target switching network board and multiple first cross-ports on the target switching network board. Subsequently, the master control, according to a preset traversal order, determines the first cross-port to be operated on from the multiple first cross-ports and sends a close instruction for that first cross-port to the target switching network board. This close instruction may carry the port identifier of the first cross-port, enabling the target switching network board to determine the specific cross-port to be closed.

[0076] After receiving a shutdown command, the target switching network board closes the first cross-port indicated by the command. Since there is a physical connection between the first cross-port and a second cross-port on the interface board side, the on / off state of the corresponding second cross-port will change accordingly after the first cross-port is closed.

[0077] The interface board can detect the on / off status of multiple second cross-ports during the interface pairing process. Upon detecting a change in the on / off status of a second cross-port, the interface board can generate cross-port status information and report this information to the main controller. This cross-port status information may include the on / off status and / or status change records of multiple second cross-ports. For example, the cross-port status information may include the port identifier of the second cross-port whose status changed, its status before and after the change, the time of the change, or the order of the changes.

[0078] After receiving the cross-port status information reported by the interface board, the main controller can first record the cross-port status information. The main controller can then combine the preset traversal order of the first cross-port with the cross-port status information to determine the target second cross-port on the interface board side corresponding to the first cross-port undergoing the current state switching operation. It should be noted that in this embodiment, the interface board can report the cross-port status information in real time after detecting a state change, or it can report the cross-port status information according to a preset period, or it can report the cross-port status information uniformly after multiple first cross-ports have completed their state switching operations. Therefore, Figure 4 The reporting sequence shown is only an example and does not constitute a limitation on the timing of cross-board port status information reporting.

[0079] After a preset timeout, the master controller sends an enable command to the target switching board for the first cross-port. Upon receiving the enable command, the target switching board enables the first cross-port, restoring it to an available state. Subsequently, the master controller can continue to execute the above-mentioned disable, wait, and enable process for the next first cross-port according to a preset traversal order, until multiple first cross-ports have completed their state switching operations.

[0080] After multiple first cross-ports complete their state switching operations, the main controller can determine the target second cross-port corresponding to each first cross-port based on the preset traversal order of the first cross-ports and the cross-port status information reported by at least one interface board. It then associates each first cross-port with its corresponding target second cross-port to obtain interface pair matching information. This interface pair matching information can be used to configure the cross-port connection mapping between the target switching network board and the interface board.

[0081] The interface pair matching method provided in this application allows the main controller to determine the target switching network board and its multiple first cross-ports to be matched after receiving the interface pair matching instruction. The main controller then sequentially performs a state switching operation (closing and opening) on ​​each of the first cross-ports according to a preset traversal order. Since each state switching operation corresponds to one first cross-port, the main controller can combine the on / off status and / or state change records of multiple second cross-ports reported by the interface board to determine the target second cross-port that has undergone a state change corresponding to each first cross-port, thereby automatically generating interface pair matching information. Therefore, this application eliminates the need for manual closing of each cross-port and observation of the status changes of the peer cross-ports, reducing manual operation and recording processes and improving interface pair matching efficiency. Simultaneously, by having the main controller perform state switching according to a preset traversal order and perform correlation judgment based on the cross-port status information, the probability of errors in manual observation, recording, or configuration can be reduced, improving the accuracy of the interface pair matching results. Furthermore, since the interface pair matching information can be used to configure the cross-board port connection correspondence between the target switching network board and the interface board, it can reduce problems such as traffic forwarding path errors, traffic loss or traffic loops caused by incorrect interface pair configuration, thereby improving the reliability of data forwarding between gateway device boards.

[0082] Corresponding to the aforementioned embodiments of the interface-to-matching method, this application also provides embodiments of the interface-to-matching device.

[0083] See Figure 5 The diagram shown is a schematic representation of an interface pair matching device according to an exemplary embodiment of this application. The device includes: The first receiving module 510 is used to receive an interface pair matching instruction, determine the target switching network board indicated by the interface pair matching instruction, and a plurality of first cross-board ports on the target switching network board to be matched. The switching module 520 is used to perform a state switching operation on each of the plurality of first cross-board ports in a preset traversal order; wherein, performing a state switching operation on any first cross-board port includes: closing any first cross-board port and opening any first cross-board port after a preset time. The second receiving module 530 is used to receive cross-port status information reported by the at least one interface board; wherein, the cross-port status information includes the switch status and / or status change records of multiple second cross-ports on the at least one interface board during the process of the multiple first cross-ports being sequentially subjected to status switching operations. The determination module 540 is used to determine, based on the cross-board port status information and the preset traversal order, the target second cross-board port that has undergone a state change corresponding to the state switching operation of each first cross-board port among the plurality of second cross-board ports; The association module 550 is used to associate each first cross-board port with the corresponding target second cross-board port to obtain interface pair matching information; wherein, the interface pair matching information indicates the second cross-board port corresponding to each first cross-board port, and the interface pair matching information is used to configure the cross-board port connection correspondence between the target switching network board and the at least one interface board.

[0084] In some implementations, the first receiving module 510 is specifically used for: Parse the interface pair matching command to obtain the slot identifier of the target switching board; The target switching network board is determined based on the slot identifier; Obtain the port status information of multiple candidate cross-board ports on the target switching network board; Based on the port status information, the cross-board port that is in the open state is determined from the plurality of candidate cross-board ports and is used as the plurality of first cross-board ports.

[0085] In some implementations, the preset traversal order is one of the port identification order, port physical location order, or preset port list order of the plurality of first cross-board ports.

[0086] In some implementations, the switching module 520 is specifically used for: Send a shutdown command carrying the port identifier of any of the first cross-board ports to the target switching network board; After the preset time has elapsed, an open command carrying the port identifier of any of the first cross-board ports is sent to the target switching network board.

[0087] In some implementations, the cross-board port status information includes the on / off status of the plurality of second cross-board ports at multiple acquisition times; The determining module 540 is specifically used for: Based on the on / off states of the multiple second cross-panel ports at multiple acquisition times, determine the state change sequence of the multiple second cross-panel ports; Based on the state change sequence and the preset traversal sequence, the target second span opening corresponding to each first span opening is determined.

[0088] In some implementations, the cross-board port status information includes status change records of the plurality of second cross-board ports, and the status change records include the port identifier of the second cross-board port where the status change occurred and the time of the status change; The determining module 540 is specifically used for: Determine the time window during which each first span opening is closed; From the state change record, determine the second span opening where the state change time is within the time window, and use it as the target second span opening to match the corresponding first span opening.

[0089] In some embodiments, the second receiving module 530 is specifically used for: During the state switching operation of each first cross-board port, the cross-board port status information reported in real time or periodically by the at least one interface board is received. Alternatively, after all the first cross-board ports have completed the state switching operation, the cross-board port status information uniformly reported by the at least one interface board can be received.

[0090] The interface pair matching device provided in this application embodiment, upon receiving an interface pair matching command, can determine the target switching network board and its multiple first cross-ports to be matched, and sequentially perform closed and open state switching operations on each first cross-port according to a preset traversal order. Since each state switching operation corresponds to a first cross-port, the main controller can combine the on / off status and / or state change records of multiple second cross-ports reported by the interface board to determine the target second cross-port that has undergone a state change corresponding to each first cross-port, thereby automatically generating interface pair matching information. Therefore, this application eliminates the need for manual closure of cross-ports one by one and observation of the state changes of the other end cross-ports, reducing manual operation and recording processes and improving interface pair matching efficiency; at the same time, by having the main controller perform state switching according to a preset traversal order and perform correlation judgment based on cross-port state information, the probability of errors in manual observation, recording, or configuration can be reduced, improving the accuracy of interface pair matching results. Furthermore, since the interface pair matching information can be used to configure the cross-board port connection correspondence between the target switching network board and the interface board, it can reduce problems such as traffic forwarding path errors, traffic loss or traffic loops caused by incorrect interface pair configuration, thereby improving the reliability of data forwarding between gateway device boards.

[0091] For a description of the processing flow of each module in the device and the interaction flow between each module, please refer to the relevant descriptions in the above method embodiments, which will not be repeated here.

[0092] This application also provides a computer device, such as... Figure 6 The diagram shown is a schematic representation of a computer device structure according to an exemplary embodiment of this application. The computer device includes: A processor 61 and a memory 62; the memory 62 stores machine-readable instructions executable by the processor 61, and the processor 61 executes the machine-readable instructions stored in the memory 62. When the machine-readable instructions are executed by the processor 61, the processor 61 performs the following steps: Receive interface pair matching instruction, determine the target switching network board indicated by the interface pair matching instruction, and the multiple first cross-board ports on the target switching network board to be matched with the interface pair; According to a preset traversal order, a state switching operation is performed on each of the plurality of first span openings in sequence; wherein, performing a state switching operation on any first span opening includes: closing any first span opening and opening any first span opening after a preset time. Receive cross-port status information reported by the at least one interface board; wherein, the cross-port status information includes the switch status and / or status change records of multiple second cross-ports on the at least one interface board during the process of the multiple first cross-ports being sequentially subjected to status switching operations; Based on the cross-board port status information and the preset traversal order, determine the target second cross-board port among the plurality of second cross-board ports that has undergone a state change corresponding to the state switching operation of each first cross-board port; Each first cross-board port is associated with its corresponding target second cross-board port to obtain interface pair matching information; wherein, the interface pair matching information indicates the second cross-board port corresponding to each first cross-board port, and the interface pair matching information is used to configure the cross-board port connection correspondence between the target switching network board and the at least one interface board.

[0093] In some implementations, determining the target switching board indicated by the interface pair matching command, and the plurality of first cross-board ports on the target switching board to be matched, includes: Parse the interface pair matching command to obtain the slot identifier of the target switching board; The target switching network board is determined based on the slot identifier; Obtain the port status information of multiple candidate cross-board ports on the target switching network board; Based on the port status information, the cross-board port that is in the open state is determined from the plurality of candidate cross-board ports and is used as the plurality of first cross-board ports.

[0094] In some implementations, the preset traversal order is one of the port identification order, port physical location order, or preset port list order of the plurality of first cross-board ports.

[0095] In some implementations, a state switching operation is performed on any first cross-board port, including: Send a shutdown command carrying the port identifier of any of the first cross-board ports to the target switching network board; After the preset time has elapsed, an open command carrying the port identifier of any of the first cross-board ports is sent to the target switching network board.

[0096] In some implementations, the cross-board port status information includes the on / off status of the plurality of second cross-board ports at multiple acquisition times; The step of determining the target second cross-port that has undergone a state change corresponding to the state switching operation of each first cross-port, based on the cross-port state information and the preset traversal order, includes: Based on the on / off states of the multiple second cross-panel ports at multiple acquisition times, determine the state change sequence of the multiple second cross-panel ports; Based on the state change sequence and the preset traversal sequence, the target second span opening corresponding to each first span opening is determined.

[0097] In some implementations, the cross-board port status information includes status change records of the plurality of second cross-board ports, and the status change records include the port identifier of the second cross-board port where the status change occurred and the time of the status change; The step of determining the target second cross-port that has undergone a state change corresponding to the state switching operation of each first cross-port, based on the cross-port state information and the preset traversal order, includes: Determine the time window during which each first span opening is closed; From the state change record, determine the second span opening where the state change time is within the time window, and use it as the target second span opening to match the corresponding first span opening.

[0098] In some implementations, receiving the cross-port status information reported by the at least one interface board includes: During the state switching operation of each first cross-board port, the cross-board port status information reported in real time or periodically by the at least one interface board is received. Alternatively, after all the first cross-board ports have completed the state switching operation, the cross-board port status information uniformly reported by the at least one interface board can be received.

[0099] The aforementioned memory 62 includes a main memory 621 and an external memory 622. The main memory 621, also known as internal memory, is used to temporarily store the computational data in the processor 61, as well as the data exchanged with external memory such as a hard disk. The processor 61 exchanges data with the external memory 622 through the main memory 621.

[0100] The specific execution process of the above instructions can be referred to the steps of the interface matching method described in the embodiments of this application, and will not be repeated here.

[0101] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0102] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the interface pair matching method described in the above method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0103] This application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the interface pair matching method provided in the various embodiments of this application.

[0104] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0105] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

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

[0107] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

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

[0109] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0110] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. An interface pair matching method, characterized by, A main control unit applied to a gateway device, the gateway device including a main control unit, at least one switching network board, and at least one interface board, wherein any one of the switching network boards and at least one of the interface boards are connected through multiple cross-board ports, the method comprising: Receive interface pair matching instruction, determine the target switching network board indicated by the interface pair matching instruction, and the multiple first cross-board ports on the target switching network board to be matched with the interface pair; According to a preset traversal order, a state switching operation is performed on each of the plurality of first span openings in sequence; wherein, performing a state switching operation on any first span opening includes: closing any first span opening and opening any first span opening after a preset time. Receive cross-port status information reported by the at least one interface board; wherein, the cross-port status information includes the switch status and / or status change records of multiple second cross-ports on the at least one interface board during the process of the multiple first cross-ports being sequentially subjected to status switching operations; Based on the cross-board port status information and the preset traversal order, determine the target second cross-board port among the plurality of second cross-board ports that has undergone a state change corresponding to the state switching operation of each first cross-board port; Each first cross-board port is associated with its corresponding target second cross-board port to obtain interface pair matching information; wherein, the interface pair matching information indicates the second cross-board port corresponding to each first cross-board port, and the interface pair matching information is used to configure the cross-board port connection correspondence between the target switching network board and the at least one interface board.

2. The interface pair matching method of claim 1, wherein, The step of determining the target switching board indicated by the interface pair matching command, and the plurality of first cross-board ports on the target switching board to be matched, includes: Parse the interface pair matching command to obtain the slot identifier of the target switching board; The target switching network board is determined based on the slot identifier; Obtain the port status information of multiple candidate cross-board ports on the target switching network board; Based on the port status information, the cross-board port that is in the open state is determined from the plurality of candidate cross-board ports and is used as the plurality of first cross-board ports.

3. The interface pair matching method of claim 1, wherein, The preset traversal order is one of the following: the port identification order of the plurality of first cross-board ports, the port physical location order, or the preset port list order.

4. The interface pair matching method of claim 1, wherein, Perform a state switching operation on any first cross-board port, including: Send a shutdown command carrying the port identifier of any of the first cross-board ports to the target switching network board; After the preset time has elapsed, an open command carrying the port identifier of any of the first cross-board ports is sent to the target switching network board.

5. The interface pair matching method of claim 1, wherein, The cross-board port status information includes the on / off status of the plurality of second cross-board ports at multiple acquisition times; The step of determining the target second cross-port that has undergone a state change corresponding to the state switching operation of each first cross-port, based on the cross-port state information and the preset traversal order, includes: Based on the on / off states of the multiple second cross-panel ports at multiple acquisition times, determine the state change sequence of the multiple second cross-panel ports; Based on the state change sequence and the preset traversal sequence, the target second span opening corresponding to each first span opening is determined.

6. The interface pair matching method of claim 1, wherein, The cross-board port status information includes status change records of the plurality of second cross-board ports, and the status change records include the port identifier of the second cross-board port where the status change occurred and the time of the status change; The step of determining the target second cross-port that has undergone a state change corresponding to the state switching operation of each first cross-port, based on the cross-port state information and the preset traversal order, includes: Determine the time window during which each first span opening is closed; From the state change record, determine the second span opening where the state change time is within the time window, and use it as the target second span opening to match the corresponding first span opening.

7. The interface pair matching method of claim 1, wherein, The step of receiving cross-port status information reported by the at least one interface board includes: During the state switching operation of each first cross-board port, the cross-board port status information reported in real time or periodically by the at least one interface board is received. Alternatively, after all the first cross-board ports have completed the state switching operation, the cross-board port status information uniformly reported by the at least one interface board can be received.

8. An interface pair matching device, characterized in that, A main controller for a gateway device, the gateway device including a main controller, at least one switching network board and at least one interface board, wherein any one of the switching network boards and at least one of the interface boards are connected through multiple cross-board ports, the device comprising: The first receiving module is used to receive an interface pair matching instruction, determine the target switching network board indicated by the interface pair matching instruction, and the multiple first cross-board ports on the target switching network board to be matched. The switching module is used to perform a state switching operation on each of the plurality of first cross-board ports in a preset traversal order; wherein, performing a state switching operation on any first cross-board port includes: closing any first cross-board port and opening any first cross-board port after a preset time. The second receiving module is used to receive cross-port status information reported by the at least one interface board; wherein, the cross-port status information includes the switch status and / or status change records of multiple second cross-ports on the at least one interface board during the process of the multiple first cross-ports being sequentially subjected to status switching operations. The determination module is used to determine, based on the cross-board port status information and the preset traversal order, the target second cross-board port among the plurality of second cross-board ports that has undergone a state change corresponding to the state switching operation of each first cross-board port; The association module is used to associate each first cross-board port with the corresponding target second cross-board port to obtain interface pair matching information; wherein, the interface pair matching information indicates the second cross-board port corresponding to each first cross-board port, and the interface pair matching information is used to configure the cross-board port connection correspondence between the target switching network board and the at least one interface board.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1 to 7.

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