Ethernet protocol automatic switching system, equipment and storage medium

By designing an Ethernet protocol automatic switching system, automatic identification and switching of ARP, ICMP and custom protocols is achieved, which solves the problem that the existing technology cannot take into account the basic network protocol and meets the customization needs of key data flows.

CN119182837AActive Publication Date: 2024-12-24TIANJIN JINHANG COMP TECH RES INST
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411260604.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-24
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 protocol, and it is difficult to meet the customization needs of some key data flow delay-sensitive scenarios.

Method used

Design an Ethernet protocol automatic switching system, including an output control module and multiple protocol modules, receive and identify network data through the target protocol module, and send data packets and control signals after processing. The output control module switches the protocol status according to the signal, and realizes ARP , automatic identification and switching of ICMP and custom protocols.

Benefits of technology

It realizes automatic identification and switching of ARP protocol, ICMP protocol and custom protocol, takes into account the basic network protocol, meets the customization needs of key data flows, and avoids the limitations of the need to formulate three chips in traditional solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119182837A_ABST
    Figure CN119182837A_ABST
Patent Text Reader

Abstract

The invention discloses an Ethernet protocol automatic switching system, method and device and a storage medium, and relates to the technical field of computers, the system comprises an output control module and a plurality of protocol modules, a target protocol module in the plurality of protocol modules receives network data transmitted by an external network, identifies whether the network data belongs to data of a target protocol, and sends the data to the output control module; if the network data belongs to the data of the target protocol, processing the network data to obtain a data packet of the target protocol, and sending the data packet of the target protocol and a control signal of the target protocol to an output control module; and the output control module receives the data packet of the target protocol and the control signal, switches to the receiving and transmitting state of the target protocol when the sending completion signal is effective, receives the data packet of the target protocol sent by the target protocol module in the receiving and transmitting state of the target protocol, processes the data packet of the target protocol and forwards the data packet of the target protocol. Therefore, the system can realize automatic identification and switching of the ARP protocol, the ICMP protocol and the 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 address resolution protocol, which is used to realize the mapping from IP address to MAC address, that is, a protocol to inquire about the MAC address corresponding to the target IP. ICMP protocol is 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, the Ethernet protocol 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 protocol, ICMP protocol and custom protocol. 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] In order 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 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, and a control signal of the target protocol is sent to the output control module. The target protocol module is any one of the multiple protocol modules.

[0009] The output control module is used to switch to the transceiver state of the target protocol if a control signal of the target protocol module is received and the sending completion signal of the output control module is valid. In the transceiver state of the target protocol, the output control module receives the data packet of the target protocol sent by the target protocol module, processes the data packet of the target protocol, and then forwards it.

