Communication method and apparatus, switching device, and storage medium

CN122513693APending Publication Date: 2026-08-04TP-LINK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610637128.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-09
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

[0003]然而,堆叠虚拟化技术本身会消耗部分带宽

Benefits of technology

[0009] A fourth aspect of this application provides a computer storage medium including a computer program that, when executed by a switching device, implements the communication method provided in the first aspect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122513693A_ABST
    Figure CN122513693A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of switching equipment, and provides a communication method and device, switching equipment and a storage medium. In the application, when it is detected that a physical link is connected, a target frequency range of a target optical module is acquired, at least one super frequency rate within the target frequency range is acquired, and the receiving channel state and the sending channel state of the target optical module corresponding to each super frequency rate are determined; based on the channel state of the target optical module corresponding to each super frequency rate, a super frequency rate set including at least one effective super frequency rate is constructed, a target super frequency rate is selected from the super frequency rate set, and communication is performed with a target terminal based on the target super frequency rate. The effective rate is adaptively selected based on the state of the switching equipment and the optical module, the forwarding bandwidth of the user data packet is improved, and thus the data transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of switching equipment technology, and particularly relates to a communication method, apparatus, switching equipment and storage medium. Background Technology

[0002] With the development of network communication and big data application technologies, network virtualization technology (e.g., stacking virtualization technology between multiple box-type or chassis-type devices) is commonly used in large-scale campus networks and data center networks to improve service capacity, data throughput, and network management efficiency. Generally, to ensure high-bandwidth data transmission between devices within a stacked virtualization system, high-speed optical ports are typically selected as data forwarding ports between the stacked devices, and optical modules are installed on the optical ports of the switching equipment. The relevant rate configuration method usually involves adaptively configuring both the switching equipment and the optical module side based on the supported rates of the optical modules inserted into the optical ports of the switching equipment, so that both the switching equipment and the optical modules can operate at their highest matching rates.

[0003] However, stacked virtualization technology itself consumes some bandwidth. For example, data packet forwarding between devices in stacked virtualization technology needs to be achieved through stacking headers, which consumes some bandwidth (for example, in small packet forwarding scenarios, the forwarding rate of user data packets may be less than 80% of the total physical bandwidth of the port); and the internal protocol messages in stacked virtualization technology also consume some forwarding bandwidth, reducing the actual effective forwarding bandwidth of user data packets and affecting the transmission efficiency of user data packets.

[0004] Therefore, how to improve the forwarding bandwidth of user data packets has become an urgent problem to be solved. Summary of the Invention

[0005] In view of this, embodiments of this application provide a communication method, apparatus, switching device, and storage medium that can determine at least one effective overclocking rate and construct an overclocking rate set from at least one overclocking rate supported by the switching device and supported by the target optical module based on the channel state of the optical module, and select the target overclocking rate from it for communication. This realizes adaptive selection of effective rate based on the state of the switching device and the optical module, improves the forwarding bandwidth of user data packets, and thus improves data transmission efficiency.

[0006] A first aspect of this application provides a communication method applied to a switching device, the communication method comprising: When a physical link connection is detected, the target frequency range of the target optical module is obtained; wherein, the target optical module refers to the optical module mounted on the target optical port, and the target optical port is the optical port corresponding to the physical link; At least one overclocking rate within the target frequency range is obtained, and the channel state of the target optical module corresponding to each overclocking rate is determined; wherein the channel state includes a receiving channel state and a transmitting channel state; Based on the channel state of the target optical module corresponding to each of the overclocking rates, an overclocking rate set is constructed; wherein, the overclocking rate set includes at least one effective overclocking rate; A target overclocking rate is selected from the set of overclocking rates, and communication is conducted with a target terminal based on the target overclocking rate; wherein, the target terminal is a terminal device corresponding to the target optical module.

[0007] A second aspect of this application provides a communication device applied to a switching device, the communication device comprising: The first acquisition module is used to acquire the target frequency range of the target optical module when the physical link is detected to be connected; wherein, the target optical module refers to the optical module mounted on the target optical port, and the target optical port is the optical port corresponding to the physical link; The second acquisition module is used to acquire at least one overclocking rate within the target frequency range and determine the channel state of the target optical module corresponding to each overclocking rate; wherein the channel state includes a receiving channel state and a transmitting channel state; A construction module is used to construct an overclocking rate set based on the channel state of the target optical module corresponding to each overclocking rate; wherein the overclocking rate set includes at least one effective overclocking rate; A communication module is used to select a target overclocking rate from the set of overclocking rates and communicate with a target terminal based on the target overclocking rate; wherein the target terminal is a terminal device corresponding to the target optical module.

[0008] A third aspect of this application provides a switching device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the communication method provided in the first aspect.

[0009] A fourth aspect of this application provides a computer storage medium including a computer program that, when executed by a switching device, implements the communication method provided in the first aspect.

[0010] The fifth aspect of this application provides a computer program product that, when run on a switching device, causes the switching device to implement the communication method provided in the first aspect.

[0011] The communication method provided in the first aspect of this application involves obtaining the target frequency range of a target optical module when physical link connectivity is detected, obtaining at least one overclocking rate within the target frequency range, and determining the receiving channel state and transmitting channel state of the target optical module corresponding to each overclocking rate. Based on the receiving channel state and transmitting channel state of the target optical module corresponding to each overclocking rate, an overclocking rate set including at least one effective overclocking rate is constructed. A target overclocking rate is selected from the overclocking rate set, and communication with the target terminal is performed based on the target overclocking rate. This achieves adaptive selection of effective rates based on the states of the switching equipment and optical modules, improving the forwarding bandwidth of user data packets and thus enhancing data transmission efficiency.

[0012] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

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

[0014] Figure 1 This is one of the flowcharts illustrating the communication method provided in the embodiments of this application; Figure 2 This is a second schematic flowchart of the communication method provided in the embodiments of this application; Figure 3 This is the third flowchart illustrating the communication method provided in the embodiments of this application; Figure 4 This is the fourth flowchart illustrating the communication method provided in the embodiments of this application; Figure 5 This is the fifth flowchart illustrating the communication method provided in the embodiments of this application; Figure 6 This is a schematic diagram of the structure of the communication device provided in the embodiments of this application; Figure 7 This is a schematic diagram of the structure of the switching device provided in the embodiments of this application. Detailed Implementation

[0015] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0016] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0017] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0018] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0019] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0020] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0021] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant countries and regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation access points for users to choose to authorize or refuse.

[0022] With the development of network communication and big data application technologies, network virtualization technology (e.g., stacking virtualization technology between multiple box-type or chassis-type devices) is commonly used in large-scale campus networks and data center networks to improve service capacity, data throughput, and network management efficiency. Generally, to ensure high-bandwidth data transmission between devices within a stacked virtualization system, high-speed optical ports are typically selected as data forwarding ports between the stacked devices, and optical modules are installed on the optical ports of the switching equipment. The relevant rate configuration method usually involves adaptively configuring both the switching equipment and the optical module side based on the supported rates of the optical modules inserted into the optical ports of the switching equipment, so that both the switching equipment and the optical modules can operate at their highest matching rates.

[0023] However, stacked virtualization technology itself consumes some bandwidth. For example, data packet forwarding between devices in stacked virtualization technology needs to be achieved through stacking headers, which consumes some bandwidth (for example, in small packet forwarding scenarios, the forwarding rate of user data packets may be less than 80% of the total physical bandwidth of the port); and the internal protocol messages in stacked virtualization technology also consume some forwarding bandwidth, reducing the actual effective forwarding bandwidth of user data packets and affecting the transmission efficiency of user data packets.

[0024] To address the aforementioned problems, embodiments of this application provide a communication method, apparatus, switching device, and storage medium. When physical link connectivity is detected, the target frequency range of the target optical module is obtained, at least one overclocking rate within the target frequency range is acquired, and the receiving channel state and transmitting channel state of the target optical module corresponding to each overclocking rate are determined. Based on the receiving and transmitting channel states of the target optical module corresponding to each overclocking rate, an overclocking rate set including at least one effective overclocking rate is constructed. A target overclocking rate is selected from the overclocking rate set, and communication with the target terminal is performed based on the target overclocking rate. This achieves adaptive selection of effective rates based on the states of the switching device and optical modules, improving the forwarding bandwidth of user data packets and thus enhancing data transmission efficiency.

[0025] It should be noted that the communication method, apparatus, switching equipment and storage medium provided in this application can be used in the field of switching equipment, and this application does not limit the application field of the communication method, apparatus, switching equipment and storage medium.

[0026] The aforementioned switching equipment is used to indicate devices that support communication functions (including but not limited to switches (e.g., optical switches, program-controlled switches, etc.), routers, wireless controllers AC+AP, etc.). This application embodiment does not impose any special restrictions on the specific type of the switching equipment.

[0027] Figure 1 This is one of the flowcharts illustrating the communication method provided in an embodiment of this application. For example... Figure 1 As shown in the embodiments of this application, the communication method includes the following steps: S101. When physical link connectivity is detected, the target frequency range of the target optical module is obtained; wherein, the target optical module refers to the optical module mounted on the target optical port, and the target optical port is the optical port corresponding to the physical link.

