Ethernet protocol automatic switching system, device and storage medium

Through the Ethernet protocol automatic switching system, automatic identification and switching of ARP protocol, ICMP protocol and custom protocol are realized, solving the problem that Ethernet chip cannot take into account basic network protocols, meeting the delay-sensitive requirements of key data streams, and improving the applicability and flexibility of Ethernet protocol.

CN119182837BActive Publication Date: 2025-09-30TIANJIN JINHANG COMP TECH RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411260604.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2025-09-30
Estimated Expiration
2044-09-10

AI Technical Summary

Technical Problem

Existing Ethernet chips cannot take into account basic network protocols such as ARP and ICMP, and cannot realize automatic identification and switching of ARP protocol, ICMP protocol and custom protocols, especially when key data streams are sensitive to delay and cannot meet usage requirements.

Method used

An Ethernet protocol automatic switching system is adopted, including an output control module and multiple protocol modules. By identifying the protocol type of network data, it automatically switches to the corresponding protocol receiving and sending state, realizing automatic identification and switching of ARP protocol, ICMP protocol and custom protocol.

Benefits of technology

It realizes automatic identification and switching of ARP protocol, ICMP protocol and custom protocol, meets the delay-sensitive requirements of key data streams, and improves the applicability and flexibility of Ethernet protocol.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119182837B_ABST
    Figure CN119182837B_ABST
Patent Text Reader

Abstract

The present application discloses an Ethernet protocol automatic switching system, method, device and storage medium, relating to the field of computer technology. The system includes: an output control module and multiple protocol modules. A target protocol module in the multiple protocol modules receives network data transmitted from an external network, identifies whether the network data belongs to the target protocol data, and if the network data belongs to the target protocol data, processes the network data to obtain a data packet of the target protocol, and sends the data packet of the target protocol and a control signal of the target protocol to the output control module; the output control module receives the data packet and control signal of the target protocol, and when the sending completion signal is valid, switches to the transceiver state of the target protocol. In the transceiver state of the target protocol, the target protocol data packet sent by the target protocol module is received, and the data packet of the target protocol is processed and forwarded. Thus, the system can realize automatic identification and switching of ARP protocol, ICMP protocol and custom protocol.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an Ethernet protocol automatic switching system, device, and storage medium. Background Art

[0002] Ethernet communication generally uses Ethernet protocol chips for data transmission. The Ethernet chip includes protocols such as Transmission Control Protocol (TCP), User Datagram Protocol (UDP), Internet Control Message Protocol (ICMP) and Address Resolution Protocol (ARP). Among them, ICMP protocol and ARP protocol are basic protocols in Ethernet protocol. ARP protocol is an address resolution protocol used to implement the mapping from IP address to MAC address, that is, a protocol for querying the MAC address corresponding to the target IP. ICMP protocol is the Internet Control Message Protocol, which is used to transmit control messages between IP hosts and routers to report whether the host is reachable and whether the route is available.

[0003] In some special areas, such as situations where certain key data flows in the network are sensitive to delay, a custom protocol must be developed based on the characteristics of the key data flow to achieve specific functions. General Ethernet chips cannot meet the usage requirements. In this case, FPGA chips can be used for customized development of Ethernet protocols.

[0004] However, Ethernet protocols customized using FPGA chips often cannot take into account basic network protocols such as ARP and ICMP, and cannot achieve automatic identification and switching of ARP, ICMP and custom protocols. Summary of the Invention

[0005] The present application provides an Ethernet protocol automatic switching system, device and storage medium, which can take into account basic network protocols such as ARP and ICMP, and realize automatic identification and switching of ARP protocol, ICMP protocol and custom protocol.

[0006] To achieve the above objectives, this application adopts the following technical solutions:

[0007] In a first aspect, the present application provides an Ethernet protocol automatic switching system, the system comprising: an output control module and a plurality of protocol modules;

[0008] a target protocol module among the multiple protocol modules, configured to receive network data transmitted from an external network, identify whether the network data belongs to the target protocol, obtain an identification result, and if the identification result indicates that the network data belongs to the target protocol, process the network data to obtain a data packet of the target protocol, send the data packet of the target protocol to the output control module, and send a control signal of the target protocol to the output control module, wherein the target protocol module is any one of the multiple protocol modules;

