Network interconnection control method, system, device and computer storage medium

By controlling the dual protocol stack master station to generate network data frames and adopting a periodic distribution strategy, the interconnection and interoperability of EtherCAT and TSN networks is realized, which solves the interconnection and interoperability problem between EtherCAT network and IP network and improves the functionality and accuracy of the transmission of network data frames.

CN116033041BActive Publication Date: 2024-10-22SHENZHEN INOVANCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211741743.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-27
Publication Date
2024-10-22
Estimated Expiration
2042-12-27

AI Technical Summary

Technical Problem

The existing EtherCAT network is difficult to directly interconnect with the IP network, and cannot be interconnected through switches and other extensions. Moreover, there can only be one master station, and data interaction between multiple master stations cannot be realized, which limits the functionality and accuracy of network data frame transmission. .

Method used

By controlling the dual protocol stack master station to generate network data frames, the EtherCAT data and the IP data of the TSN network are periodically distributed using a preset periodic distribution strategy, and then sent to the TSN switch for classification processing and delivery, thereby realizing the interconnection of the EtherCAT and TSN networks. Interoperability.

Benefits of technology

It realizes the interconnection and interoperability between EtherCAT network and TSN network, improves the transmission functionality and accuracy of network data frames, and avoids the limitation of existing technology that cannot directly interconnect with IP network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116033041B_ABST
    Figure CN116033041B_ABST
Patent Text Reader

Abstract

The present application relates to the field of industrial network technology, and discloses a network interconnection control method, system, device and computer storage medium. The network interconnection control method is applied to a network interconnection control system including a dual-protocol stack master station and a TSN switch. The method includes: generating a network data frame by controlling the dual-protocol stack master station, and determining communication cycle data according to the network data frame and a preset cycle allocation strategy, wherein the cycle allocation strategy is a strategy for periodically allocating EtherCAT data and IP data of the TSN network; sending the communication cycle data to the TSN switch according to the working mode of the dual-protocol stack master station; determining the communication data and data boundary position in the communication cycle data through the TSN switch, and sending the communication data according to the data boundary position, so as to interconnect the TSN network with the EtherCAT network, thereby improving the functionality of network data frame transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of industrial network technology, and in particular to a network interconnection control method, system, device and computer storage medium. Background Art

[0002] With the ever-changing needs of factory business, especially the current background of big data and cloud computing entering the field of industrial control and requiring the integration of IT (internet technology) and OT (operation technology), it is necessary not only to ensure the transmission of big data, but also to ensure the real-time and deterministic transmission, which also puts higher requirements on the existing industrial Ethernet protocol.

[0003] The traditional EtherCAT (Ether Control Automation Technology) network is a centrally scheduled OT network that is difficult to coexist directly with an IT network (IP network). This type of EtherCAT network has major defects, including the inability to directly interconnect with an IP network through switches and other extensions. In addition, an EtherCAT network can only have one master station, and data interaction between multiple master stations is not possible. That is, this type of EtherCAT network is difficult to coexist directly with an IP network, which limits the application of network data frame transmission. Summary of the invention

[0004] The main purpose of this application is to propose a network interconnection control method, system and computer storage medium, aiming to achieve interconnection between EtherCAT network and TSN network, thereby improving the functionality of network data frame transmission.

[0005] To achieve the above-mentioned object, the present application provides a network interconnection control method, which is applied to a network interconnection control system, wherein the network interconnection control system includes controlling a dual-stack master station and a TSN switch, and the steps of the network interconnection control method include:

[0006] Generate network data frames by controlling the dual-stack master station, and determine communication cycle data according to the network data frames and a preset cycle allocation strategy, wherein the cycle allocation strategy is a strategy for periodically allocating EtherCAT data and IP data of the TSN network;

[0007] Sending the communication cycle data to the TSN switch according to the working mode of the control dual-protocol stack master station;

[0008] The communication data and the data boundary position in the communication cycle data are determined by the TSN switch, and the communication data is sent down according to the data boundary position.

[0009] Optionally, the step of determining the communication cycle data according to the network data frame and a preset cycle allocation strategy includes:

[0010] Determining data features of the network data frame, and determining actual location information of the network data frame according to the data features;

[0011] Receiving the network data frame according to the actual location information and a preset cycle allocation strategy to obtain communication cycle data;

[0012] The determining of the actual location information of the network data frame according to the data feature comprises:

[0013] If the actual location information matches the preset data end location, a preset bandwidth is reserved after receiving the network data frame.

[0014] Optionally, the step of determining the actual location information of the network data frame according to the data feature includes:

[0015] Extracting a previous data feature corresponding to a most recently generated network data frame, and determining a data relationship between the previous data feature and the data feature;

[0016] Determine the time interval information corresponding to the data relationship, and determine the actual location information of the network data frame according to the data relationship and the time interval information.

[0017] Optionally, the step of determining the actual location information of the network data frame according to the data relationship and the time interval information includes:

[0018] Detecting whether the data relationship matches a data boundary relationship, wherein the data boundary relationship is where the EtherCAT data ends and the IP data begins;

[0019] If the data relationship matches the data boundary relationship, determining whether the time interval information is less than the preset period duration information;

[0020] If the time interval information is less than the preset period duration information, the actual position information of the network data frame is the data boundary position.

[0021] Optionally, the step of receiving the network data frame to obtain communication cycle data according to the actual location information and a preset cycle allocation strategy includes:

[0022] If the actual position information is the data boundary position, after storing the network data frame corresponding to the previous data feature, setting the data boundary according to a preset period allocation strategy;

