Data transmission system and method

By designing multi-protocol network ports and control modules in the industrial process control system, data transmission and communication isolation between the control network and external systems are realized, which solves the problem of reduced applicability caused by a single communication protocol in the existing technology and improves efficiency. System suitability and compatibility.

CN118677967APending Publication Date: 2024-09-20CHINA NUCLEAR POWER TECH RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410556137.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-07
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

In existing industrial process control systems, the communication protocol between the gateway and external systems is single, which reduces the applicability of data communication and is incompatible with multiple communication protocols, limiting the data transmission and communication isolation capabilities of the control network and external systems.

Method used

A data transmission system is designed, which includes a first communication protocol for communication connection between the first network port and the control network, and multiple different communication protocols for communication connection between the second network port and the external system. The first network port and the control network are controlled through the control module. Transmit data between networks, and determine an appropriate second communication protocol from multiple communication protocols of the second network port to communicate with the external system to achieve protocol conversion.

Benefits of technology

It achieves data transmission and communication isolation between the control network and external systems, improves the applicability and compatibility of the system, is compatible with multiple communication protocols, and enhances the flexibility and scalability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118677967A
    Figure CN118677967A
Patent Text Reader

Abstract

The invention relates to a data transmission system and method, and the system controls data transmission between a first network port and a control network through a first communication protocol through a control module, and determines a second communication protocol from a plurality of communication protocols of a second network port through the control module. Data transmission and communication isolation between the control network and the external system can be realized, and a plurality of communication protocols are compatible between the system and the external system due to the fact that the specific communication protocol of the second network port can be switched. Protocol conversion between a control network and an external system communication protocol is realized, and applicability and expandability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data communication technology, and in particular, to a data transmission system and method. Background Art

[0002] In the field of industrial process control, especially in distributed control systems (DCS), programmable logic controllers (PLC), and various instrumentation systems, it is often necessary to use a gateway to achieve data communication between the control network and external systems.

[0003] In order to achieve communication isolation between the control network and the external system, the current communication protocol between the gateway and the external system is single (eg TCP), which greatly reduces the applicability of data communication between the control network and the external system. Summary of the invention

[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0005] To achieve the above object, a first aspect of an embodiment of the present application provides a data transmission system, the data transmission system comprising:

[0006] A first network port is communicatively connected to a control network, wherein the first network port is configured with a first communication protocol;

[0007] A second network port is connected to an external system for communication, wherein the second network port is configured with a plurality of communication protocols, the plurality of communication protocols are different from each other, and the plurality of communication protocols are different from the first communication protocol;

[0008] A control module is communicatively connected to the first network port and the second network port, and is used to control the transmission of data between the first network port and the control network through the first communication protocol; and to determine a second communication protocol and control the transmission of data between the second network port and the external system through the second communication protocol, wherein the second communication protocol is any one of the multiple communication protocols.

[0009] An embodiment of the present application provides a data transmission system, in which the system controls the transmission of data between a first network port and a control network through a first communication protocol through a control module; determines a second communication protocol from multiple communication protocols of a second network port through the control module, and controls the transmission of data between the second network port and an external system through the second communication protocol, which not only enables data transmission and communication isolation between the control network and the external system, but also, because the specific communication protocol of the second network port can be switched, makes the system compatible with multiple communication protocols between the system and the external system, realizes protocol conversion between the control network and the external system communication protocol, and improves applicability.

[0010] In some embodiments of the present application, the first network port includes a first control network communication network port and a second control network communication network port;

[0011] The control module is specifically used to control the transmission of data between the first control network communication port and the control network through the first communication protocol, or, after the first control network communication port and the control network are disconnected, control the transmission of data between the second control network communication port and the control network through the first communication protocol.

[0012] In some embodiments of the present application, the second network port includes a plurality of external network communication network ports having the same number as the plurality of communication protocols;

[0013] Each of the external network communication ports is configured with a corresponding one of the multiple communication protocols;

