Network communication system, communication method, device and medium
By adopting a binding scheme of micro -control unit and Ethernet exchange module in the network communication terminal, single -chip supports multi -port, solve the problem of complexity and cost of business in traditional solutions, and improve system efficiency and flexibility.
Patent Information
- Application Number
- CN202411230807.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-09-04
AI Technical Summary
When traditional network communication terminals use a single physical port main chip in scenarios where multiple ports and support the same IP or different IPs, it leads to complex chip cascade services and high product design costs.
Through a combination of software and hardware, the micro control unit is combined with the Ethernet switching module to achieve a single chip supporting multiple ports. The specific implementation includes configuring the Ethernet switching module to route packets between the Ethernet upstream and downstream ports, and the micro control unit performing network device information linked list processing, binding and routing packets to the corresponding ports.
The multi -port support of the single chip is realized, the product design cost and business complexity are reduced, and the efficiency and flexibility of the network communication system is improved.
Smart Images

Figure CN118740768B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communication technology, and in particular to a network communication system, a communication method, a device and a medium. Background Art
[0002] With the rapid development of network communication technology, its applications are becoming more and more extensive. In network communication applications, the network communication terminal is an indispensable part. It connects the sensor network layer and the transmission network layer to collect data from multi-port network communication devices and send data to network services.
[0003] Traditionally, when encountering a scenario involving multiple ports and supporting the same IP or different IPs, if the selected main chip is a single physical port, multiple CPU cascades are usually used for expansion. The most direct problem brought by this solution is the complexity of the chip cascade business and the high cost of product design. However, the method of the present invention can achieve support for multiple ports through a single chip.
[0004] The network communication terminal with multiple ports connected in the related art has a complex structure and high equipment cost. Summary of the invention
[0005] In response to the above problems, the present disclosure provides a network communication method that supports multi-port, multi-IP and multi-service. The purpose is to solve the business scenario of multi-port, multi-IP and multi-service by combining software and hardware when the selected CPU chip only supports a single port.
[0006] According to a first aspect of the present disclosure, a network communication system is provided, characterized in that it includes an Ethernet switching module, including an Ethernet uplink port and multiple Ethernet downlink ports, wherein the Ethernet switching module is configured to route messages between the Ethernet uplink port and the multiple Ethernet downlink ports; and a micro control unit, including a specific network interface connected to the Ethernet uplink port of the Ethernet switching module, wherein the micro control unit is configured to perform network device information linked list processing on messages from the specific network interface, thereby routing messages received via the specific network interface to an upper-layer network service and routing messages from the upper-layer network service to corresponding ports among the multiple Ethernet downlink ports of the Ethernet switching module via the specific network interface.
[0007] In some embodiments, the micro control unit also includes a configuration binding module, configured to perform configuration on the network protocol stack, the port attribute module and the data forwarding module; the port attribute module is configured to establish a network device information linked list binding between the corresponding ports among the multiple Ethernet downstream ports and the network protocol stack according to the configuration of the configuration binding module and pass the bound network device information linked list to the port switching module; the port switching module is configured to switch the ports corresponding to the multiple Ethernet downstream ports of the message according to the network device information linked list bound by the port attribute module; the data forwarding module is configured to forward the message to the network protocol stack according to the switching port of the port switching module; and the network protocol stack is configured to route the message forwarded by the data forwarding module to the upper-layer network service and route the message from the upper-layer network service to the data forwarding module based on the network device information linked list configured by the port attribute module.
[0008] In some embodiments, the network device information linked list binding includes one or more of the following binding relationships: binding the Ethernet downstream port to a network device information linked list, wherein the one network device information linked list corresponds to an IP address information; binding the Ethernet downstream port to multiple network device information linked lists, wherein the multiple network device information linked lists respectively correspond to multiple different IP address information; and binding multiple Ethernet downstream ports to multiple network device information linked lists, wherein the multiple network device information linked lists respectively correspond to the same IP address information.
[0009] In some embodiments, the network device information linked list includes: IP address information, mask, gateway, and port identifier to which the Ethernet downstream port belongs.
[0010] In some embodiments, the micro control unit is configured to, in response to a message received from the upper-layer network service being a broadcast message, route the received message to each of the multiple Ethernet downstream ports; and in response to a message received from the upper-layer network service being not a broadcast message, determine a corresponding port based on the IP address information of the network device information linked list and a port identifier to which the Ethernet downstream port belongs and route the message to the determined corresponding port.
[0011] In some embodiments, the micro control unit is further configured to, in response to a message received from the upper-layer network service being not a broadcast message, determine whether the IP address information and port identifier in the destination network device information linked list of the message are equal to the IP address information and port identifier of the multiple Ethernet downstream ports; if the IP address information and port identifier of the received message are not equal to the IP address information and port identifier of the multiple Ethernet downstream ports, discard the message; and if the IP address information and port identifier of the received message are equal to the IP address information and port identifier of the multiple Ethernet downstream ports, route the message to the determined port.
[0012] In some embodiments, the micro control unit is configured to, if the message received via a specific network interface is a broadcast message, route the received message to all upper-layer network services; if the message received via the specific network interface is not a broadcast message, determine the corresponding upper-layer network service based on the IP address information of the network device information linked list and the port identifier to which the Ethernet downstream port belongs and route the message to the determined corresponding upper-layer network service.
[0013] In some embodiments, the microcontroller unit is further configured to, in response to a message received via a specific network interface being not a broadcast message, determine whether the IP address information and Port port identifier in the destination network device information linked list of the message are equal to the IP address information and port identifier of the upper-layer network service; if the IP address information and port identifier of the received message are not equal to the IP address information and port identifier of the upper-layer network service, discard the message; and if the IP address information and port identifier of the received message are equal to the IP address information and port identifier of the upper-layer network service, route the message to the determined upper-layer network service.
[0014] According to a second aspect of the present disclosure, a computing device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method in the present disclosure.
[0015] In a third aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method in the present disclosure.
[0016] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements.
[0018] Figure 1 A schematic diagram of a network communication device according to an embodiment of the present disclosure is shown.
[0019] Figure 2 A schematic diagram of a micro control unit according to an embodiment of the present disclosure is shown.
[0020] Figure 3 A schematic diagram showing a network device information linked list processing executed by a network communication system according to an embodiment of the present disclosure.
[0021] Figure 4 A schematic diagram showing uplink communication performed by a network communication system according to an embodiment of the present disclosure is shown.
[0022] Figure 5 A schematic diagram showing downlink communication performed by a network communication system according to an embodiment of the present disclosure is shown.
[0023] Figure 6 A schematic block diagram of an example electronic device 600 is shown that may be used to implement embodiments of the present disclosure. DETAILED DESCRIPTION
[0024] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0025] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0026] The present invention adopts a combination of a microcontroller unit MCU and an Ethernet switching module to expand the interface that only supports a specific network interface, connects to the specific network interface through the uplink interface of the Ethernet switching module, and then connects to other Ethernet devices through multiple Ethernet downlink interfaces.
[0027] The specific network interface that the microcontroller unit MCU of the present invention may include may be an Ethernet interface, a serial interface for connecting a serial device (such as an RS interface), a PHY interface for connecting a physical layer of a network device, a GMAC interface for Gigabit Ethernet communication, etc. Those skilled in the art will appreciate that the specific network interface includes but is not limited to the above interfaces.
[0028] The Ethernet switching module of the present invention can be various types of Ethernet switching chips such as Ethernet switching chips based on system-on-chip (SOC), communication switching modules based on FPGA, etc. For example, the switching module includes multiple Ethernet interfaces, MAC controllers, frame processing units, and internal switching matrices to achieve forwarding and routing of high-speed data packets. The switching module can also be used to achieve the transmission and processing of Ethernet data, for example, including Ethernet PHY interfaces and MAC controllers to achieve the transmission and processing of Ethernet data.
[0029] Figure 1 FIG. 1 is a schematic diagram of a network communication device according to an embodiment of the present disclosure. Figure 1 As shown, the network communication device 100 includes an Ethernet switching module 102 and a microcontroller unit MCU 104. The Ethernet switching module 102 includes an Ethernet uplink port and multiple Ethernet downlink ports, wherein the Ethernet switching module is configured to route messages between the Ethernet uplink port and the multiple Ethernet downlink ports. The Ethernet switching module 102 is designed with an Ethernet uplink port and multiple Ethernet downlink ports. The chip is responsible for routing messages between these ports to ensure that the messages can be transmitted in the network according to a predetermined path.
[0030] The microcontroller unit MCU 104 includes a specific network interface (e.g., a GMAC interface) connected to an upstream port of the Ethernet switching module, wherein the microcontroller unit is configured to perform network device information linked list processing on messages from the specific network interface, thereby routing messages received via the specific network interface to an upper-layer network service and routing messages from the upper-layer network service to corresponding ports among a plurality of Ethernet downstream ports via the specific network interface.
[0031] MCU 104 is the core processing unit of the system, which is connected to the uplink port of the Ethernet switch module through a specific network interface (GMAC). MCU is responsible for performing network device information linked list processing, which includes receiving messages from the specific network interface and routing them to the upper network service. At the same time, it also processes messages sent from the upper network service and sends them to the corresponding downlink port of the Ethernet switch module through the specific network interface.
[0032] MCU 104 is the core processing unit of the network communication system, which usually includes a microprocessor (CPU), memory, input / output (I / O) ports, timers / counters, communication interfaces, and interrupt controllers. The microprocessor executes instructions in the instruction set architecture and processes data. The memory includes program memory (such as ROM or Flash) and data memory (such as RAM). The I / O port is used to communicate with external devices, and communication interfaces such as UART, SPI, I2C, USB, etc. are used for data exchange. The interrupt controller manages external interrupt requests. Based on the above technical features, multiple modules can be installed in MCU 104 to route messages from multiple downstream ports for transmission to upper-layer network services.
[0033] Figure 2 FIG. 2 shows a schematic diagram of a microcontroller unit according to an embodiment of the present disclosure. Figure 2 As shown, the micro control unit 200 includes a configuration binding module, a port attribute module, a port switching module, a data forwarding module and a network protocol stack. Figure 2 In the embodiment, the software modules of the micro control unit 200 from bottom to top are PORT port attribute module, PORT port switching module, configuration binding module, data forwarding module, network protocol stack and various network services.
[0034] The configuration binding module is configured to perform configuration on the network protocol stack, port attribute module and data forwarding module. The configuration binding module is a component of the MCU and is responsible for configuring the network protocol stack, port attribute module and data forwarding module. Through this module, the system can adapt to different network environments and communication requirements.
[0035] The port attribute module is configured to establish a network device information linked list binding between the ports corresponding to the plurality of Ethernet downstream ports and the network protocol stack according to the configuration of the configuration binding module and transmit the bound network device information linked list binding information to the port switching module. According to the setting of the configuration binding module, the port attribute module establishes a network device information linked list binding between the plurality of Ethernet downstream ports and the network protocol stack. This binding process ensures that the message can be correctly identified and routed.
[0036] The port switching module is configured to switch the ports corresponding to the multiple Ethernet downstream ports of the message according to the network device information linked list information bound by the port attribute module. The port switching module uses the network device information linked list information bound by the port attribute module to determine which Ethernet downstream port the message should be sent to.
[0037] The data forwarding module is configured to forward the message to the network protocol stack according to the port switched by the port switching module. The module forwards the message to the network protocol stack according to the decision of the port switching module for further processing and routing.
[0038] The network protocol stack is configured to route the message forwarded by the data forwarding module to the upper network service and route the message from the upper network service to the data forwarding module based on the network device information linked list configured by the port attribute module. The network protocol stack is the highest-level software component in the entire system. It routes the message to the upper network service based on the network device information linked list configured by the port attribute module, and routes the response message from the upper network service back to the data forwarding module.
[0039] The overall process is that in the overall initialization phase, the network management initialization module configures the network protocol stack and the PORT port attribute module by configuring the binding module. By binding the physical PORT port attribute and the IP address attribute and passing the bound network device information list information to the data forwarding module and the PORT port switching module.
[0040] When normal communication is fully established and communication begins, data is bidirectionally exchanged only by the network protocol stack, data forwarding module, and PORT port switching module, and other modules are no longer involved.
[0041] The network device information list includes IP address information, Mask mask, GW gateway and the port identifier to which the Ethernet downstream port belongs. The network device information list is associated and matched with the network protocol stack port, and it must also be matched with the attributes of the switch port. The attribute matching of the switch port can be done through special identifiers, such as CPU PORT, VLAN ID, custom identifiers, etc. Through the above IDs or representations, the corresponding relationship between the network device information list (NetDev structure) and the external expansion port of the switch chip is established. The network device information list processing can be one-to-many, many-to-many, and many-to-one. Furthermore, the same port uses different network addresses, different ports use different network addresses, and different ports use the same network address. Then it is extended to the establishment relationship between the upper-layer network service and the network address. This solution can use the network protocol stack to establish different network services with the same network address, or different network services with different network addresses, etc., so that the purpose of matching different network services to different ports can be achieved.
[0042] Figure 3 FIG. 2 is a schematic diagram showing a network device information linked list processing executed by a network communication system according to an embodiment of the present disclosure. Figure 3As shown, in one embodiment, the network communication system can be configured in multiple ways through the network device information linked list. For example, one-to-many configuration management is implemented, such as port 1 is associated with 3 network device information linked lists (NetDev structure); scenario two: one-to-one configuration management is implemented, such as ports 2 / 3 / 4 are each bound to their own independent network device information linked lists (NetDev structure); scenario three: many-to-one configuration management is implemented, such as ports 5 / 6 / 7 are associated with 3 network device information linked lists (NetDev structure) with the same network information; scenario four: a combination of the above three, such as the combination of port 1 and port 2.
[0043] Although the port mapping schemes are different, there is a common network information structure. Network device information linked list binding includes one or more of the following binding relationships: binding an Ethernet downstream port to a network device information linked list, wherein the network device information linked list corresponds to an IP address information; binding an Ethernet downstream port to multiple network device information linked lists, wherein the multiple network device information linked lists correspond to multiple different IP address information respectively; and binding multiple Ethernet downstream ports to multiple network device information linked lists, wherein the multiple network device information linked lists correspond to the same IP address information respectively.
[0044] In one embodiment, when the system receives a message from an upper-layer network service and the message is identified as a broadcast message, the system will execute a broadcast routing strategy. The broadcast routing strategy includes copying and routing the received broadcast message to all configured Ethernet downstream ports. This process ensures that the broadcast message can be received on all terminal devices within the network and is suitable for scenarios where messages need to be broadcast to all devices. In the present invention, broadcast refers to broadcasting based on an IP address information interval or unicasting based on specific IP address information. Broadcasting refers to sending data messages to all possible specific IP address segments in the network. Unicast refers to sending and receiving messages with ports with specific IP address information.
[0045] For non-broadcast message processing, the system will process it according to the IP address information in the network device information list contained in the message. The system matches the IP address in the message with the port identifier to which the Ethernet downstream port belongs.
[0046] If the IP address information and port identifier in the message match the IP address and port identifier of any Ethernet downstream port, the message will be routed to the corresponding port. If the IP address information and port identifier in the message do not match any Ethernet downstream port, the system will discard the message according to the routing rules to avoid invalid routing attempts.
[0047] The system will continuously check the destination IP address and port identifier of each received message. If the IP address and port identifier of the received message match the configuration of a downstream Ethernet port in the system, the system will perform routing operations and forward the message to that port.
[0048] This process ensures that only correct and well-targeted messages are routed to the corresponding network devices, improving network efficiency and security. If the system detects that the IP address and port identifier of the received message do not match any configured Ethernet downstream port, the message will be considered as having an unclear purpose. The system will execute a discard mechanism to avoid sending messages to the wrong port, reducing network congestion and potential security risks.
[0049] In one embodiment, when the system receives a broadcast message through a specific network interface, the system will execute a special routing rule. The rule requires the system to route the received broadcast message to all configured upper-layer network services. This process ensures that the broadcast message can be propagated in all upper-layer services, so that all relevant devices in the network can receive the broadcast message. For non-broadcast messages, the system will determine the corresponding upper-layer network service based on the IP address information and Port port identifier of the network device information linked list contained in the message. The system will check the IP address and Port port identifier in the message and match them with the IP address and Port port identifier of the upper-layer network service configured in the system.
[0050] If the IP address and port identifier in the message match the configuration of a certain upper-layer network service, the system will perform a routing operation and forward the message to the upper-layer network service. This process ensures that the message can be correctly routed to the target service, improving the accuracy and efficiency of network communication.
[0051] If the system detects that the IP address and port identifier of the received non-broadcast message do not match any configured upper-layer network services, it is considered that the message cannot find a suitable route. The system will execute the discard mechanism and give up further processing of the message to avoid invalid routing attempts and potential network congestion.
[0052] If the IP address and port identifier in the message completely match the configuration of a certain upper-layer network service, the system will confirm that the upper-layer network service is the destination service of the message. The system will then route the message to the determined upper-layer network service, completing the final step of data transmission.
[0053] Through the above embodiments, the network communication system can intelligently process received messages, whether broadcast messages or unicast messages, and ensure that the correct routing strategy is executed, while avoiding invalid routing attempts, thereby improving the operating efficiency and stability of the network.
[0054] The above Ethernet downstream port is an information socket connector for connecting to a data terminal device or for connecting to a digital communication device, such as an RJ45 interface.
[0055] Figure 4 FIG. 2 shows a schematic diagram of a network communication system performing uplink communication according to an embodiment of the present disclosure. Figure 4 As shown, in step 402, the Ethernet switching module receives messages from one or more of the multiple Ethernet downstream ports and routes the received messages to a specific network interface of the micro control unit via the Ethernet upstream port.
[0056] In step 404, the micro control unit verifies the network device information linked list of the received message, and routes the received message to the corresponding upper layer network service based on the verification result of the network device information linked list.
[0057] Figure 5 FIG. 2 shows a schematic diagram of a network communication system performing downlink communication according to an embodiment of the present disclosure. Figure 5 As shown, in step 502, the micro control unit receives a message from an upper layer network service and checks the network device information linked list of the received message to route the received message to the Ethernet uplink port of the Ethernet switching module via a specific network interface.
[0058] In step 504, the Ethernet switching module receives the message from the micro control unit and routes the received message to the corresponding Ethernet downstream port based on the verification result of the network device information linked list.
[0059] Figure 6 Schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. Figure 1 The network communication device shown can be implemented by an electronic device 600. As shown, the electronic device 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 602 or computer program instructions loaded from a storage unit 608 to a random access memory (RAM) 603. In the random access memory 603, various programs and data required for the operation of the electronic device 600 can also be stored. The central processing unit 601, the read-only memory 602, and the random access memory 603 are connected to each other via a bus 604. An input / output (I / O) port 605 is also connected to the bus 604.
[0060] Multiple components in the electronic device 600 are connected to the input / output port 605, including: an input unit 606, such as a keyboard, a mouse, a microphone, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0061] The various processes and processing described above, such as methods 400 and 500, may be performed by the central processing unit 601. For example, in some embodiments, the methods 400 and 500 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the read-only memory 602 and / or the communication unit 609. When the computer program is loaded into the random access memory 603 and executed by the central processing unit 601, one or more actions in the methods 400 and 500 described above may be performed.
[0062] The present disclosure relates to methods, apparatuses, systems, electronic devices, computer-readable storage media and / or computer program products. The computer program products may include computer-readable program instructions for executing various aspects of the present disclosure.
[0063] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the above. The computer-readable storage medium used herein is not to be interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0064] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge computing devices. The network adapter card or network port in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.
[0065] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of the computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit may execute the computer-readable program instructions, thereby implementing various aspects of the present disclosure.
[0066] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of boxes in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0067] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0068] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0069] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0070] Those skilled in the art should understand that the present invention is not limited to the above-mentioned embodiments, and the present invention can be implemented in many other forms without departing from its purpose and scope. Therefore, the examples and embodiments shown are regarded as illustrative rather than restrictive, and the present invention may cover various modifications and substitutions without departing from the spirit and scope of the present invention as defined in the appended claims.
Claims
1. A network communication system, characterized in that: include, An Ethernet switching module, comprising an Ethernet uplink port and a plurality of Ethernet downlink ports, wherein the Ethernet switching module is configured to route messages between the Ethernet uplink port and the plurality of Ethernet downlink ports; as well as A micro control unit, comprising a specific network interface connected to an Ethernet uplink port of an Ethernet switch module, wherein the micro control unit is configured to perform network device information linked list processing on messages from the specific network interface, thereby routing messages received via the specific network interface to an upper-layer network service and routing messages from the upper-layer network service to corresponding ports among a plurality of Ethernet downlink ports of the Ethernet switch module via the specific network interface, The micro control unit further includes a configuration binding module configured to perform configuration on the network protocol stack, the port attribute module and the data forwarding module, a port attribute module configured to establish a network device information linked list binding between the corresponding ports in the multiple Ethernet downstream ports and the network protocol stack according to the configuration of the configuration binding module and pass the bound network device information linked list to the port switching module, the port switching module configured to switch the ports corresponding to the multiple Ethernet downstream ports of the message according to the network device information linked list bound by the port attribute module, a data forwarding module configured to forward the message to the network protocol stack according to the switching port of the port switching module, the network protocol stack configured to route the message forwarded by the data forwarding module to the upper network service and route the message from the upper network service to the data forwarding module based on the network device information linked list configured by the port attribute module, The network device information linked list binding at least includes binding the Ethernet downstream port with a network device information linked list, wherein the network device information linked list corresponds to an IP address information, binding the Ethernet downstream port with multiple network device information linked lists, wherein the multiple network device information linked lists respectively correspond to multiple different IP address information, and binding multiple Ethernet downstream ports with multiple network device information linked lists, wherein the multiple network device information linked lists respectively correspond to the same IP address information.
2. The network communication system according to claim 1, characterized in that: The network device information linked list includes: IP address information, mask, gateway and port identifier to which the Ethernet downlink port belongs.
3. The network communication system according to claim 2, characterized in that: The micro control unit is configured to: In response to the message received from the upper layer network service being a broadcast message broadcast based on an IP address, routing the received message to each of the plurality of Ethernet downstream ports; as well as In response to the message received from the upper layer network service not being a broadcast message based on IP address broadcast, the corresponding port is determined according to the IP address information of the network device information linked list and the port identifier to which the Ethernet downlink port belongs, and the message is routed to the determined corresponding port.
4. The network communication system according to claim 3, characterized in that: The micro control unit is further configured to: In response to the message received from the upper layer network service not being a broadcast message based on IP address broadcast, determining whether the IP address information and port identifier in the destination network device information linked list of the message are equal to the IP address information and port identifier of the multiple Ethernet downstream ports; If the IP address information and port identifier of the received message are not equal to the IP address information and port identifier of the multiple Ethernet downstream ports, the message is discarded; as well as If the IP address information and the port identifier of the received message are equal to the IP address information and the port identifiers of the multiple Ethernet downstream ports, the message is routed to the determined port.
5. The network communication system according to claim 2, characterized in that: The micro control unit is configured to: If the message received via the specific network interface is a broadcast message based on the IP address broadcast, the received message is routed to all upper-layer network services; If the message received via the specific network interface is not a broadcast message based on IP address broadcast, the corresponding upper layer network service is determined according to the IP address information of the network device information linked list and the port identifier to which the Ethernet downlink port belongs, and the message is routed to the determined corresponding upper layer network service.
6. The network communication system according to claim 5, characterized in that: The micro control unit is further configured to: In response to the message received via the specific network interface not being a broadcast message based on IP address broadcast, determining whether the IP address information and the Port port identifier in the destination network device information linked list of the message are equal to the IP address information and the port identifier of the upper layer network service; If the IP address information and port identifier of the received message are not equal to the IP address information and port identifier of the upper layer network service, the message is discarded; as well as If the IP address information and the port identifier of the received message are equal to the IP address information and the port identifier of the upper-layer network service, the message is routed to the determined upper-layer network service.
7. A communication method, characterized in that: The method is applied to the network communication system according to any one of claims 1 to 6, and the method comprises: The Ethernet switching module receives messages from one or more of the plurality of Ethernet downstream ports and routes the received messages to a specific network interface of the micro control unit via the Ethernet upstream port; and The micro control unit verifies the network device information linked list of the received message, and routes the received message to the corresponding upper layer network service based on the verification result of the network device information linked list.
8. A communication method, characterized in that: The method is applied to the network communication system according to any one of claims 1 to 6, and the method comprises: The micro control unit receives a message from an upper layer network service and verifies the network device information linked list of the received message to route the received message to an Ethernet uplink port of the Ethernet switching module via a specific network interface; and The Ethernet switching module receives the message from the micro control unit and routes the received message to the corresponding Ethernet downstream port based on the verification result of the network device information chain table.
9. A computing device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of claim 7 or 8.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method of claim 7 or 8.
Citation Information
Patent Citations
Method and device for realizing three-layer communication on two-layer single board
CN102833155A
Network switching implementation method based on FPGA (Field Programmable Gate Array)
CN117176651A