[0023] The network data frame is received based on the data boundary position until the data relationship matches the cycle data end relationship to obtain communication cycle data, wherein the cycle data end relationship is that the IP data ends and the EtherCAT data starts.

[0024] Optionally, the step of sending the communication cycle data to the TSN switch according to the working mode of the control dual-stack master station includes:

[0025] Detecting whether the working mode of the control dual-protocol stack master station matches the preset master station open mode;

[0026] If the working mode of the dual-protocol stack master station is matched with the preset master station open mode, the communication cycle data is sent to the TSN switch.

[0027] Optionally, the network interconnection control system includes an EtherCAT slave station and a TSN network, and the step of sending the communication data according to the data boundary position includes:

[0028] Determine the EtherCAT data and IP data in the communication data based on the data boundary position;

[0029] Determine the slave station network segment address corresponding to the EtherCAT data, send the EtherCAT data to the EtherCAT slave station corresponding to the slave station network segment address, and send the IP data to the TSN network.

[0030] In addition, to achieve the above-mentioned purpose, the present application also provides a network interconnection control device, including:

[0031] A data generation module, used for generating a network data frame by controlling a dual-protocol stack master station, and determining communication cycle data according to the network data frame and a preset cycle allocation strategy, wherein the cycle allocation strategy is a strategy for periodically allocating EtherCAT data and IP data of a TSN network;

[0032] A data transmission module, used for sending the communication cycle data to the TSN switch according to the working mode of the control dual-protocol stack master station;

[0033] The data sending module is used to determine the communication data and the data boundary position in the communication cycle data through the TSN switch, and send the communication data according to the data boundary position.

[0034] In addition, to achieve the above-mentioned purpose, the present application also provides a network interconnection control device, including: a memory, a processor, and a network interconnection control program stored in the memory and executable on the processor, wherein the network interconnection control program implements the steps of the above-mentioned network interconnection control method when executed by the processor.

[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a network interconnection control computer storage medium, on which a network interconnection control program is stored, and when the network interconnection control program is executed by a processor, the steps of the network interconnection control method described above are implemented.

[0036] The present application discloses a network interconnection control method, which controls the network data frame generated by the dual-protocol stack master station, and obtains the communication cycle data by controlling the communication cycle processing of the dual-protocol stack master station according to a preset cycle allocation strategy, wherein the cycle allocation strategy is a strategy for periodically allocating EtherCAT data and IP data of the TSN network; and sends the communication cycle data to the TSN switch when the working mode of the dual-protocol stack master station is the master station open mode; determines the classification processing of the communication cycle data through the TSN switch, obtains the communication data and the data boundary position, and finally sends the different types of communication data to the corresponding position according to the data boundary position. The communication cycle data is obtained by controlling the dual-protocol stack master station to generate the network data frame according to the cycle allocation strategy, so that the communication cycle data can include the IP data of the EtherCAT and TSN networks, and then the corresponding data is sent through the TSN switch to realize the interconnection and intercommunication between the TSN network and the EtherCAT network.

[0037] Therefore, the present application avoids the phenomenon in the prior art that it is impossible to directly achieve interconnection with the IP network through extensions such as switches. This network interconnection control system not only achieves interconnection between networks through TSN switches, thereby improving the functionality of the EtherCAT network, but also sends EtherCAT data and IP data through a periodic allocation strategy, thereby improving the accuracy of network data frame transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a schematic diagram of the network interconnection control device structure of the hardware operating environment involved in the embodiment of the present application;

[0039] Figure 2 A flowchart of an embodiment of the network interconnection control method of the present application;

[0040] Figure 3This is a schematic diagram of the structure of the first embodiment of the network interconnection control system of the present application;

[0041] Figure 4 This is a schematic diagram of the structure of the second embodiment of the network interconnection control system of the present application;

[0042] Figure 5 This is a schematic diagram of the communication cycle of the network interconnection control system of this application;

[0043] Figure 6 This is a schematic diagram of the network interconnection control system module of this application.

[0044] Description of Figure Numbers:

[0045]

[0046]

[0047] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0048] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0049] Reference Figure 1 , Figure 1 This is a schematic diagram of the network interconnection control device structure of the hardware operating environment involved in the embodiment of the present application.

[0050] like Figure 1 As shown, the network interconnection control device may include: a processor 0003, such as a central processing unit (CPU), a communication bus 0001, an acquisition interface 0002, a processing interface 0004, and a memory 0005. Among them, the communication bus 0001 is used to realize the connection and communication between these components. The acquisition interface 0002 may include an information acquisition device and an acquisition unit such as a computer, and the acquisition interface 0002 may optionally include a standard wired interface and a wireless interface. The processing interface 0004 may optionally include a standard wired interface and a wireless interface. The memory 0005 may be a high-speed random access memory (Random Access Memory, RAM) or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 0005 may optionally be a storage device independent of the aforementioned processor 0003.

[0051] Those skilled in the art will understand that Figure 1The structure shown in the figure does not constitute a limitation on the network interconnection control device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0052] like Figure 1 As shown, the memory 0005 as a computer storage medium may include an operating system, an acquisition interface module, a processing interface module, and a network interconnection control program.

[0053] exist Figure 1 In the network interconnection control device shown, the communication bus 0001 is mainly used to realize the connection and communication between components; the acquisition interface 0002 is mainly used to connect to the background server and communicate data with the background server; the processing interface 0004 is mainly used to connect to the deployment end (user end) and communicate data with the deployment end; the processor 0003 and the memory 0005 in the network interconnection control device of the present application can be set in the network interconnection control device, and the network interconnection control device calls the network interconnection control program stored in the memory 0005 through the processor 0003, and executes the network interconnection control system provided by the embodiment of the present application.