[0009] The output control module is configured to switch to a target protocol transceiver state upon receiving a control signal for sending a target protocol from the target protocol module and a valid sending completion signal from the output control module. In the target protocol transceiver state, the output control module receives a target protocol data packet sent by the target protocol module, processes the target protocol data packet, and then forwards the target protocol data packet.

[0010] In some possible implementations, the target protocol module is specifically used to obtain an identification result that the network data belongs to the target protocol if the network data includes request data of the target protocol; if the network data does not include request data of the target protocol, obtain an identification result that the network data does not belong to the target protocol.

[0011] In some possible implementations, the target protocol module includes a target receiving submodule, a target controlling submodule, and a target sending submodule;

[0012] The target receiving submodule is configured to send a target receiving start signal to the target control submodule when receiving the network data, and send the received network data to the target control submodule, and send a target receiving completion signal to the target control submodule when the network data is received.

[0013] The target control submodule is used to send a target enable signal and the network data to the target sending submodule;

[0014] The target sending submodule is used to process the network data to obtain a data packet of the target protocol, and send the data packet of the target protocol to the output control module, and send a target completion signal to the target control submodule after completing the sending of the data packet of the target protocol;

[0015] The target control submodule is used to send a target protocol control signal to the output control module, where the target protocol control signal includes: the target reception start signal, the target reception completion signal, and the target enable signal.

[0016] In some possible implementations, the target protocol module includes a preset protocol module or a custom protocol module, and the initial transceiver state of the output control module is the transceiver state of the custom protocol;

[0017] The output control module is used to switch the custom sending completion signal from invalid to valid after processing and forwarding the data packets of the custom protocol sent by the custom protocol module. If the output control module receives the control signal of the preset protocol, it switches from the sending and receiving state of the custom protocol to the sending and receiving state of the preset protocol, and processes and forwards the data packets of the preset protocol sent by the preset protocol module.

[0018] In some possible implementations, the output control module is further configured to switch from a sending and receiving state of the preset protocol to a sending and receiving state of the custom protocol after forwarding a data packet of the preset protocol sent by the preset protocol module.

[0019] In some possible implementations, the target protocol module further includes a storage submodule, and the storage submodule is configured to receive the network data sent by the target control submodule and store the network data.

[0020] In some possible implementations, the preset protocol module includes an address resolution ARP protocol module, a network control message ICMP protocol module, a user datagram UDP protocol module, and the like.

[0021] In a second aspect, the present application provides a method for automatic Ethernet protocol switching, the method comprising:

[0022] A target protocol module among the multiple protocol modules receives network data transmitted from an external network, identifies whether the network data belongs to data of the target protocol, obtains an identification result, and if the identification result indicates that the network data belongs to data of the target protocol, processes the network data to obtain a data packet of the target protocol, sends the data packet of the target protocol to an output control module, and sends a control signal of the target protocol to the output control module, wherein the target protocol module is any one of the multiple protocol modules;

[0023] If the output control module receives a control signal for sending a target protocol from the target protocol module and the sending completion signal of the output control module is valid, the output control module switches to a transceiver state of the target protocol. In the transceiver state of the target protocol, the output control module receives a data packet of the target protocol sent by the target protocol module, processes the data packet of the target protocol, and then forwards the data packet.

[0024] In a third aspect, the present application provides a computing device, including a memory and a processor;

[0025] One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the computing device executes the method as described in any one of the first aspects.

[0026] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program for executing the method as described in any one of the first aspects.

[0027] It can be seen from the above technical solution that this application has at least the following beneficial effects:

