Data frame real-time forwarding method and device, equipment and storage medium

By performing real-time address comparison and forwarding instructions on downlink data frames in a hybrid network topology, the problem of data frame forwarding delay in the prior art is solved, and the real-timeness of data frame forwarding is improved.

CN119854208AActive Publication Date: 2025-04-18BEIJING FANGXIN SEMICON CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510320178.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-04-18
Estimated Expiration
2045-03-18

AI Technical Summary

Technical Problem

The existing hybrid network topology needs to complete address identification before forwarding when forwarding data frames, resulting in processing delays and reducing the real-time nature of data frame forwarding.

Method used

While forwarding downlink data frames to the subnet, the target address of the downlink data frame is compared with the node address of the subnet, and the forwarding instruction is determined based on the comparison result, and the forwarding instruction is executed.

Benefits of technology

By processing data transmission and address recognition in parallel, the real-timeness of data frame forwarding is improved and the forwarding delay of data frames is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854208A_ABST
    Figure CN119854208A_ABST
Patent Text Reader

Abstract

The invention discloses a data frame real-time forwarding method and device, equipment and a storage medium. The method comprises the following steps: acquiring a downlink data frame from a main network; the downlink data frame is a data frame forwarded to a sub-network through a main network; when the downlink data frame is forwarded to a sub-network, comparing a target address of the downlink data frame with a node address of the sub-network to obtain an address comparison result corresponding to the downlink data frame; and determining a forwarding instruction corresponding to the downlink data frame according to the address comparison result corresponding to the downlink data frame, and executing the forwarding instruction. According to the method provided by the invention, the obtained downlink data frame is directly forwarded, and address comparison is carried out at the same time, so that the real-time performance of data frame forwarding is improved, and the forwarding delay of the data frame is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication technology, and in particular to a method, device, equipment and storage medium for real-time forwarding of data frames. Background Art

[0002] With the widespread use of computer networks, different application scenarios have put forward different requirements for network performance, reliability, scalability, etc. For example, enterprise networks require high reliability and scalability to support a large number of employees and business systems; while home networks focus more on cost and ease of use. Therefore, hybrid network topologies are usually adopted, combining different topologies to improve network performance and optimize data transmission paths.

[0003] In the prior art, when a hybrid network topology forwards data between different networks or nodes, the address of the data frame is usually identified first, and then the data frame is forwarded after the address is confirmed to be correct. The address identification step needs to be completed before forwarding, which will bring certain processing delays and reduce the real-time performance of data frame forwarding. Summary of the invention

[0004] Based on the above problems, the present application provides a data frame real-time forwarding method, device, equipment and storage medium, the purpose of which is to improve the real-time performance of data frame forwarding and reduce the forwarding delay of data frames.

[0005] The embodiments of the present application disclose the following technical solutions: In a first aspect, the present application provides a method for real-time forwarding of data frames, the method comprising: Acquire a downlink data frame from the main network; the downlink data frame is a data frame forwarded from the main network to the sub-network; While forwarding the downlink data frame to the sub-network, comparing the target address of the downlink data frame with the node address of the sub-network to obtain an address comparison result corresponding to the downlink data frame; According to the address comparison result corresponding to the downlink data frame, a forwarding instruction corresponding to the downlink data frame is determined, and the forwarding instruction is executed.

[0006] Optionally, in the method as described above, determining the forwarding instruction corresponding to the downlink data frame according to the address comparison result corresponding to the downlink data frame, and executing the forwarding instruction includes: If the address comparison result of the downlink data frame is that the addresses are the same, determining that the forwarding instruction corresponding to the downlink data frame is to continue forwarding, and continuing the forwarding operation of the downlink data frame; or, If the address comparison result of the downlink data frame is that the addresses are not the same, it is determined that the forwarding instruction corresponding to the downlink data frame is to stop forwarding, and the forwarding operation of the downlink data frame is stopped.

[0007] Optionally, the method as described above further includes: Adding the serial number identifier of the downlink data frame and the address comparison result of the downlink data frame to a frame address comparison list; the frame address comparison list is used to query the address comparison result; In response to an uplink data frame obtained from the sub-network, determining an address comparison result corresponding to the uplink data frame from the frame address comparison list; the uplink data frame is a data frame forwarded to the main network through the sub-network; If the address comparison result corresponding to the uplink data frame is that the addresses are the same, the forwarding operation of the uplink data frame is continued; or, if the address comparison result corresponding to the uplink data frame is that the addresses are not the same, the forwarding operation of the uplink data frame is stopped.