[0054] Based on the above hardware structure, an embodiment of the network interconnection control method of the present application is proposed.

[0055] The first embodiment of the network interconnection control method of the present application refers to Figure 3 , Figure 3 The present invention is a flow chart of an embodiment of a network interconnection control method, the network interconnection control method comprising:

[0056] Step S10, generating a network data frame by controlling the dual-protocol stack master station, and determining the communication cycle data according to the network data frame and a preset cycle allocation strategy, wherein the cycle allocation strategy is a strategy for periodically allocating EtherCAT data and IP data of the TSN network;

[0057] In this embodiment, by loading the relevant protocols of IP data into the dual-stack control station, the dual-stack control station can generate IP data internally and generate EtherCAT data by itself, and then use both as network data frames to be transmitted. After the dual-stack control station generates network data frames, the network data frames will be allocated according to the preset cycle allocation strategy to obtain communication cycle data, wherein the cycle allocation strategy is a strategy for periodically allocating the EtherCAT data generated by the dual-stack control station and the IP data of the TSN network, and the communication cycle data refers to the data of each cycle generated by the dual-stack control station, and is composed of the data within the cycle defined by the cycle allocation strategy. Figure 5 , Figure 5This is a communication cycle diagram of the network interconnection control system. The EtherCAT communication cycle is divided into the EtherCAT communication area for storing EtherCAT data and the IP communication area for storing IP data. The two types of data are divided to ensure the subsequent transmission of the data. In addition, bandwidth is reserved between each type of data to prevent data from crossing the boundary due to jitter in the data transmission time. It can refer to the network interconnection system in the initial stage, controlling the dual-stack master station and the TSN switch to achieve clock synchronization and complete the configuration of bandwidth reservation. Through bandwidth reservation technology, mixed transmission of IP data and ECAT (EtherCAT abbreviation) data can be achieved within a communication cycle.

[0058] The step of determining the communication cycle data according to the network data frame and the preset cycle allocation strategy includes:

[0059] Step C11, determining data features of the network data frame, and determining actual location information of the network data frame according to the data features;

[0060] In this embodiment, after the dual-stack master station generates a network data frame, the data characteristics of the network data frame will be determined, and then the actual location information of the network data frame can be determined based on the data characteristics. That is, the controller needs to determine the location of the currently received network data frame in real time in order to process the data. Figure 5 , when the network data frame is IP data, it will detect in real time when the current communication cycle ends and enter the next communication cycle. The judgment basis is whether EtherCAT data has been received, that is, the reception of EtherCAT data is used as the starting point of the next cycle data. If no EtherCAT data has been received in the meantime, it will keep waiting and leave part of the IP communication area empty. Data features refer to the data features of the received network data frame, which can refer to the data features of EtherCAT data or the data features of IP data. The actual position information refers to the position of the network data frame in the communication cycle and that communication cycle determined according to the data features. Among them, the step of determining the actual position information of the network data frame according to the data features includes:

[0061] Step C111, extracting the previous data feature corresponding to the most recently generated network data frame, and determining the data relationship between the previous data feature and the data feature;

[0062] Step C112: determining the time interval information corresponding to the data relationship, and determining the actual location information of the network data frame according to the data relationship and the time interval information.

[0063] In this embodiment, by extracting the previous data features corresponding to the most recently generated network data frame, because the generation here refers to the network data frame outputted last time, it is used to judge the currently generated network data frame. And determine the data relationship between the previous data features and the data features. The previous data features refer to the data features corresponding to the most recently generated network data frame, and the data features refer to the data features of the current network data frame. The data relationship refers to the data relationship between the previous data features and the data features. It can be that both are EtherCAT data, both are IP data, or the former is IP data and the latter is EtherCAT data, or the former is EtherCAT data and the latter is IP data. Then, the periodic position of the current network data frame can be determined, and the periodic position refers to the position in the period. The time interval information corresponding to the data relationship will also be determined, and finally the actual position information of the network data frame will be determined according to the data relationship and the time interval information. The time interval information refers to the interval duration between the previous data features and the data features corresponding to the network data frame. Among them, the step of determining the actual position information of the network data frame according to the data relationship and the time interval information includes:

[0064] Step C1121, detecting whether the data relationship matches the data boundary relationship, wherein the data boundary relationship is that the EtherCAT data ends and the IP data begins;

[0065] In this embodiment, by detecting whether the data relationship matches the data boundary relationship, the actual location information corresponding to the network data frame can be determined, and the data boundary relationship refers to the data relationship where EtherCAT data ends and IP data starts, corresponding to the EtherCAT data corresponding to the previous data feature, and the data feature corresponding to the IP data, it will be determined that the data relationship corresponding to the previous data feature and the data feature is a data boundary relationship; the current data feature corresponds to EtherCAT data, and the data feature corresponds to EtherCAT data, and the data feature will be determined to be an EtherCAT data storage relationship; the current data feature corresponds to IP data, and the data feature corresponds to IP data, and the data relationship corresponding to the previous data feature and the data feature will be determined to be an IP data storage relationship; the current data feature corresponds to EtherCAT data, and the data feature corresponds to IP data, and the data relationship corresponding to the previous data feature and the data feature will be determined to be an IP data storage relationship; the current data feature corresponds to EtherCAT data, and the data feature corresponds to IP data, and the data relationship corresponding to the previous data feature and the data feature will be determined to be a periodic data end relationship.