[0028] The present application provides an Ethernet automatic switching system, which includes an output control module and multiple protocol modules. The target protocol module in the multiple protocol modules is used to receive network data transmitted from an external network, identify whether the network data belongs to the target protocol, and if the network data belongs to the target protocol, process the network data to obtain a target protocol data packet, and send the target protocol data packet and the target protocol control signal to the output control module. The output control module is used to receive the target protocol control signal sent by the target protocol module, and when the output control module's send completion signal is valid, it switches to the target protocol transceiver state. In the target protocol transceiver state, the target protocol data packet sent by the target protocol module is received, and the target protocol data packet is processed and forwarded. In traditional solutions, in some special areas, such as situations where certain key data streams on the network are sensitive to time delay, a custom protocol must be developed based on the characteristics of the key data stream to achieve specific functions. Conventional Ethernet chips cannot meet the requirements. In this case, FPGA chips can be used to customize the Ethernet protocol. However, Ethernet protocols customized using FPGA chips often cannot take into account basic network protocols such as ARP and ICMP. To simultaneously implement ARP, ICMP, and a custom protocol, three chips must be developed and used together. It can be seen that the solution provided by this application can take into account basic network protocols such as ARP and ICMP, and realize automatic identification and switching of ARP protocol, ICMP protocol and custom protocol.

[0029] It should be understood that the description of technical features, technical solutions, beneficial effects or similar language in this application does not imply that all features and advantages can be realized in any single embodiment. On the contrary, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution or beneficial effect is included in at least one embodiment. Therefore, the description of a technical feature, technical solution or beneficial effect in this specification does not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions and beneficial effects described in the present embodiment can also be combined in any appropriate manner. Those skilled in the art will understand that the embodiment can be implemented without one or more specific technical features, technical solutions or beneficial effects of a specific embodiment. In other embodiments, additional technical features and beneficial effects can also be identified in specific embodiments that do not embody all embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application;

[0031] Figure 2 A schematic diagram of an Ethernet protocol automatic switching system provided in an embodiment of the present application;

[0032] Figure 3 A schematic diagram of an ARP protocol module provided in an embodiment of the present application;

[0033] Figure 4 A schematic diagram of an ICMP protocol module provided in an embodiment of the present application;

[0034] Figure 5 A schematic diagram of a custom protocol module provided in an embodiment of the present application;

[0035] Figure 6 A schematic diagram of a state machine provided in an embodiment of the present application;

[0036] Figure 7 A flowchart of an Ethernet protocol automatic switching method provided in an embodiment of the present application;

[0037] Figure 8 A schematic diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] The terms "first", "second" and "third" in this application specification and the accompanying drawings are used to distinguish different objects rather than to limit a specific order.

[0039] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0040] To make the description of the following embodiments clear and concise, a brief introduction to the related technologies is first given:

[0041] Ethernet is the most widely used local area network technology. Due to its simplicity, low cost, strong scalability, and good integration with IP networks, the application of Ethernet technology is moving from enterprise internal networks to public telecommunications networks.

[0042] Ethernet access refers to the combination of Ethernet technology and integrated cabling. As the access network of the public telecommunications network, it directly provides users with a transmission channel for various IP-based services. The essence of Ethernet technology is a two-layer media access control technology that can be transmitted on Category 5 lines and can also be combined with other access media to form a variety of broadband access technologies. Ethernet is combined with ultra-high-speed digital subscriber lines on telephone copper cables to form EoVDSL technology; combined with passive optical networks, it produces Ethernet passive optical network technology; in wireless environments, it develops into WLAN technology.

[0043] In view of this, an embodiment of the present application provides an Ethernet automatic switching system, which includes an output control module and multiple protocol modules. The target protocol module in the multiple protocol modules is used to receive network data transmitted by an external network, identify whether the network data belongs to the target protocol data, and if the network data belongs to the target protocol data, process the network data to obtain a data packet of the target protocol, and send the data packet of the target protocol and the control signal of the target protocol to the output control module; the output control module is used to receive the control signal of the target protocol sent by the target protocol module, and when the sending completion signal of the output control module is valid, it switches to the transceiver state of the target protocol. In the transceiver state of the target protocol, the target protocol data packet sent by the target protocol module is received, and the target protocol data packet is processed and forwarded. In traditional solutions, in some special fields, such as situations where certain key data streams in the network are sensitive to time delay, a custom protocol must be formulated according to the characteristics of the key data stream to achieve specific functions. General Ethernet chips cannot meet the use requirements. In this case, FPGA chips can be used for customized development of Ethernet protocols. However, Ethernet protocols customized using FPGA chips often cannot take into account basic network protocols such as ARP and ICMP. To implement ARP, ICMP, and a custom protocol simultaneously, three chips must be developed to work together. Therefore, the solution provided by this application can take into account basic network protocols such as ARP and ICMP, and realize automatic recognition and switching of ARP, ICMP, and custom protocols.