[0028] In applications, switching equipment includes multiple optical ports, on which optical modules can be mounted / inserted. Physical links are established with peer devices via these optical modules to enable communication. When a physical link is detected, the optical port corresponding to that physical link is identified as the target optical port, and the optical module mounted / inserted on the target optical port is designated as the target optical module. The target frequency range of the target optical module is then obtained.

[0029] It is understandable that the target optical module can support multiple frequencies, and the target frequency range is determined based on all the frequencies supported by the target optical module.

[0030] In some embodiments, a polling detection mechanism can be used to poll the presence (absent) signals of each optical port in the switching equipment. When no presence (absent) signal is detected, it is determined that an optical module has been inserted into the optical port. The optical module is then identified to determine its type, thereby obtaining the target frequency range of the optical module. Based on the rate type of the optical port and the type of the currently inserted optical module, the rate of both the optical port and the optical module is set to the maximum rate supported by both parties, so as to communicate with the target terminal at the other end of the physical link at the aforementioned maximum rate.

[0031] As an example and not a limitation, when the physical link connection of the target optical port on the switching device is detected, communication is established with the microcontroller unit (MCU) of the corresponding target optical module. That is, by reading the protocol specified by the standard protocol or the content of the user-defined protocol, the frequency range supported by the transmit channel (CDR) and receive channel (CDR) of the target optical module and the frequency range supported by each range are obtained, as well as information such as the current default frequency range of the transmit channel (CDR) and receive channel (CDR) of the target optical module are obtained.

[0032] The execution entity in this application embodiment can be a switching device or a communication device installed in the switching device. The communication device can be implemented by software or by a combination of software and hardware.

[0033] S102. Obtain at least one overclocking rate within the target frequency range and determine the channel state of the target optical module corresponding to each overclocking rate; wherein, the channel state includes the receiving channel state and the transmitting channel state.

[0034] In the application, at least one overclocking rate within the target frequency range supported by the target optical module is obtained, and the channel state of the target optical module corresponding to each overclocking rate is determined. The channel state includes, but is not limited to, the receive channel state and the transmit channel state. Both the receive channel state and the transmit channel state include locked and unlocked states.

[0035] As an example, and not a limitation, a preset frequency range file for the switching device can be pre-built, which includes at least one overclocking rate supported by the switching device. In this way, based on the preset frequency range file, at least one overclocking frequency supported by the switching device and located within the target frequency range supported by the target optical module can be obtained.

[0036] For example, when the switching device is a switch, the ASIC chip of the switch can be read to obtain the overclocking rates supported by all links of the switch, a preset frequency range file of the switch can be created, and the overclocking rate information can be stored. When the switch starts up, the preset frequency range file is read and the overclocking rate information is stored to facilitate subsequent rate configuration operations.

[0037] As an example, and not a limitation, when the switch starts up, if the preset frequency range file is not detected, it will automatically read all the overclocking rates supported by the ASIC chip, create the preset frequency range file, and write the overclocking rate information.

[0038] As an example, and not a limitation, creating a preset frequency range file and writing overclocking rate information includes two methods. The automatic generation method involves the switch's built-in program automatically reading the overclocking rates supported by the ASIC chip, creating the preset frequency range file, and automatically writing the overclocking rate information. The manual generation method involves, upon receiving a user instruction, determining the different overclocking rates supported by different links on the user-specified ASIC chip, creating the preset frequency range file, and writing only the user-specified overclocking rate information. The user instruction can be a command or request sent by the user through a user terminal; or it can be an instruction or request automatically generated based on the user's actions on the current switch (such as pressing external buttons, clicking or dragging the current switch screen).

[0039] It is understandable that the target optical module's receive and transmit channels (CDRs) can only enter a locked state and normally receive or transmit data when the port rate (also known as overclocking rate or overclocking frequency) configured on the target optical port is within the frequency range supported by the target optical module's receive and transmit channels (CDRs). By selecting at least one overclocking frequency within the target frequency range supported by the target optical module from the preset frequency range file supported by the switching equipment, at least one overclocking frequency supported by both the switching equipment and the target optical module can be obtained, thereby determining the receive and transmit channel states of the target optical module corresponding to each of the aforementioned overclocking frequencies.

[0040] like Figure 2 As shown, in some embodiments, S102 includes the following steps: S1021. Determine at least one first overclocking rate within the target frequency range.

[0041] In the application, at least one overclocking rate within the target frequency range is determined and designated as the first overclocking rate.

[0042] For example, in the preset frequency range file supported by the switching device, at least one overclocking frequency located within the target frequency range is found and determined as the first overclocking rate.