[0066] Step C1122, if the data relationship matches the data boundary relationship, determining whether the time interval information is less than the preset period duration information;

[0067] Step C1123: If the time interval information is less than the preset period duration information, the actual position information of the network data frame is the data boundary position.

[0068] In this embodiment, when the data relationship matches the data boundary relationship, it will detect whether the time interval information is less than the preset cycle duration information. When the time interval information is less than the preset cycle duration information, the actual position information of the network data frame can be determined as the data boundary position. If it is not less than, a new communication cycle will be started to allocate network data frames. The preset cycle duration information refers to the duration of a single communication cycle that controls the dual-protocol stack master station, that is, to prevent the occurrence of the extreme situation of no IP data in the previous communication cycle and no EtherCAT data in the next cycle. The data boundary position refers to the boundary position between EtherCAT data and IP data in a single communication cycle; when the data relationship matches the cycle data end relationship, the step of determining whether the time interval information is less than the preset cycle duration information will also be executed. If it is less than, the actual position information of the network data frame is determined as the data cycle end position. If it is not less than, a new communication cycle will be started to allocate network data frames. The data cycle end position refers to the completion of the transmission of EtherCAT data and IP data in a single communication cycle, and the end of this communication cycle, to prevent the phenomenon of misjudgment in the extreme case of a blank data communication cycle; when the data relationship matches the EtherCAT data storage relationship, it will detect whether the time interval information is less than the preset IP data cycle duration information. If it is less, the actual position information of the network data frame is determined to be the EtherCAT allocation position. If it is not less, a new communication cycle will be started to allocate network data frames. The preset IP data cycle duration information refers to twice the duration of the IP data occupying a single communication cycle, or it is determined that the IP data occupies the capacity of a single communication cycle (capacity judgment can also be performed before, when IP data and EtherCAT are allocated by capacity in the communication cycle). The EtherCAT allocation position refers to the location where EtherCAT is stored in the communication cycle, to prevent the phenomenon of misjudgment in the extreme case of no IP data in the next communication cycle; when the data relationship matches the IP data storage relationship, it will detect whether the time interval information is less than the preset EtherCAT data cycle duration information. If it is less, the actual position information of the network data frame is determined to be the IP allocation position. If it is not less, a new communication cycle will be started to allocate network data frames. The preset EtherCAT data cycle duration information refers to the duration of EtherCAT data occupying twice a single communication cycle, and the IP allocation position refers to the location where the IP is stored in the communication cycle, to prevent the phenomenon of misjudgment in the extreme case of no EtherCAT data in the next communication cycle. Through detection, the accuracy of network data frame processing within and between communication cycles can be improved.

[0069] Step C12, receiving the network data frame according to the actual location information and the preset cycle allocation strategy to obtain communication cycle data;

[0070] The determining of the actual location information of the network data frame according to the data feature comprises:

[0071] If the actual location information matches the preset data end location, a preset bandwidth is reserved after receiving the network data frame.

[0072] In this embodiment, after the actual location information is determined, the network data frame will be received according to the actual location information and the preset cycle allocation strategy to obtain the communication cycle data, that is, the received network data frame will be processed based on the aforementioned determined position and the preset cycle allocation strategy to obtain the communication cycle data. When the actual location information matches the preset data end position, the preset bandwidth will be reserved after receiving the network data frame. The preset data end position refers to after the IP data or EtherCAT data is received within the cycle, and the preset bandwidth refers to the custom or optimal communication bandwidth length within the cycle. In other words, bandwidth is reserved after each data is received to prevent data from crossing the boundary due to jitter in the data sending time. Among them, the step of receiving the network data frame according to the actual location information and the preset cycle allocation strategy to obtain the communication cycle data includes:

[0073] Step C121, if the actual position information is the data boundary position, after storing the network data frame corresponding to the previous data feature, setting the data boundary according to a preset period allocation strategy;

[0074] Step C122, receiving the network data frame based on the data boundary position until the data relationship matches the cycle data end relationship to obtain communication cycle data, wherein the cycle data end relationship is the end of the IP data and the start of the EtherCAT data.

[0075] In this embodiment, when the actual position information is the IP allocation position or the EtherCAT allocation position, the communication cycle allocation process will be continuously performed on the received network data frames. That is to say, the network data frames will continue to be transmitted in this communication cycle; when the actual position information is the data demarcation position, after the network data frame corresponding to the pre-data characteristics is transmitted, a data demarcation line will be set according to the preset cycle allocation strategy. That is to say, the previously received network data frames will be demarcated from the subsequent network data frames. The data demarcation line refers to the demarcation line between IP data and EtherCAT data within a single cycle. The cycle allocation strategy internally defines the demarcation requirements within the communication cycle, that is, the demarcation between IP data and EtherCAT data in the communication cycle is user-defined to ensure the same for each cycle. For example, taking time as an example, with the communication cycle being time a, the demarcation line time can be custom-defined as b, and the network data frames will be transmitted in the communication cycle in turn (which can be infinitely close to the actual b). When the situation of the data demarcation position occurs (time c, where c < b on the time axis), the time interval between time c and time b is used as bandwidth reservation to prevent data overrun problems caused by data transmission time jitter. Then the actual transmission time will be adjusted to the time point of b to transmit the network data frames until the network data frames that match the end relationship of the cycle data are received to obtain the communication cycle data; when the actual position information is the data cycle end position, after the previous data corresponding to the pre-data characteristics is received, a cycle demarcation line will be set according to the preset cycle allocation strategy. That is to say, the previously received network data frames will be demarcated from the subsequent network data frames. The cycle demarcation line refers to the demarcation line between two cycles. For example, taking time as an example, with the communication cycle being time a, the demarcation line time can be custom-defined as b, and the network data frames will be transmitted after the time point of b. When the situation of the data cycle end position occurs (time d, where d > b on the time axis), the time interval between time d and the cycle cut-off time point is used as bandwidth reservation. Then the transmission of the network data frames into this communication cycle will be stopped until EtherCAT data appears, and a new communication cycle will be created to transmit the network data frames. By using the actual position information and the preset cycle allocation strategy to receive the network data frames to obtain the communication cycle data, the accuracy of data transmission can be ensured.