[0008] Optionally, in the method as described above, adding the sequence number identifier of the downlink data frame and the address comparison result of the downlink data frame to the frame address comparison list includes: While forwarding the downlink data frame to the subnetwork, using a counter to generate a sequence number identifier corresponding to the downlink data frame, and adding the sequence number identifier to the corresponding downlink data frame; The sequence number identifier corresponding to the downlink data frame and the address comparison result corresponding to the downlink data frame are stored in a frame address comparison list.

[0009] Optionally, in the method as described above, in response to the uplink data frame obtained from the subnetwork, determining the address comparison result corresponding to the uplink data frame from the frame address comparison list includes: While acquiring the uplink data frame from the subnetwork, determining the second sequence number identifier of the uplink data frame according to the first sequence number identifier of the last uplink data frame acquired; According to the second sequence number identifier, the address comparison result corresponding to the second sequence number identifier is queried from the frame address comparison list; the address comparison result corresponding to the second sequence number identifier is the address comparison result corresponding to the uplink data frame.

[0010] Optionally, in the method described above, the uplink data frame and the downlink data frame have the same data frame format.

[0011] In a second aspect, the present application provides a data frame real-time forwarding device, comprising: An acquisition module, used to acquire a downlink data frame from the main network; the downlink data frame is a data frame forwarded from the main network to the sub-network; A first processing module is used to compare the target address of the downlink data frame with the node address of the sub-network while forwarding the downlink data frame to the sub-network, so as to obtain the address comparison result corresponding to the downlink data frame; The second processing module is used to determine the forwarding instruction corresponding to the downlink data frame according to the address comparison result corresponding to the downlink data frame, and execute the forwarding instruction.

[0012] In a third aspect, the present application provides a hybrid network topology, including: a main network, multiple sub-networks, and a data frame real-time forwarding device corresponding to each of the multiple sub-networks; The main network adopts fieldbus technology; the sub-network adopts Ethercat network; The sub-network communicates with the main network through a data frame real-time forwarding device corresponding to the sub-network; The data frame real-time forwarding device is used to implement the data frame real-time forwarding method described in any one of the above embodiments.

[0013] In a fourth aspect, the present application provides an electronic device, the device comprising: a processor, and a memory communicatively connected to the processor; Memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the data frame real-time forwarding method described in any of the above embodiments.

[0014] In a fifth aspect, the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement the real-time forwarding method for data frames described in any of the above embodiments.

[0015] Compared with the prior art, this application has the following beneficial effects: A downlink data frame is obtained from the main network, and while forwarding the downlink data frame to the sub-network, the target address of the downlink data frame is compared with the node address of the sub-network to obtain the address comparison result corresponding to the downlink data frame, thereby determining the forwarding instruction corresponding to the downlink data frame according to the address comparison result corresponding to the downlink data frame, and executing the forwarding instruction. When the method of the present application obtains the downlink data frame, the downlink data frame is directly forwarded while performing address comparison to execute the corresponding forwarding instruction according to the comparison result, thereby improving the real-time performance of data frame forwarding and reducing the forwarding delay of the data frame. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0017] Figure 1 A flowchart of an embodiment of a method for real-time forwarding of data frames provided by the present application; Figure 2 A flowchart of another embodiment of a method for real-time forwarding of data frames provided by the present application; Figure 3 A flowchart of another embodiment of a method for real-time forwarding of data frames provided by the present application; Figure 4 A flowchart of another embodiment of a method for real-time forwarding of data frames provided by the present application; Figure 5 A schematic diagram of the structure of an embodiment of a data frame real-time forwarding device provided by the present application; Figure 6 A schematic structural diagram of another embodiment of a data frame real-time forwarding device provided by the present application; Figure 7 A schematic diagram of the structure of an embodiment of a hybrid network topology provided by the present application; Figure 8 A schematic structural diagram of an embodiment of an electronic device provided in the present application. DETAILED DESCRIPTION

[0018] As described above, in a computer network, in a hybrid network topology, when data needs to be transmitted between different networks or nodes, the system will first check the destination address of the data frame to ensure that the address is correct before forwarding the data. However, this address verification process must be completed before forwarding, so it will introduce a certain time delay, thus affecting the immediacy of data frame forwarding.

