A message forwarding method, device, apparatus and storage medium
By additionally encapsulating the MAC address in the Profinet RT message, the target optical network unit is determined and forwarded using the MAC address set of the optical network unit, thus solving the communication failure problem caused by the lack of a switch in the passive optical network system and achieving efficient message forwarding.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER
- Filing Date
- 2023-07-05
- Publication Date
- 2026-06-23
AI Technical Summary
In the absence of switches in a passive optical network system, existing technologies cannot effectively utilize VLAN tags for packet forwarding, leading to communication failures.
The destination MAC address and source MAC address are additionally encapsulated in the Profinet RT message. The inclusion relationship between the MAC address set recorded by the optical network unit and the destination MAC address is used to determine the target optical network unit for message forwarding.
It improves the success rate of message forwarding in passive optical network systems and ensures normal communication between devices.
Smart Images

Figure CN116709069B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial internet technology, and in particular to a message forwarding method, apparatus, device and storage medium. Background Technology
[0002] To meet the needs of intelligent transformation, factories are using Passive Optical Networks (PON) instead of Industrial Ethernet to achieve high bandwidth, high speed, and low latency. Industrial equipment in the field generally needs to be connected to Programmable Logic Controllers (PLCs) to issue control commands and automate the production process.
[0003] For standard factory networking, the lower layer of the PON network consists of industrial equipment and PLCs, while the upper layer of the PON network is connected to the switch via the uplink port of the Optical Line Terminal (OLT). The server is also connected to the switch. When forwarding packets, the VLAN tag built into the packet is used for identification and forwarding.
[0004] However, some factories currently lack switches due to cost considerations in their self-modified network structures. This can hinder the use of VLAN tags for identification and forwarding, preventing normal forwarding and affecting communication. Summary of the Invention
[0005] This application provides a message forwarding method, apparatus, device, and storage medium to improve the success rate of message forwarding in passive optical network systems lacking switches.
[0006] In a first aspect, embodiments of this application provide a message forwarding method applied to an optical line terminal in a passive optical network system, comprising:
[0007] Receive a message sent by a first device, wherein the message encapsulates the destination MAC address corresponding to the second device and the source MAC address corresponding to the first device, and the message is a Profinet RT message based on the Profinet communication protocol;
[0008] Based on the inclusion relationship between the MAC address set recorded by the optical network unit and the destination MAC address, the target optical network unit corresponding to the destination MAC address is determined from multiple optical network units that communicate with the optical line terminal. The MAC address set is the source MAC address of the second device recorded before the first device communicates with the second device.
[0009] The message is forwarded to the target optical network unit, so that the target optical network unit sends the message to the second device according to the destination MAC address.
[0010] In some embodiments, if the first device is a server, then the second device is a PLC control device, and the message is used to update the control model of the PLC control device;
[0011] If the first device is a PLC-controlled device, then the second device is an industrial device, and the message is used to control the industrial device;
[0012] If the first device is an industrial device, then the second device is a PLC control device, and the message is used to report the status parameters of the industrial device.
[0013] In some embodiments, the destination MAC address and the source MAC address are encapsulated adjacently in the frame header of the ProfinetRT message, and the number of bytes in both the MAC address and the source MAC address is a set value.
[0014] In some embodiments, determining the target optical network unit corresponding to the destination MAC address from multiple optical network units communicating with the optical line terminal based on the inclusion relationship between the MAC address set recorded by the optical network unit and the destination MAC address includes:
[0015] Query the set of MAC addresses recorded in multiple optical network units that communicate with the optical line terminal;
[0016] The optical network unit containing the destination MAC address in the MAC address set is used as the target optical network unit.
[0017] Secondly, embodiments of this application also provide a message forwarding method, applied to an optical network unit in a passive optical network system, comprising:
[0018] Receive a message sent by a third device, wherein the message encapsulates the destination MAC address corresponding to the fourth device and the source MAC address corresponding to the third device, and the message is a Profinet RT message based on the Profinet communication protocol;
[0019] The message is forwarded to the optical line terminal that is connected to the optical network unit, so that the optical line terminal sends the message to the fourth device.
[0020] In some embodiments, if the third device is a PLC control device, then the fourth device is an industrial device, and the message is used to control the industrial device;
[0021] If the third device is an industrial device, then the fourth device is a PLC control device, and the message is used to report the status parameters of the industrial device.
[0022] In some embodiments, the destination MAC address and the source MAC address are encapsulated adjacently in the frame header of the ProfinetRT message, and the number of bytes in both the MAC address and the source MAC address is a set value.
[0023] Thirdly, embodiments of this application also provide a message forwarding device, applied to an optical line terminal in a passive optical network system, comprising:
[0024] The first receiving unit is used to receive a message sent by the first device, wherein the message encapsulates the destination MAC address corresponding to the second device and the source MAC address corresponding to the first device, and the message is a Profinet RT message based on the Profinet communication protocol.
[0025] The determining unit is used to determine the target optical network unit corresponding to the destination MAC address from multiple optical network units that communicate with the optical line terminal based on the inclusion relationship between the MAC address set recorded by the optical network unit and the destination MAC address. The MAC address set is the source MAC address of the second device recorded before the first device communicates with the second device.
[0026] The first forwarding unit is configured to forward the packet to the target optical network unit, so that the target optical network unit sends the packet to the second device according to the destination MAC address.
[0027] In some embodiments, if the first device is a server, then the second device is a PLC control device, and the message is used to update the control model of the PLC control device;
[0028] If the first device is a PLC-controlled device, then the second device is an industrial device, and the message is used to control the industrial device;
[0029] If the first device is an industrial device, then the second device is a PLC control device, and the message is used to report the status parameters of the industrial device.
[0030] In some embodiments, the destination MAC address and the source MAC address are encapsulated adjacently in the frame header of the ProfinetRT message, and the number of bytes in both the MAC address and the source MAC address is a set value.
[0031] In some embodiments, the determining unit is specifically used for:
[0032] Query the set of MAC addresses recorded in multiple optical network units that communicate with the optical line terminal;
[0033] The optical network unit containing the destination MAC address in the MAC address set is used as the target optical network unit.
[0034] Fourthly, embodiments of this application also provide a message forwarding device, applied to an optical network unit in a passive optical network system, comprising:
[0035] The second receiving unit is used to receive a message sent by the third device, wherein the message encapsulates the destination MAC address corresponding to the fourth device and the source MAC address corresponding to the third device, and the message is a Profinet RT message based on the Profinet communication protocol.
[0036] The second forwarding unit is used to forward the message to the optical line terminal that is connected to the optical network unit, so that the optical line terminal can send the message to the fourth device.
[0037] In some embodiments, if the third device is a PLC control device, then the fourth device is an industrial device, and the message is used to control the industrial device;
[0038] If the third device is an industrial device, then the fourth device is a PLC control device, and the message is used to report the status parameters of the industrial device.
[0039] In some embodiments, the destination MAC address and the source MAC address are encapsulated adjacently in the frame header of the ProfinetRT message, and the number of bytes in both the MAC address and the source MAC address is a set value.
[0040] Fifthly, embodiments of this application also provide an electronic device, including a memory and a processor;
[0041] The memory is used to store instructions;
[0042] The processor is configured to execute instructions stored in the memory, and when the processor executes the instructions stored in the memory, it causes the electronic device to perform the method as described in either the first aspect or the second aspect.
[0043] Sixthly, embodiments of this application also provide a computer storage medium storing instructions that, when executed on a computer, cause the computer to perform the method described in either the first or second aspect.
[0044] This application provides a packet forwarding method, apparatus, device, and storage medium. The packet forwarding method receives a packet sent by a first device, wherein the packet encapsulates a destination MAC address corresponding to a second device and a source MAC address corresponding to the first device. The packet is a Profinet RT packet based on the Profinet communication protocol. Based on the inclusion relationship between the MAC address set recorded by optical network units and the destination MAC address, a target optical network unit corresponding to the destination MAC address is determined from multiple optical network units communicating with optical line terminals. The MAC address set is the source MAC address of the second device recorded before the first device communicates with the second device. The packet is forwarded to the target optical network unit, so that the target optical network unit sends the packet to the second device according to the destination MAC address. Because this application additionally encapsulates the destination MAC address and source MAC address in the Profinet RT packet and forwards the packet based on the additionally encapsulated MAC address instead of forwarding based on the VLAN identifier, the success rate of packet forwarding can be improved in passive optical network systems lacking switches. Attached Figure Description
[0045] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1a This is a schematic diagram of the factory standard network in related technologies;
[0047] Figure 1b A simplified network diagram of the factory in related technologies;
[0048] Figure 2 This application provides a schematic diagram of a message forwarding scenario for a passive optical network system.
[0049] Figure 3 A flowchart illustrating a message forwarding method provided in an embodiment of this application;
[0050] Figure 4 A flowchart illustrating another message forwarding method provided in an embodiment of this application;
[0051] Figure 5 This is a schematic diagram of the structure of a message forwarding device provided in an embodiment of this application;
[0052] Figure 6 A schematic diagram of another message forwarding device provided in the embodiments of this application;
[0053] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art are within the scope of protection of this application.
[0055] To meet the needs of intelligent transformation, factories are using Passive Optical Networks (PON) instead of industrial Ethernet to achieve high bandwidth, high speed, and low latency. Industrial equipment in the factory floor typically connects to PLCs and issues control commands to automate production processes. However, due to the inherent differences between the forwarding rules of PON systems and the Profinet protocol definition, the two are not well compatible. Furthermore, factory networking is complex, and established solutions cannot be directly replicated. Therefore, factories encounter significant obstacles in their intelligent transformation and upgrade using industrial PON due to the unique networking characteristics and PON forwarding issues.
[0056] For factory networking, there are... Figure 1a He Ru Figure 1b Two scenarios:
[0057] like Figure 1a The diagram shows a standard factory network in related technologies. The lower layer of the PON network consists of industrial equipment and PLC controllers. The upper layer of the PON network is connected to a switch via the OLT uplink port, and the central server is also connected to the switch. For this standard factory network, the operation is the same as in a live network, and no problems will arise due to the presence of the switch.
[0058] like Figure 1b As shown, this illustrates a simplified factory network setup in related technologies. For some factories that modify their network architecture themselves, due to budget constraints or by utilizing existing equipment, the OLT uplink port is directly connected to the server, lacking a switch layer. This leads to problems. The PLC itself carries a VLAN 0. When the data flows out from the uplink port, both management and PLC data flows need to be stripped of the Layer 2 (QinQ domain) VLAN tagging within the PON system. However, the OLT uplink port can only hold one UN-TAG VLAN, resulting in a conflict. After stripping, the data is then routed from the server, making it impossible to distinguish between the two flows. In this scenario, using VLAN tags for flow forwarding is no longer feasible. Therefore, a method is needed that allows for normal flow forwarding without adding physical equipment.
[0059] The Profinet message frame structure is shown in Table 1, and it comes with a built-in VLAN. The default VLAN is 0 unless otherwise specified. However, for existing PON devices, firstly, the minimum message length for forwarding is 64 bytes (the automatic byte padding issue has been resolved), and secondly, VLAN 0 is not recognized (and will conflict with already planned VLANs), so it will be automatically discarded. This phenomenon causes PON to be unable to function well as a bearer when embedded in a factory communication network, and it cannot forward Profinet messages correctly.
[0060] Table 1
[0061] 2 Bytes 2 Bytes 2 Bytes 2 Bytes 36-1440 Bytes 2 Bytes 1 Bytes 1 Bytes 4 Bytes Ethtype VLAN Ethtype Frame RT-User Cycle Data Transfer FCS 0x8100 ID 0x8892 ID Data Count Status Status
[0062] The Profinet communication messages used by Siemens PLCs are divided into three types: Profinet TCP / IP, ProfinetRT, and Profinet IRT. Because the Profinet messages used by Siemens PLCs inherently carry VLAN 0, they can conflict with the factory's existing VLANs during network planning. This causes packets coming from the uplink port to be dropped because they cannot be forwarded according to the VLAN. Therefore, an alternative method must be chosen to resolve the forwarding problem caused by VLAN conflicts.
[0063] In process control industries with high control precision requirements, Profinet RT can meet the deterministic requirements and has a high usage rate. Therefore, this application provides a solution for this type of message. Since Profinet RT itself does not carry MAC-related information, its message structure needs to be optimized.
[0064] This application optimizes the message structure of Profinet RT. As shown in Table 2, which is a schematic diagram of the optimized Profinet RT message frame structure provided by this application, the frame structure of the Profinet RT message entering the PON is modified by encapsulating the source MAC address (i.e., Src.Addr in Table 2) and the destination MAC address (i.e., Dest.Addr in Table 2) in the frame header. This allows the message to be forwarded with the MAC identifier during the forwarding process within the PON, avoiding the problem of forwarding failure due to VLAN conflicts.
[0065] Table 2
[0066] 2 Bytes 6 Bytes 6 Bytes 2 Bytes 2 Bytes 2 Bytes 36-1440 Bytes 2 Bytes 1 Bytes 1 Bytes 4 Bytes Ethtype Src.Addr Dest.Addr VLAN Ethtype Frame RT-User Cycle Data Transfer FCS 0x8100 Status Status ID 0x8892 ID Data Count Status Status
[0067] To more clearly illustrate the message forwarding method provided in the embodiments of this application, the following will be combined with... Figure 2 The diagram shown illustrates a message forwarding scenario in a PON system, which serves as a description of the method.
[0068] like Figure 3 The image shows a message forwarding method provided in this application embodiment, applied to the optical line terminal (OLT) in a passive optical network (PON) system. The method includes the following steps:
[0069] S301. Receive a message sent by the first device, wherein the message encapsulates the destination MAC address corresponding to the second device and the source MAC address corresponding to the first device, and the message is a Profinet RT message based on the Profinet communication protocol;
[0070] S302. Based on the inclusion relationship between the MAC address set recorded by the Optical Network Unit (ONU) and the destination MAC address, determine the target optical network unit corresponding to the destination MAC address from multiple optical network units that communicate with the optical line terminal. The MAC address set is the source MAC address of the second device recorded before the first device communicates with the second device.
[0071] S303. Forward the message to the target optical network unit so that the target optical network unit can send the message to the second device according to the destination MAC address.
[0072] The packet forwarding method provided in this application provides an additional encapsulation of the destination MAC address and source MAC address for ProfinetRT packets based on the Profinet communication protocol. This enables packet forwarding between the first and second devices in a passive optical network system lacking a switch, based on the additionally encapsulated MAC address instead of forwarding based on the VLAN identifier. This allows packets to be successfully forwarded, improving the success rate of communication between devices in the passive optical network system.
[0073] In some embodiments, if the first device is a server, then the second device is a PLC control device, and the message is used to update the control model of the PLC control device;
[0074] like Figure 2 As shown, the source MAC address of messages 5 and 6 is xxx05, where xxx05 represents the server address. The destination MAC address of message 5 is xxx03. After receiving message 5, the OLT determines that it should be forwarded to PLC1 under ONU2 based on the destination MAC address xxx03. The destination MAC address of message 6 is xxx04. After receiving message 6, the OLT determines that it should be forwarded to PLC2 under ONU2 based on the destination MAC address xxx04. Both messages 5 and 6 are used to update the control model of the PLC control device.
[0075] In some embodiments, if the first device is a PLC control device, then the second device is an industrial device, and the message is used to control the industrial device;
[0076] like Figure 2 As shown, the source MAC address of message 3 is xxx03, and the source MAC address of message 4 is xxx04. xxx03 represents the address of PLC1, and xxx04 represents the address of PLC2. The destination MAC address of message 3 is xxx01. After receiving message 3, the OLT determines that it should be forwarded to industrial device 1 under ONU1 based on the destination MAC address of message 3, xxx01. The destination MAC address of message 4 is xxx02. After receiving message 4, the OLT determines that it should be forwarded to industrial device 2 under ONU1 based on the destination address of message 4, xxx02. Both messages 3 and 4 are used to control industrial devices.
[0077] In some embodiments, if the first device is an industrial device, then the second device is a PLC control device, and the message is used to report the status parameters of the industrial device.
[0078] like Figure 2 As shown, the source MAC address of message 1 is xxx01, and the source MAC address of message 2 is xxx02. xxx01 represents the address of industrial device 1, and xxx02 represents the address of industrial device 2. The destination MAC address of message 1 is xxx03. After receiving message 1, the OLT determines that it should be forwarded to PLC1 under ONU2 based on the destination MAC address of message 1, xxx03. The destination MAC address of message 2 is xxx04. After receiving message 2, the OLT determines that it should be forwarded to PLC2 under ONU1 based on the destination address of message 2, xxx04. Both message 1 and message 2 are used to report the status parameters of the industrial devices.
[0079] In some embodiments, determining the target optical network unit corresponding to the destination MAC address from multiple optical network units that communicate with the optical line terminal based on the inclusion relationship between the MAC address set recorded by the optical network unit and the destination MAC address may include: querying the MAC address set recorded in multiple optical network units that communicate with the optical line terminal; and selecting the optical network unit whose MAC address set contains the destination MAC address as the target optical network unit.
[0080] For example, such as Figure 2As shown, after receiving message 5, the OLT learns that the destination MAC address of message 5 is xxx03. At this point, it can determine the target ONU from ONU1 and ONU2, which are connected to the OLT. The ONU1 record shows MAC addresses xxx01 and xxx02, but xxx03 is not present in this set. The ONU2 record shows MAC addresses xxx03 and xxx04 (containing xxx03). Therefore, ONU2 is chosen as the target ONU, and the message is forwarded to it. ONU2 then forwards the message to PLC1 based on the destination MAC address xxx03. The principle is the same for other cases, and will not be elaborated further.
[0081] In some embodiments, the destination MAC address and source MAC address are encapsulated adjacently in the frame header of the Profinet RT message, and the number of bytes for both the MAC address and source MAC address is a set value. Specifically, as shown in Table 2 above, they can be encapsulated adjacently before the VLAN identifier in the frame header of the Profinet RT message, and the number of bytes for both the MAC address and source MAC address can be 6 bytes, which can meet the packet forwarding requirements.
[0082] In some embodiments, the MAC address set is the source MAC address of the second device recorded before the first device communicates with the second device. Specifically, for example, before the PLC control device and the industrial equipment begin communication, a time synchronization frame is used to synchronize the clocks of both parties. In this step, the PLC control device can encapsulate its own source MAC address and destination MAC address into the time synchronization frame; when the industrial equipment reports its own status parameters, it can also encapsulate its own source MAC address and destination MAC address.
[0083] Based on the same concept, embodiments of this application also provide a message forwarding method, applied to an optical network unit in a passive optical network system, such as... Figure 4 As shown, it includes:
[0084] S401. Receive a message sent by a third device, wherein the message encapsulates the destination MAC address corresponding to the fourth device and the source MAC address corresponding to the third device, and the message is a Profinet RT message based on the Profinet communication protocol.
[0085] S402. Forward the message to the optical line terminal that is connected to the optical network unit, so that the optical line terminal can send the message to the fourth device.
[0086] In some embodiments, if the third device is a PLC control device, then the fourth device is an industrial device, and the message is used to control the industrial device;
[0087] If the third device is an industrial device, then the fourth device is a PLC control device, and the message is used to report the status parameters of the industrial device.
[0088] In some embodiments, the destination MAC address and the source MAC address are encapsulated adjacently in the frame header of the Profinet RT message, and the number of bytes in both the MAC address and the source MAC address is a set value.
[0089] The message forwarding method applied to the optical network unit side of a passive optical network system is the same in principle as the message forwarding method applied to the optical line terminal in a passive optical network system, and will not be repeated here.
[0090] Based on the same concept, this application also provides a message forwarding device applied to an optical line terminal in a passive optical network system. The implementation of this device can refer to the implementation of the above-described method; repeated details will not be elaborated further. Figure 5 As shown, the message forwarding device includes:
[0091] The first receiving unit 501 is used to receive a message sent by the first device, wherein the message encapsulates the destination MAC address corresponding to the second device and the source MAC address corresponding to the first device, and the message is a Profinet RT message based on the Profinet communication protocol.
[0092] The determining unit 502 is used to determine the target optical network unit corresponding to the destination MAC address from multiple optical network units that communicate with the optical line terminal based on the inclusion relationship between the MAC address set recorded by the optical network unit and the destination MAC address. The MAC address set is the source MAC address of the second device recorded before the first device communicates with the second device.
[0093] The first forwarding unit 503 is used to forward the message to the target optical network unit so that the target optical network unit can send the message to the second device according to the destination MAC address.
[0094] In some embodiments, if the first device is a server, then the second device is a PLC control device, and the message is used to update the control model of the PLC control device;
[0095] If the first device is a PLC-controlled device, then the second device is an industrial device, and the message is used to control the industrial device;
[0096] If the first device is an industrial device, then the second device is a PLC control device, and the message is used to report the status parameters of the industrial device.
[0097] In some embodiments, the destination MAC address and the source MAC address are encapsulated adjacently in the frame header of the Profinet RT message, and the number of bytes in both the MAC address and the source MAC address is a set value.
[0098] In some embodiments, the determining unit 502 is specifically used for:
[0099] Query the set of MAC addresses recorded in multiple optical network units that communicate with the optical line terminal;
[0100] The optical network unit containing the destination MAC address in the MAC address set is used as the target optical network unit.
[0101] Based on the same concept, this application also provides a message forwarding device applied to an optical network unit in a passive optical network system. The implementation of this device can refer to the implementation of the above-described method; repeated details will not be elaborated further. Figure 6 As shown, the message forwarding device includes:
[0102] The second receiving unit 601 is used to receive a message sent by the third device, wherein the message encapsulates the destination MAC address corresponding to the fourth device and the source MAC address corresponding to the third device, and the message is a Profinet RT message based on the Profinet communication protocol.
[0103] The second forwarding unit 602 is used to forward the message to the optical line terminal that communicates with the optical network unit, so that the optical line terminal can send the message to the fourth device.
[0104] In some embodiments, if the third device is a PLC control device, then the fourth device is an industrial device, and the message is used to control the industrial device;
[0105] If the third device is an industrial device, then the fourth device is a PLC control device, and the message is used to report the status parameters of the industrial device.
[0106] In some embodiments, the destination MAC address and the source MAC address are encapsulated adjacently in the frame header of the Profinet RT message, and the number of bytes in both the MAC address and the source MAC address is a set value.
[0107] Based on the same concept, embodiments of this application also provide an electronic device, the implementation of which can refer to the implementation of the above-described method, and repeated details will not be described again. Figure 7 As shown, the electronic device includes a memory 701 and a processor 702;
[0108] Memory 701 is used to store instructions;
[0109] The processor 702 is used to execute instructions stored in the memory 701. When the processor 702 executes the instructions stored in the memory, the device performs the message forwarding method described in any of the preceding claims.
[0110] Furthermore, embodiments of the present invention also provide a computer storage medium storing instructions that, when executed on a computer, cause the computer to perform the message forwarding method described in any of the preceding claims.
[0111] This application provides a packet forwarding method, apparatus, device, and storage medium. The packet forwarding method receives a packet sent by a first device, wherein the packet encapsulates a destination MAC address corresponding to a second device and a source MAC address corresponding to the first device. The packet is a Profinet RT packet based on the Profinet communication protocol. Based on the inclusion relationship between the MAC address set recorded by optical network units and the destination MAC address, a target optical network unit corresponding to the destination MAC address is determined from multiple optical network units communicating with optical line terminals. The MAC address set is the source MAC address of the second device recorded before the first device communicates with the second device. The packet is forwarded to the target optical network unit, so that the target optical network unit sends the packet to the second device according to the destination MAC address. Because this application additionally encapsulates the destination MAC address and source MAC address in the Profinet RT packet and forwards the packet based on the additionally encapsulated MAC address instead of forwarding based on the VLAN identifier, the success rate of packet forwarding can be improved in passive optical network systems lacking switches.
[0112] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0113] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.
[0114] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0115] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0116] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A message forwarding method, characterized in that, Optical line terminals used in passive optical network systems include: Receive a message sent by a first device, wherein the message encapsulates the destination MAC address corresponding to the second device and the source MAC address corresponding to the first device, and the message is a Profinet RT message based on the Profinet communication protocol; Based on the inclusion relationship between the MAC address set recorded by the optical network unit and the destination MAC address, the target optical network unit corresponding to the destination MAC address is determined from multiple optical network units that communicate with the optical line terminal. The MAC address set is the source MAC address of the second device recorded before the first device communicates with the second device. The message is forwarded to the target optical network unit, so that the target optical network unit sends the message to the second device according to the destination MAC address.
2. The method as described in claim 1, characterized in that, If the first device is a server, then the second device is a PLC control device, and the message is used to update the control model of the PLC control device; If the first device is a PLC-controlled device, then the second device is an industrial device, and the message is used to control the industrial device; If the first device is an industrial device, then the second device is a PLC control device, and the message is used to report the status parameters of the industrial device.
3. The method as described in claim 1, characterized in that, The destination MAC address and the source MAC address are encapsulated adjacently in the frame header of the Profinet RT message, and the number of bytes in both the MAC address and the source MAC address is a set value.
4. The method according to any one of claims 1-3, characterized in that, The method of determining the target optical network unit corresponding to the destination MAC address from multiple optical network units communicating with the optical line terminal, based on the inclusion relationship between the MAC address set recorded by the optical network unit and the destination MAC address, includes: Query the set of MAC addresses recorded in multiple optical network units that communicate with the optical line terminal; The optical network unit containing the destination MAC address in the MAC address set is used as the target optical network unit.
5. A message forwarding method, characterized in that, Optical network units used in passive optical network systems include: Receive a message sent by a third device, wherein the message encapsulates the destination MAC address corresponding to the fourth device and the source MAC address corresponding to the third device, and the message is a Profinet RT message based on the Profinet communication protocol; The message is forwarded to the optical line terminal that is connected to the optical network unit, so that the optical line terminal sends the message to the fourth device according to the destination MAC address.
6. The method as described in claim 5, characterized in that, If the third device is a PLC control device, then the fourth device is an industrial device, and the message is used to control the industrial device; If the third device is an industrial device, then the fourth device is a PLC control device, and the message is used to report the status parameters of the industrial device.
7. The method as described in claim 5, characterized in that, The destination MAC address and the source MAC address are encapsulated adjacently in the frame header of the Profinet RT message, and the number of bytes in both the MAC address and the source MAC address is a set value.
8. A message forwarding device, characterized in that, Optical line terminals used in passive optical network systems include: The first receiving unit is used to receive a message sent by the first device, wherein the message encapsulates the destination MAC address corresponding to the second device and the source MAC address corresponding to the first device, and the message is a Profinet RT message based on the Profinet communication protocol. The determining unit is used to determine the target optical network unit corresponding to the destination MAC address from multiple optical network units that communicate with the optical line terminal based on the inclusion relationship between the MAC address set recorded by the optical network unit and the destination MAC address. The MAC address set is the source MAC address of the second device recorded before the first device communicates with the second device. The first forwarding unit is configured to forward the packet to the target optical network unit, so that the target optical network unit sends the packet to the second device according to the destination MAC address.
9. The apparatus as claimed in claim 8, characterized in that, If the first device is a server, then the second device is a PLC control device, and the message is used to update the control model of the PLC control device; If the first device is a PLC-controlled device, then the second device is an industrial device, and the message is used to control the industrial device; If the first device is an industrial device, then the second device is a PLC control device, and the message is used to report the status parameters of the industrial device.
10. The apparatus as claimed in claim 8, characterized in that, The destination MAC address and the source MAC address are encapsulated adjacently in the frame header of the Profinet RT message, and the number of bytes in both the MAC address and the source MAC address is a set value.
11. The apparatus according to any one of claims 8-10, characterized in that, The determining unit is specifically used for: Query the set of MAC addresses recorded in multiple optical network units that communicate with the optical line terminal; The optical network unit containing the destination MAC address in the MAC address set is used as the target optical network unit.
12. A message forwarding device, characterized in that, Optical network units used in passive optical network systems include: The second receiving unit is used to receive a message sent by the third device, wherein the message encapsulates the destination MAC address corresponding to the fourth device and the source MAC address corresponding to the third device, and the message is a Profinet RT message based on the Profinet communication protocol. The second forwarding unit is used to forward the message to the optical line terminal that is connected to the optical network unit, so that the optical line terminal sends the message to the fourth device according to the destination MAC address.
13. The apparatus as claimed in claim 12, characterized in that, If the third device is a PLC control device, then the fourth device is an industrial device, and the message is used to control the industrial device; If the third device is an industrial device, then the fourth device is a PLC control device, and the message is used to report the status parameters of the industrial device.
14. The apparatus as claimed in claim 12, characterized in that, The destination MAC address and the source MAC address are encapsulated adjacently in the frame header of the Profinet RT message, and the number of bytes in both the MAC address and the source MAC address is a set value.
15. An electronic device, characterized in that, Including memory and processor; The memory is used to store instructions; The processor is configured to execute instructions stored in the memory, and when the processor executes the instructions stored in the memory, causes the electronic device to perform the method as described in any one of claims 1-7.
16. A computer storage medium, characterized in that, The computer storage medium stores instructions that, when executed on the computer, cause the computer to perform the method as described in any one of claims 1-7.