[0043] S1022. Traverse each first overclocking rate, set the target optical port rate to the first overclocking rate in sequence, and determine the corresponding receiving channel status and transmitting channel status.

[0044] In the application, each first overclocking rate is traversed, and the rate of the target optical port is set to the corresponding first overclocking rate in turn, so as to obtain the receiving channel status and transmitting channel status of the target optical module corresponding to each first overclocking rate.

[0045] For example, in the preset frequency range file, the first overclocking rate within the target frequency range includes rate 1, rate 2, rate 3... rate n. Each of the above first overclocking rates can be iterated over, and the rate of the target optical port can be sequentially set to rate 1, rate 2, rate 3... rate n. This allows for the sequential acquisition of the receiving channel status and transmitting channel status of the target optical module corresponding to rate 1; the receiving channel status and transmitting channel status of the target optical module corresponding to rate 2; and the receiving channel status and transmitting channel status of the target optical module corresponding to rate n.

[0046] In some embodiments, the following steps are included after S1022: If at least one of the receiving channel states and the transmitting channel state is in an unlocked state, the corresponding first overclocking rate is determined to be an invalid overclocking rate.

[0047] In application, when at least one of the receiving channel states and the transmitting channel states of the target optical module is in an unlocked state (for example, the receiving channel state is unlocked, the transmitting channel state is unlocked, or both the receiving channel state and the transmitting channel state are unlocked), the corresponding first overclocking rate is determined to be an invalid overclocking rate.

[0048] Optionally, a corresponding invalid flag can be added to the invalid overclocking rate. This allows invalid overclocking rates carrying invalid flags to be identified, preventing invalid overclocking rates from being grouped together in the overclocking rate set.

[0049] For example, if the receiving channel of the target optical module corresponding to rate 1 is unlocked and the transmitting channel is locked, rate 1 is determined to be an invalid overclocking rate, and a corresponding invalid flag is added to rate 1; if the receiving channel of the target optical module corresponding to rate 2 is locked and the transmitting channel is unlocked, rate 2 is determined to be an invalid overclocking rate, and a corresponding invalid flag is added to rate 2; if both the receiving and transmitting channels of the target optical module corresponding to rate 3 are unlocked, rate 3 is determined to be an invalid overclocking rate, and a corresponding invalid flag is added to rate 3.

[0050] It is understandable that when both the receiving channel state and the transmitting channel state of the target optical module are locked, the corresponding first overclocking rate is determined as the effective overclocking rate, and an overclocking rate set is constructed based on each effective overclocking rate.

[0051] For example, if the receiving channel state and transmitting channel state of the target optical module corresponding to rate 4 are both locked, rate 4 is determined as an effective overclocking rate and added to the overclocking rate set.

[0052] like Figure 3As shown, in some embodiments, after S101, the following steps are further included: S201. When the target frequency range includes multiple frequency levels, traverse each frequency level to find the target frequency level. S202. Generate corresponding control commands based on each target frequency level; wherein, the control commands are used to control the target optical module to update the current frequency level to the corresponding target frequency level.

[0053] In application, when the target frequency range supported by the transmit and receive channels of the target optical module includes multiple frequency levels, each frequency level is traversed to obtain the target frequency level, and corresponding control commands are generated based on each target frequency level. The control commands are used to control the target optical module to update the current frequency level to the corresponding target frequency level.

[0054] For example, the target optical module's transmit and receive channels support both low-frequency and high-frequency ranges. The low-frequency and high-frequency ranges are iterated to determine the target frequency range. A first control command is generated based on the first target frequency range (e.g., a low-frequency range) to control the target optical module to update its current frequency range to the first target frequency range. A second control command is generated based on the second target frequency range (e.g., a high-frequency range) to control the target optical module to update its current frequency range to the second target frequency range.

[0055] like Figure 4 As shown, in some embodiments, S102 further includes the following step: S1023. Determine multiple second overclocking rates corresponding to each target frequency level; S1024. For each target frequency level, iterate through each second overclocking rate corresponding to the target frequency level, set the rate of the target optical port to the second overclocking rate in sequence, and determine the receiving channel state and transmitting channel state corresponding to each second overclocking rate.

[0056] In the application, multiple second overclocking rates corresponding to each target frequency range are determined. For each target frequency range, the second overclocking rates corresponding to that target frequency range are iterated through, and the rate of the target optical port is sequentially set to each second overclocking rate corresponding to that target frequency range, so as to obtain the receive channel status and transmit channel status of the target optical module corresponding to each second overclocking rate corresponding to that target frequency range.

[0057] For example, multiple second overclocking rates corresponding to each target frequency level can be determined in a preset frequency range file, thereby obtaining multiple second overclocking rates supported by the switching device and corresponding to each target frequency level of the target optical module.