[0044] In order to make the technical solution of this application clearer and easier to understand, the application scenarios of the technical solution of this application are introduced below with reference to the accompanying drawings. Figure 1 As shown in the figure, this figure is a schematic diagram of an application scenario provided by an embodiment of the present application.

[0045] In this application scenario, the Ethernet automatic switching system 100 includes an ARP protocol module 101, an ICMP protocol module 102, a custom protocol module 103 and an output control module 104. The external network inputs the ARP protocol module 101, the ICMP protocol module 102 and the custom protocol module 103 through the network data receiving circuit 105.

[0046] The ARP protocol module 101 identifies whether the network data belongs to the ARP protocol data and obtains an identification result. If the identification result indicates that the network data belongs to the ARP protocol data, the network data is processed to obtain an ARP protocol data packet, and the ARP protocol data packet is sent to the output control module 104, and an ARP protocol control signal is sent to the output control module 104.

[0047] The ICMP protocol module 102 identifies whether the network data belongs to ICMP protocol data and obtains an identification result. If the identification result indicates that the network data belongs to ICMP protocol data, the network data is processed to obtain an ICMP protocol data packet, and the ICMP protocol data packet is sent to the output control module 104, and an ICMP protocol control signal is sent to the output control module 104.

[0048] The custom protocol module 103 identifies whether the network data belongs to the custom protocol data and obtains an identification result. If the identification result indicates that the network data belongs to the custom protocol data, the network data is processed to obtain a data packet of the custom protocol, and the data packet of the custom protocol is sent to the output control module 104, and a control signal of the custom protocol is sent to the output control module 104.

[0049] The initial transceiver state of the output control module 104 is the transceiver state of the custom protocol. If the output control module 104 receives a control signal of the ARP protocol, it switches to the transceiver state of the ARP protocol to receive data packets of the ARP protocol and sends the data packets of the ARP protocol to the network data processing system 106. The sending completion signal of the output control module 104 is sent to the ARP control submodule, and the transceiver state of the ARP protocol switches back to the transceiver state of the custom protocol.

[0050] If the output control module 104 receives a control signal of the ICMP protocol, it switches to the sending and receiving state of the ICMP protocol to receive ICMP protocol data packets, and sends the ICMP protocol data packets to the network data processing system 106. The sending completion signal of the output control module 104 is sent to the ICMP control sub-module, and the sending and receiving state of the ICMP protocol is switched back to the sending and receiving state of the custom protocol.

[0051] If the output control module 104 receives a control signal of the custom protocol, it receives a data packet of the custom protocol and sends the data packet of the custom protocol to the network data processing system 106 , and sends a sending completion signal of the output control module 104 to the custom control submodule.

[0052] Through the above operations, basic network protocols such as ARP and ICMP can be taken into account, and automatic identification and switching of ARP protocol, ICMP protocol and custom protocol can be realized.

[0053] The Ethernet automatic switching system 100 includes but is not limited to an ARP protocol module 101, an ICMP protocol module 102 and a custom protocol module 103. The Ethernet automatic switching system 100 in this application is an example.

[0054] In order to make the technical solution of this application clearer and easier to understand, the following describes an Ethernet protocol automatic switching system provided by an embodiment of this application in combination with the above application scenarios. Figure 2 As shown in the figure, this figure is a schematic diagram of an Ethernet protocol automatic switching system provided in an embodiment of the present application.

[0055] The Ethernet protocol automatic switching system includes: an output control module and multiple protocol modules;