[0014] The control module is specifically used to control the transmission of data between the external network communication port configured with the second communication protocol and the external system through the second communication protocol.

[0015] In some embodiments of the present application, the first communication protocol includes a first UDP protocol, the multiple communication protocols include a second UDP protocol and a TCP protocol, and the second UDP protocol is different from the first UDP protocol.

[0016] In some embodiments of the present application, the control module is specifically used to receive a configuration file sent by a host computer, and determine the second communication protocol according to the configuration file.

[0017] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a data transmission method, wherein the data transmission method includes:

[0018] When a first data frame sent by a control network is received by a first network port through a first communication protocol, the first data frame is parsed to obtain first parsed data;

[0019] In response to the first parsed data, determining a second communication protocol from a plurality of communication protocols configured at the second network port, wherein the plurality of communication protocols are different from each other and are different from the first communication protocol;

[0020] storing the first parsed data in a memory associated with the second communication protocol;

[0021] In response to a data request sent by an external system, the first parsed data in the memory associated with the second communication protocol is sent to the external system by the second network port through the second communication protocol.

[0022] An embodiment of the present application provides a data transmission method. The method transmits a first data frame between a first network port and a control network through a first communication protocol, determines a second communication protocol from multiple communication protocols of a second network port in response to first parsed data, and controls the transmission of the first parsed data between the second network port and the external system through the second communication protocol after a data request is sent by an external system. This method not only enables data transmission and communication isolation between the control network and the external system, but also, because the specific communication protocol of the second network port can be selected, it enables protocol conversion between the control network and the external system communication protocol, thereby improving applicability.

[0023] In some embodiments of the present application, the data transmission method further includes:

[0024] When a second data frame sent by the external system is received by the second network port through the second communication protocol, the second data frame is parsed to obtain second parsed data;

[0025] storing the second parsed data in a memory associated with the first communication protocol;

[0026] The second parsed data in the memory associated with the first communication protocol is sent to the control network by the first network port through the first communication protocol.

[0027] In some embodiments of the present application, before responding to the first parsed data, the data transmission method further includes:

[0028] Get the configuration file sent by the host computer;

[0029] Determining the second communication protocol from among the multiple communication protocols configured by the second network port includes:

[0030] According to the configuration file, a second communication protocol is determined from a plurality of communication protocols configured for the second network port.

[0031] In some embodiments of the present application, obtaining the configuration file sent by the host computer includes:

[0032] Receiving a download command sent by a host computer, wherein the download command carries the configuration file;

[0033] When the download command is a download request command, receiving the configuration file, generating and sending a response command to the host computer;

[0034] When the download command is a download data command, the configuration file is stored in a local buffer area, and a response command is generated and sent to the host computer;

[0035] When the download command is a download save command, the configuration file is verified, and if the verification is valid, the configuration file is stored in the local flash memory, and a response command is generated and sent to the host computer.

[0036] In some embodiments of the present application, the data transmission method further includes:

[0037] Monitoring the communication status between the first network port and the control network, and between the second network port and the external system;

[0038] Encapsulating the communication state into a communication data frame;

[0039] The first network port sends the communication data frame to the control network through the first communication protocol, so that the control network sends the communication data frame to the host computer. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0041] Figure 1 is a structural diagram of an embodiment of a data transmission system provided by the present application;

[0042] Figure 2 is another structural schematic diagram of an embodiment of the data transmission system provided by the present application;

[0043] Figure 3 is a schematic diagram of a data receiving process in an embodiment of a data transmission system provided by the present application;

[0044] Figure 4 It is a flowchart of an embodiment of the data transmission method provided by the present application;

[0045] Figure 5 is another flowchart of an embodiment of the data transmission method provided by the present application;

[0046] Figure 6 It is a schematic diagram of a flow chart of confirming a second communication protocol according to a configuration file in an embodiment of the data transmission method provided by the present application;

[0047] Figure 7 It is a schematic diagram of a flow chart of obtaining a configuration file sent by a host computer in an embodiment of the data transmission method provided by the present application;

[0048] Figure 8 It is a schematic diagram of the downloading process of the configuration file in the embodiment of the data transmission method provided by the present application;

[0049] Fig. 9 It is a flow chart of communication status monitoring and uploading in an embodiment of the data transmission method provided by the present application;

[0050] Fig.10 It is a schematic diagram of a flow chart of configuring a configuration file when a data transmission system is powered on in an embodiment of a data transmission method provided in the present application.

[0051] Reference numerals:

[0052] 100, first network port; 110, first control network communication network port; 120, second control network communication network port; 200, second network port; 210, first external system communication network port; 220, second external system communication network port; 300, control module; 400, control network; 500, external system; 510, first external system; 520, second external system; 1000, data transmission system. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. 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.

[0054] Reference Figure 1 According to an embodiment of the present application, a data transmission system 1000 is provided. The data transmission system 1000 includes:

[0055] The first network port 100 is connected to the control network 400 for communication, and the first network port 100 is configured with a first communication protocol;

[0056] The second network port 200 is connected to the external system 500 for communication. The second network port 200 is configured with a plurality of communication protocols, the plurality of communication protocols are different from each other, and the plurality of communication protocols are different from the first communication protocol;

[0057] The control module 300 is communicatively connected with the first network port 100 and the second network port 200. The control module 300 is used to control the transmission of data between the first network port 100 and the control network 400 through the first communication protocol; and to determine the second communication protocol and control the transmission of data between the second network port 200 and the external system 500 through the second communication protocol. The second communication protocol is any one of the multiple communication protocols.

[0058] In this embodiment, the data transmission system 1000 is located between the control network 400 and the external system 500, and is used to realize data transmission between the control network 400 and the external system 500 and to realize communication isolation between the control network 400 and the external system 500. The control network 400 refers to the internal network of the system in the field of industrial process control, and the external system 500 is an external network system that exchanges data with the internal network.

[0059] The data transmission system 1000 is provided with a first network port 100, and the first network port 100 is communicatively connected to the control network 400. For example, the first network port 100 is connected to a switch of the control network 400, and the first network port 100 is configured with a first communication protocol, that is, under the action of the control module 300, the first network port 100 and the control network 400 transmit data through the first communication protocol.

[0060] The data transmission system 1000 is provided with a second network port 200, and the second network port 200 is communicatively connected with the external system 500. For example, the second network port 200 is connected with a switch of the external system 500, and the second network port 200 is configured with multiple communication protocols. Under the action of the control module 300, the second network port 200 will perform data transmission with the external system 500 using one of the multiple communication protocols configured therein.

[0061] The second network port 200 is configured with multiple communication protocols that are different from each other. For example, the second network port 200 is configured with two communication protocols, one is the Transmission Control Protocol (TCP), and the other is the User Datagram Protocol (UDP), also known as the custom UDP protocol. Under the action of the control module 300, the second network port 200 can transmit data with the external system 500 using the TCP protocol, and can also transmit data with the external system 500 using the custom UDP protocol.

[0062] The multiple communication protocols configured by the second network port 200 are different from the first communication protocol configured by the first network port 100. For example, the second network port 200 is configured with two communication protocols, one is a TCP protocol and the other is a custom UDP protocol; the first communication protocol is also a custom UDP protocol, and the custom UDP protocol is a different protocol from the UDP of the second network port 200. Since the definition of the UDP protocol is common knowledge in the art, and different UDP protocols can be defined by different data selection methods, it will not be described in detail here.

[0063] Because the multiple communication protocols configured by the second network port 200 are different from each other, and the multiple communication protocols are also different from the first communication protocol configured by the first network port 100, such processing can achieve communication isolation between the control network 400 and the external system 500 based on this system.

[0064] The control module 300 is connected to the first network port 100 and the second network port 200. The control module 300 may be a processor such as ARM or FPGA. In this embodiment, the control module 300 mainly implements the following functions:

[0065] First, controlling the first network port 100 to transmit data with the control network 400 via the first communication protocol;

[0066] Second, determining the second communication protocol, that is, selecting a communication protocol from the multiple communication protocols configured for the second network port 200 as a protocol for transmitting data between the second network port 200 and the external network;

[0067] Third, control the transmission of data between the second network port 200 and the external system 500 through the second communication protocol.

[0068] The control process and the process of selecting the communication protocol are described in detail in the subsequent implementation methods.

[0069] This embodiment provides a data transmission system 1000, which controls the transmission of data between the first network port 100 and the control network 400 through the first communication protocol through the control module 300; determines the second communication protocol from multiple communication protocols of the second network port 200 through the control module 300, and controls the transmission of data between the second network port 200 and the external system 500 through the second communication protocol. This not only enables data transmission and communication isolation between the control network 400 and the external system 500, but also because the specific communication protocol of the second network port 200 can be switched, the system and the external system 500 are compatible with multiple communication protocols, and protocol conversion between the control network 400 and the external system 500 communication protocols is achieved, thereby improving applicability.

[0070] In some embodiments, the first network port 100 includes a first control network communication network port 110 and a second control network communication network port 120;

[0071] The control module 300 is specifically used to control the transmission of data between the first control network communication port 110 and the control network 400 through the first communication protocol, or, after the first control network communication port 110 and the control network 400 are disconnected, control the transmission of data between the second control network communication port 120 and the control network 400 through the first communication protocol.

[0072] Compared with the solution of setting only one network port for the control network 400, this embodiment makes a safety redundant design, that is, the first network port 100 includes a first control network communication network port 110 and a second control network communication network port 120; these two control network 400 communication network ports both transmit data with the control network 400 through the first communication protocol. During normal use, only one of the communication network ports maintains data transmission with the control network 400, and the other control network 400 communication network port does not work. Only when one of the control network 400 communication network ports is disconnected from the control network 400, the other control network 400 communication network port starts working.

[0073] For example, after the control module 300 is disconnected between the first control network communication port 110 and the control network 400, it controls the transmission of data between the second control network communication port 120 and the control network 400 through the first communication protocol to ensure that the system and the control network 400 can transmit data normally and improve communication reliability.

[0074] In some embodiments, the second network port 200 includes a plurality of external network communication network ports equal in number to the plurality of communication protocols;

[0075] Each external network communication port is configured with a corresponding one of the plurality of communication protocols;

[0076] The control module 300 is specifically used to control data transmission between the external network communication port configured with the second communication protocol and the external system 500 through the second communication protocol.

[0077] Similar to the above-mentioned implementation, compared with the solution of setting only one network port for the external system 500, the second network port 200 also sets multiple external network communication ports, wherein the number of communication ports is the same as the number of communication protocols, one external network communication port is configured with one communication protocol, and is connected to the external system through a communication protocol correspondingly configured at the external system communication port.

[0078] For example, refer to Figure 2The second network port 200 of the system is provided with two external system communication network ports, including a first external system communication network port 210 and a second external system communication network 220; there are two external systems, including a first external system 510 and a second external system 520; the first external system communication network port 210 and the first external system 510 are connected by TCP protocol, and the second external system communication network port 220 and the second external system 520 are connected by UDP protocol, wherein the UDP protocol between the second external system communication network port 220 and the second external system 520 is a different UDP protocol from the first communication protocol.

[0079] This implementation method can bring the following advantages:

[0080] The second network port of the data transmission system is expanded into multiple external system communication network ports. Each external system communication network port is provided with a corresponding communication protocol as the second communication protocol of the network port. Each external system communication network port transmits data with a corresponding external system through the communication protocol configured on the network port. Such a setting can realize simultaneous communication between the control network and multiple external systems, thereby improving the scalability and flexibility of the data transmission system.

[0081] Reference Figure 1 and Figure 2 In a preferred embodiment, the multiple communication protocols configured by the second network port 200 include a UDP protocol and a TCP protocol. When the first external system 510 uses the TCP protocol, the system can use the TCP protocol as the second communication protocol of the first external system communication network port 210; when the second external system 520 uses the UDP protocol, the system can use a UDP protocol as the second communication protocol of the second external system communication network port 220.

[0082] Reference Figure 2 In a preferred embodiment, in order to increase security, the data transmission system is provided with a first control network communication port 110 and a second control network communication port 120. Both control network communication ports transmit data with the control network switch through the UDP protocol. When one of the control network communication ports cannot transmit data, the other control network communication port can take over the work, thereby improving security.

[0083] Reference Figure 2In a preferred embodiment, the second network port 200 of the data transmission system includes a first external system communication network port 210 and a second external system communication network port 220; the external network has two systems, namely, a first external system 510 and a second external system 520; the data transmission system transmits data between the first external system communication network port 210 and the first external system 510 through the Modbus-tcp communication protocol, and transmits data between the second external system communication network port 220 and the second external system 520 through the UDP protocol. The control module 300 of the data transmission system is an ARM processor, and the ARM processor is respectively connected to the four network ports for communication.

[0084] Reference Figure 3 , Figure 3 yes Figure 2 The system shown receives communication data from the control network 400, and periodically sends the communication data processed by the system to the control network, which includes the data receiving process.

[0085] In some embodiments, the system is further provided with a storage module, which is a memory associated with the second communication protocol and the first communication protocol. Figure 2 ,The memory includes registers of the Modbus-TCP protocol stack and the cache of the UDP protocol.

[0086] The ARM processor of this system establishes a TCP server as a slave station and establishes an access connection with the Modbus master station of the external system 500. The command data frame from the Modbus master station is received through the TCP protocol, and the Modbus protocol stack verifies, parses and processes the data frame. After the processing is completed, the response data frame is sent to the Modbus master station through the TCP protocol. The register types supported by the Modbus protocol stack include Holding, Input, Coil and Discrete, and the supported function codes include:

[0087] 1)01 (read Coil coil);

[0088] 2)02 (Read Discrete register)

[0089] 3)05 (write a single Coil coil);

[0090] 4) 15 (write multiple Coil coils);

[0091] 5)03 (Read Holding Register)

[0092] 6)04 (Read Input Register)

[0093] 7)06 (write a single Holding register);

[0094] 8) 16 (write multiple Holding registers);

[0095] 9)23 (read and write multiple holding registers).

[0096] In some implementations of the present application, the configuration file originates from a host computer, and the control module 300 is specifically configured to receive the configuration file sent by the host computer and determine the second communication protocol according to the configuration file.

[0097] The host computer is the host computer of the control network 400. The configuration file is a data structure that records corresponding fields. These fields can record the communication protocols used by the first external system 510 and the second external system 520. Then, these information can be written in the corresponding fields. After receiving the configuration file, the system can extract the fields therein and select the corresponding communication protocol to transmit data according to these information. When the system is restarted, data reception enable, transmission enable, length of received and sent data, and data format can all be defined according to the configuration file.

[0098] For details about the process of obtaining the configuration file, see the subsequent implementation method.

[0099] Reference Figure 4 In some embodiments of the present application, a data transmission method is provided based on the above-mentioned data transmission system, and the data transmission method includes the following steps S110 to S140.

[0100] Step S110: When a first data frame sent by a control network is received by a first network port through a first communication protocol, the first data frame is parsed to obtain first parsed data.

[0101] In step S110, the first data frame received by the first network port is data encapsulated by the control network using a corresponding communication protocol (i.e., the first communication protocol). Therefore, the first network port needs to parse the first data frame to obtain first parsed data therefrom. The first parsed data is data that needs to be sent to an external system, or is data marked with data required by the control network. The former is taken as an example here.

[0102] Step S120: In response to the first parsed data, determine a second communication protocol from a plurality of communication protocols configured at the second network port, wherein the plurality of communication protocols are different from each other and are different from the first communication protocol.

[0103] In step S120, in response to the first parsed data, one of the multiple communication protocols configured for the second network port is selected as the protocol used by the second network port and the external system, i.e., the second communication protocol. In one embodiment, the corresponding protocol can be selected according to the protocol used by the external system. For example, the external system selects TCP, and the TCP protocol is selected as the selected communication protocol here. In one embodiment, the second communication protocol can be randomly selected, and then the external system also uses the corresponding communication protocol. They are not listed here one by one.

[0104] Step S130: store the first parsed data in a memory associated with the second communication protocol.

[0105] In step S130, after parsing the first data frame sent by the control network to obtain the first parsed data, the first parsed data is then stored in a memory associated with the second communication protocol. For example, when the second communication protocol is the TCP communication protocol, the memory associated with the second communication protocol is a register of the TCP protocol stack; if the second communication protocol is the UDP protocol, the memory associated with the second communication protocol is the UDP cache.

[0106] Step S140: In response to a data request sent by the external system, the second network port sends the first parsed data in the memory associated with the second communication protocol to the external system through the second communication protocol.

[0107] In step S140, when a data request sent by an external system is received through the second network port, for example, the second network receives a data frame from the external system, after parsing the data frame, first parsed data is extracted from a memory associated with the second communication protocol according to the content of the data frame, and the first parsed data is sent to the external system.

[0108] In this embodiment, a first data frame is transmitted between the first network port and the control network through a first communication protocol, a second communication protocol is determined from multiple communication protocols of the second network port in response to the first parsed data, and after a data request is sent by the external system, the transmission of the first parsed data between the second network port and the external system through the second communication protocol is controlled. This not only enables data transmission and communication isolation between the control network and the external system, but also because the specific communication protocol of the second network port can be selected, protocol conversion between the control network and the external system communication protocol is achieved, thereby improving applicability and scalability.

[0109] Reference Figure 1 The system shown here provides the data conversion process between the control network, this system and the external system:

[0110] 1. Data conversion from control network to this system;

[0111] After the system receives the first data frame sent by the control network in the UDP protocol and passes the verification, it parses the first data frame according to the configuration file to obtain the first parsed data. Assuming that the first parsed data is the data that needs to be sent to the external system, and the second communication protocol between the second network port and the external system is the TCP communication protocol, the first parsed data is first stored in the Coil, Discrete, Input, and Holding registers of the corresponding Modbus protocol stack. If the communication protocol between the second network port and the external system is the UDP protocol, it is stored in the cache corresponding to the UDP protocol.

[0112] 2. Data conversion between this system and external systems through UDP protocol;

[0113] After the UDP data frame received by this system from the external system has passed the verification, it will parse the data frame according to the configuration file, extract the first parsed data from the cache corresponding to the UDP protocol based on the parsed data, and compose a communication data frame according to the UDP protocol and send it to the external system.

[0114] 3. Data conversion between this system and external systems through TCP communication protocol.

[0115] After the TCP data frame received by this system from the external system passes the verification, it parses the data frame according to the configuration file, extracts the first parsed data from the Coil, Discrete, Input, and Holding registers of the Modbus protocol stack based on the parsed data, and composes a communication data frame according to the TCP communication protocol and sends it to the external system.

[0116] Reference Figure 5 In some implementations of the present application, the data transmission method further includes:

[0117] Step S210: When a second data frame sent by an external system is received by the second network port through the second communication protocol, the second data frame is parsed to obtain second parsed data.

[0118] Step S220: store the second parsed data in a memory associated with the first communication protocol.

[0119] Step S230: The first network port sends the second parsed data in the memory associated with the first communication protocol to the control network through the first communication protocol.

[0120] The above-mentioned implementation mode is to transmit data from the control network to the external system. The steps S210 to S230 provided in this implementation mode are to transmit data from the external system to the control network.

[0121] In this implementation method, when a second data frame sent by an external system is received by a second network port through a second communication protocol, the second data frame is parsed to obtain second parsed data. The second parsed data is then stored in a memory associated with the first communication protocol. For example, if the first communication protocol is a UDP protocol, the second parsed data is stored in a cache corresponding to the UDP protocol. The first network port sends the second parsed data in the memory associated with the first communication protocol to the control network through the first communication protocol.

[0122] This implementation has the same beneficial effects as the above steps S110 to S140, and will not be described in detail here.

[0123] Reference Figure 6 In some embodiments of the present application, before responding to the first parsed data, the data transmission method further includes:

[0124] Step S310: Obtain the configuration file sent by the host computer.

[0125] Determining the second communication protocol from among the multiple communication protocols configured for the second network port in step S120 includes:

[0126] Step S320: Determine a second communication protocol from among a plurality of communication protocols configured for the second network port according to the configuration file.

[0127] In this embodiment, the host computer is a host computer that controls the network. The configuration file is a data structure that records corresponding fields, and these fields can record the communication protocol used by the external system, and then these information can be written in the corresponding fields. After receiving the configuration file, the second communication protocol can be determined from the multiple communication protocols configured by the second network port according to the information recorded in the configuration file.

[0128] In one embodiment, the host computer can send a configuration file based on the state of the external system, for example, if the external system selects TCP as the communication protocol, and after receiving the configuration file sent by the host computer, TCP is selected as the communication protocol for data transmission between the second network port and the external system. The second communication protocol of the second network port can be adjusted in real time by sending the configuration file by the host computer, and switching the communication protocol is more convenient.

[0129] Reference Figure 7 In some implementations of the present application, obtaining the configuration file sent by the host computer includes:

[0130] Step S510: receiving a download command sent by a host computer, wherein the download command carries a configuration file.

[0131] Step S520: When the download command is a download request command, receive the configuration file, generate and send a response command to the host computer.

[0132] Step S530: When the download command is a download data command, the configuration file is stored in a local buffer area, and a response command is generated and sent to the host computer.

[0133] Step S540: When the download command is a download and save command, verify the configuration file. If the verification is valid, store the configuration file in the local flash memory, and generate and send a response command to the host computer.

[0134] Reference Figure 8 , Figure 8 It is a schematic diagram of the download process of the configuration file, that is, the configuration files for system operation and the configuration files for variable processing of the host computer are directly sent to this system through the TCP protocol.

[0135] Of course, the host computer can also forward the configuration file through the control network, and then transmit it to the control module through the communication protocol between the control network and the system. The communication with the host computer adopts the "command-response" method. After receiving the download command frame from the host computer and checking whether it is valid, if the command is valid, it responds to the corresponding command and sends a response frame. After the configuration file is received, the file is checked as a whole. If the check passes, the configuration file is stored in the local flash memory.

[0136] Reference Fig.10 After the control module is powered on, the device configuration and data configuration need to be parsed from the configuration file to provide a basis for communication, receiving variable parsing and sending variable packaging.

[0137] Reference Fig. 9 In some implementations of the present application, the data transmission method further includes:

[0138] Step S610: monitor the communication status between the first network port and the control network, and between the second network port and the external system.

[0139] Step S620: encapsulate the communication status into a communication data frame.

[0140] Step S630: The first network port sends the communication data frame to the control network through the first communication protocol, so that the control network sends the communication data frame to the host computer.

[0141] This implementation can monitor the communication status between the first network port and the control network, and between the second network port and the external system, and send the control network periodically to the host computer, so that the host computer can monitor the operation status in real time.

[0142] In some implementations, the system may also encapsulate system version information and operating status related information into communication data frames and periodically send them to a host computer via a control network, so that the host computer can monitor the operating status of the system in real time.

[0143] In some implementations, to ensure reliable operation of the system, the ARM processor of the system monitors the following status information during operation:

[0144] 1) Working status: monitor initialization status, operating status, and fault information.

[0145] 2) Communication status: Detect the communication status between this system and the control network, the Modubs-TCP communication status between this system and the external system, and the UDP communication status between this system and the external system.

[0146] The above is a specific description of the preferred implementation of the embodiments of the present application, but the embodiments of the present application are not limited to the above-mentioned implementation methods. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the embodiments of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the embodiments of the present application.

Claims

1. A data transmission system, characterized in that: The data transmission system comprises: A first network port is communicatively connected to a control network, wherein the first network port is configured with a first communication protocol; A second network port is connected to an external system for communication, wherein the second network port is configured with a plurality of communication protocols, the plurality of communication protocols are different from each other, and the plurality of communication protocols are different from the first communication protocol; A control module is communicatively connected to the first network port and the second network port, and is used to control the transmission of data between the first network port and the control network through the first communication protocol; and to determine a second communication protocol and control the transmission of data between the second network port and the external system through the second communication protocol, wherein the second communication protocol is any one of the multiple communication protocols.

2. The data transmission system according to claim 1, characterized in that: The first network port includes a first control network communication network port and a second control network communication network port; The control module is specifically used to control the transmission of data between the first control network communication port and the control network through the first communication protocol, or, after the first control network communication port and the control network are disconnected, control the transmission of data between the second control network communication port and the control network through the first communication protocol.

3. The data transmission system according to claim 1, characterized in that: The second network port includes a plurality of external network communication network ports having the same number as the plurality of communication protocols; Each of the external network communication ports is configured with a corresponding one of the multiple communication protocols; The control module is specifically used to control the transmission of data between the external network communication port configured with the second communication protocol and the external system through the second communication protocol.

4. The data transmission system according to claim 1, characterized in that: The first communication protocol includes a first UDP protocol, the multiple communication protocols include a second UDP protocol and a TCP protocol, and the second UDP protocol is different from the first UDP protocol.

5. The data transmission system according to claim 1, characterized in that: The control module is specifically used to receive a configuration file sent by a host computer, and determine the second communication protocol according to the configuration file.

6. A data transmission method, characterized in that: The data transmission method comprises: When a first data frame sent by a control network is received by a first network port through a first communication protocol, the first data frame is parsed to obtain first parsed data; In response to the first parsed data, determining a second communication protocol from a plurality of communication protocols configured at the second network port, wherein the plurality of communication protocols are different from each other and are different from the first communication protocol; storing the first parsed data in a memory associated with the second communication protocol; In response to a data request sent by an external system, the first parsed data in the memory associated with the second communication protocol is sent to the external system by the second network port through the second communication protocol.

7. The data transmission method according to claim 6, characterized in that: The data transmission method further comprises: When a second data frame sent by the external system is received by the second network port through the second communication protocol, the second data frame is parsed to obtain second parsed data; storing the second parsed data in a memory associated with the first communication protocol; The second parsed data in the memory associated with the first communication protocol is sent to the control network by the first network port through the first communication protocol.

8. The data transmission method according to claim 6, characterized in that: Before responding to the first parsed data, the data transmission method further includes: Get the configuration file sent by the host computer; Determining the second communication protocol from among the multiple communication protocols configured by the second network port includes: According to the configuration file, a second communication protocol is determined from a plurality of communication protocols configured for the second network port.

9. The data transmission method according to claim 8, characterized in that: The step of obtaining the configuration file sent by the host computer includes: Receiving a download command sent by a host computer, wherein the download command carries the configuration file; In the case where the download command is a download request command, receiving the configuration file, generating and sending a response command to the host computer; In the case where the download command is a download data command, storing the configuration file in a local buffer area, generating and sending a response command to the host computer; In the case where the download command is a download save command, the configuration file is verified, and if the verification is valid, the configuration file is stored in the local flash memory, and a response command is generated and sent to the host computer.

10. The data transmission method according to claim 6, characterized in that: The data transmission method further comprises: Monitoring the communication status between the first network port and the control network, and between the second network port and the external system; Encapsulating the communication state into a communication data frame; The first network port sends the communication data frame to the control network through the first communication protocol, so that the control network sends the communication data frame to the host computer.