[0058] For example, when generating a first control command based on a first target frequency range (e.g., a low frequency range) to control the target optical module to update its current frequency range to the first target frequency range, multiple second overclocking rates corresponding to the first target frequency range are determined in a preset frequency range file (e.g., the low frequency range includes rate x, rate y, and rate z). For the first target frequency range, each second overclocking rate corresponding to that range is traversed, and the rate of the target optical port is sequentially set to each second overclocking rate corresponding to the first target frequency range. The receiving channel state and transmitting channel state of the target optical module corresponding to each of the above-mentioned second overclocking rates (including rate x, rate y, and rate z) are obtained, thereby obtaining the channel state of the target optical module corresponding to rate x, rate y, and rate z in the low frequency range. Furthermore, when generating a second control command based on a second target frequency level (e.g., a high frequency level) to control the target optical module to update its current frequency level to the second target frequency level, multiple second overclocking rates (e.g., the high frequency level includes rate a, rate b, and rate c) corresponding to the second target frequency level (e.g., a high frequency level) are determined in a preset frequency range file. For each second target frequency level, the second overclocking rate corresponding to that high frequency level is traversed, and the rate of the target optical port is sequentially set to each second overclocking rate corresponding to the second target frequency level. The receiving channel state and transmitting channel state of the target optical module corresponding to each of the above-mentioned second overclocking rates (including rate a, rate b, and rate c) are obtained, thereby obtaining the channel state of the target optical module corresponding to rate a, rate b, and rate c in the high frequency level.

[0059] By adjusting the target optical module to the target frequency range and determining the receive channel status and transmit channel status of the target optical module when the target optical port is configured with the overclocking rate corresponding to the target frequency range, the effective overclocking rate can be identified, which can improve the compatibility between the effective overclocking rates in the overclocking rate set and the switching equipment and the target optical module.

[0060] S103. Based on the channel state of the target optical module corresponding to each overclocking rate, an overclocking rate set is constructed; wherein, the overclocking rate set includes at least one effective overclocking rate.

[0061] In application, based on the channel state of the target optical module corresponding to each overclocking rate, at least one effective overclocking rate is determined, and an overclocking rate set is constructed based on the above at least one effective overclocking rate.

[0062] like Figure 5 As shown, in some embodiments, S103 includes the following steps: S1031. When both the receiving channel state and the transmitting channel state of the target optical module are locked, determine the corresponding second overclocking rate as the effective overclocking rate. S1032. Determine the effective overclocking rates corresponding to each target frequency level and construct an overclocking rate set.

[0063] In the application, when both the receiving channel state and the transmitting channel state of the target optical module are locked, the corresponding second overclocking rate is determined as the effective overclocking rate, thereby obtaining at least one effective overclocking rate corresponding to each target frequency level, and constructing the corresponding overclocking rate set.

[0064] For example, in the low-frequency range, the channel states of the target optical module corresponding to rate x include: both the receive and transmit channels are locked; the channel states of the target optical module corresponding to rate y include: the receive channel is unlocked and the transmit channel is locked; the channel states of the target optical module corresponding to rate z include: both the receive and transmit channels are locked. The effective overclocking rates for the low-frequency range are determined to be rates x and z. In the high-frequency range, the channel states of the target optical module corresponding to rate a include: both the receive and transmit channels are locked; the channel states of the target optical module corresponding to rate b include: both the receive and transmit channels are locked; the channel states of the target optical module corresponding to rate c include: both the receive and transmit channels are locked. The effective overclocking rates for the high-frequency range are determined to be rates a, b, and c. The resulting overclocking rate set includes rates a, b, c, x, and z.

[0065] In some embodiments, prior to S101, the following steps are included: Obtain at least one overclocking rate that the switching device can support, and construct a preset frequency range file; wherein, the overclocking rate includes a first overclocking rate and a second overclocking rate.

[0066] In the application, at least one overclocking rate that the current switching device can support is obtained, and the corresponding preset frequency range file is constructed.

[0067] The overclocking rate includes a first overclocking rate and a second overclocking rate. The first overclocking rate and the second overclocking rate may be the same or different.

[0068] S104. Select a target overclocking rate from the overclocking rate set, and communicate with the target terminal based on the target overclocking rate; wherein, the target terminal is the terminal device corresponding to the target optical module.

[0069] In application, an overclocking rate is selected from the overclocking rate set and determined as the target overclocking rate. The current rate of the target optical port is then updated to this target overclocking rate to enable communication with the target terminal. Here, the target terminal refers to the terminal device corresponding to the target optical module connected as described above.

[0070] As an example and not a limitation, the methods for selecting a target overclocking rate from the set of overclocking rates include, but are not limited to, random selection and maximum value selection. Random selection means randomly selecting an effective overclocking rate from the set of overclocking rates and determining it as the target overclocking rate. Maximum value selection means selecting the effective overclocking rate with the largest value from the set of overclocking rates and determining it as the target overclocking rate.

[0071] In practical applications, the same type of optical module can be physically linked using fiber optic cables of different lengths in different business scenarios. The same type of optical module or fiber optic cable may exhibit different bit error rates at the same overclocking rate. That is, at the same overclocking rate, the transmit and receive channel states of the optical module may be inconsistent, and the overclocking rate matched to the switching equipment on the optical module will also differ at different temperatures. By selecting the transmission rate with the highest forwarding efficiency from a set of multiple effective overclocking rates supported by the switching equipment within the target frequency range of the target optical module, which simultaneously adapts to both the current switching equipment and the target terminal, the bandwidth consumed during data transmission (e.g., the additional bandwidth consumed by internal communication protocols and management protocols) can be reduced, and the effective forwarding bandwidth of data transmission can be increased, thereby improving data transmission efficiency. This method is applicable to optical modules supporting standard protocols (e.g., optical modules supporting the 8636 protocol); or to user-designed or customized optical modules.

[0072] Understandably, the target overclocking rate selected using the above method can break through the original physical speed limit (generally, the physical speed limit is affected by factors such as temperature, fiber length, and signal quality), compensating to some extent for the bandwidth consumed by data packet forwarding, thereby increasing the actual effective forwarding bandwidth of user data packets. For example, the standard baud rate of a 25G optical port is 25.781250G, and the target overclocking rate selected using the above method can configure the optical port speed to any of 27.34375G, 27.78125G, or 28.125000G.

[0073] For example, when the optical module inserted into the 10G optical port is 10G, the target overclocking rate selected by the above method can reach 11G or 12G.

[0074] In some embodiments, S104 includes the following steps: Select the overclocking rate with the largest value from the set of overclocking rates and determine it as the target overclocking rate, and then communicate with the target terminal based on the target overclocking rate.

[0075] In the application, the effective overclocking rate with the largest value is selected from the set of overclocking rates and determined as the target overclocking rate. Then, based on the maximum effective overclocking rate (i.e. the target overclocking rate) supported by the current switching equipment and located within the target frequency range supported by the target optical module, communication is carried out with the target terminal.

[0076] In some embodiments, after S104, the following steps are further included: Start the timer to obtain the timer duration; When the timing duration reaches the preset threshold, return to execute the steps to obtain the target frequency range of the target optical module and subsequent steps.

[0077] In applications, the frequency range supported by the optical module can change due to external environmental factors (e.g., ambient temperature, fiber length, signal quality, etc.) (e.g., supporting a higher frequency range or a lower frequency range). Based on this, a preset threshold is set. When a target overclocking rate is selected and communication with the target terminal is initiated based on the target overclocking rate, a timer is started to obtain the corresponding timing duration. When the timing duration reaches the preset threshold, the process returns to obtain the target frequency range of the optical module and subsequent steps, so as to dynamically update the target overclocking rate based on the updated target frequency range, improve the forwarding bandwidth of user data packets, and thus improve data transmission efficiency.

[0078] The preset threshold can be set according to actual needs. For example, the preset threshold can be set to 10s, 30s, or 2h.

[0079] As an example and not a limitation, when the aforementioned physical link interruption is detected, the steps of obtaining the target frequency range of the target optical module and subsequent steps may be stopped.

[0080] The communication method provided in this application, upon detecting physical link connectivity, obtains the target frequency range of the target optical module, acquires at least one overclocking rate within the target frequency range, and determines the receiving channel state and transmitting channel state of the target optical module corresponding to each overclocking rate. Based on the receiving channel state and transmitting channel state of the target optical module corresponding to each overclocking rate, an overclocking rate set including at least one effective overclocking rate is constructed. A target overclocking rate is selected from the overclocking rate set, and communication with the target terminal is performed based on the target overclocking rate. This achieves adaptive selection of effective rates based on the states of the switching equipment and optical modules, improving the forwarding bandwidth of user data packets and thus enhancing data transmission efficiency.