[0076] Step S20: Send the communication cycle data to the TSN switch according to the working mode of the control dual-protocol stack master station;

[0077] In this embodiment, when the obtained communication cycle data needs to be sent down, the working mode of the dual-protocol stack master station is determined, and then the communication cycle data is sent down according to the working mode. The working mode refers to the working mode of the dual-protocol stack master station, which may include a closed mode, an open mode, etc. Among them, the step of sending the communication cycle data to the TSN switch according to the working mode of the dual-protocol stack master station includes:

[0078] Step C21, detecting whether the working mode of the dual-protocol stack master station controls matches the preset master station open mode;

[0079] Step C22: If the working mode of the dual-protocol stack master station is matched with the preset master station open mode, the communication cycle data is sent to the TSN switch.

[0080] In this embodiment, by detecting whether the working mode of the dual-stack master station is matched with the preset master station open mode, when the working mode of the dual-stack master station is matched with the preset master station open mode, the communication cycle data is sent to the TSN switch. The master station open mode refers to the mode in which the dual-stack master station is controlled to open for communication, that is, the dual-stack master station is controlled to adopt the open mode mode, and the data with the slave station network segment address is sent to the slave station via TSN switching addressing. At the same time, the master station interface adds bandwidth reservation technology to realize the function of sending EtherCAT data and IP data at the same time.

[0081] Step S30, determining the communication data and the data boundary position in the communication cycle data through the TSN switch, and sending the communication data according to the data boundary position.

[0082] In this embodiment, after the TSN switch receives the communication cycle data, it will determine the data boundary position in the communication cycle data. Because of the cycle allocation strategy, a single cycle can transmit IP data and EtherCAT data, and the implementation function of the TSN switch is to send the corresponding data to the corresponding network. By determining the data boundary position in the communication cycle data and then dividing the communication cycle data into two parts, the data can be quickly sent down, thereby improving the communication efficiency. After the communication cycle data is divided into two parts, the data features of the communication data therein will be randomly obtained, and it will be detected whether the data features are EtherCAT data or IP data. If it is EtherCAT data, it can be determined that the target information for sending the communication data is the EtherCAT slave station. Otherwise, if it is IP data, it can be determined that the target information for sending the communication data is the TSN network. The sending target information refers to the destination or network corresponding to the sent data. Among them, the step of sending the communication data according to the data boundary position includes:

[0083] Step C41, determining the EtherCAT data and IP data in the communication data based on the data boundary position;

[0084] Step C42, determining the slave station network segment address corresponding to the EtherCAT data, sending the EtherCAT data to the EtherCAT slave station corresponding to the slave station network segment address, and sending the IP data to the TSN network.

[0085] In this embodiment, the entire communication cycle data is divided into two groups of communication data according to the data boundary position, and then the front and rear target information corresponding to the communication data are determined, and the front / rear target information refers to the sending target information corresponding to the communication data. Finally, the EtherCAT data in the communication cycle data will be sent to the first target position corresponding to the front target information, and the IP data in the communication cycle data will be sent to the second target position corresponding to the rear target information. The first / second target position can refer to the EtherCAT slave / TSN network. When sending the EtherCAT slave, the slave network segment address of the EtherCAT data in the communication data will be determined, and sent to the corresponding EtherCAT slave according to the slave network segment address. The slave network segment address refers to the EtherCAT slave symbol address information; when sending the TSN network, the TSN network segment address of the IP data in the communication data will be determined, and sent to the device corresponding to the TSN network according to the TSN network segment address. The TSN network segment address refers to the symbol address information of different devices in the TSN network. The communication cycle data is processed by the TSN switch to achieve accurate data sending, thereby improving the accuracy of data transmission.

[0086] In this embodiment, by controlling the network data frame generated by the dual-protocol stack master station, the communication cycle data is obtained by controlling the communication cycle of the dual-protocol stack master station according to the preset cycle allocation strategy, wherein the cycle allocation strategy is a strategy for periodically allocating EtherCAT data and IP data of the TSN network; and when the working mode of the dual-protocol stack master station is controlled to be the master station open mode, the communication cycle data is sent to the TSN switch; the communication cycle data is classified and processed by the TSN switch to obtain the communication data and the data boundary position, and finally the different types of communication data are sent to the corresponding position according to the data boundary position. By controlling the dual-protocol stack master station to obtain the communication cycle data according to the cycle allocation strategy for the generated network data frame, the communication cycle data can include the IP data of the EtherCAT and TSN networks, and then the corresponding data is sent through the TSN switch to realize the interconnection and intercommunication between the TSN network and the EtherCAT network.