[0019] After research, the present application proposes a real-time forwarding method, device, equipment and storage medium for data frames to improve the real-time performance of data frame forwarding and reduce the forwarding delay of data frames.

[0020] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0021] See also Figure 1 , which is a flow chart of an embodiment of a data frame real-time forwarding method provided by the present application. The method is applied through a data frame real-time forwarding device, and the method includes: S101: Obtain a downlink data frame from the main network, wherein the downlink data frame is a data frame forwarded from the main network to the sub-network.

[0022] S102: While forwarding the downlink data frame to the sub-network, a target address of the downlink data frame is compared with a node address of the sub-network to obtain an address comparison result corresponding to the downlink data frame.

[0023] In this embodiment, when a downlink data frame is obtained through the main network, the downlink data frame is directly forwarded to the sub-network. At the same time, the downlink data frame is parsed, the destination address in the downlink data frame is identified, and the destination address of the downlink data frame is compared with the node address of the current sub-network to determine whether the downlink data frame should be forwarded to the current sub-network.

[0024] For example, if the subnetwork includes subnetwork 1 and subnetwork 2, subnetwork 1 communicates with the main network through real-time data frame forwarding device 1, and subnetwork 2 communicates with the main network through real-time data frame forwarding device 2. In the real-time data frame forwarding device corresponding to each subnetwork, the downlink data frame sent by the main network is received, and the downlink data frame is directly forwarded to the corresponding subnetwork. At the same time, the real-time data frame forwarding device identifies the target address of the downlink data frame, and compares the target address with the node address of the corresponding subnetwork stored in the real-time data frame forwarding device, thereby obtaining the address comparison result corresponding to the downlink data frame in the current subnetwork.

[0025] S103: Determine a forwarding instruction corresponding to the downlink data frame according to the address comparison result corresponding to the downlink data frame, and execute the forwarding instruction.

[0026] In this embodiment, if the address comparison result of the downlink data frame is that the address is the same, the forwarding instruction corresponding to the downlink data frame is determined to be continued forwarding, and the forwarding operation of the downlink data frame is continued. Alternatively, if the address comparison result of the downlink data frame is that the address is not the same, the forwarding instruction corresponding to the downlink data frame is determined to be stop forwarding, and the forwarding operation of the downlink data frame is stopped.

[0027] In this embodiment, a downlink data frame is obtained from the main network, and then while forwarding the downlink data frame to the sub-network, the target address of the downlink data frame is compared with the node address of the sub-network to obtain the address comparison result corresponding to the downlink data frame, thereby determining the forwarding instruction corresponding to the downlink data frame according to the address comparison result corresponding to the downlink data frame, and executing the forwarding instruction. When the method of the present application obtains the downlink data frame, the address comparison is performed while the downlink data frame is directly forwarded, so as to execute the corresponding forwarding instruction according to the comparison result, thereby realizing the parallel processing of data transmission and address recognition, thereby improving the real-time performance of data frame forwarding and reducing the forwarding delay of the data frame.

[0028] Further, based on the above embodiment, a specific implementation of "determining the forwarding instruction corresponding to the downlink data frame according to the address comparison result corresponding to the downlink data frame, and executing the forwarding instruction" in S103 includes: If the address comparison result of the downlink data frame is that the addresses are the same, it is determined that the forwarding instruction corresponding to the downlink data frame is to continue forwarding, and the forwarding operation of the downlink data frame is continued.

[0029] or, If the address comparison result of the downlink data frame is that the addresses are not the same, it is determined that the forwarding instruction corresponding to the downlink data frame is to stop forwarding, and the forwarding operation of the downlink data frame is stopped.

[0030] In this embodiment, when the address comparison result of the downlink data frame is that the target address of the downlink data frame is the same as the node address of the sub-network, it is determined that the forwarding instruction corresponding to the current downlink data frame is to continue forwarding, and the forwarding operation of the current downlink data frame is continued. When the address comparison result of the downlink data frame is that the target address of the downlink data frame is not the same as the node address of the sub-network, it is determined that the forwarding instruction corresponding to the current downlink data frame is to stop forwarding, and the forwarding operation of the downlink data frame is stopped.