[0081] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0082] This application also provides a communication device for performing the steps in the above method embodiments. The communication device can be a virtual appliance in a switching device, run by the processor of the switching device, or it can be the switching device itself. Figure 6 As shown, the communication device 600 provided in this application embodiment includes: The first acquisition module 601 is used to acquire the target frequency range of the target optical module when the physical link is detected to be connected; wherein, the target optical module refers to the optical module assembled on the target optical port, and the target optical port is the optical port corresponding to the physical link; The second acquisition module 602 is used to acquire at least one overclocking rate within the target frequency range and determine the channel state of the target optical module corresponding to each overclocking rate; wherein the channel state includes the receiving channel state and the transmitting channel state. The construction module 603 is used to construct an overclocking rate set based on the channel state of the target optical module corresponding to each overclocking rate; wherein the overclocking rate set includes at least one effective overclocking rate; The communication module 604 is used to select a target overclocking rate from the overclocking rate set and communicate with the target terminal based on the target overclocking rate; wherein the target terminal is a terminal device corresponding to the target optical module.

[0083] In some embodiments, the second acquisition module includes: The first determining unit is used to determine at least one first overclocking rate within the target frequency range; The second determining unit is used to traverse each first overclocking rate, sequentially set the rate of the target optical port to the first overclocking rate, and determine the corresponding receiving channel state and transmitting channel state.

[0084] In some embodiments, the communication device further includes: The determination module is used to determine that the corresponding first overclocking rate is an invalid overclocking rate when at least one channel state in the receiving channel state and the transmitting channel state is in an unlocked state.

[0085] In some embodiments, the communication device further includes: The traversal module is used to traverse each frequency range to find the target frequency range when the target frequency range includes multiple frequency ranges. The generation module is used to generate corresponding control commands based on each target frequency level; the control commands are used to control the target optical module to update the current frequency level to the corresponding target frequency level.

[0086] In some embodiments, the second acquisition module further includes: The third determining unit is used to determine multiple second overclocking rates corresponding to each target frequency level; The fourth determining unit is used to traverse each second overclocking rate corresponding to each target frequency level, sequentially set the rate of the target optical port to the second overclocking rate, and determine the receiving channel state and transmitting channel state corresponding to each second overclocking rate.

[0087] In some embodiments, the building module includes: The fifth determining unit is used to determine the corresponding second overclocking rate as the effective overclocking rate when both the receiving channel state and the transmitting channel state of the target optical module are locked. The sixth determining unit is used to determine the effective overclocking rate corresponding to each target frequency level and to construct an overclocking rate set.

[0088] In some embodiments, the communication device further includes: The third acquisition module is used to acquire at least one overclocking rate that the switching device can support and construct a preset frequency range file; wherein the overclocking rate includes a first overclocking rate and a second overclocking rate.

[0089] The communication device provided in this application embodiment can be used to execute the technical solution of the communication method in the above embodiment. Its implementation principle and technical effect are similar, and will not be described again here.

[0090] In applications, the modules in a communication device can be software program modules, or they can be implemented through different logic circuits integrated in a processor, or they can be implemented through multiple distributed processors.

[0091] Corresponding to the communication method provided above, embodiments of this application also provide a switching device, which has communication functions, such as... Figure 7 As shown, the switching device 700 includes: at least one processor 701 ( Figure 7 Only one processor is shown in the diagram; memory 702; computer program 703 stored in memory 702 and executable on at least one processor 701; when processor 701 executes computer program 703, it performs the following steps: When physical link connectivity is detected, the target frequency range of the target optical module is obtained; where the target optical module refers to the optical module mounted on the target optical port, and the target optical port is the optical port corresponding to the physical link; At least one overclocking rate within the target frequency range is obtained, and the channel state of the target optical module corresponding to each overclocking rate is determined; wherein, the channel state includes the receiving channel state and the transmitting channel state; Based on the channel state of the target optical module corresponding to each overclocking rate, an overclocking rate set is constructed; wherein, the overclocking rate set includes at least one effective overclocking rate; Select a target overclocking rate from the overclocking rate set, and communicate with the target terminal based on the target overclocking rate; wherein, the target terminal is the terminal device corresponding to the target optical module.

[0092] In applications, the switching device 700 may include, but is not limited to, a processor and memory. Those skilled in the art will understand that... Figure 7 The example of switching device 700 is merely an illustration and does not constitute a limitation on switching device 700. It may include more or fewer components than shown, or combine certain components, or different components; for example, it may also include input / output devices, network access devices, etc.

[0093] In applications, the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0094] In applications, the memory may be an internal storage unit of the switching device 700 in some embodiments, such as a hard disk or RAM of the switching device 700. In other embodiments, the memory may be an external storage device of the switching device 700, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., provided with the switching device 700. Furthermore, the memory may include both internal storage units and external storage devices of the switching device 700. The memory is used to store operating systems, applications, boot loaders, data, and other programs, such as program code for computer programs. The memory can also be used to temporarily store data that has been output or will be output.