[0056] The target protocol module among the multiple protocol modules is used to receive network data transmitted from an external network, identify whether the network data belongs to the target protocol, and obtain an identification result. If the identification result indicates that the network data belongs to the target protocol, the network data is processed to obtain a data packet of the target protocol, and the data packet of the target protocol is sent to the output control module 104. The control signal of the target protocol is sent to the output control module 104. The target protocol module is any one of the multiple protocol modules, and the target protocol module includes a target receiving submodule, a target control submodule, and a target sending submodule.

[0057] The target receiving submodule is configured to send a target receiving start signal to the target control submodule when receiving the network data, and send the received network data to the target control submodule, and send a target receiving completion signal to the target control submodule when the network data is received.

[0058] Among them, the target control submodule is used to send a target enable signal and the network data to the target sending submodule; the target sending submodule is used to process the network data, obtain a data packet of the target protocol, and send the data packet of the target protocol to the output control module, and send a target completion signal to the target control submodule after completing the sending of the data packet of the target protocol. The target control submodule is used to send a control signal of the target protocol to the output control module, and the control signal of the target protocol includes: a target reception start signal, a target reception completion signal and a target enable signal.

[0059] Multiple protocol modules include an ARP protocol module 101, an ICMP protocol module 102 and a custom protocol module 103; the target receiving submodule includes an ARP receiving submodule, an ICMP receiving submodule, and a custom receiving submodule; the target control submodule includes an ARP control submodule, an ICMP control submodule, and a custom control submodule; and the target sending submodule includes an ARP sending submodule, an ICMP sending submodule, and a custom sending submodule.

[0060] Among them, such as Figure 3As shown, this figure is a schematic diagram of an ARP protocol module provided in an embodiment of the present application. The ARP protocol module 101 includes an ARP receiving submodule 301, an ARP control submodule 302 and an ARP sending submodule 303.

[0061] The ARP receiving submodule 301 is configured to receive the network data, identify whether the network data includes ARP protocol request data, and obtain a first identification result.

[0062] If the first identification result indicates that the network data does not include request data of the ARP protocol, obtaining a first identification result that the network data does not belong to data of the ARP protocol;

[0063] If the first identification result indicates that the network data includes request data of the ARP protocol, and the first identification result is obtained that the network data belongs to data of the ARP protocol, an ARP reception completion signal is sent to the ARP control submodule 302, and the ARP sending submodule 303 waits for the ARP sending enable signal output by the ARP control submodule 302. If the ARP sending enable signal is valid, the ARP sending submodule 303 sends an ARP protocol data packet to the output control module 104 according to the ARP response protocol. After the sending is completed, an ARP sending completion signal is output to the ARP control submodule 302, and the ARP control submodule 302 sends a control signal to the output control module 104, and the control signal includes an ARP reception completion signal, an ARP sending enable signal and an ARP sending completion signal.

[0064] like Figure 4 As shown, the figure is a schematic diagram of an ICMP protocol module provided in an embodiment of the present application. The ICMP protocol module includes an ICMP receiving submodule 401, an ICMP control submodule 402, an ICMP sending submodule 403 and an ICMP data FIFO 404.

[0065] The ICMP receiving submodule is configured to receive the network data, identify whether the network data includes request data of the ICMP protocol, and obtain a first identification result.

[0066] If the first identification result indicates that the network data does not include request data of the ICMP protocol, obtaining a first identification result that the network data does not belong to data of the ICMP protocol;

[0067] If the first identification result indicates that the network data includes request data of the ICMP protocol, and the first identification result that the network data belongs to data of the ICMP protocol is obtained, then the ICMP receive start signal, ICMP data and ICMP receive completion signal are sent to the ICMP control submodule 402, and the ICMP sending submodule 403 waits for the ICMP send enable signal and ICMP data output by the ICMP control submodule 402. If the ICMP send enable signal is valid, the ICMP sending submodule 403 sends the ICMP protocol data packet to the output control module 104 according to the ICMP response protocol, and outputs the ICMP send completion signal to the ICMP control submodule 402 after the sending is completed. The ICMP control submodule 402 sends a control signal to the output control module 104, and the control signal includes the ICMP receive completion signal, the ICMP send enable signal and the ICMP send completion signal. The ICMP control submodule 402 also writes the received ICMP data into the ICMP data FIFO 404 according to the ICMP reception start signal and ICMP reception completion signal sent by the ICMP reception submodule 401, and reads the ICMP data in the ICMP data FIFO 404 and sends it to the ICMP transmission submodule 403 according to the read data instruction sent by the ICMP transmission submodule 403.