[0031] In this embodiment, if the address comparison result of the downlink data frame is that the address is the same, the forwarding instruction corresponding to the downlink data frame is determined to be continue forwarding, and the forwarding operation of the downlink data frame is continued; however, once the address mismatch is found, the forwarding operation is interrupted, and the downlink data frame becomes a residual frame. The residual frame does not affect the internal devices of the self-network, thereby reducing the delay in data transmission and improving the real-time performance of data transmission.

[0032] See also Figure 2 , which is a flow chart of another embodiment of a method for real-time forwarding of data frames provided by the present application. After the main network sends a downlink data frame to the sub-network, the sub-network returns an uplink data frame corresponding to the downlink data frame. Therefore, in order to improve the real-time forwarding of the uplink data frame, based on the above embodiment, the method may further include: S104: Add the serial number identifier of the downlink data frame and the address comparison result of the downlink data frame to a frame address comparison list, wherein the frame address comparison list is used to query the address comparison result.

[0033] In this embodiment, while forwarding the downlink data frame to the subnetwork, the frame ID counter is started to generate a serial number identifier corresponding to the downlink data frame to ensure that each data frame can obtain a unique and increasing serial number. In addition, this serial number identifier is usually embedded in a specific field of the data frame and transmitted along with the data frame. The serial number identifier of the downlink data frame and its corresponding uplink data frame is the same serial number identifier. The serial number identifier is added to the corresponding downlink data frame header or specific field so that subsequent processing can easily identify it; then the serial number identifier corresponding to the downlink data frame and the address comparison result corresponding to the downlink data frame are stored together in the frame address comparison list.

[0034] S105: In response to the uplink data frame obtained from the sub-network, determine the address comparison result corresponding to the uplink data frame from the frame address comparison list.

[0035] The uplink data frame is a data frame forwarded to the main network through the sub-network; the data frame format of the uplink data frame is the same as that of the downlink data frame.

[0036] In this embodiment, while obtaining the uplink data frame from the subnetwork, the sequence number identifier of the previous uplink data frame is obtained, thereby determining the sequence number identifier of the current uplink data frame. Then, the frame address comparison list is immediately accessed to query the address comparison result corresponding to the sequence number identifier in the list according to the sequence number identifier of the current uplink data frame, and the address comparison result obtained is the address matching result of the current uplink data frame.

[0037] S106: If the address comparison result corresponding to the uplink data frame is that the addresses are the same, then continue the forwarding operation of the uplink data frame; or, if the address comparison result corresponding to the uplink data frame is that the addresses are not the same, then stop the forwarding operation of the uplink data frame.

[0038] In this embodiment, when the address comparison result corresponding to the uplink data frame is that the addresses are the same, the forwarding operation of the uplink data frame is continued to forward the uplink data frame from the sub-network to the main network. When the address comparison result corresponding to the uplink data frame is that the addresses are not the same, the forwarding operation of the uplink data frame is stopped, and the current uplink data frame will not be forwarded to the main network.

[0039] In this embodiment, the sequence number identifier of the downlink data frame and the address comparison result of the downlink data frame are added to the frame address comparison list; then in response to the uplink data frame obtained from the subnetwork, the address comparison result corresponding to the uplink data frame is determined from the frame address comparison list, if the address comparison result corresponding to the uplink data frame is that the address is the same, the forwarding operation of the uplink data frame is continued; or, if the address comparison result corresponding to the uplink data frame is that the address is not the same, the forwarding operation of the uplink data frame is stopped, thereby realizing real-time forwarding of the uplink data frame, improving the real-time performance of the forwarding of the uplink data frame, and reducing the delay in the forwarding of the uplink data frame.

[0040] See also Figure 3 , which is a flow chart of another embodiment of a real-time forwarding method for data frames provided by the present application. Based on the above embodiment, a specific implementation of "adding the sequence number identifier of the downlink data frame and the address comparison result of the downlink data frame to the frame address comparison list" in S104 includes: S1041: while forwarding the downlink data frame to the sub-network, a counter is used to generate a sequence number identifier corresponding to the downlink data frame, and the sequence number identifier is added to the corresponding downlink data frame.

[0041] In this embodiment, while forwarding the downlink data frame to the subnetwork, the downlink data frame is counted using a frame ID counter to generate a sequence number identifier corresponding to the current downlink data frame, and the sequence number identifier is added to any position of the downlink data frame, which can be added to the frame header or after the target address.

[0042] S1042: Store the sequence number identifier corresponding to the downlink data frame and the address comparison result corresponding to the downlink data frame into a frame address comparison list.