[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 device 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 used to send a target receiving start signal to the target control module 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 control signal of the target protocol to the output control module, wherein the control signal of the target protocol 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 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.

[0019] In some possible implementations, 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.

[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 an Ethernet protocol automatic switching method, 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 the 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 of the target protocol sent by the target protocol module, and the sending completion signal of the output control module is valid, the output control module switches to the sending and receiving state of the target protocol. In the sending and receiving state of the target protocol, the output control module receives the data packet of the target protocol sent by the target protocol module, processes the data packet of the target protocol, and then forwards it.

[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, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method as described in any one of the first aspects.

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

[0028] In the present application, an Ethernet automatic switching system is provided, which includes an output control module and multiple protocol modules, wherein a 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, the network data is processed to obtain a data packet of the target protocol, and the data packet of the target protocol and the control signal of the target protocol are sent 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 is switched to the transceiver state of the target protocol, and in the transceiver state of the target protocol, the data packet of the target protocol sent by the target protocol module is received, and the data packet of the target protocol is processed and forwarded. In the traditional scheme, in some special fields, such as the situation where some key data streams of the network are sensitive to time delay, a custom protocol should be formulated according to the characteristics of the key data stream to realize specific functions, and the general Ethernet chip cannot meet the use requirements. In this case, FPGA chips can be used for custom development of Ethernet protocols. However, the Ethernet protocol customized using FPGA chips often cannot take into account basic network protocols such as ARP and ICMP. In order to realize ARP protocol, ICMP protocol and custom protocol at the same time, three chips need to be formulated for use. It can be seen that the solution provided in 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 features or beneficial effects means that specific technical features, technical solutions or beneficial effects are included in at least one embodiment. Therefore, the description of technical features, technical solutions or beneficial effects 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 realized 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 a specific embodiment that does 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", "third", etc. in the specification of this application and the accompanying drawings are used to distinguish different objects rather than to limit a specific order.

[0039] In the embodiments of the present 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 the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

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

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

[0042] Ethernet access refers to the combination of Ethernet technology and integrated wiring. 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, which can be transmitted on Category 5 lines or 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, the embodiment of the present application provides an Ethernet automatic switching system, which 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. In the traditional scheme, in some special fields, such as the situation where some key data streams of the network are sensitive to time delay, a custom protocol should be formulated according to the characteristics of the key data stream to realize specific functions, and the general Ethernet chip cannot meet the use requirements. In this case, FPGA chips can be used for customized development of Ethernet protocols. However, the Ethernet protocol customized using FPGA chips often cannot take into account basic network protocols such as ARP and ICMP. To implement ARP, ICMP and custom protocols at the same time, three chips need to be developed for use. 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, ICMP and custom protocols.

[0044] In order to make the technical solution of the present application clearer and easier to understand, the application scenarios of the technical solution of the present application are introduced below in conjunction with the accompanying drawings. Figure 1 As shown, the 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, and the external network is input to the ARP protocol module 101, the ICMP protocol module 102 and the custom protocol module 103 through a 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, after processing the network data, an ARP protocol data packet is obtained, 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 is switched 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 data packets of the ICMP protocol, and sends the data packets of the ICMP protocol to the network data processing system 106. The sending completion signal of the output control module 104 is sent to the ICMP control submodule, 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 the output control module 104 sends a sending completion signal 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 the present application clearer and easier to understand, the following describes an Ethernet protocol automatic switching system provided by the embodiment of the present application in combination with the above application scenario. Figure 2 As shown, 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 a plurality of protocol modules;

[0056] The target protocol module among 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 obtain an identification result. If the identification result indicates that the network data belongs to the data of 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, and a 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 used to send a target receiving start signal to the target control module 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] The 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; the target sending submodule includes an ARP sending submodule, an ICMP sending submodule, and a custom sending submodule.

[0060] Among them, Figure 3As shown, the 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 used to receive the network data, identify whether the network data includes request data of the ARP protocol, 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, a first identification result is obtained 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 a 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. 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 used 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, a first identification result is obtained 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 is obtained that the network data belongs to data of the ICMP protocol, an 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 an ICMP protocol data packet to the output control module 104 according to the ICMP response protocol, and outputs an 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 an ICMP receive completion signal, an ICMP send enable signal and an 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 the 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, and 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 used to receive the network data, identify whether the network data includes request data of the 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, a first identification result is obtained that the network data does not belong to the custom protocol data;

[0071] If the first recognition result indicates that the network data includes request data of a custom protocol, and the first recognition result that the network data belongs to the custom protocol data is obtained, a custom reception start signal, custom data and a custom reception completion signal are sent to the custom control submodule 502, and the custom transmission submodule 503 waits for the custom transmission enable signal and the 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, and outputs a custom transmission completion signal to the custom control submodule 502 after the transmission is completed. The custom control submodule 502 sends a control signal to the output control module 104, and 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, and reads the custom data in the custom data FIFO 504 and sends it to the custom transmission submodule 503 according to the read data instruction sent by the custom transmission submodule 503.

[0072] The output control module 104 is used to switch to the transceiver state of the target protocol if a control signal of the target protocol module is received and the sending completion signal of the output control module 104 is valid. 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.

[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 transceiver state 601 of the ARP protocol, the transceiver state 602 of the ICMP protocol and the transceiver state 603 of the custom protocol. The transceiver state 603 of the custom protocol switches to the transceiver state 601 of the ARP protocol, which needs to meet the first condition 604. The transceiver state 601 of the ARP protocol switches to the transceiver state 603 of the custom protocol, which needs to meet the second condition 605. The transceiver state 603 of the custom protocol switches to the transceiver state 602 of the ICMP protocol, which needs to meet the third condition 606. The transceiver state 602 of the ICMP protocol switches to the transceiver state 603 of the custom protocol, which needs to meet the fourth condition 607.

[0074] The output control module 104 implements the sending and switching 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 receiving completion signal and the custom sending completion signal is valid at this time, the state machine switches to the ARP protocol sending and receiving 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 sending completion signal, the state machine switches to the custom protocol sending and receiving 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 completion signal and the custom send completion 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 completion 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, a target protocol module in the multiple protocol modules, for receiving network data transmitted by an external network, identifying 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, processing the network data to obtain a data packet of the target protocol, and sending a data packet of the target protocol and a 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, and in the transceiver state of the target protocol, receives the data packet of the target protocol sent by the target protocol module, and forwards the data packet of the target protocol after processing. Thus, the scheme 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] Combination of the above Figures 1 to 6An Ethernet protocol automatic switching system provided in an embodiment of the present application is introduced in detail. Hereinafter, an Ethernet protocol automatic switching method provided in an embodiment of the present application will be introduced in conjunction with the accompanying drawings.

[0080] like Figure 7 As shown, the figure is a flow chart of an Ethernet protocol automatic switching method provided in 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 a data packet of the target protocol and a control signal of the target protocol to the output control module.

[0087] S707: The output control module receives a 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, receives the data packet of the target protocol sent by the target protocol module, processes the data packet of the target protocol, 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 in an embodiment of the present application, and 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 through 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 only 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 a volatile memory, such as a random access memory (RAM). The memory 804 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a 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] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by the computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute an Ethernet protocol automatic switching method.

[0097] The embodiment of the present application further provides a computer program product, which includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part.

[0098] The computer instructions may 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 may 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 executes any method of an Ethernet protocol automatic switching method. The computer program product can be a software installation package, and when any method of an Ethernet protocol automatic switching method needs to be used, the computer program product can be downloaded and executed on the computer.

[0100] The descriptions of the processes or structures corresponding to the above-mentioned 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 of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions 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 comprises: an output control module and a plurality of protocol modules; A 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, and a control signal of the target protocol is sent to the output control module. The target protocol module is any one of the multiple protocol modules. The output control module is used to switch to the transceiver state of the target protocol if a control signal of the target protocol module is received and the sending completion signal of the output control module is valid. In the transceiver state of the target protocol, the output control module receives the data packet of the target protocol sent by the target protocol module, processes the data packet of the target protocol, and then forwards it.

2. The system according to claim 1, characterized in that 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, and to obtain an identification result that the network device does not belong to the target protocol if the network data does not include request data of the target protocol.

3. The system according to claim 1, characterized in that The target protocol module includes a target receiving submodule, a target controlling submodule, and a target sending submodule; The target receiving submodule is used to send a target receiving start signal to the target control module 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 control signal of the target protocol to the output control module, wherein the control signal of the target protocol includes: the target reception start signal, the target reception completion signal and the target enable signal.

4. The system according to claim 1, characterized in that 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.

5. The system according to claim 4, characterized in that The output control module is further used 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.

6. The system according to claim 3, characterized in that The target protocol module also 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.

7. The system according to claim 1, characterized in that The preset protocol module includes an address resolution ARP protocol module, a network control message ICMP protocol module, a user datagram UDP protocol module, etc.

8. An Ethernet protocol automatic switching method, 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 the 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 of the target protocol sent by the target protocol module, and the sending completion signal of the output control module is valid, the output control module switches to the sending and receiving state of the target protocol. In the sending and receiving state of the target protocol, the output control module receives the data packet of the target protocol sent by the target protocol module, processes the data packet of the target protocol, and then forwards it.

9. 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 as claimed in claim 8.

10. 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 8.

Citation Information

Patent Citations

  • Implementation system for multi-interface adapter card with double PCIE (Peripheral Component Interface Express) interfaces

    CN113609044A

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

    CN114125075A

  • Heterogeneous protocol conversion system and method

    CN116760911A

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

    CN116846988A

  • Method, device, and computer program product for communication of internet of things

    US20240032117A1