[0087] Further, based on the first embodiment of the above-mentioned network interconnection control method, the present application embodiment provides a network interconnection control system, referring to Figure 3 , Figure 3 This is a structural diagram of the first embodiment of the network interconnection control system of the present application.

[0088] In this embodiment, the network interconnection control system includes a time-sensitive TSN network 30, a TSN switch 20, at least one Ethernet automation control technology control dual-protocol stack master station 10 and multiple EtherCAT slave stations 40; the control dual-protocol stack master station 10 is connected to the TSN switch 20, and the TSN switch 20 is respectively connected to the TSN network 30 and the multiple EtherCAT slave stations 40 connected in series;

[0089] The control dual-protocol stack master station 10 is used to generate a network data frame, and determine the communication cycle data according to the network data frame and a preset cycle allocation strategy;

[0090] The TSN switch 20 is used to obtain communication data according to the communication cycle data, and send the EtherCAT data in the communication data to the EtherCAT slave station 40, and send the IP data in the communication data to the TSN network 30, so as to interconnect the TSN network 30 with the EtherCAT network.

[0091] In this embodiment, EtherCAT is an Ethernet technology for industrial automation and is part of the international standards IEC / PAS62407 and ISO15745-4. EtherCAT uses full-duplex 100Mb / s Ethernet. The system consists of a control and communication master station based on a PC computer and several slave communication nodes. The master station uses a standard Ethernet controller, and the protocol and driver are implemented by software. The slave communication node uses a repeater processing technology. In the control of the machine, the performance of EtherCAT in a typical IO segment is nearly ten times higher than that of TSN. As the fastest industrial Ethernet fieldbus today, EtherCAT can be perfectly combined with TSN technology. In heterogeneous networks, EtherCAT segments are used for machine control (multi-node, high-speed response, hard real-time requirements), and each EtherCAT segment (containing multiple EtherCAT node devices) is connected to the master station through a high-speed data channel established by a TSN switch. The EtherCAT standard allows the use of open mode mode, and the master station exit access switch is connected to the slave devices of different segments to achieve interconnection.

[0092] However, with the needs of factory business, especially the current background of big data and cloud computing entering the field of industrial control and requiring the integration of IT and OT, it is necessary not only to ensure the transmission of big data, but also to ensure the real-time and deterministic transmission. At this time, the existing industrial Ethernet protocol seems to be more incapable. TSN aims to establish a "universal" time-sensitive mechanism for the Ethernet protocol to ensure the real-time, deterministic and low latency of network data frame transmission. The key appeal of TSN lies in the transmission of the "same" network, that is, the transmission of heterogeneous network data frames. EtherCAT is a centralized scheduling OT network, which is difficult to coexist directly with the IT network, that is, it cannot be directly interconnected with the IP network through switches and other extensions. At the same time, the EtherCAT network can only have one autonomous station, and it is impossible to realize data communication between multiple master stations; in the context of the integration of IT and OT networks in industrial digitalization, the contradictions caused by the above defects of EtherCAT are more prominent. Therefore, the technical solution of this embodiment to realize the interconnection and intercommunication between the EtherCAT network and the TSN network is proposed. The main improvement direction is to realize the control of the dual-stack master station to send IP data packets, define the relevant protocols about IP data internally in advance, and then realize the control of the dual-stack master station to generate and send EtherCAT and IP data. Another point is to realize the function of sending EtherCAT and IP data at the same time through built-in control of communication cycle data and processing the data sent in each cycle.

[0093] In this embodiment, compared with the prior art control dual-protocol stack master station (which can generate EtherCAT data and IP data internally) directly connected with multiple EtherCAT slave stations for data transmission and communication, this embodiment proposes an embodiment of interconnection and intercommunication between a single control dual-protocol stack master station and a TSN network, and interconnection and intercommunication are achieved through a TSN switch and a TSN network, thereby achieving communication between the two. The main role of the TSN switch is to send the communication cycle data generated by the control dual-protocol stack master station to the EtherCAT slave station and the TSN network, based on whether the data in the communication data in the communication cycle data is the EtherCAT data that the EtherCAT slave station needs to receive, or the IP data that the TSN network needs to receive, and the corresponding data exchange is sent to the destination of the corresponding received data, thereby achieving interconnection and intercommunication between the EtherCAT network and the TSN network. Among them, the communication cycle data refers to the data of each cycle generated by the control dual-protocol stack master station, and the communication data refers to the IP data and EtherCAT data after the distinction. The function of controlling the dual-stack master station is to generate IP data according to the relevant protocols of IP data and to generate EtherCAT data according to the relevant protocols of EtherCAT data, collectively referred to as network data frames, and finally allocate and process the network data frames according to the preset cycle allocation strategy to obtain communication cycle data. The cycle allocation strategy refers to the way of periodically allocating EtherCAT data and IP data within the cycle. For example, the duration of a communication cycle is As, and the cycle allocation strategy will define the first Bs to transmit EtherCAT data and the latter (AB)s to transmit IP data. It can also be defined that the capacity of a communication cycle is C, and the cycle allocation strategy will define the front capacity D to transmit EtherCAT data and the latter capacity (CD) to transmit IP data, where A>B, C>D. The data transmission of each cycle of the dual-stack master station is defined through the cycle allocation strategy, thereby realizing the interconnection between the EtherCAT network and the TSN network. When the TSN network is connected to a computer, the data of the EtherCAT network can be transmitted to the computer in a timely manner, which makes it convenient for users to view it in time. Conversely, the computer data can also be transmitted back to the EtherCAT network through the TSN network, thereby realizing the interconnection between the EtherCAT network and the TSN network. While expanding the functions of the EtherCAT network, the functions of the TSN network are also expanded.

[0094] Based on an embodiment of interconnection and intercommunication between a single control dual-protocol stack master station and a TSN network, two embodiments of interconnection and intercommunication between multiple control dual-protocol stack master stations and a TSN network are proposed. Figure 4 , Figure 4This is a structural diagram of the second embodiment of the network interconnection control system. Based on the scheme of connecting a single control dual-protocol stack master station (i.e., the master station in the figure) to a TSN switch, it is proposed that multiple control dual-protocol stack master stations are connected to the TSN switch. Taking two control dual-protocol stack master stations as an example, the two control dual-protocol stack master stations are connected to the TSN switch at the same time, and the control dual-protocol stack master station uses the above-mentioned cycle allocation strategy to realize IP data interaction between multiple control dual-protocol stack master stations through the TSN switch. Furthermore, the IP data in the multiple control dual-protocol stack master stations will realize clock synchronization based on the 1588 protocol, thereby ensuring the timeliness of data transmission between multiple control dual-protocol stack master stations. According to the above data interaction and clock synchronization method, collaborative control and data transmission of multiple control dual-protocol stack master stations can be realized. For example, the IP data of the first control dual-stack master station is transmitted to the TSN network (such as a computer) based on the 1588 protocol to achieve clock synchronization, and the TSN network then transmits the time-synchronized IP data to the second control dual-stack master station. The second control dual-stack master station then controls the EtherCAT slaves in the second control dual-stack master station through EtherCAT data, thereby achieving collaborative control and data transmission of multiple control dual-stack master stations.

[0095] The present embodiment discloses a network interconnection control system, which includes a time-sensitive TSN network, a TSN switch, at least one Ethernet automation control technology control dual-protocol stack master station and multiple EtherCAT slave stations; the control dual-protocol stack master station is connected to the TSN switch, and the TSN switch is respectively connected to the TSN network and multiple serially connected EtherCAT slave stations; the control dual-protocol stack master station is used to generate a network data frame, and determine the communication cycle data according to the network data frame and a preset cycle allocation strategy; the TSN switch is used to obtain communication data according to the communication cycle data, and send the EtherCAT data in the communication data to the EtherCAT slave station, and send the IP data in the communication data to the TSN network, so as to interconnect the TSN network with the EtherCAT network. The generated network data frame is processed by the control dual-protocol stack master station, and sent to the TSN network and the EtherCAT slave station via the TSN switch, thereby realizing the interconnection between the TSN network and the EtherCAT network.

[0096] Therefore, the present application avoids the phenomenon in the prior art that it is impossible to directly achieve interconnection with the IP network through extensions such as switches. This network interconnection control system not only achieves interconnection between networks through TSN switches, thereby improving the functionality of the EtherCAT network, but also sends EtherCAT data and IP data through a periodic allocation strategy, thereby improving the accuracy of network data frame transmission.

[0097] The present invention also provides a schematic diagram of a network interconnection control system module, referring to Figure 6 , the network interconnection control system includes:

[0098] The data generation module A01 is used to generate a network data frame by controlling the dual-protocol stack master station, and determine the communication cycle data according to the network data frame and a preset cycle allocation strategy, wherein the cycle allocation strategy is a strategy for periodically allocating EtherCAT data and IP data of the TSN network;

[0099] A data transmission module A02, used for sending the communication cycle data to the TSN switch according to the working mode of the control dual-protocol stack master station;

[0100] The data sending module A03 is used to determine the communication data and the data boundary position in the communication cycle data through the TSN switch, and send the communication data according to the data boundary position.

[0101] Optionally, the data generating module A01 is further used to:

[0102] Determining data features of the network data frame, and determining actual location information of the network data frame according to the data features;

[0103] The network data frame is received according to the actual location information and a preset cycle allocation strategy to obtain communication cycle data.

[0104] Optionally, the data generating module A01 is further used to:

[0105] Extracting a previous data feature corresponding to a most recently generated network data frame, and determining a data relationship between the previous data feature and the data feature;

[0106] Determine the time interval information corresponding to the data relationship, and determine the actual location information of the network data frame according to the data relationship and the time interval information.

[0107] Optionally, the data generating module A01 is further used to:

[0108] Detecting whether the data relationship matches a data boundary relationship, wherein the data boundary relationship is where the EtherCAT data ends and the IP data begins;

[0109] If the data relationship matches the data boundary relationship, determining whether the time interval information is less than the preset period duration information;

[0110] If the time interval information is less than the preset period duration information, the actual position information of the network data frame is the data boundary position.

[0111] Optionally, the data generating module A01 is further used to:

[0112] If the actual position information is the data boundary position, after storing the network data frame corresponding to the previous data feature, setting the data boundary according to a preset period allocation strategy;

[0113] The network data frame is received based on the data boundary position until the data relationship matches the cycle data end relationship to obtain communication cycle data, wherein the cycle data end relationship is that the IP data ends and the EtherCAT data starts.

[0114] Optionally, the data transmission module A02 is further used to:

[0115] Detecting whether the working mode of the control dual-protocol stack master station matches the preset master station open mode;

[0116] If the working mode of the dual-protocol stack master station is matched with the preset master station open mode, the communication cycle data is sent to the TSN switch.

[0117] Optionally, the data sending module A03 is further used to:

[0118] Determine the EtherCAT data and IP data in the communication data based on the data boundary position;

[0119] Determine the slave station network segment address corresponding to the EtherCAT data, send the EtherCAT data to the EtherCAT slave station corresponding to the slave station network segment address, and send the IP data to the TSN network.

[0120] The present application also provides a network interconnection control device.

[0121] The device of the present application includes: a memory, a processor, and a network interconnection control program stored in the memory and executable on the processor. When the network interconnection control program is executed by the processor, the steps of the network interconnection control method described above are implemented.

[0122] The present application also provides a computer storage medium.

[0123] The computer storage medium of the present application stores a network interconnection control program, and when the network interconnection control program is executed by a processor, the steps of the network interconnection control method described above are implemented.

[0124] Among them, the method implemented when the network interconnection control program running on the processor is executed can refer to the various embodiments of the network interconnection control method of the present application, and will not be repeated here.

[0125] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0126] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0127] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a computer storage medium (such as ROM / RAM, disk, CD) as described above, including a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0128] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A network interconnection control method, characterized in that: The network interconnection control method is applied to a network interconnection control system, wherein the network interconnection control system includes controlling a dual-protocol stack master station and a TSN switch, and the steps of the network interconnection control method include: The dual-stack master station is controlled to generate a network data frame, and the communication cycle data is determined according to the network data frame and a preset cycle allocation strategy, wherein the cycle allocation strategy is a strategy for periodically allocating EtherCAT data and IP data of the TSN network, and the step of determining the communication cycle data according to the network data frame and the preset cycle allocation strategy includes: Determine the data features of the network data frame, extract the previous data features corresponding to the most recently generated network data frame, and determine the data relationship between the previous data features and the data features; determine the time interval information corresponding to the data relationship, and detect whether the data relationship matches the data boundary relationship, wherein the data boundary relationship is the end of the EtherCAT data and the beginning of the IP data; if the data relationship matches the data boundary relationship, determine whether the time interval information is less than the preset cycle duration information; if the time interval information is less than the preset cycle duration information, the actual position information of the network data frame is the data boundary position; receive the network data frame according to the actual position information and the preset cycle allocation strategy to obtain communication cycle data; after determining the actual position information of the network data frame according to the data features, include: if the actual position information matches the preset data end position, reserve a preset bandwidth after receiving the network data frame; Sending the communication cycle data to the TSN switch according to the working mode of the control dual-protocol stack master station; The communication data and the data boundary position in the communication cycle data are determined by the TSN switch, and the communication data is sent down according to the data boundary position.

2. The network interconnection control method according to claim 1, characterized in that: The step of receiving the network data frame to obtain communication cycle data according to the actual location information and the preset cycle allocation strategy includes: If the actual position information is the data boundary position, after storing the network data frame corresponding to the previous data feature, setting the data boundary according to a preset period allocation strategy; The network data frame is received based on the data boundary position until the data relationship matches the cycle data end relationship to obtain communication cycle data, wherein the cycle data end relationship is that the IP data ends and the EtherCAT data starts.

3. The network interconnection control method according to claim 1, characterized in that: The step of sending the communication cycle data to the TSN switch according to the working mode of the control dual-protocol stack master station includes: Detecting whether the working mode of the control dual-protocol stack master station matches the preset master station open mode; If the working mode of the dual-protocol stack master station is matched with the preset master station open mode, the communication cycle data is sent to the TSN switch.

4. The network interconnection control method according to claim 1, characterized in that: The network interconnection control system includes an EtherCAT slave station and a TSN network, and the step of sending the communication data according to the data boundary position includes: Determine the EtherCAT data and IP data in the communication data based on the data boundary position; Determine the slave station network segment address corresponding to the EtherCAT data, send the EtherCAT data to the EtherCAT slave station corresponding to the slave station network segment address, and send the IP data to the TSN network.

5. A network interconnection control system, characterized in that: The network interconnection control system comprises: A data generation module, used for generating a network data frame by controlling a dual-protocol stack master station, and determining communication cycle data according to the network data frame and a preset cycle allocation strategy, wherein the cycle allocation strategy is a strategy for periodically allocating EtherCAT data and IP data of a TSN network; The data generation module is also used to determine the data features of the network data frame, extract the previous data features corresponding to the most recently generated network data frame, and determine the data relationship between the previous data features and the data features; determine the time interval information corresponding to the data relationship, and detect whether the data relationship matches the data boundary relationship, wherein the data boundary relationship is the end of the EtherCAT data and the beginning of the IP data; if the data relationship matches the data boundary relationship, determine whether the time interval information is less than the preset cycle duration information; if the time interval information is less than the preset cycle duration information, the actual position information of the network data frame is the data boundary position; receive the network data frame according to the actual position information and the preset cycle allocation strategy to obtain communication cycle data; after determining the actual position information of the network data frame according to the data features, it includes: if the actual position information matches the preset data end position, reserve a preset bandwidth after receiving the network data frame; A data transmission module, used for sending the communication cycle data to the TSN switch according to the working mode of the control dual-protocol stack master station; The data sending module is used to determine the communication data and the data boundary position in the communication cycle data through the TSN switch, and send the communication data according to the data boundary position.

6. A network interconnection control device, characterized in that: The network interconnection control device comprises: a memory, a processor, and a network interconnection control program stored in the memory and executable on the processor, wherein the network interconnection control program, when executed by the processor, implements the steps of the network interconnection control method according to any one of claims 1 to 4.

7. A computer storage medium, characterized in that: The computer storage medium stores a network interconnection control program, and when the network interconnection control program is executed by the processor, the steps of the network interconnection control method according to any one of claims 1 to 4 are implemented.