[0043] In this embodiment, the serial number identifier corresponding to the downlink data frame and the address comparison result corresponding to the downlink data frame are stored in the frame address comparison list. Since the data frame is forwarded using a first-in, first-out queue (First In, First Out, FIFO), the frame address comparison list maintains the address comparison result corresponding to each downlink data frame according to the serial number identifier.

[0044] In this embodiment, while forwarding the downlink data frame to the subnetwork, a counter is used to generate a serial number identifier corresponding to the downlink data frame, and the serial number identifier is added to the corresponding downlink data frame. The serial number identifier corresponding to the downlink data frame and the address comparison result corresponding to the downlink data frame are then stored in a frame address comparison list, which facilitates quick retrieval and subsequent data frame management, and ensures the orderliness and traceability of data frame forwarding.

[0045] See also Figure 4 , which is a flow chart of another embodiment of a data frame real-time forwarding method provided by the present application. On the basis of the above embodiments, since the forwarding order of the uplink data frame is the same as the forwarding order of the downlink data frame, the uplink data frame is also forwarded in real time, and the address and sequence number identifier of the current uplink data frame cannot be checked in real time, the address and sequence number identifier of the previous uplink data frame that has been forwarded can be queried to determine the address comparison result corresponding to the uplink data frame from the frame address comparison list. Therefore, a specific implementation method of "determining the address comparison result corresponding to the uplink data frame from the frame address comparison list in response to the uplink data frame obtained from the subnetwork" in S105 includes: S1051: while acquiring an uplink data frame from the subnetwork, determine a second sequence number identifier of the uplink data frame according to the first sequence number identifier of the last acquired uplink data frame.

[0046] In this embodiment, for example, when an uplink data frame is obtained from the subnetwork, the first sequence number of the previous uplink data frame is obtained as 018. Then, the second sequence number corresponding to the current uplink data frame is obtained by adding one to the first sequence number, that is, 019.

[0047] S1052: According to the second sequence number identifier, query the address comparison result corresponding to the second sequence number identifier from the frame address comparison list, wherein the address comparison result corresponding to the second sequence number identifier is the address comparison result corresponding to the uplink data frame.

[0048] In this embodiment, the address comparison result corresponding to the downlink data frame corresponding to the sequence number 019 can be queried from the frame address comparison list. Since the downlink data frame has the same sequence number as its corresponding uplink data frame, the address comparison result corresponding to the second sequence number obtained is the address comparison result corresponding to the current uplink data frame.

[0049] In this embodiment, while obtaining an uplink data frame from a subnetwork, the second sequence number identifier of the uplink data frame is determined based on the first sequence number identifier of the last uplink data frame obtained; and then, based on the second sequence number identifier, the address comparison result corresponding to the second sequence number identifier is queried from the frame address comparison list. By utilizing the fact that the sequence number identifiers of the uplink data frame and its corresponding downlink data frame are the same, the address comparison result of the uplink data frame can be quickly determined by querying the frame address comparison list while obtaining the uplink data frame, completing the fast address comparison, improving the real-time performance of the uplink data frame forwarding, and reducing the delay of the uplink data frame forwarding.

[0050] See also Figure 5 , which is a schematic diagram of the structure of an embodiment of a data frame real-time forwarding device provided by the present application. The device 50 includes: an acquisition module 51, a first processing module 52 and a second processing module 53.

[0051] The acquisition module 51 is used to acquire a downlink data frame from the main network; the downlink data frame is a data frame forwarded from the main network to the sub-network. The first processing module 52 is used to compare the target address of the downlink data frame with the node address of the sub-network while forwarding the downlink data frame to the sub-network, and obtain the address comparison result corresponding to the downlink data frame. The second processing module 53 is used to determine the forwarding instruction corresponding to the downlink data frame according to the address comparison result corresponding to the downlink data frame, and execute the forwarding instruction.

[0052] A data frame real-time forwarding device provided in an embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0053] Further, based on the above embodiment, the second processing module 53 is specifically used to determine that the forwarding instruction corresponding to the downlink data frame is to continue forwarding if the address comparison result of the downlink data frame is that the address is the same, and continue the forwarding operation of the downlink data frame; or, if the address comparison result of the downlink data frame is that the address is not the same, then determine that the forwarding instruction corresponding to the downlink data frame is to stop forwarding, and stop the forwarding operation of the downlink data frame.

[0054] A data frame real-time forwarding device provided in an embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0055] See also Figure 6 , which is a schematic diagram of the structure of another embodiment of a data frame real-time forwarding device provided by the present application. Based on the above embodiment, the device 50 may further include a third processing module 54.

[0056] The third processing module 54 is used to add the serial number identifier of the downlink data frame and the address comparison result of the downlink data frame to the frame address comparison list; the frame address comparison list is used to query the address comparison result; in response to the uplink data frame obtained from the subnetwork, the address comparison result corresponding to the uplink data frame is determined from the frame address comparison list; the uplink data frame is a data frame forwarded to the main network through the subnetwork; if the address comparison result corresponding to the uplink data frame is that the address is the same, the forwarding operation of the uplink data frame is continued; or, if the address comparison result corresponding to the uplink data frame is that the address is not the same, the forwarding operation of the uplink data frame is stopped.

[0057] A data frame real-time forwarding device provided in an embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0058] Further, based on the above embodiments, the third processing module 54 is specifically used to use a counter to generate a serial number identifier corresponding to the downlink data frame while forwarding the downlink data frame to the subnetwork, and add the serial number identifier to the corresponding downlink data frame; store the serial number identifier corresponding to the downlink data frame and the address comparison result corresponding to the downlink data frame in the frame address comparison list.

[0059] A data frame real-time forwarding device provided in an embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0060] Further, based on the above embodiment, the third processing module 54 is specifically used to determine the second sequence number identifier of the uplink data frame based on the first sequence number identifier of the previous uplink data frame obtained while obtaining the uplink data frame from the subnetwork; based on the second sequence number identifier, query the address comparison result corresponding to the second sequence number identifier from the frame address comparison list, and the address comparison result corresponding to the second sequence number identifier is the address comparison result corresponding to the uplink data frame.

[0061] A data frame real-time forwarding device provided in an embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0062] See also Figure 7 , which is a schematic diagram of the structure of an embodiment of a hybrid network topology provided by the present application. It includes: a main network, multiple sub-networks, and a real-time data frame forwarding device corresponding to each of the multiple sub-networks; The main network uses fieldbus technology; the sub-network uses Ethercat network; The sub-network communicates with the main network through the real-time forwarding device of the data frame corresponding to the sub-network; The data frame real-time forwarding device is used to implement the data frame real-time forwarding method described in any one of the above embodiments.

[0063] In this embodiment, the hybrid network topology is a two-level network topology. Among them, the first-level network is the main network, using fieldbus technology, and all sub-networks are connected to the same bus; the second-level network is at least one sub-network, using Ethercat network. Data frames are forwarded between the main network and the sub-network through a real-time data frame forwarding device, so that each sub-network can be hot-plugged at any time without affecting other sub-networks. At the same time, access to multiple Ethercat terminals within the sub-network is low-latency and high-speed. When the number needs to be expanded, it can also be expanded on the sub-network. Since the main network and the sub-network transmit at the same speed, the entire network can reach the transmission rate of industrial Ethernet, improving the transmission rate of the network topology.

[0064] It is understandable that an Ethercat network can be one Ethercat terminal or multiple Ethercat terminals, with a maximum of 65535. The number of real-time data frame forwarding devices directly connected to the main network is limited to 32 or 64 at most because they share a bus while achieving high-speed transmission.

[0065] A data frame real-time forwarding device provided in an embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0066] See also Figure 8 , which is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. The electronic device 80 may include: a processor 81 and a memory 82.

[0067] The processor 81 is in communication connection with the memory 82 , and the memory 82 is used to store computer-executable instructions; the processor 81 is configured to execute the technical solution in any of the aforementioned method embodiments by executing the computer-executable instructions stored in the memory 82 .

[0068] Optionally, the memory 82 may be independent or integrated with the processor 81. Optionally, when the memory 82 is a device independent of the processor 81, the electronic device 80 may further include: a bus for connecting the above devices.

[0069] The electronic device is used to execute the technical solution in any of the aforementioned method embodiments, and its implementation principle and technical effect are similar and will not be repeated here.

[0070] An embodiment of the present application also provides a computer-readable storage medium, which stores computer execution instructions. When the computer execution instructions are executed by a processor, they are used to implement the above-mentioned method. The implementation principle and technical effect are similar and will not be repeated here.

[0071] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is merely schematic, in which the unit described as a separate component may or may not be physically separated, and the component prompted as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

[0072] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for real-time forwarding of data frames, characterized in that: The method comprises: Acquire a downlink data frame from the main network; the downlink data frame is a data frame forwarded from the main network to the sub-network; While forwarding the downlink data frame to the sub-network, comparing the target address of the downlink data frame with the node address of the sub-network to obtain an address comparison result corresponding to the downlink data frame; According to the address comparison result corresponding to the downlink data frame, a forwarding instruction corresponding to the downlink data frame is determined, and the forwarding instruction is executed.

2. The method according to claim 1, characterized in that The step of determining a forwarding instruction corresponding to the downlink data frame according to an address comparison result corresponding to the downlink data frame, and executing the forwarding instruction, comprises: If the address comparison result of the downlink data frame is that the addresses are the same, determining that the forwarding instruction corresponding to the downlink data frame is to continue forwarding, and continuing the forwarding operation of the downlink data frame; or, If the address comparison result of the downlink data frame is that the addresses are not the same, it is determined that the forwarding instruction corresponding to the downlink data frame is to stop forwarding, and the forwarding operation of the downlink data frame is stopped.

3. The method according to claim 1, characterized in that The method further comprises: Adding the serial number identifier of the downlink data frame and the address comparison result of the downlink data frame to a frame address comparison list; the frame address comparison list is used to query the address comparison result; In response to an uplink data frame obtained from the sub-network, determining an address comparison result corresponding to the uplink data frame from the frame address comparison list; the uplink data frame is a data frame forwarded to the main network through the sub-network; If the address comparison result corresponding to the uplink data frame is that the addresses are the same, the forwarding operation of the uplink data frame is continued; or, if the address comparison result corresponding to the uplink data frame is that the addresses are not the same, the forwarding operation of the uplink data frame is stopped.

4. The method according to claim 3, characterized in that The step of adding the sequence number identifier of the downlink data frame and the address comparison result of the downlink data frame to a frame address comparison list includes: While forwarding the downlink data frame to the subnetwork, using a counter to generate a sequence number identifier corresponding to the downlink data frame, and adding the sequence number identifier to the corresponding downlink data frame; The sequence number identifier corresponding to the downlink data frame and the address comparison result corresponding to the downlink data frame are stored in a frame address comparison list.

5. The method according to claim 3, characterized in that: The step of determining, in response to the uplink data frame obtained from the subnetwork, an address comparison result corresponding to the uplink data frame from the frame address comparison list comprises: While acquiring the uplink data frame from the subnetwork, determining the second sequence number identifier of the uplink data frame according to the first sequence number identifier of the last uplink data frame acquired; According to the second sequence number identifier, the address comparison result corresponding to the second sequence number identifier is queried from the frame address comparison list; the address comparison result corresponding to the second sequence number identifier is the address comparison result corresponding to the uplink data frame.

6. The method according to claim 3, characterized in that The uplink data frame has the same data frame format as the downlink data frame.

7. A data frame real-time forwarding device, characterized in that: include: An acquisition module, used to acquire a downlink data frame from the main network; the downlink data frame is a data frame forwarded from the main network to the sub-network; A first processing module is used to compare the target address of the downlink data frame with the node address of the sub-network while forwarding the downlink data frame to the sub-network, so as to obtain the address comparison result corresponding to the downlink data frame; The second processing module is used to determine the forwarding instruction corresponding to the downlink data frame according to the address comparison result corresponding to the downlink data frame, and execute the forwarding instruction.

8. A hybrid network topology, characterized in that: include: A main network, multiple sub-networks, and a real-time forwarding device for data frames corresponding to each of the multiple sub-networks; The main network adopts fieldbus technology; The sub-network adopts Ethercat network; The sub-network communicates with the main network through a data frame real-time forwarding device corresponding to the sub-network; The data frame real-time forwarding device is used to implement the method according to any one of claims 1 to 6.

9. An electronic device, characterized in that: The device comprises: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.

Citation Information

Patent Citations

  • Method for fast achieving packet forwarding in wireless ad hoc network of TDMA protocol

    CN103763750A

  • One-master multi-slave high-speed synchronous serial communication data transmission method

    CN104954096A

  • Input buffer structure and data forwarding method of Ethernet switch

    CN108306835A

  • Information frame configuration method, unit, equipment and communication network

    CN117615027A

  • Multicasting procedure in wireless mesh network

    KR1020090003582A