[0068] like Figure 5 As shown, the figure is a schematic diagram of a custom protocol module provided in an embodiment of the present application. The custom protocol module includes a custom receiving submodule 501, a custom control submodule 502, a custom sending submodule 503 and a custom data FIFO 504.

[0069] The custom receiving submodule is configured to receive the network data, identify whether the network data includes request data of a custom protocol, and obtain a first identification result.

[0070] If the first identification result indicates that the network data does not include request data of the custom protocol, obtaining a first identification result that the network data does not belong to custom protocol data;

[0071] If the first recognition result indicates that the network data includes request data of a custom protocol, and a first recognition result is obtained that the network data belongs to custom protocol data, a custom reception start signal, custom data, and a custom reception completion signal are sent to the custom control submodule 502. The custom transmission submodule 503 waits for the custom transmission enable signal and custom data output by the custom control submodule 502. If the custom transmission enable signal is valid, the custom transmission submodule 503 sends a data packet of the custom protocol to the output control module 104 according to the custom response protocol. After the transmission is completed, the custom control submodule 502 outputs a custom transmission completion signal to the custom control submodule 502. The custom control submodule 502 sends a control signal to the output control module 104, wherein the control signal includes a custom reception completion signal, a custom transmission enable signal, and a custom transmission completion signal. The custom control submodule 502 also writes the received custom data into the custom data FIFO 504 according to the custom reception start signal and the custom reception completion signal sent by the custom reception submodule 502. According to the read data instruction sent by the custom transmission submodule 503, the custom data in the custom data FIFO 504 is read and sent to the custom transmission submodule 503.

[0072] The output control module 104 is configured to switch to the target protocol transceiver state if a control signal of the target protocol is received from the target protocol module and a sending completion signal from the output control module 104 is valid. In the target protocol transceiver state, the output control module 104 receives target protocol data packets sent by the target protocol module, processes the target protocol data packets, and then forwards them.

[0073] In some embodiments, the output control module 104 mainly switches the receiving and sending states of multiple protocols through a state machine, such as Figure 6 As shown, the figure is a schematic diagram of a state machine provided in an embodiment of the present application. In the figure, it can be seen that the state machine includes the sending and receiving state 601 of the ARP protocol, the sending and receiving state 602 of the ICMP protocol and the sending and receiving state 603 of the custom protocol. The sending and receiving state 603 of the custom protocol switches to the sending and receiving state 601 of the ARP protocol, which needs to meet the first condition 604. The sending and receiving state 601 of the ARP protocol switches to the sending and receiving state 603 of the custom protocol, which needs to meet the second condition 605. The sending and receiving state 603 of the custom protocol switches to the sending and receiving state 602 of the ICMP protocol, which needs to meet the third condition 606. The sending and receiving state 602 of the ICMP protocol switches to the sending and receiving state 603 of the custom protocol, which needs to meet the fourth condition 607.

[0074] The output control module 104 implements the sending and receiving of three protocol data packets through the state machine, including the sending and receiving state of the ARP protocol, the sending and receiving state of the ICMP protocol, and the sending and receiving state of the custom protocol. After the system is started, the default state machine state is the sending and receiving state of the custom protocol;

[0075] The state machine selects a data packet of the custom protocol as an output data packet and sends it to the network data processing system 106. If the state machine detects the ARP receive completion signal and the custom send completion signal is valid at this time, the state machine switches to the ARP protocol send and receive state. The state machine selects a data packet of the ARP protocol as an output data packet and sends it to the network data processing system 106. If the state machine detects the ARP send completion signal, the state machine switches to the custom protocol send and receive state.

