CN113839964A - Communication method for gateway device and gateway device - Google Patents

Communication method for gateway device and gateway device Download PDF

Info

Publication number
CN113839964A
CN113839964A CN202111417027.7A CN202111417027A CN113839964A CN 113839964 A CN113839964 A CN 113839964A CN 202111417027 A CN202111417027 A CN 202111417027A CN 113839964 A CN113839964 A CN 113839964A
Authority
CN
China
Prior art keywords
data
node
data segment
configuration protocol
epa
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111417027.7A
Other languages
Chinese (zh)
Other versions
CN113839964B (en
Inventor
王迎
王克炜
陈建飞
顾昊
徐向文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Guoli Xin'an Technology Co ltd
Original Assignee
Zhejiang Guoli Xin'an Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Guoli Xin'an Technology Co ltd filed Critical Zhejiang Guoli Xin'an Technology Co ltd
Priority to CN202111417027.7A priority Critical patent/CN113839964B/en
Publication of CN113839964A publication Critical patent/CN113839964A/en
Application granted granted Critical
Publication of CN113839964B publication Critical patent/CN113839964B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Abstract

The application relates to a communication method for a gateway device and the gateway device. The communication method for the gateway device comprises the following steps: analyzing a first data message from at least a first node in a first EPA network according to a first configuration protocol to acquire a data segment for sending to at least a second node in a second EPA network, wherein the nodes in the first EPA network are networked according to the first configuration protocol, and the nodes in the second EPA network are networked according to a second configuration protocol; storing the acquired data segment; and generating a second data message for sending to at least a second node according to the format agreed by the second configuration protocol based on the acquired data segment. According to the communication method and the gateway equipment, cross-network communication among nodes in different EPA networks can be realized.

Description

Communication method for gateway device and gateway device
Technical Field
The present application relates generally to an EPA (Ethernet for plant automation industrial Ethernet) network, and more particularly to a communication method between different EPA subnets and a gateway device.
Background
An EPA (Ethernet for plant automation industrial Ethernet) network is a distributed system which utilizes the protocol definitions of ISO/IEC8802-3, IEEE802.11, IEEE802.15 and the like to realize measurement and control in industrial production processes and operations.
However, in the actual application scenario of the EPA network, the complexity of the network application scenario is continuously increased, and a single network cannot meet the actual requirements. In industrial applications, a large number of devices are divided into multiple EPA networks; however, because different EPA networks are networked according to different configuration protocols, how to implement interconnection and communication between multiple EPA networks is a technical problem that the present application aims to solve.
Disclosure of Invention
Embodiments of the present application provide a communication method for a gateway device, an electronic device, and a non-transitory computer-readable storage medium, aiming to solve one or more of the above technical problems.
According to a first aspect of the present application, a communication method for a gateway device is provided. The communication method comprises the following steps: analyzing a first data message from at least a first node in a first EPA network according to a first configuration protocol to acquire a data segment for sending to at least a second node in a second EPA network, wherein the nodes in the first EPA network are networked according to the first configuration protocol, and the nodes in the second EPA network are networked according to a second configuration protocol; storing the acquired data segment; and generating a second data message for sending to the at least second node according to the format agreed by the second configuration protocol based on the acquired data segment.
The communication method according to the embodiment of the application can bring the following technical effects, and particularly can realize cross-network communication among nodes in different EPA networks.
In some embodiments, parsing the first data packet according to the first configuration protocol includes: acquiring a source IP address of the at least first node from an EPA message header of the first data message; and acquiring the data segment from an appointed position of the first data message according to the first configuration protocol based on the acquired source IP address, wherein the source IP address identifies the at least first node, and the first configuration protocol appoints the position of the data segment in the first data message for sending to at least a second node in a second EPA network.
In some embodiments, parsing the first data packet according to the first configuration protocol includes: analyzing the first data message according to the first configuration protocol to acquire a destination IP address of the at least second node from the first data message; and acquiring the data segment from the first data message based on the destination IP address.
In some embodiments, the method further comprises: and packing the data segment to be sent to the at least second node at a preset position according to the second configuration protocol, wherein the packed data segment at least comprises the data segment stored by the data interaction module, and the second configuration protocol appoints the position of the data segment sent to the at least second node in the second data message.
In some embodiments, parsing the first data packet according to the first configuration protocol includes: analyzing the first data message according to the first configuration protocol to acquire a destination IP address of the at least second node from the first data message or from configuration information of the first configuration protocol; the packed data segment includes the destination IP address.
In some embodiments, generating the second data message comprises: identifying the validity of the data segment in the second data message according to the second configuration protocol.
In some embodiments, parsing the first data packet according to the first configuration protocol includes: determining whether the data segment is valid based on the validity identification of the data segment; storing the retrieved data segment includes causing a data interaction module to store the data segment in response to determining that the data segment is valid.
In some embodiments, storing the retrieved data segment further comprises: determining, by a processor, whether the valid data segment satisfies a predetermined check condition; and in response to determining that the data segment satisfies the verification condition, causing the data interaction module to store the data segment.
In some embodiments, the method further comprises: and responding to the generation of the second data message, and instructing the gateway equipment to forward the second data message according to the second configuration protocol at a preset time sequence.
In some embodiments, the method further comprises: determining whether the acquired data segment meets a predetermined filtering condition; and in response to the data segment satisfying a predetermined filter condition, causing the data interaction module to store the data segment.
In some embodiments, the method further comprises: obtaining a source IP of the at least first node;
acquiring a destination IP of the at least second node; in response to determining that the source IP and the destination IP are both included in a preconfigured table, allowing the stored data segment to generate a second data packet for transmission to the at least second node.
In some embodiments, the method further comprises: discarding the data segment in response to determining that the source IP and the destination IP are not included in a preconfigured table.
According to a second aspect of the present application, there is provided a gateway device for an EPA network. The gateway apparatus includes: a first protocol stack configured to parse a first data packet from at least a first node in a first EPA network according to a first configuration protocol to obtain a data segment intended for transmission to at least a second node in a second EPA network, wherein nodes in the first EPA network are networked according to the first configuration protocol and nodes in the second EPA network are networked according to a second configuration protocol; a data interaction module configured to store the acquired data segment; and the second protocol stack is configured to generate a second data message for sending to the at least second node according to a format agreed by the second configuration protocol based on the acquired data segment.
In some embodiments, the first protocol stack is configured to: acquiring a source IP address of the at least first node from an EPA message header of the first data message; and acquiring the data segment from an appointed position of the first data message according to the first configuration protocol based on the acquired source IP address, wherein the source IP address identifies the at least first node, and the first configuration protocol appoints the position of the data segment in the first data message for sending to at least a second node in a second EPA network.
In some embodiments, the first protocol stack is configured to: analyzing the first data message according to the first configuration protocol to acquire a destination IP address of the at least second node from the first data message; and acquiring the data segment from the first data message based on the destination IP address.
In some embodiments, the second protocol stack is configured to: and according to the second configuration protocol, packaging a data segment to be sent to the at least second node at a preset position in the second data message, wherein the packaged data segment at least comprises a data segment stored by the data interaction module, and the preset position is agreed by the second configuration protocol.
In some embodiments, the first protocol stack is configured to: analyzing the first data message according to the first configuration protocol to acquire a destination IP address of the at least second node from the first data message; wherein the packed data segment includes the destination IP address.
In some embodiments, the second protocol stack is configured to: identifying the validity of the data segment in the second data message.
In some embodiments, the first protocol stack is further configured to: determining whether the data segment is valid based on the validity identification of the data segment; storing the retrieved data segment includes causing a data interaction module to store the data segment in response to determining that the data segment is valid.
In some embodiments, the gateway device is configured to: storing the retrieved data segment further comprises: determining, by a processor, whether the valid data segment satisfies a predetermined check condition; and in response to determining that the data segment satisfies the verification condition, causing the data interaction module to store the data segment.
In some embodiments, the gateway device is configured to: and responding to the generation of the second data message, and instructing the gateway equipment to forward the second data message according to the second configuration protocol at a preset time sequence.
In some embodiments, the gateway device is configured to: determining whether the acquired data segment meets a predetermined filtering condition; and in response to the data segment satisfying a predetermined filter condition, causing the data interaction module to store the data segment.
In some embodiments, the gateway device is configured to: obtaining a source IP of the at least first node; acquiring a destination IP of the at least second node; in response to determining that the source IP and the destination IP are both included in a preconfigured table, allowing the stored data segment to generate a second data packet to be sent to the at least second node.
In some embodiments, the gateway device is configured to: discarding the data segment in response to determining that the source IP and the destination IP are not included in a preconfigured table.
According to a third aspect of the present application, an electronic device is provided. The electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect.
According to a fourth aspect of the present application, there is provided a non-transitory computer readable storage medium having computer instructions stored thereon. The computer instructions are for causing the computer to perform the method of the first aspect.
It should be understood that what is described in this summary section is not intended to limit key or critical features of the embodiments of the application, nor is it intended to limit the scope of the application. Other features of the present application will become apparent from the following description.
Drawings
The above and other objects, features and advantages of the embodiments of the present application will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. In the drawings, several embodiments of the present application are illustrated by way of example and not by way of limitation.
FIG. 1 illustrates a schematic diagram of an example environment in which embodiments of the present application can be implemented.
Fig. 2 shows a schematic structural diagram of a gateway device according to an embodiment of the present application.
Fig. 3 shows a flow chart of a communication method for a gateway device according to an embodiment of the application.
Fig. 4 is a schematic diagram illustrating a process flow of a datagram of a gateway device according to an embodiment of the present application.
Fig. 5 is a schematic diagram illustrating a process flow of a datagram of a gateway device according to another embodiment of the present application.
Fig. 6 illustrates a flow diagram of a method of parsing a first datagram according to one embodiment of the present application.
Fig. 7 shows a flowchart of a method 700 of parsing a first datagram according to another embodiment of the present application.
Fig. 8 shows a schematic structural diagram of a gateway device according to another embodiment of the present application.
Fig. 9 shows a schematic structural diagram of a gateway device according to another embodiment of the present application.
FIG. 10 illustrates a block diagram of an electronic device capable of implementing various embodiments of the present application.
Like or corresponding reference characters designate like or corresponding parts throughout the several views.
Detailed Description
Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are for illustration purposes only and are not intended to limit the scope of the present application.
In describing embodiments of the present application, the terms "include" and "comprise," and similar language, are to be construed as open-ended, i.e., "including, but not limited to. The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first," "second," and the like may refer to different or the same object. Other explicit and implicit definitions are also possible below.
As described above, in the actual application scenario of EPA, the complexity of the network application scenario is increasing; a single EPA network cannot meet the actual demand. EPA devices are also increasingly interconnected in multiple networks. However, the EPA devices located between two networks cannot directly communicate, and how to implement network communication between EPA devices between different networks is a technical problem that the present application aims to solve. Embodiments of the present application will be described below in detail with reference to the accompanying drawings.
FIG. 1 illustrates a schematic diagram of an example environment 100 in which embodiments of the present application can be implemented. Two EPA networks 10, 20 are included in this example environment 100. In the illustrated embodiment, the first EPA network 10 employs a star network topology and comprises a plurality of EPA nodes 11, 12, 13, 30 and switches 15, 16 for inter-connected communication between the EPA nodes. In the illustrated embodiment, the first EPA network 10 employs a dual star redundant topology and comprises four nodes (including one gateway node 30). The topology of the first EPA network 10 is merely exemplary, the first EPA network 10 may employ any other suitable topology, such as in a linear, ring, or combination thereof, and the number of nodes is not limited in the context of meeting EPA protocol requirements. In the illustrated embodiment, second EPA network 20 employs a dual ring type redundancy topology and comprises five nodes 21, 22, 23, 24, 30 (including one gateway node 30). It is worth noting that the topology of second EPA network 20 is merely exemplary, e.g., in a linear, ring, or combination thereof, etc., and the number of nodes is not limited in the case of meeting EPA protocol requirements. "node" herein refers to a device capable of communication and supporting the EPA protocol and may include, for example, virtual machines, laptop computers, desktop computers, workstations, personal digital assistants, servers, computers, and other suitable computing devices; the nodes may represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices.
In the application environment 100 according to embodiments of the present application, the gateway node 30 is implemented in both EPA networks 10, 20, i.e. the network node is not only a node of the first EPA network 10, but also a node of the second EPA network 20. It is worth noting that this is merely exemplary; an environment according to embodiments of the present application may include multiple networks, and gateway node 30 is implemented in multiple EPA networks, and may be similarly implemented based on the teachings in accordance with the present application.
The EPA nodes 11, 12, 13, 30 of the first EPA network 10 are networked in accordance with a first configuration protocol and effect data transmission and reception between the nodes in an agreed manner. EPA nodes 21, 22, 23, 24, 30 of the second EPA network 20 are networked according to the second configuration protocol and data transmission and reception between the nodes is effected in the agreed manner. However, given that the first stateful protocol is different from the second stateful protocol, nodes within the first EPA network 10 and nodes of the second EPA network 20 cannot communicate directly.
As shown in fig. 1, the example environment 100 further includes a gateway node 30 according to an embodiment of the present application. In one aspect, the gateway node 30 is implemented as a node in the first EPA network 10 and is capable of communicating with other nodes, e.g. 11, 12, 13, in the first EPA network 10 to enable the reception and transmission of data. On the other hand, gateway node 30 is also implemented as a node in second EPA network 20 and is capable of communicating with other nodes, e.g. 21, 22, 23, 24, in second EPA network 20 to enable the reception and transmission of data. Thereby, network communication of nodes in the first EPA network 10 with nodes in the second EPA network 20 is enabled through the gateway node 30.
Fig. 2 shows a schematic structural diagram of a gateway device 200 according to an embodiment of the present application. As shown in fig. 2, the gateway device 200 may include a first protocol stack 210, a data interaction module 220, a second protocol stack 230, a processor 240, and a configuration module 250.
The protocol stacks 210, 220 may be configured to implement a data communication configuration. For example, in some embodiments, the protocol stack may include a location to package data segments, a location to retrieve data, a location to store cross-network data. For example, the first protocol stack 210 may be configured to parse a first data packet from a node in the first EPA network and obtain a data segment intended for transmission to a second node in the second EPA network in accordance with the first configuration protocol. And the nodes in the first EPA network are networked according to the first configuration protocol, and the nodes in the second EPA network are networked according to the second configuration protocol. The data interaction module 220 is configured to store interaction data between two protocol stacks. The second protocol stack 230 is configured to generate a second data packet for transmission to at least the second node in a format agreed upon by the second configuration protocol based on the acquired data segment. The processor 240 may be configured to configure the first protocol stack and the second protocol stack in a data interactive manner. The configuration module 250 may be configured to store information of data interaction of the data communication interface and send the information to the first protocol stack 210 and the second protocol stack 230.
A flowchart of a communication method for a gateway device according to an embodiment of the present application is shown below in conjunction with fig. 3 and 4.
Fig. 3 shows a flow chart of a communication method 300 for a gateway device according to an embodiment of the application. As shown in fig. 3, the method 300 may include: at 302, a first datagram from at least a first node in a first EPA network may be parsed by a first protocol stack according to a first organizational protocol to obtain a data segment intended for transmission to at least a second node in a second EPA network, where nodes in the first EPA network are networked according to the first organizational protocol and nodes in the second EPA network are networked according to a second organizational protocol. At 304, the retrieved data segments may be stored by the data interaction module 220. At 306, a second data packet may be generated by the second protocol stack for transmission to the second node based on the retrieved data segment in a format agreed upon by the second configuration protocol.
Before data communication is carried out by a user, each network appoints a data transmission rule according to a configuration protocol, and data packaging and acquisition are carried out according to the data transmission rule. For example, the sending node generates a data packet to be sent according to a convention, and particularly, the sending node fills data sent to the corresponding node into a data segment at a corresponding position in the data packet. The receiving node is also configured according to the configuration protocol to obtain data in the data segment of the corresponding position of the received data message. And as a gateway node, the gateway node is required to take the function of data forwarding between the first EPA network and the second EPA network. In particular, the gateway node acquires data from nodes from the first EPA network that needs to be transmitted across the network in accordance with the first stateful protocol and reassembles the extracted data and repackages the extracted data in accordance with rules agreed upon by the second stateful protocol to generate a second data message suitable for transmission in the second EPA network, and sends the second data message to nodes in the second EPA network.
Fig. 4 shows a schematic diagram of a data packet processing flow 400 of a gateway device according to an embodiment of the present application. As shown in fig. 4, nodes 11, 12, 13 are all nodes in the first EPA network; nodes 21, 22, 23, 24 are all nodes in the second EPA network. It is worth noting that although the operation of the gateway according to the embodiment of the present application is described in the illustrated embodiment taking the example of sending data from a node in the first EPA network to a node in the second EPA network, this is merely exemplary, and sending data to a node in the first EPA network for a node in the second EPA network may similarly be implemented by corresponding configuration of the second protocol stack and the first protocol stack.
The nodes 11, 12, 13 may each generate a corresponding first datagram 410 according to the first configuration protocol. As shown in fig. 4, node 11 is configured to communicate with node 12, node 13, node 22 in the second EPA network. The node 11 is configured to fill in the DATA segments of the corresponding positions with the DATA USER _ DATA 12, USER _ DATA 13, USER _ DATA 22 in sequence according to the first configuration protocol. The node 12 is configured to communicate with the node 11, the node 13, the network node 30. The node 12 is configured to fill in the DATA segments of the corresponding positions with the DATA USER _ DATA 12, USER _ DATA 13, USER _ DATA 30 in sequence according to the first configuration protocol. The node 13 is configured to communicate with the node 21, the node 23 in the second EPA network and the node 12 in the first EPA network. The node 13 is configured to fill in the DATA segments of the corresponding positions with the DATA USER _ DATA 21, USER _ DATA 23, USER _ DATA 13 in sequence according to the first configuration protocol. In the illustrated embodiment, in addition to showing the data section of the first data message, a respective EPA message header and a corresponding frame Check sequence code fcs (frame Check sequences) are included.
For the first DATA packet 411 from the node 11, when the node 12 (i.e. the receiving end) receives the packet sent from the node 11, the DATA segment USER _ DATA 12 at the appointed position of the packet is obtained according to the first configuration protocol. Similarly, the node 13 (i.e., the receiving end) obtains the DATA segment USER _ DATA 13 of the appointed position of the message sent from the node 11 in the same manner. When gateway node 30 receives the first DATA packet from node 11, gateway node 30 (i.e., the receiving end) parses the first DATA packet from node 11 according to the first configuration protocol and thereby obtains the DATA segment USER _ DATA 22 sent to node 22 in the second EPA network. The acquired DATA segment USER DATA 22 intended for transmission to the node 22 in the second EPA network is stored in the DATA interaction module 420, as indicated by the arrow 420.
For the first DATA packet 412 from the node 12, when the node 11 (i.e. the receiving end) receives the packet sent from the node 12, the DATA segment USER _ DATA 11 at the appointed position of the packet is obtained according to the first configuration protocol. Similarly, the node 13 (i.e., the receiving end) acquires the DATA segment USER _ DATA 13 of the predetermined position of the message transmitted from the node 12 in the same manner. When gateway node 30 receives the first DATA packet from node 12, gateway node 30 (i.e., the receiving end) parses the first DATA packet USER _ DATA 30 from node 12 according to the first configuration protocol. The first data packet from node 12 travels within the first EPA network without being sent to the second EPA network.
For the first DATA packet 413 from node 13, when node 12 (i.e. the receiving end) receives the packet sent from node 13, it obtains the DATA segment USER _ DATA 12 located at the appointed position of the packet according to the first configuration protocol. When gateway node 30 receives the first DATA packet from node 13, gateway node 30 (i.e., the receiving end) parses the first DATA packet from node 13 according to the first configuration protocol and thereby obtains the DATA segment USER _ DATA 21 sent to node 21 in the second EPA network and the DATA segment USER _ DATA 23 sent to node 23 in the second EPA network. The acquired DATA segment USER _ DATA 21 intended for transmission to node 21 in the second EPA network and the DATA segment USER _ DATA 23 transmitted to node 23 in the second EPA network are stored in the DATA interaction module 420, as indicated by arrow 430.
As indicated by arrow 450, a second DATA message 440 is generated in a format agreed upon by the second configuration protocol based on the acquired DATA segments USER _ DATA 22, USER _ DATA 21, USER _ DATA 23 intended for transmission to the nodes 22, 21, 23 in the second EPA network.
After generating the second datagram 440, the gateway node 30 may send the generated second datagram 440 to the second EPA network according to the rules of the second stateful protocol. The nodes 21, 22, 23 located in the second EPA network obtain the corresponding data segment from the agreed location of the second data packet according to the second configuration protocol. Thus, cross-network transmission of data can be realized.
There are multiple transmission modes for the second data packet generated by the gateway node. In some embodiments, the generated second datagram may be sent based on a second configuration protocol of a second EPA network. In some embodiments, the gateway node may periodically transmit the second datagram at a predetermined timing as dictated by the second configuration protocol. In other embodiments, the gateway node may trigger the sending operation in response to the generation of the second data packet.
Fig. 5 shows a schematic diagram of a datagram processing flow 500 of a gateway device according to another embodiment of the present application. The process flow 500 of fig. 5 is similar to fig. 4.
The difference is that the gateway node 30 receives the data segment in the data packet 511 from the node 11 as invalid data; and the gateway node 30 receives the data segment in the data packet from node 13 as valid data. In this case, the gateway device may initiate the cross-network transmission upon determining that the received data includes data that requires cross-network transmission. For the first data packet 511 from the node 11, since the data packet from the node 11 is invalid data; therefore, the data at the data interaction module 520 is null data. The second data packet 540 generated by the second protocol stack according to the format agreed by the second configuration protocol is null data at the corresponding agreed position. In some embodiments, the second data message 540 also identifies the data segment as invalid data at the corresponding agreed location.
When the sum of the lengths of the data segments that need to be transmitted across the network exceeds the maximum packet length, for example, in some embodiments, the maximum packet length limit may be ethernet, typically 1518 bytes, and in some embodiments, may be another agreed or fixed limit length. In this case, the second datagram 440 may be processed according to a packetization.
To implement cross-network delivery of data, the first configuration protocol of the node in the first EPA network may include a variety of configurations to implement parsing of the first data packet.
In the illustrated embodiment, the example is given in which the node 11 in the first EPA network performs cross-network data transmission to the node 22 in the second EPA network, and the node 13 in the first EPA network performs cross-network data transmission to the nodes 21 and 23 in the second EPA network, and it is worth to say that this is merely exemplary; the method and the device for transmitting the data in the first EPA network can be applied to the situation that any node in the first EPA network needs to perform cross-network transmission. Fig. 6 illustrates a flow diagram of a method 600 of parsing a first datagram according to one embodiment of the present application. As shown in fig. 6, a method 600 for parsing a first datagram according to a first configuration protocol may include: at step 602, the source IP address of the sending node is obtained from the EPA header of the first data packet from the sending node. At step 604, a data segment is obtained from an agreed upon location of the first data packet according to the first configuration protocol based on the obtained source IP address. The source IP address identifies the IP address of the transmittable node.
The first configuration protocol may agree on the location within the first data message of a data segment intended for transmission to a second node in the second EPA network. Thus, at the gateway node, a data segment intended for transmission to a second node in the second EPA network can be resolved only by the source IP address of the transmitting node, avoiding occupying network resources. The message sending node carries a source IP address, and the receiving node can identify the node equipment of the sending end through the source IP, so that the corresponding data segment can be obtained according to the configuration convention.
Fig. 7 illustrates a flow diagram of a method 700 of parsing a first datagram according to one embodiment of the present application. As shown in fig. 7, a method 700 for parsing a first datagram according to a first configuration protocol may include: at step 702, the first data packet from the sending node is parsed according to the first configuration protocol to obtain a destination IP address of the second node. Obtaining the destination IP address of the second node may include a variety of ways. In some embodiments, the destination IP address may be included in the first datagram itself. In other embodiments, the destination IP address may be obtained at the receiving end (i.e., at the gateway node) via configuration information in the first configuration protocol of the first EPA network. At step 704, a data segment is obtained from the first data packet based on the destination IP address. In this case, the data segment in the first data packet of the sending node includes the destination IP address; therefore, the receiving node does not need to be configured, and the data segment which is intended to be sent to the second node in the second EPA network can be analyzed from the first data message by comparing the IP of the receiving node with the destination IP.
To enable cross-network reception of data, the network node may include multiple implementations of the second configuration protocol to package the second data messages.
In some embodiments, at the network node, the data segment to be sent to the node in the second EPA network is packaged at the predetermined location in accordance with the second configuration protocol. The packaged data segments comprise data segments stored by the data interaction module, and the second configuration protocol agrees on the position of the data segments sent to the nodes in the second EPA network in the second data message. In this case, a node in the second EPA network can conveniently receive the data segment sent to the node based on the second configuration protocol, while avoiding occupying network resources.
In some embodiments, at the network node, parsing the first data packet according to the first configuration protocol further comprises: and analyzing the first data message according to the first configuration protocol to acquire at least the destination IP address of the second node from the first data message. At the network node, the packed data segment includes a destination IP address. In this case, the node in the second EPA network can receive the data segment sent to the node based on the second data packet, so that the receiving node can extract the data segment intended for the corresponding node in the second EPA network from the second data packet without configuration by comparing the receiving node's own IP with the destination IP.
Fig. 8 shows a schematic structural diagram of a gateway device 800 according to another embodiment of the present application. The embodiment of fig. 8 is similar to the embodiment shown in fig. 2. In the fig. 8 embodiment, gateway device 800 may include a number of additional functions to further enhance the functionality of the gateway device.
In some embodiments, as shown in fig. 8, the first protocol stack 810 may include a validity detection module 811, the validity detection module 811 configured to: and determining whether the data segment is valid or not based on the validity identification of the data segment. The gateway device 800 is configured to: in response to determining that the data segment is valid, the data interaction module 820 is caused to store the data segment. Thereby, cross-network transmission of invalid or erroneous data is avoided.
In some embodiments, as shown in fig. 8, the second protocol stack 830 may include a validity generation module 831. The validity generation module 831 can be configured to identify the validity of the data segment in the second data message. Therefore, the validity of the data segment can be judged through the validity identifier, and error transmission is avoided.
In some embodiments, as shown in fig. 8, the gateway device 800 may also include a data verification module 860. Through the data check module 860, non-transparent transmission of cross-network data can be achieved. The data verification module 860 may be configured to verify a data segment received from a sending node in the first EPA network to be sent to a receiving node in the second EPA network, and to cause the data interaction module 820 to store the data segment in response to determining that the data segment passes the verification. In particular, determining, by a processor, whether the valid data segment satisfies a predetermined check condition; and in response to determining that the data segment satisfies the verification condition, causing the data interaction module to store the data segment. In some embodiments, for the valid data segments of the packet received by the first protocol stack of the gateway device 800, the data segments are written into the receive buffer one by one, and read one by one via the processor communication interface unit, and verified by the host before the data interaction module 820 is allowed to store the valid data segments.
Fig. 9 shows a schematic structural diagram of a gateway device 900 according to another embodiment of the present application. The embodiment of fig. 9 is similar to the embodiment shown in fig. 2 and 8. In the embodiment of fig. 9, gateway device 900 may enable efficient cross-network transmission of data.
In some embodiments, as shown in fig. 9, the gateway device 900 may include a filtering module 960. The filtering module 960 may be configured to determine whether the retrieved data segment satisfies a predetermined filtering condition and, in response to the data segment satisfying the filtering condition, cause the data interaction module 920 to store the data segment. Thereby, the acquired data segment from the sending node intended for sending to the node in the second EPA network can be filtered, and only if the data segment satisfies the filtering condition is allowed to be sent to the node in the second EPA network.
In some embodiments, the filtering module 960 may be implemented as a non-transparent transmission. In other embodiments, the filtering module 960 may be implemented as a transparent transport.
In some embodiments, the transparent transmission may be implemented in a tabular manner. The filtering module 960 may be configured to: obtaining a source IP of at least a first node; acquiring a destination IP of at least a second node; in response to determining that the source IP and the destination IP are both included in the preconfigured table, allowing the stored data segment to generate a second data packet to be sent to at least the second node. In some embodiments, the method may further comprise: in response to determining that the source IP and the destination IP are not included in the preconfigured table, discarding the data segment.
Fig. 10 is a block diagram of an electronic device for network communication according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
FIG. 10 illustrates a block diagram of a computing device 1000 capable of implementing various embodiments of the present application. As shown, device 1000 includes a Central Processing Unit (CPU) 1001 that can perform various appropriate actions and processes according to computer program instructions stored in a Read Only Memory (ROM) 1002 or computer program instructions loaded from a storage unit 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data necessary for the operation of the device 1000 can also be stored. The CPU 1001, ROM 1002, and RAM 1003 are connected to each other via a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
A number of components in device 1000 are connected to I/O interface 1005, including: an input unit 1006 such as a keyboard, a mouse, and the like; an output unit 1007 such as various types of displays, speakers, and the like; a storage unit 1008 such as a magnetic disk, an optical disk, or the like; and a communication unit 1009 such as a network card, a modem, a wireless communication transceiver, or the like. The communication unit 1009 allows the device 1000 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The processing unit 1001 performs the various methods and processes described above, such as the processes 300, 600, 700. For example, in some embodiments, the processes 300, 600, 700 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 1000 via ROM 1002 and/or communications unit 1009. When the computer program is loaded into RAM 1003 and executed by CPU 1001, one or more steps of process 200 described above may be performed. Alternatively, in other embodiments, the CPU 1001 may be configured to perform the processes 300, 600, 700 in any other suitable manner (e.g., by way of firmware).
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a load programmable logic device (CPLD), and the like.
Program code for implementing the methods of the present application may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
Further, while operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the application. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (12)

1. A communication method for a gateway device, comprising:
analyzing a first data message from at least a first node in a first EPA network according to a first configuration protocol to acquire a data segment for sending to at least a second node in a second EPA network, wherein the nodes in the first EPA network are networked according to the first configuration protocol, and the nodes in the second EPA network are networked according to a second configuration protocol;
storing the acquired data segment;
and generating a second data message for sending to the at least second node according to the format agreed by the second configuration protocol based on the acquired data segment.
2. The method of claim 1, wherein parsing the first datagram according to a first configuration protocol comprises:
acquiring a source IP address of the at least first node from an EPA message header of the first data message;
and acquiring the data segment from an appointed position of the first data message according to the first configuration protocol based on the acquired source IP address, wherein the source IP address identifies the at least first node, and the first configuration protocol appoints the position of the data segment in the first data message for sending to at least a second node in a second EPA network.
3. The method of claim 1, wherein parsing the first datagram according to the first configuration protocol comprises:
analyzing the first data message according to the first configuration protocol to acquire a destination IP address of the at least second node from the first data message or from configuration information of the first configuration protocol; and
and acquiring the data segment from the first data message based on the destination IP address.
4. The method of claim 1, further comprising:
and according to the second configuration protocol, packaging a data segment to be sent to the at least second node at a preset position in the second data message, wherein the packaged data segment at least comprises a data segment stored by the data interaction module, and the preset position is agreed by the second configuration protocol.
5. The method of claim 4, wherein parsing the first datagram according to the first configuration protocol comprises: and analyzing the first data message according to the first configuration protocol to acquire a destination IP address of the at least second node from the first data message, wherein the destination IP address is included by the packaged data segment.
6. The method of any of claims 1-5, wherein parsing the first datagram according to a first configuration protocol comprises: determining whether the data segment is valid based on the validity identification of the data segment;
storing the retrieved data segment includes causing a data interaction module to store the data segment in response to determining that the data segment is valid.
7. The method of claim 6, storing the retrieved data segment further comprising:
determining, by a processor, whether the valid data segment satisfies a predetermined check condition; and
in response to determining that the data segment satisfies the check condition, causing the data interaction module to store the data segment.
8. The method of any of claims 1-5, further comprising:
determining whether the acquired data segment meets a predetermined filtering condition; and
and in response to the data segment meeting a preset filtering condition, causing the data interaction module to store the data segment.
9. The method of claim 8, further comprising:
obtaining a source IP of the at least first node;
acquiring a destination IP of the at least second node;
in response to determining that the source IP and the destination IP are both included in a preconfigured table, allowing the stored data segment to be used to generate a second data packet to be sent to the at least second node; and
discarding the data segment in response to determining that the source IP and the destination IP are not included in a preconfigured table.
10. A gateway device for an EPA network, comprising:
the first protocol stack is configured to analyze a first data message from at least a first node in a first EPA network according to a first configuration protocol to acquire a data segment for sending to at least a second node in a second EPA network, wherein the nodes in the first EPA network are networked according to the first configuration protocol, and the nodes in the second EPA network are networked according to a second configuration protocol;
a data interaction module configured to store the acquired data segment; and
and the second protocol stack is configured to generate a second data message for sending to the at least second node according to a format agreed by the second configuration protocol based on the acquired data segment.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.
12. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-9.
CN202111417027.7A 2021-11-26 2021-11-26 Communication method for gateway device and gateway device Active CN113839964B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111417027.7A CN113839964B (en) 2021-11-26 2021-11-26 Communication method for gateway device and gateway device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111417027.7A CN113839964B (en) 2021-11-26 2021-11-26 Communication method for gateway device and gateway device

Publications (2)

Publication Number Publication Date
CN113839964A true CN113839964A (en) 2021-12-24
CN113839964B CN113839964B (en) 2022-03-11

Family

ID=78971538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111417027.7A Active CN113839964B (en) 2021-11-26 2021-11-26 Communication method for gateway device and gateway device

Country Status (1)

Country Link
CN (1) CN113839964B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117395327A (en) * 2023-12-12 2024-01-12 浙江国利信安科技有限公司 Method, apparatus and computer readable storage medium for Ethernet access EPA network

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040064537A1 (en) * 2002-09-30 2004-04-01 Anderson Andrew V. Method and apparatus to enable efficient processing and transmission of network communications
CN101159718A (en) * 2007-08-03 2008-04-09 重庆邮电大学 Embedded type industry ethernet safety gateway
CN101420423A (en) * 2007-10-26 2009-04-29 株式会社日立制作所 Network system
CN101582895A (en) * 2009-06-18 2009-11-18 重庆邮电大学 EPA-based embedded industrial wireless WIA-PA gateway
CN101800652A (en) * 2010-02-04 2010-08-11 深圳市金宏威实业发展有限公司 Mode switching method and system of serial port and Ethernet and industrial Ethernet switch
CN110139271A (en) * 2019-04-30 2019-08-16 普联技术有限公司 A kind of method, system and device that smart home device batch configuration networks
CN113452630A (en) * 2020-03-27 2021-09-28 京东方科技集团股份有限公司 Data converging method, data splitting method, device, equipment and storage medium
CN113518044A (en) * 2021-09-15 2021-10-19 浙江国利信安科技有限公司 EPA equipment
CN113556414A (en) * 2021-09-18 2021-10-26 浙江国利信安科技有限公司 Method, gateway device and storage medium for inter-network communication
CN113612801A (en) * 2021-09-30 2021-11-05 浙江国利信安科技有限公司 EPA gateway equipment and EPA cross-network communication method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040064537A1 (en) * 2002-09-30 2004-04-01 Anderson Andrew V. Method and apparatus to enable efficient processing and transmission of network communications
CN101159718A (en) * 2007-08-03 2008-04-09 重庆邮电大学 Embedded type industry ethernet safety gateway
CN101420423A (en) * 2007-10-26 2009-04-29 株式会社日立制作所 Network system
CN101582895A (en) * 2009-06-18 2009-11-18 重庆邮电大学 EPA-based embedded industrial wireless WIA-PA gateway
CN101800652A (en) * 2010-02-04 2010-08-11 深圳市金宏威实业发展有限公司 Mode switching method and system of serial port and Ethernet and industrial Ethernet switch
CN110139271A (en) * 2019-04-30 2019-08-16 普联技术有限公司 A kind of method, system and device that smart home device batch configuration networks
CN113452630A (en) * 2020-03-27 2021-09-28 京东方科技集团股份有限公司 Data converging method, data splitting method, device, equipment and storage medium
CN113518044A (en) * 2021-09-15 2021-10-19 浙江国利信安科技有限公司 EPA equipment
CN113556414A (en) * 2021-09-18 2021-10-26 浙江国利信安科技有限公司 Method, gateway device and storage medium for inter-network communication
CN113612801A (en) * 2021-09-30 2021-11-05 浙江国利信安科技有限公司 EPA gateway equipment and EPA cross-network communication method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117395327A (en) * 2023-12-12 2024-01-12 浙江国利信安科技有限公司 Method, apparatus and computer readable storage medium for Ethernet access EPA network
CN117395327B (en) * 2023-12-12 2024-03-12 浙江国利信安科技有限公司 Method, apparatus and computer readable storage medium for Ethernet access EPA network

Also Published As

Publication number Publication date
CN113839964B (en) 2022-03-11

Similar Documents

Publication Publication Date Title
CN108965484B (en) Internet of things data transmission method, system and terminal
CN113672397B (en) Full-flow storage method, system and equipment
CN105207975A (en) Data transmission method and data transmission system for USB image equipment under VDI architecture
CN104899085A (en) Data processing method and apparatus
CN113839964B (en) Communication method for gateway device and gateway device
CN111294235A (en) Data processing method, device, gateway and readable storage medium
CN113965508B (en) Dual path data transmission method, electronic device, and computer-readable storage medium
WO2013107143A1 (en) Method and device for transmitting interface parameter
US8886913B2 (en) Apparatus and method for identifier management
US9723091B1 (en) Variable length protocol using serialized payload with compression support
CN108289165B (en) Method and device for realizing camera control based on mobile phone and terminal equipment
CN113676521A (en) Service request response method and device and electronic equipment
CN103368956A (en) RFB (remote frame buffer) protocol secure communication method for VNC (virtual network computer) used for server side and RFB proxy server
CN112925297A (en) Automatic driving algorithm verification method, device, equipment, storage medium and product
CN113326060A (en) Service request processing method, device and system and service configuration method and device
CN113163025B (en) Data transmission method, device, equipment and storage medium
CN112769741B (en) Message communication method and electronic equipment
CN113271305B (en) Attack detection method and device and web application level intrusion prevention system WAF
CN115412258A (en) Physical layer interface verification device, method, equipment and storage medium
CN115623070B (en) IDL message processing method and device, electronic equipment and storage medium
US11405217B2 (en) Ensuring data consistency between a modular device and an external system
CN117527726A (en) Bidirectional path communication control system, method, electronic equipment and storage medium
CN113961376A (en) Message middleware switching method and device
CN114928490A (en) Multi-terminal network management and control method and device in container scene, storage medium and electronic equipment
CN116961938A (en) Communication method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant