CN111541629A - Mode self-adaption method, device, equipment and computer readable storage medium - Google Patents

Mode self-adaption method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN111541629A
CN111541629A CN202010319641.9A CN202010319641A CN111541629A CN 111541629 A CN111541629 A CN 111541629A CN 202010319641 A CN202010319641 A CN 202010319641A CN 111541629 A CN111541629 A CN 111541629A
Authority
CN
China
Prior art keywords
switch
port
optical module
circuit
switch circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010319641.9A
Other languages
Chinese (zh)
Inventor
熊伟
李耀军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
3onedata Co ltd
Original Assignee
3onedata Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 3onedata Co ltd filed Critical 3onedata Co ltd
Priority to CN202010319641.9A priority Critical patent/CN111541629A/en
Publication of CN111541629A publication Critical patent/CN111541629A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/35Switches specially adapted for specific applications
    • H04L49/351Switches specially adapted for specific applications for local area network [LAN], e.g. Ethernet switches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0005Switch and router aspects

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Optical Communication System (AREA)

Abstract

The invention discloses a mode self-adaptive method, a device, equipment and a computer readable storage medium, wherein the mode self-adaptive method is applied to an Ethernet switch, the Ethernet switch comprises a switch port and an analog switch circuit, the switch port is electrically connected with the analog switch circuit, and the mode self-adaptive method comprises the following steps: if the optical module is successfully connected with the Ethernet switch, determining the model of the optical module; and configuring the switch port into a target port mode matched with the model of the optical module based on the analog switch circuit of the Ethernet switch. The invention integrates the ports with different rates of the Ethernet switch into one switch port, and when the Ethernet switch is connected with the optical modules with different models, the matching communication between the optical modules and the switch port can be simply and conveniently completed.

Description

Mode self-adaption method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for mode adaptation.
Background
With the continuous development of network communication technology, optical fiber communication is the main wired communication mode due to the advantages of good confidentiality and large transmission capacity. The optical module completes photoelectric conversion work in optical fiber communication, and is an important device in the optical fiber communication. The most widely used are optical transceiver modules, and the common types are SFP, SFF, SFP +, GBIC, and XFP, wherein gigabit optical modules are mostly SFP optical modules, and gigabit optical modules are mostly SFP + optical modules.
In practical use, the ethernet switch is often unable to adapt to the optical module due to the difference between the internal hardware of the ethernet switch, such as the switch chip architecture and the internal registers, or due to the mismatch between the optical module and the switch port of the ethernet switch, or due to the fact that different optical modules are used in the field, various problems of abnormal communication are caused. Or because the resources of the switching chip of the Ethernet switch are not enough, the gigabit compatibility of hundreds of megabytes cannot be realized. Such as gigabit servers ports, are normally not configurable to hundreds of megabits of rate for matching hundreds of megabits of optical module communications.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a mode self-adaptive method, a mode self-adaptive device, mode self-adaptive equipment and a computer readable storage medium, and aims to solve the technical problem that an Ethernet switch cannot be self-adaptive to different optical modules.
In order to achieve the above object, the present invention provides a mode adaptive method, which is applied to an ethernet switch, where the ethernet switch includes a switch port and an analog switch circuit, and the switch port is electrically connected to the analog switch circuit, and the mode adaptive method includes the following steps:
if the optical module is detected to be successfully connected with the Ethernet switch, determining the model of the optical module;
configuring the switch port to a target port mode matching the model of the optical module based on an analog switch circuit of the Ethernet switch.
Optionally, when the model of the optical module is a gigabit optical module, the step of configuring the switch port to a target port mode matching the model of the optical module based on the analog switch circuit of the ethernet switch includes:
configuring a switch port as a gigabit port based on an analog switch circuit of the Ethernet switch to configure the switch port as a target port mode matching a model of the optical module.
Optionally, the ethernet switch further includes a switch circuit, the switch port is electrically connected to the switch circuit through the analog switch circuit, and the step of configuring the switch port as a gigabit port based on the analog switch circuit of the ethernet switch includes:
and closing the gigabit optical port switch of the analog switch circuit so that the switch port is electrically connected with the gigabit optical port of the switch circuit through the analog switch circuit.
Optionally, when the model of the optical module is a hundred mega optical module, the step of configuring the switch port to a target port mode matching the model of the optical module based on the analog switch circuit of the ethernet switch includes:
configuring a switch port as a hundred megaport port based on an analog switch circuit of the Ethernet switch to configure the switch port as a target port mode matching the model of the optical module.
Optionally, the ethernet switch further includes a switch circuit, the switch port is electrically connected to the switch circuit through the analog switch circuit, and the step of configuring the switch port as a hundred mega port based on the analog switch circuit of the ethernet switch includes:
and closing the hundred-million optical port switch of the analog switch circuit so that the switch port is electrically connected with the hundred-million optical port of the switching circuit through the analog switch circuit.
Optionally, the step of determining the model number of the light module includes:
acquiring hardware information of the optical module;
and determining the model of the optical module based on the hardware information.
Optionally, before the step of determining the model of the optical module if it is detected that the optical module is successfully connected to the ethernet switch, the method further includes:
and detecting whether the optical module is successfully connected with the Ethernet switch or not based on a monitoring circuit connected with the port of the switch.
In addition, to achieve the above object, the present invention also provides a mode adaptation apparatus, including:
the detection module is used for determining the model of the optical module if the optical module is successfully connected with the Ethernet switch;
and the configuration module is used for configuring the switch port into a target port mode matched with the model of the optical module based on the analog switch circuit of the Ethernet switch.
Further, to achieve the above object, the present invention also provides a mode adaptive apparatus including: a memory, a processor and a pattern adaptation program stored on the memory and executable on the processor, the pattern adaptation program when executed by the processor implementing the steps of the pattern adaptation method as described above.
Furthermore, to achieve the above object, the present invention also provides a computer readable storage medium having stored thereon a mode adaptation program, which when executed by a processor, implements the steps of the mode adaptation method as described above.
According to the invention, if the optical module is successfully connected with the Ethernet switch, the model of the optical module is determined; configuring the switch port to a target port mode matching the model of the optical module based on an analog switch circuit of the Ethernet switch. In this embodiment, different speed ports of the ethernet switch are integrated into one switch port through the analog switch circuit, and when the ethernet switch is connected with optical modules of different models, the ethernet switch can automatically adapt to the optical modules, so that the ethernet switch can be connected with the optical modules of different models without performing corresponding configuration on a switch chip register of the ethernet switch, that is, without rewriting a switch chip in the ethernet switch, the matching communication between the optical modules and the switch port can be simply and conveniently completed; the optical module self-adapting circuit and the software algorithm are simplified to the greatest extent through a simple design circuit, the universality and the expandability are extremely high, and the design cost of an expansion chip is saved.
Drawings
FIG. 1 is a schematic diagram of a mode adaptive device for a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a mode adaptive method according to the present invention;
FIG. 3 is a diagram illustrating a mode adaptation circuit corresponding to the mode adaptation method of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic diagram of a mode adaptive device in a hardware operating environment according to an embodiment of the present invention.
The mode adaptive device of the embodiment of the invention can be a PC, and can also be a mobile terminal device with a display function, such as a smart phone, a tablet computer, an electronic book reader, a portable computer and the like.
As shown in fig. 1, the mode adaptive apparatus may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the mode adaptive device may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like.
Those skilled in the art will appreciate that the configuration of the modal adaptive device illustrated in fig. 1 does not constitute a limitation of the modal adaptive device and may include more or fewer components than illustrated, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a mode adaptation program.
In the mode adaptive device shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be used to invoke a mode adaptation program stored in the memory 1005.
In this embodiment, the mode adaptive apparatus includes: a memory 1005, a processor 1001, and a mode adaptive program stored on the memory 1005 and operable on the processor 1001, wherein the processor 1001, when calling the mode adaptive program stored in the memory 1005, performs the following operations:
if the optical module is detected to be successfully connected with the Ethernet switch, determining the model of the optical module;
configuring the switch port to a target port mode matching the model of the optical module based on an analog switch circuit of the Ethernet switch.
Further, the processor 1001 may call a mode adaptation program stored in the memory 1005, and also perform the following operations:
configuring a switch port as a gigabit port based on an analog switch circuit of the Ethernet switch to configure the switch port as a target port mode matching a model of the optical module.
Further, the processor 1001 may call a mode adaptation program stored in the memory 1005, and also perform the following operations:
and closing the gigabit optical port switch of the analog switch circuit so that the switch port is electrically connected with the gigabit optical port of the switch circuit through the analog switch circuit.
Further, the processor 1001 may call a mode adaptation program stored in the memory 1005, and also perform the following operations:
configuring a switch port as a hundred megaport port based on an analog switch circuit of the Ethernet switch to configure the switch port as a target port mode matching the model of the optical module.
Further, the processor 1001 may call a mode adaptation program stored in the memory 1005, and also perform the following operations:
and closing the hundred-million optical port switch of the analog switch circuit so that the switch port is electrically connected with the hundred-million optical port of the switching circuit through the analog switch circuit.
Further, the processor 1001 may call a mode adaptation program stored in the memory 1005, and also perform the following operations:
acquiring hardware information of the optical module;
and determining the model of the optical module based on the hardware information.
Further, the processor 1001 may call a mode adaptation program stored in the memory 1005, and also perform the following operations:
and detecting whether the optical module is successfully connected with the Ethernet switch or not based on a monitoring circuit connected with the port of the switch.
Referring to fig. 2, fig. 2 is a flowchart illustrating a mode adaptive method according to a first embodiment of the mode adaptive method of the present invention.
The mode adaptive method provided by the present invention is applied to a mode adaptive circuit, as shown in fig. 3, the mode adaptive circuit includes a central control circuit, a switching circuit, an analog switch circuit and a switch port, wherein the analog switch circuit is connected with the switching circuit through an optical port matching circuit, the central control circuit establishes an electrical connection with the switching circuit, and communicates with the switching circuit, thereby controlling the switching circuit; the central control circuit is electrically connected with the analog switch circuit and is communicated with the analog switch circuit so as to control the analog switch circuit; the central control circuit communicates with the switch ports by establishing electrical connections with the switch ports of the ethernet switch, thereby controlling the switch ports.
Further, the switch circuit is configured to configure a channel of an optical port matching circuit of the switch circuit based on the first control signal sent by the central control circuit, where the channel of the optical port matching circuit includes a first channel and a second channel. The channels of the optical port matching circuit comprise a hundred-million channel and a gigabit channel, the first channel is different from the second channel, and when the first channel is the hundred-million channel, the second channel is the gigabit channel; when the first channel is a gigabit channel, the second channel is a hundred megabits channel. Specifically, the first control signal includes a gigabit configuration signal and a hundred-megabyte configuration signal, and when the switch circuit receives the gigabit configuration signal sent by the central control circuit, the channel of the optical port matching circuit of the switch circuit is configured as a gigabit channel; when the switching circuit receives a hundred million configuration signal sent by the central control circuit, the channel of the optical port matching circuit of the switching circuit is configured into a hundred million channel.
The analog switch circuit is used for configuring analog switch channels based on a second control signal sent by the central control circuit, wherein the analog switch channels comprise a first switch channel and a second switch channel. The analog switch channels comprise a hundred-million switch channel and a kilomega switch channel, the first switch channel and the second switch channel are different, and when the first channel is the hundred-million switch channel, the second channel is the kilomega switch channel; when the first channel is a gigabit switch channel, the second channel is a hundred megabyte switch channel. Specifically, the second control signal includes a gigabit configuration signal and a hundred-megabyte configuration signal, and when the analog switch circuit receives the gigabit configuration signal sent by the central control circuit, the gigabit optical port switch of the analog switch circuit is closed, and a channel of the analog switch circuit is configured as a gigabit switch channel; when the analog switch circuit receives a hundred million configuration signal sent by the central control circuit, a hundred million light port switch of the analog switch circuit is closed, and a channel of the analog switch circuit is configured into a hundred million switch channel.
The switch port is used for being connected with the optical module and detecting whether the optical module is connected or not. When the switch port detects whether the optical module is connected or not, the central controller of the Ethernet switch is informed.
The central control circuit is used for controlling the switching circuit, the analog switch circuit and the switch port respectively.
In this embodiment, the mode adaptive method includes the following steps:
step S10, if detecting that the optical module is successfully connected with the Ethernet switch, determining the model of the optical module;
in an embodiment, after the ethernet switch is powered on, the monitoring circuit detects whether the optical module is connected to the switch port of the ethernet switch in real time, and detects whether the optical module is successfully connected to the ethernet switch, so as to detect whether the optical module is inserted into an interface corresponding to the switch port of the ethernet switch. When the optical module is successfully connected with the Ethernet switch, the fact that the optical module is inserted into an interface corresponding to a port of the switch at the moment is indicated, the optical module is successfully connected with the port of the switch, and then the model of the optical module is detected to obtain performance parameters of the optical module, wherein the model of the optical module can be the type, the working mode and the like of the optical module. Whether the optical module is connected with the Ethernet switch or not can be judged by detecting the working state of the optical module, and when the working state of the optical module is online, the optical module is successfully connected with the Ethernet switch currently; and when the working state of the optical module is off-line, the current connection between the optical module and the Ethernet switch fails.
Step S20, configuring the switch port to a target port mode matching the model of the optical module based on the analog switch circuit of the ethernet switch.
In an embodiment, when it is detected that the optical module is in place, the model of the optical module is read, and the analog switch circuit of the ethernet is configured according to the model of the optical module, so that the port mode of the switch port is configured through the analog switch circuit of the ethernet switch, and the switch port connected to the optical module is configured into a target port mode matched with the optical module. The Ethernet switch comprises a plurality of switch and optical module interfaces, and comprises a plurality of switch ports. Specifically, when the optical module is in place, the hardware information of the optical module is read, the central control circuit sends a corresponding control signal to the analog switch circuit according to the hardware information of the optical module, the analog switch circuit receives a second control signal sent by the central control circuit, configures a switch channel of the analog switch circuit, and configures the switch channel of the analog switch circuit into a target switch channel matched with the optical module, so that a switch port of the ethernet switch corresponding to the optical module is configured into a target port mode matched with the model of the optical module. The second control signal comprises a gigabit configuration signal and a hundred-megabyte configuration signal, and the analog switch channel comprises a hundred-megabyte switch channel and a gigabit switch channel. Furthermore, when the analog switch circuit receives the gigabit configuration signal sent by the central control circuit, the channel of the analog switch circuit is configured into a gigabit switch channel; when the analog switch circuit receives a hundred million configuration signal sent by the central control circuit, the channel of the analog switch circuit is configured into a hundred million switch channel.
In the mode adaptive method provided by this embodiment, if it is detected that an optical module is successfully connected to the ethernet switch, the model of the optical module is determined; then, the switch port is configured to a target port mode matching the model of the optical module based on the analog switch circuit of the ethernet switch. In this embodiment, different speed ports of the ethernet switch are integrated into one switch port through the analog switch circuit, and when the ethernet switch is connected with optical modules of different models, the ethernet switch can automatically adapt to the optical modules, so that the ethernet switch can be connected with the optical modules of different models without performing corresponding configuration on a switch chip register of the ethernet switch, that is, without rewriting a switch chip in the ethernet switch, the matching communication between the optical modules and the switch port can be simply and conveniently completed; the optical module self-adapting circuit and the software algorithm are simplified to the greatest extent through a simple design circuit, the universality and the expandability are extremely high, and the design cost of an expansion chip is saved.
A second embodiment of the mode adaptive method of the present invention is proposed based on the first embodiment, and in this embodiment, step S20 includes:
step a, configuring a switch port into a gigabit port based on an analog switch circuit of the Ethernet switch, so as to configure the switch port into a target port mode matched with the model of the optical module.
In an embodiment, when the optical module is detected to be in place, the model of the optical module is read, and the analog switch circuit of the ethernet is configured according to the model of the optical module. When the type of the optical module is read to be a gigabit optical module, the analog switch circuit of the Ethernet switch is used for configuring a switch port connected with the optical module into a target port mode matched with the gigabit optical module, namely configuring the switch port into a gigabit port. Specifically, when the optical module is connected with the ethernet switch, hardware information of the optical module is read, the central control circuit sends a corresponding control signal to the analog switch circuit according to the hardware information of the optical module, the analog switch circuit receives a second control signal sent by the central control circuit, a switch channel of the analog switch circuit is configured, and the switch channel of the analog switch circuit is configured into a target switch channel matched with the gigabit optical module, so that a switch port is configured into a gigabit port.
Further, in an embodiment, the ethernet switch further includes a switch circuit, the switch port is electrically connected to the switch circuit through the analog switch circuit, and the step of configuring the switch port as a gigabit port based on the analog switch circuit of the ethernet switch includes:
and b, closing the gigabit optical port switch of the analog switch circuit so as to electrically connect the switch port with the gigabit optical port of the switch circuit through the analog switch circuit.
In one embodiment, when the optical module is detected to be in place, the model of the optical module is read, and the analog switch circuit and the optical port matching circuit of the ethernet are configured according to the model of the optical module. And when the type of the optical module is read to be a gigabit optical module, closing a gigabit optical port switch of the analog switch circuit and configuring the optical port matching circuit into a gigabit channel so as to configure the switch port into a gigabit port. Specifically, when the optical module is connected with the ethernet switch, hardware information of the optical module is read, the central control circuit sends a corresponding control signal to the analog switch circuit according to the hardware information of the optical module, and the analog switch circuit receives the control signal sent by the central control circuit, and the switch port can be configured into the gigabit port by closing the gigabit optical port switch of the analog switch circuit and configuring the optical port matching circuit into the gigabit channel. Therefore, when the optical module connected to the ethernet switch is a gigabit optical module, the gigabit optical port switch of the analog switch circuit is closed and the optical port matching circuit is configured as a gigabit channel, the switch port is configured as a gigabit port, and the ethernet switch is adaptively configured by the analog switch circuit.
Further, in an embodiment, when the model of the optical module is a hundred mega optical module, the step of configuring the switch port to a target port mode matching the model of the optical module based on the analog switch circuit of the ethernet switch includes:
and c, configuring a switch port into a hundred-million port based on an analog switch circuit of the Ethernet switch so as to configure the switch port into a target port mode matched with the model of the optical module.
In an embodiment, when it is detected that the optical module is connected to the ethernet switch, the model of the optical module is read, and the analog switch circuit of the ethernet is configured according to the model of the optical module. When the type of the optical module is read as a hundred-million optical module, the analog switch circuit of the Ethernet switch is used for configuring the switch port connected with the optical module into a target port mode matched with the hundred-million optical module, namely configuring the switch port into a hundred-million port. Specifically, when the optical module is connected with the ethernet switch, hardware information of the optical module is read, the central control circuit sends a corresponding control signal to the analog switch circuit according to the hardware information of the optical module, the analog switch circuit receives the control signal sent by the central control circuit, a switch channel of the analog switch circuit is configured, the switch channel of the analog switch circuit is configured into a target switch channel matched with the hundred-megabyte optical module, and a port of the switch is configured into a hundred-megabyte port.
Further, in an embodiment, the ethernet switch further includes a switch circuit, the switch port is electrically connected to the switch circuit through the analog switch circuit, and the step of configuring the switch port as a hundred mega port based on the analog switch circuit of the ethernet switch includes:
and d, closing a hundred-million optical port switch of the analog switch circuit so as to enable the switch port to be electrically connected with a hundred-million optical port of the switch circuit through the analog switch circuit.
In an embodiment, when the optical module is connected to the ethernet switch, the model of the optical module is read, and the analog switch circuit and the optical port matching circuit of the ethernet are configured according to the model of the optical module. When the optical module is read to be a hundred-million optical module, a hundred-million optical port switch of the analog switch circuit is closed, and an optical port matching circuit is configured into a hundred-million channel, so that a port of the switch is configured into a hundred-million port, the hundred-million optical module can be connected with an Ethernet switch, and the optical module is matched with the port of the switch. Specifically, when the optical module is connected with the ethernet switch, hardware information of the optical module is read, the central control circuit sends a corresponding control signal to the analog switch circuit according to the hardware information of the optical module, the analog switch circuit receives the control signal sent by the central control circuit, a switch channel of the analog switch circuit is configured into a hundred-megabyte switch channel by closing a hundred-megabyte optical port switch of the analog switch circuit, the optical port matching circuit is configured into the hundred-megabyte channel, and a channel between the switch circuit and the analog switch circuit is configured into the hundred-megabyte channel, so that a port of the switch is configured into a hundred-megabyte port. Therefore, when the ethernet switch is connected to the hundred-mega optical module, the switch port can be configured to be the hundred-mega port by simply configuring the circuit, that is, closing the hundred-mega optical port switch of the analog switch circuit and configuring the channel between the switch circuit and the analog switch circuit to be the hundred-mega channel, so that the switch port can be adaptively configured.
Further, in an embodiment, the step of determining the model of the light module includes:
step e, acquiring hardware information of the optical module;
and f, determining the model of the optical module based on the hardware information.
In an embodiment, after the ethernet switch is powered on, the monitoring circuit detects whether the optical module is in place in real time, so as to detect whether the optical module is connected to the switch port of the ethernet switch, that is, whether the optical module is inserted into an interface corresponding to the switch port of the ethernet switch. When the optical module is detected to be in place, the optical module is inserted into an interface corresponding to the port of the switch at the moment, and the optical module is successfully connected with the port of the switch, the internal hardware of the optical module is detected to acquire the hardware information of the optical module. And determining the model of the optical module based on the detected hardware information of the optical module. The type of the optical module may be a type, a parameter, or a working mode of the optical module, and the hardware information may be EEPROM information built in the optical module.
Further, in an embodiment, before the step of determining the model of the optical module if the optical module is successfully connected to the ethernet switch, the method further includes:
and g, detecting whether the optical module is successfully connected with the Ethernet switch or not based on a monitoring circuit connected with the port of the switch.
In one embodiment, the working state of the optical module is detected based on a monitoring circuit connected with a switch port to judge whether the optical module is connected with the switch port of the Ethernet switch, and when the working state of the optical module is online, the current connection between the optical module and the switch port is successful; and when the working state of the optical module is off-line, the current connection between the optical module and the port of the switch fails.
In the mode adaptive method provided by this embodiment, the switch port is configured as a gigabit port to configure the switch port as a target port mode matched with the gigabit optical module, when an optical module connected to the ethernet switch is a gigabit optical module, the switch port is configured as the gigabit port by turning on the first end of the analog switch circuit and turning on the first channel in the switch circuit of the ethernet switch, and adaptive configuration is performed by the analog switch circuit.
In addition, an embodiment of the present invention further provides a mode adaptive apparatus, where the mode adaptive apparatus includes:
the detection module is used for determining the model of the optical module if the optical module is successfully connected with the Ethernet switch;
and the configuration module is used for configuring the switch port into a target port mode matched with the model of the optical module based on the analog switch circuit of the Ethernet switch.
Further, the configuration module is further configured to:
configuring a switch port as a gigabit port based on an analog switch circuit of the Ethernet switch to configure the switch port as a target port mode matching a model of the optical module.
Further, the configuration module is further configured to:
and closing the gigabit optical port switch of the analog switch circuit so that the switch port is electrically connected with the gigabit optical port of the switch circuit through the analog switch circuit.
Further, the configuration module is further configured to:
configuring a switch port as a hundred megaport port based on an analog switch circuit of the Ethernet switch to configure the switch port as a target port mode matching the model of the optical module.
Further, the configuration module is further configured to:
and closing the hundred-million optical port switch of the analog switch circuit so that the switch port is electrically connected with the hundred-million optical port of the switching circuit through the analog switch circuit.
Further, the detection module is further configured to:
acquiring hardware information of the optical module;
and determining the model of the optical module based on the hardware information.
Further, the detection module is further configured to:
and detecting whether the optical module is successfully connected with the Ethernet switch or not based on a monitoring circuit connected with the port of the switch.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where a mode adaptation program is stored, and when executed by a processor, the mode adaptation program implements the steps of the mode adaptation method according to any one of the above.
The specific embodiment of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the mode adaptive method described above, and will not be described in detail herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A mode adaptation method applied to an ethernet switch, the ethernet switch including a switch port and an analog switch circuit, the switch port being electrically connected to the analog switch circuit, the mode adaptation method comprising the steps of:
if the optical module is detected to be successfully connected with the Ethernet switch, determining the model of the optical module;
configuring the switch port to a target port mode matching the model of the optical module based on an analog switch circuit of the Ethernet switch.
2. The mode adaptation method of claim 1, wherein the step of configuring the switch port to a target port mode matching a model number of the optical module based on the analog switch circuit of the ethernet switch when the model number of the optical module is a gigabit optical module comprises:
configuring a switch port as a gigabit port based on an analog switch circuit of the Ethernet switch to configure the switch port as a target port mode matching a model of the optical module.
3. The mode adaptation method of claim 2, wherein the ethernet switch further comprises a switch circuit, the switch port being electrically connected to the switch circuit through the analog switch circuit, the configuring the switch port as a gigabit port based on the analog switch circuit of the ethernet switch comprising:
and closing the gigabit optical port switch of the analog switch circuit so that the switch port is electrically connected with the gigabit optical port of the switch circuit through the analog switch circuit.
4. The mode adaptation method of claim 1, wherein, when the optical module is a hundred mega optical module in model number, the step of configuring the switch port to a target port mode matching the model number of the optical module based on the analog switch circuit of the ethernet switch comprises:
configuring a switch port as a hundred megaport port based on an analog switch circuit of the Ethernet switch to configure the switch port as a target port mode matching the model of the optical module.
5. The mode adaptation method of claim 4, wherein the Ethernet switch further comprises a switch circuit, the switch port being electrically connected to the switch circuit through the analog switch circuit, the configuring the switch port as a hundred megaport port based on the analog switch circuit of the Ethernet switch comprising:
and closing the hundred-million optical port switch of the analog switch circuit so that the switch port is electrically connected with the hundred-million optical port of the switching circuit through the analog switch circuit.
6. The mode adaptation method of claim 1, wherein the step of determining the model number of the light module comprises:
acquiring hardware information of the optical module;
and determining the model of the optical module based on the hardware information.
7. The mode adaptation method of any of claims 1 to 6, wherein before the step of determining the model of the optical module if the connection between the optical module and the Ethernet switch is detected to be successful, the method further comprises:
and detecting whether the optical module is successfully connected with the Ethernet switch or not based on a monitoring circuit connected with the port of the switch.
8. A mode adaptation apparatus, characterized in that the mode adaptation apparatus comprises:
the detection module is used for determining the model of the optical module if the optical module is successfully connected with the Ethernet switch;
and the configuration module is used for configuring the switch port into a target port mode matched with the model of the optical module based on the analog switch circuit of the Ethernet switch.
9. A mode adaptation device, characterized in that the mode adaptation device comprises: memory, a processor and a pattern adaptation program stored on the memory and executable on the processor, the pattern adaptation program when executed by the processor implementing the steps of the pattern adaptation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a pattern adaptation program which, when executed by a processor, implements the steps of the pattern adaptation method of any of claims 1 to 7.
CN202010319641.9A 2020-04-21 2020-04-21 Mode self-adaption method, device, equipment and computer readable storage medium Pending CN111541629A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010319641.9A CN111541629A (en) 2020-04-21 2020-04-21 Mode self-adaption method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010319641.9A CN111541629A (en) 2020-04-21 2020-04-21 Mode self-adaption method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111541629A true CN111541629A (en) 2020-08-14

Family

ID=71975147

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010319641.9A Pending CN111541629A (en) 2020-04-21 2020-04-21 Mode self-adaption method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111541629A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114006653A (en) * 2021-10-29 2022-02-01 锐捷网络股份有限公司 Equipment compatible with different types of optical modules, control method thereof and storage medium
CN114979494A (en) * 2022-06-28 2022-08-30 重庆紫光华山智安科技有限公司 Communication mode control method, device, camera and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101505233A (en) * 2009-02-18 2009-08-12 华为技术有限公司 Method for switching optical transmission physical channel and physical interface equipment
US20090323705A1 (en) * 2008-06-30 2009-12-31 Huawei Technologies Co., Ltd. Method for implementing photoelectric mutex, ethernet photoelectric mutex interface device and network equipment
CN104639468A (en) * 2015-01-07 2015-05-20 武汉微创光电股份有限公司 Optical port adaptive Ethernet switch and adaptive method thereof
CN108462659A (en) * 2017-02-17 2018-08-28 北京国基科技股份有限公司 The network switching equipment and its data transmission method
CN110602003A (en) * 2019-09-17 2019-12-20 深圳市三旺通信股份有限公司 Mine intrinsic safety type ten-gigabit three-layer switch with flexibly configurable optical ports
CN110880952A (en) * 2019-10-23 2020-03-13 浪潮思科网络科技有限公司 Switch interface rate self-adaptive tuning system, method, equipment and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090323705A1 (en) * 2008-06-30 2009-12-31 Huawei Technologies Co., Ltd. Method for implementing photoelectric mutex, ethernet photoelectric mutex interface device and network equipment
CN101505233A (en) * 2009-02-18 2009-08-12 华为技术有限公司 Method for switching optical transmission physical channel and physical interface equipment
CN104639468A (en) * 2015-01-07 2015-05-20 武汉微创光电股份有限公司 Optical port adaptive Ethernet switch and adaptive method thereof
CN108462659A (en) * 2017-02-17 2018-08-28 北京国基科技股份有限公司 The network switching equipment and its data transmission method
CN110602003A (en) * 2019-09-17 2019-12-20 深圳市三旺通信股份有限公司 Mine intrinsic safety type ten-gigabit three-layer switch with flexibly configurable optical ports
CN110880952A (en) * 2019-10-23 2020-03-13 浪潮思科网络科技有限公司 Switch interface rate self-adaptive tuning system, method, equipment and medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114006653A (en) * 2021-10-29 2022-02-01 锐捷网络股份有限公司 Equipment compatible with different types of optical modules, control method thereof and storage medium
CN114006653B (en) * 2021-10-29 2023-03-21 锐捷网络股份有限公司 Equipment compatible with different types of optical modules, control method thereof and storage medium
CN114979494A (en) * 2022-06-28 2022-08-30 重庆紫光华山智安科技有限公司 Communication mode control method, device, camera and readable storage medium