[0076] The state machine selects a data packet of the custom protocol as an output data packet and sends it to the network data processing system 106. If the state machine detects an ICMP receive complete signal and the custom send complete signal is valid at this time, the state machine switches to the ICMP protocol send and receive state. The state machine selects a data packet of the ICMP protocol as an output data packet and sends it to the network data processing system 106. If the state machine detects an ICMP send complete signal, the state machine switches to the custom protocol send and receive state.

[0077] The first condition 604 is that the ARP receive completion signal is valid and the custom send completion signal is valid; the second condition is that the ARP send completion signal is valid, the third condition is that the ICMP receive completion signal is valid and the custom send completion signal is valid, and the fourth condition is that the ICMP send completion signal is valid.

[0078] Based on the above content, the system includes an output control module and multiple protocol modules, wherein the target protocol module in the multiple protocol modules is used to receive network data transmitted by an external network, identify whether the network data belongs to the data of the target protocol, and if the network data belongs to the data of the target protocol, process the network data to obtain a data packet of the target protocol, and send the data packet of the target protocol and the control signal of the target protocol to the output control module; the output control module is used to receive the control signal of the target protocol sent by the target protocol module, and if the sending completion signal of the output control module is valid, it switches to the transceiver state of the target protocol, receives the data packet of the target protocol sent by the target protocol module in the transceiver state of the target protocol, and forwards the data packet of the target protocol after processing. Thus, the solution provided by the present application can take into account basic network protocols such as ARP and ICMP, and realize automatic identification and switching of ARP protocol, ICMP protocol and custom protocol.

[0079] Combined with the above Figures 1 to 6An Ethernet protocol automatic switching system provided in an embodiment of the present application is introduced in detail. An Ethernet protocol automatic switching method provided in an embodiment of the present application will be introduced below with reference to the accompanying drawings.

[0080] like Figure 7 As shown in the figure, this figure is a flowchart of an Ethernet protocol automatic switching method provided by an embodiment of the present application, the method comprising:

[0081] S701: A target protocol module among multiple protocol modules receives network data transmitted from an external network.

[0082] S702: The target protocol identifies whether the network data belongs to the target protocol.

[0083] S703: If the identification result indicates that the network data belongs to the target protocol.

[0084] S704: If the identification result indicates that the network data does not belong to the target protocol,

[0085] S705: After processing the network data, a data packet of the target protocol is obtained.

[0086] S706: Send the data packet of the target protocol and the control signal of the target protocol to the output control module.

[0087] S707 , the output control module receives the control signal of the target protocol sent by the target protocol module and the sending completion signal of the output control module is valid.

[0088] S708: The output control module switches to the receiving and sending state of the target protocol. In the receiving and sending state of the target protocol, the output control module receives the target protocol data packet sent by the target protocol module, processes the target protocol data packet, and then forwards it.

[0089] S709: Discard the network data.

[0090] The present application also provides a computing device. Figure 8 As shown, this figure is a schematic diagram of a computing device provided by an embodiment of the present application, wherein the computing device 800 includes a bus 801, a processor 802, a communication interface 803, and a memory 804. The processor 802, the memory 804, and the communication interface 803 communicate with each other via the bus 801.

[0091] The bus 801 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0092] The processor 802 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0093] The communication interface 803 is used for communicating with the outside.

[0094] The memory 804 may include volatile memory, such as random access memory (RAM). The memory 804 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0095] The memory 804 stores executable codes, and the processor 802 executes the executable codes to perform an Ethernet protocol automatic switching method.

[0096] Embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, hard disk, or magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct a computing device to execute an Ethernet protocol automatic switching method.

[0097] The present application also provides a computer program product comprising one or more computer instructions that, when loaded and executed on a computing device, fully or partially generate the process or function described in the present application.

[0098] The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer or data center to another website, computer or data center via wired (e.g., coaxial cable, optical fiber) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0099] When the computer program product is executed by a computer, the computer performs any one of the Ethernet protocol automatic switching methods. The computer program product may be a software installation package. When any one of the Ethernet protocol automatic switching methods is required, the computer program product may be downloaded and executed on the computer.