[0095] It should be noted that the information interaction and execution process between the above-mentioned devices / modules are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0096] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The functional modules in the embodiments can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules can be implemented in hardware or as software functional modules. Furthermore, the specific names of the functional modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the modules in the above-described device can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0097] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps described in the various method embodiments above.

[0098] This application provides a computer program product that, when run on a switching device, enables the switching device to perform the steps described in the above-described method embodiments.

[0099] If an integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium can include at least: any entity or device capable of carrying computer program code to a device / switching equipment, a recording medium, a computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0100] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

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

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

[0103] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0104] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications 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 included within the protection scope of this application.

Claims

1. A communication method, characterized in that, Applied to switching equipment, the method includes: When a physical link connection is detected, the target frequency range of the target optical module is obtained; wherein, the target optical module refers to the optical module mounted on the target optical port, and the target optical port is the optical port corresponding to the physical link; At least one overclocking rate within the target frequency range is obtained, and the channel state of the target optical module corresponding to each overclocking rate is determined; wherein the channel state includes a receiving channel state and a transmitting channel state; Based on the channel state of the target optical module corresponding to each of the overclocking rates, an overclocking rate set is constructed; wherein, the overclocking rate set includes at least one effective overclocking rate; A target overclocking rate is selected from the set of overclocking rates, and communication is conducted with a target terminal based on the target overclocking rate; wherein, the target terminal is a terminal device corresponding to the target optical module.

2. The communication method as described in claim 1, characterized in that, The step of acquiring at least one overclocking rate within the target frequency range and determining the channel state of the target optical module corresponding to each overclocking rate includes: Determine at least one first overclocking rate within the target frequency range; Iterate through each of the first overclocking rates, sequentially set the rate of the target optical port to the first overclocking rate, and determine the corresponding receiving channel state and transmitting channel state.

3. The communication method as described in claim 2, characterized in that, After traversing each of the first overclocking rates, sequentially setting the rate of the target optical port to the first overclocking rate, and determining the corresponding receive channel state and transmit channel state, the process includes: When at least one of the receiving channel states and the transmitting channel states is in an unlocked state, the corresponding first overclocking rate is determined to be an invalid overclocking rate.

4. The communication method as described in claim 1, characterized in that, After obtaining the target frequency range of the target optical module, the method further includes: When the target frequency range includes multiple frequency levels, each frequency level is traversed to obtain the target frequency level; Based on each of the target frequency levels, a corresponding control command is generated; wherein, the control command is used to control the target optical module to update the current frequency level to the corresponding target frequency level.

5. The communication method as described in claim 4, characterized in that, The step of acquiring at least one overclocking rate within the target frequency range and determining the channel state of the target optical module corresponding to each overclocking rate includes: Determine multiple second overclocking rates corresponding to each of the target frequency levels; For each target frequency level, iterate through each second overclocking rate corresponding to the target frequency level, sequentially set the rate of the target optical port to the second overclocking rate, and determine the receiving channel state and transmitting channel state corresponding to each second overclocking rate.

6. The communication method as described in claim 5, characterized in that, The overclocking rate set is constructed based on the channel state of the target optical module corresponding to each overclocking rate, including: When both the receiving channel state and the transmitting channel state of the target optical module are locked, the corresponding second overclocking rate is determined to be the effective overclocking rate; Determine the effective overclocking rate corresponding to each of the target frequency levels, and construct the overclocking rate set.

7. The communication method according to any one of claims 1 to 6, characterized in that, Before obtaining the target frequency range of the target optical module when physical link connectivity is detected, the process includes: Obtain at least one overclocking rate that the switching device can support, and construct a preset frequency range file; wherein the overclocking rate includes a first overclocking rate and a second overclocking rate.

8. A communication device, characterized in that, Applied to switching equipment, the device includes: The first acquisition module is used to acquire the target frequency range of the target optical module when the physical link is detected to be connected; wherein, the target optical module refers to the optical module mounted on the target optical port, and the target optical port is the optical port corresponding to the physical link; The second acquisition module is used to acquire at least one overclocking rate within the target frequency range and determine the channel state of the target optical module corresponding to each overclocking rate; wherein the channel state includes a receiving channel state and a transmitting channel state; A construction module is used to construct an overclocking rate set based on the channel state of the target optical module corresponding to each overclocking rate; wherein the overclocking rate set includes at least one effective overclocking rate; A communication module is used to select a target overclocking rate from the set of overclocking rates and communicate with a target terminal based on the target overclocking rate; wherein the target terminal is a terminal device corresponding to the target optical module.

9. A switching 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 computer program, it implements the steps of the communication method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Includes a computer program that, when executed by a switching device, implements the steps of the communication method according to any one of claims 1 to 7.