Similar Documents

Publication Publication Date Title
CN111541956B (en) Optical port self-adaption method, device, switch and computer readable storage medium
CN111556383A (en) Optical module adaptive speed interface method, switch and computer storage medium
CN107423099B (en) Key code programming method, server, terminal, key code programming system and storage medium
EP3972202A1 (en) Smart home system control method and apparatus, electronic device and storage medium
CN111541629A (en) Mode self-adaption method, device, equipment and computer readable storage medium
CN111277991B (en) Operator name display method and device, mobile terminal and storage medium
CN111132267A (en) Network distribution method and device and terminal equipment
CN110457154B (en) Abnormal service processing method and device, storage medium and communication terminal
CN106101989A (en) A kind of method selecting safe unit and mobile terminal
CN108733403B (en) BIOS setting method and device
CN110677842B (en) Network searching method, device, terminal equipment and storage medium
CN113489630A (en) Network distribution method, device, storage medium and electronic terminal
CN104519482A (en) Equipment parameter configuration method and device
CN113259942B (en) Connection method, connection device, electronic equipment, connection system and computer-readable storage medium
CN111541960B (en) Switch configuration method, device, equipment and computer readable storage medium
CN111065086A (en) SIM (subscriber identity module) identification method and device, storage medium and mobile terminal
CN112199246B (en) Terminal test method and device, storage medium and mobile terminal
CN111541958A (en) Optical interface rate self-adaption method, equipment, device and readable storage medium
CN111541568B (en) Switch configuration method, device, equipment and computer readable storage medium
CN111953389A (en) Antenna tuning method, antenna tuning device, storage medium and electronic terminal
CN111432387A (en) Many-to-many switching module, multi-machine wireless communication system and communication method thereof
CN111132097B (en) Wireless module driving method and device, wireless module, terminal and storage medium
CN109495119B (en) Radio frequency switch control method, device, mobile terminal and storage medium
CN110177364B (en) Bluetooth device pairing connection method and device, storage medium and electronic device
CN114442590A (en) Vehicle diagnosis method, apparatus, diagnosis communication device, server, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200814