[0100] The descriptions of the processes or structures corresponding to the above figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.

[0101] The above description is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed in the present application should be included in the protection scope of the present application.

Claims

1. An Ethernet protocol automatic switching system, characterized in that: The system includes: an output control module and a plurality of protocol modules; a target protocol module among the multiple protocol modules, configured to receive network data transmitted from an external network, identify whether the network data belongs to the target protocol, obtain an identification result, and if the identification result indicates that the network data belongs to the target protocol, process the network data to obtain a data packet of the target protocol, send the data packet of the target protocol to the output control module, and send a control signal of the target protocol to the output control module, wherein the target protocol module is any one of the multiple protocol modules; The output control module is configured to, upon receiving a control signal from the target protocol module to send a target protocol and a sending completion signal from the output control module being valid, switch to a target protocol transceiver state, receive a target protocol data packet sent by the target protocol module, process the target protocol data packet, and then forward the target protocol data packet; The target protocol module includes a preset protocol module or a custom protocol module, and the initial transceiver state of the output control module is the transceiver state of the custom protocol; The output control module is used to switch the custom sending completion signal from invalid to valid after processing and forwarding the data packets of the custom protocol sent by the custom protocol module. If the output control module receives the control signal of the preset protocol, it switches from the sending and receiving state of the custom protocol to the sending and receiving state of the preset protocol, and processes and forwards the data packets of the preset protocol sent by the preset protocol module.

2. The system according to claim 1, wherein: The target protocol module is specifically used to obtain an identification result that the network data belongs to the target protocol if the network data includes request data of the target protocol; if the network data does not include request data of the target protocol, obtain an identification result that the network data does not belong to the target protocol.

3. The system according to claim 1, wherein: The target protocol module includes a target receiving submodule, a target control submodule, and a target sending submodule; The target receiving submodule is configured to send a target receiving start signal to the target control submodule when receiving the network data, and send the received network data to the target control submodule, and send a target receiving completion signal to the target control submodule when the network data is received. The target control submodule is used to send a target enable signal and the network data to the target sending submodule; The target sending submodule is used to process the network data to obtain a data packet of the target protocol, and send the data packet of the target protocol to the output control module, and send a target completion signal to the target control submodule after completing the sending of the data packet of the target protocol; The target control submodule is used to send a target protocol control signal to the output control module, where the target protocol control signal includes: the target reception start signal, the target reception completion signal, and the target enable signal.

4. The system according to claim 1, wherein: The output control module is further configured to switch from the sending and receiving state of the preset protocol to the sending and receiving state of the custom protocol after forwarding the data packet of the preset protocol sent by the preset protocol module.

5. The system according to claim 3, wherein: The target protocol module further includes a storage submodule, and the storage submodule is used to receive the network data sent by the target control submodule and store the network data.

6. The system according to claim 1, wherein: The preset protocol modules include an address resolution ARP protocol module, a network control message ICMP protocol module, a user datagram UDP protocol module, and the like.

7. A method for automatic Ethernet protocol switching, characterized in that: The method comprises: A target protocol module among the multiple protocol modules receives network data transmitted from an external network, identifies whether the network data belongs to data of the target protocol, obtains an identification result, and if the identification result indicates that the network data belongs to data of the target protocol, processes the network data to obtain a data packet of the target protocol, sends the data packet of the target protocol to an output control module, and sends a control signal of the target protocol to the output control module, wherein the target protocol module is any one of the multiple protocol modules; If the output control module receives a control signal for sending a target protocol from the target protocol module and the sending completion signal of the output control module is valid, the output control module switches to a transceiver state of the target protocol. In the transceiver state of the target protocol, the output control module receives a data packet of the target protocol sent by the target protocol module, processes the data packet of the target protocol, and then forwards the data packet.

8. A computing device, characterized in that including memory and processor; One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the computing device executes the method according to claim 7.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to claim 7.

Citation Information

Patent Citations

  • System and method for dynamically switching multiple communication protocols in private network

    CN114125075A

  • Ethernet driving system and method for built-in interphone, storage medium and processor

    CN116846988A