C2F application transmission system industrial message sending method, receiving method and related equipment
By introducing transmit conversion devices and receive conversion devices into the EtherCAT network, the EtherCAT data format is converted into the IP data format, and encryption is performed using message and network characteristics. This solves the problems of transmission flexibility and security under the EtherCAT protocol, and enables reliable data transmission over long distances.
Patent Information
- Application Number
- CN202510459017.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-04-14
AI Technical Summary
Existing C2F application data transmission under the EtherCAT protocol has poor flexibility, cannot be transmitted over long distances, and lacks data transmission security.
Sending and receiving conversion devices are set up between the master and slave stations. These devices are used to encapsulate C2F application industrial message data into IP packets, converting the data format from EtherCAT to IP, and encrypting the data using message data characteristics and real-time network characteristics of the IP network before transmission.
It improves the flexibility and security of C2F application industrial message data transmission, and realizes the reliability and security of long-distance data transmission.
Smart Images

Figure CN120075311B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to industrial message sending and receiving methods and related equipment for C2F application transmission systems. Background Technology
[0002] With societal development, a new business model called C2F (customer to factory) has emerged. In this model, customers can place orders directly through a digital platform, and factories produce and deliver according to the order requirements. By directly connecting consumers and manufacturers, it eliminates intermediaries, thereby improving efficiency, reducing costs, and providing more personalized customization services. Under the C2F model, factories need to respond to consumer order demands in real time and be able to quickly adjust production lines to meet individual needs. This requires not only efficient production processes but also robust and flexible hardware infrastructure to support high-speed data transmission and processing.
[0003] In related technologies, based on the C2F model, the information layer switches at the factory end need to transmit massive C2F application data streams from various industrial equipment and business management systems. The mainstream communication protocol for these data streams is EtherCAT. The factory side typically adopts a master-slave transmission structure based on the EtherCAT protocol, that is, setting up one master station and multiple slave stations to transmit EtherCAT data. One master station is responsible for controlling and synchronizing the slave stations in the network. The master station sends control commands and data, and the slave stations receive and execute these commands. However, since only EtherCAT data can be transmitted between the master and slave stations, and between slave stations themselves, the distance between the master and slave stations, and between slave stations themselves, cannot be too great, resulting in poor flexibility in the transmission of existing C2F application data. Summary of the Invention
[0004] This application provides an industrial message sending method, receiving method, and related equipment for a C2F application transmission system, which can improve the transmission flexibility of industrial data in C2F applications.
[0005] To achieve the above objectives, a first aspect of this application provides an industrial message transmission method for a C2F application transmission system. The C2F application transmission system includes a transmitting station, a transmitting conversion device, a receiving conversion device, and a receiving station connected sequentially. The method is applied to the transmitting conversion device and includes:
[0006] Acquire C2F application industrial message data input by the sending station;
[0007] Based on the message data characteristics of the C2F application industrial message data and the real-time network characteristics of the IP network, the C2F application industrial message data is encrypted to obtain encrypted message data.
[0008] Based on the register configuration of the receiving and conversion device, the encrypted message data is encapsulated into IP packets to obtain IP encrypted message data;
[0009] The IP encrypted message data is sent to the receiving and conversion device through the IP network, so that the receiving and conversion device forwards the C2F application industrial message data to the receiving station.
[0010] In some embodiments, the step of encapsulating the encrypted message data into IP packets based on the register configuration of the receiving conversion device to obtain IP encrypted message data includes:
[0011] Based on the register configuration, an IPv4 header is obtained, which includes an idle protocol identifier value.
[0012] Obtain the target MAC address of the receiving station, and generate an Ethernet frame header based on the target MAC address;
[0013] The IPv4 packet header and the Ethernet frame header are added to the header of the encrypted packet data to obtain the IP encrypted packet data.
[0014] In some embodiments, encrypting the C2F application industrial message data based on the message data characteristics of the C2F application industrial message data and the real-time network characteristics of the IP network to obtain encrypted message data includes:
[0015] An encryption key is generated based on the message data characteristics and the real-time network characteristics;
[0016] The C2F application industrial message data is encrypted based on the encryption key to generate encrypted data and corresponding authentication tags.
[0017] The encrypted message data is generated based on the encrypted data, the authentication tag, and the real-time network features.
[0018] In some embodiments, generating an encryption key based on the message data features and the real-time network features includes:
[0019] The initial key is generated by hashing based on the aforementioned register configuration.
[0020] The message data features and the real-time network features are normalized and concatenated to generate dynamic factors;
[0021] A dynamic key is generated by hashing based on the dynamic factor.
[0022] The dynamic key and the initial key are XORed together to generate the encryption key.
[0023] In some embodiments, encrypting the C2F application industrial message data based on the encryption key to generate encrypted data and a corresponding authentication tag includes:
[0024] Obtain the nonlinear mapping table and generate misalignment handling identifiers;
[0025] Based on the nonlinear mapping table, each byte in the C2F application industrial message data is nonlinearly replaced to generate nonlinear message data.
[0026] Based on the misalignment processing identifier and the encryption key, the nonlinear message data is subjected to misalignment encryption processing to obtain the encrypted data;
[0027] The authentication tag is generated based on the mapping table identifier of the nonlinear mapping table and the misalignment processing identifier.
[0028] In some embodiments, the misalignment processing identifier includes a row shift identifier and a column hybrid identifier. The step of performing misalignment encryption processing on the nonlinear message data based on the misalignment processing identifier and the encryption key to obtain the encrypted data includes:
[0029] Based on the row shift identifier, target row data is selected from the nonlinear message data and shifted to obtain the first shifted data;
[0030] Obtain the mixing matrix corresponding to the column mixing identifier, select target column data from the first shifted data based on the column mixing identifier, and perform matrix operations on the target column data and the mixing matrix to obtain the second shifted data;
[0031] The second shifted data is XORed with the encryption key to obtain the encrypted data.
[0032] To achieve the above objectives, a second aspect of this application provides an industrial message receiving method for a C2F application transmission system. The C2F application transmission system includes a transmitting station, a transmitting conversion device, a receiving conversion device, and a receiving station connected sequentially. The method is applied to the receiving conversion device and includes:
[0033] Acquire IP encrypted message data transmitted by the sending station through the sending conversion device and the IP network, and acquire message data characteristics;
[0034] Based on the register configuration of the receiving and conversion device, the IP encrypted message data is decapsulated to obtain encrypted message data.
[0035] Obtain the real-time network characteristics of the IP network at the time of transmission from the encrypted message data;
[0036] The encrypted message data is decrypted based on the message data characteristics and real-time network characteristics to obtain the C2F application industrial message data, and then the C2F application industrial message data is forwarded to the receiving station.
[0037] To achieve the above objectives, a third aspect of this application provides an industrial message sending device for a C2F application transmission system. The C2F application transmission system includes a sending station, a sending conversion device, a receiving conversion device, and a receiving station connected in sequence. The device is applied to the sending conversion device and includes:
[0038] The message data acquisition module is used to acquire C2F application industrial message data input by the sending station;
[0039] The encryption processing module is used to encrypt the C2F application industrial message data based on the message data characteristics of the C2F application industrial message data and the real-time network characteristics of the IP network to obtain encrypted message data.
[0040] The format conversion module is used to encapsulate the encrypted message data into IP packets based on the register configuration of the receiving conversion device to obtain IP encrypted message data.
[0041] The data transmission module is used to send the IP encrypted message data to the receiving and conversion device through the IP network, so that the receiving and conversion device forwards the C2F application industrial message data to the receiving station.
[0042] To achieve the above objectives, a fourth aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the industrial message sending method of the C2F application transmission system as described in the first aspect or the industrial message receiving method of the C2F application transmission system as described in the second aspect.
[0043] To achieve the above objectives, a fifth aspect of the present application provides a storage medium, which is a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the industrial message sending method of the C2F application transmission system described in the first aspect or the industrial message receiving method of the C2F application transmission system described in the second aspect.
[0044] The present application discloses an industrial message sending method, receiving method, and related equipment for a C2F application transmission system. The C2F application transmission system includes a sending station, a sending conversion device, a receiving conversion device, and a receiving station connected in sequence. The method is applied to the sending conversion device and includes: first, acquiring C2F application industrial message data input from the sending station; next, encrypting the C2F application industrial message data based on the message data characteristics and real-time network characteristics of the IP network to obtain encrypted message data; then, encapsulating the encrypted message data into IP packets based on the register configuration of the receiving conversion device to obtain IP encrypted message data; finally, sending the IP encrypted message data to the receiving conversion device through the IP network, so that the receiving conversion device forwards the C2F application industrial message data to the receiving station. This application embodiment sets up a transmitting conversion device and a receiving conversion device between the master station and the slave station, or between slave stations. The transmitting conversion device encapsulates the industrial message data of the C2F application into IP packets, converting the data format from EtherCAT to an IP data format suitable for transmission over an IP network. This allows the industrial message data to be transmitted between the sending and receiving stations via the IP network, improving the transmission flexibility of the C2F application's industrial message data. Furthermore, before transmission, the C2F application's industrial message data is encrypted using two random characteristics: the message data characteristics and the current real-time network characteristics of the IP network. This greatly reduces the possibility of theft during data transmission, thus improving both the transmission flexibility and security of the C2F application's industrial message data.
[0045] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description
[0046] Figure 1 This is a master-slave data transmission architecture diagram in a C2F application provided by an embodiment of this application.
[0047] Figure 2 This is a schematic diagram of the structure of EtherCAT data provided in another embodiment of this application.
[0048] Figure 3 This is a schematic diagram of message information for EtherCAT data provided in another embodiment of this application.
[0049] Figure 4This is a schematic diagram of remote transmission of EtherCAT data between master and slave stations, provided in another embodiment of this application.
[0050] Figure 5 This is a schematic diagram of the structure of a C2F application transmission system provided in another embodiment of this application.
[0051] Figure 6 This is a schematic diagram of the structure of a conversion device provided in another embodiment of this application.
[0052] Figure 7 This is a flowchart of an industrial message sending method for a C2F application transmission system provided in another embodiment of this application.
[0053] Figure 8 yes Figure 7 The flowchart for step 702.
[0054] Figure 9 yes Figure 8 The flowchart for step 801.
[0055] Figure 10 yes Figure 8 The flowchart for step 802.
[0056] Figure 11 yes Figure 10 The flowchart for step 1003.
[0057] Figure 12 yes Figure 7 The flowchart for step 703.
[0058] Figure 13 This is a schematic diagram of a protocol number in IP encrypted message data provided in another embodiment of this application.
[0059] Figure 14 This is a schematic diagram of an industrial message data transmission and processing method provided in another embodiment of this application.
[0060] Figure 15 This is a flowchart of an industrial message receiving method for a C2F application transmission system provided in another embodiment of this application.
[0061] Figure 16 This is a schematic diagram of an industrial message data receiving and processing procedure provided in another embodiment of this application.
[0062] Figure 17 This is a flowchart of a C2F application industrial message data processing method provided in another embodiment of this application.
[0063] Figure 18This is a schematic diagram of the structure of an industrial message sending device for a C2F application transmission system provided in another embodiment of this application.
[0064] Figure 19 This is a schematic diagram of the hardware structure of an electronic device provided in another embodiment of this application. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0066] It should be noted that although functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.
[0067] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0068] With societal development, a new business model called C2F (customer to factory) has emerged. The C2F model directly connects consumers and manufacturers, eliminating intermediaries, thereby improving efficiency, reducing costs, and providing more personalized customization services. This model is becoming increasingly popular in modern manufacturing, especially in the fields of customized production and smart manufacturing. The two core concepts of C2F are "unmanned" and "capacity release." To achieve an "unmanned" factory, precise and rapid automated control of factory equipment is essential. Therefore, factories extensively utilize automated equipment such as Programmable Logic Controllers (PLCs), robotic arms, and vision inspection systems.
[0069] In this model, customers can place orders directly through a digital platform, and factories produce and deliver according to the order requirements. By directly connecting consumers and manufacturers, it eliminates intermediaries, thereby improving efficiency, reducing costs, and providing more personalized customization services. In the C2F model, factories need to respond to consumer order demands in real time and be able to quickly adjust production lines to meet individual needs. This requires not only efficient production processes but also robust and flexible hardware infrastructure to support high-speed data transmission and processing.
[0070] In related technologies, based on the C2F (Consumer-to-Factory) model, the information layer switches at the factory end need to transmit massive C2F application data streams from various industrial equipment and business management systems. The mainstream communication protocol for these data streams is EtherCAT. EtherCAT (Ethernet for Control Automation) is an open, real-time Ethernet technology, originally developed by Beckhoff. EtherCAT sets a new standard for real-time performance and topology flexibility. EtherCAT networks offer superior performance, flexible network topologies, simple system configuration, and intuitive operation, similar to fieldbus systems. Furthermore, the low implementation cost of EtherCAT allows systems to utilize fieldbus networks in situations where they were previously not feasible. For these reasons, EtherCAT is widely used in industrial scenarios such as robotics, machine tools, packaging machinery, power plants, steel mills, and sawmills.
[0071] Reference Figure 1 This is a master-slave data transmission architecture diagram provided in a C2F application according to an embodiment of this application. For example... Figure 1 As shown, the factory typically employs a master-slave transmission structure based on the EtherCAT protocol, where a master station is responsible for controlling and synchronizing the slave stations in the network. The master station sends control commands and data, and the slave stations receive and execute these commands. An EtherCAT network can support up to 1000 slave stations, each with its own network address and unique identifier. Through EtherCAT, slave stations can transmit input and output signals in real time, such as sensor data, actuator status, and control commands.
[0072] Figure 2 This is a schematic diagram of the structure of EtherCAT data provided in an embodiment of this application. For example... Figure 2 The diagram illustrates the detailed structure of the EtherCAT message format, including the Ethernet frame header and the EtherCAT data area. The Ethernet frame header consists of a 6-byte destination address, a 6-byte source address, and a 2-byte frame type (0x88A4). Following this is the EtherCAT header, which contains an 11-bit EtherCAT data length, a 1-bit reserved bit, a 4-bit type, and sub-messages. The EtherCAT data area consists of one or more sub-messages, each including a 10-byte sub-message header and up to 1486 bytes of data. The sub-message header is subdivided into an 8-bit command, an 8-bit index, a 32-bit address area, an 11-bit length, a 4-bit R bit, a 1-bit M bit, a 16-bit status bit, and a 2-byte WKC (Work Count). The entire message ends with a 6-byte FCS (Frame Check Sequence).
[0073] Figure 3 This is a schematic diagram of EtherCAT data message information provided in an embodiment of this application. For example... Figure 3 As shown, the names and meanings of each field in the EtherCAT message field are provided. Figure 3 The EtherCAT message contains six fields: destination address (receiver's MAC address), source address (sender's MAC address), frame type (0x88A4), data length in the EtherCAT header (representing the length of the EtherCAT data area, i.e., the sum of the lengths of all sub-messages), type in the EtherCAT header (where 1 indicates communication with a slave station, and the remaining values are reserved), and FCS (Frame Check Sequence). These fields together constitute the structure of the EtherCAT message, ensuring the accuracy and integrity of data transmission.
[0074] Traditional factory industrial production control rooms are divided into three levels: the on-site operator room, the plant's dispatch room, and the base's central dispatch room, with the operator room located on the production line. In many industries such as chemical and metallurgical manufacturing, the on-site operating environment is harsh or dangerous, making remote centralized control a trend towards reduced or unmanned on-site operations. However, existing industrial control systems generally use local area network architectures such as industrial Ethernet and industrial buses, which cannot meet the demands of remote centralized control.
[0075] Reference Figure 4 This is a schematic diagram of remote transmission of EtherCAT data between master and slave stations provided in an embodiment of this application. Figure 4 As shown, because the master and slave stations used under the EtherCAT protocol, as well as between slave stations, can only transmit EtherCAT type data, and cannot use IP networks for remote data transmission, the distance between the master and slave stations, as well as between slave stations, cannot be too far. This results in poor data transmission flexibility in existing C2F applications, making long-distance data transmission impossible.
[0076] To improve the transmission flexibility of industrial data in C2F applications, this embodiment of the application sets up a sending conversion device and a receiving conversion device between the master station and the slave station, or between slave stations. The sending conversion device encapsulates the industrial message data of the C2F application into IP packets, converting the data format from EtherCAT to an IP data format suitable for transmission over an IP network. This allows the industrial message data to be transmitted between the sending and receiving stations via the IP network, thereby improving the transmission flexibility of C2F application industrial message data. Furthermore, before transmission, the C2F application industrial message data is encrypted using two random characteristics: the message data characteristics of the C2F application industrial message data and the current real-time network characteristics of the IP network. This greatly reduces the possibility of theft during data transmission, thus improving both the transmission flexibility and the security of data transmission.
[0077] The following will further describe the industrial message sending method, receiving method, and related equipment of the C2F application transmission system provided in the embodiments of this application. First, the C2F application transmission system provided in the embodiments of this application will be described. (Refer to...) Figure 5 This is a schematic diagram of the structure of a C2F application transmission system provided in an embodiment of this application. Figure 5 As shown in the diagram, a C2F application transmission system is configured with a transmitting station, a transmitting conversion device, a receiving conversion device, and a receiving station connected in sequence. The method is applied to the transmitting conversion device, and the transmitting station can be as follows: Figure 1 The EtherCAT master station shown is either an EtherCAT slave station; similarly, the receiving station can also be as follows: Figure 1 The diagram shows either an EtherCAT master station or an EtherCAT slave station; then, a transmit conversion device and a receive conversion device are set between the sender station and the receiver station. These two conversion devices are used to convert the EtherCAT type data sent by the sender station into IP type data that can be transmitted in the IP network, and to convert the IP type data into EtherCAT type data.
[0078] Reference Figure 6 This is a schematic diagram of the structure of a conversion device provided in an embodiment of this application. Figure 6As shown, the conversion device includes: an Ethernet interface (including Ethernet interface 1 and Ethernet interface 2) for transmitting and receiving Ethernet messages, receiving messages from EtherCAT master / slave stations or IP network devices and sending messages to each other; a bus, which is the interconnection module of all modules in the system, and can be an AXI4 bus interface; a DDR controller, where the DDR PHY converts the bus timing to the DDR interface timing, and the DDR is used to store messages; a protocol conversion (including protocol conversion 1 and protocol conversion 2), which adds an IP header and an Ethernet header to the encrypted EtherCAT message to form a complete Ethernet frame; an encryption module, which encrypts the received EtherCAT message to obtain ciphertext, which can use the AES (Advanced Encryption Standard) encryption algorithm; and a decryption module, which decrypts the received ciphertext to obtain the original EtherCAT message. The AES decryption algorithm can also be used; the CPU is responsible for register configuration and software execution; the registers configure the encryption and decryption keys, the destination and source IP addresses in the IP header, the protocol number in the IP header, etc.; other interfaces include the serial port for debugging, the I2C interface for the temperature sensor, etc.
[0079] Based on the C2F application transmission system described above, the industrial message transmission method of the C2F application transmission system in this application embodiment will be described in detail below. (Refer to...) Figure 7 This is an optional flowchart of an industrial message sending method for a C2F application transmission system provided in this application embodiment. Figure 7 The method may include, but is not limited to, steps 701 to 704. It is also understood that this embodiment... Figure 7 The order of steps 701 to 704 is not specifically limited; the order of steps can be adjusted or certain steps can be added or removed according to actual needs. The industrial message sending method for the C2F application transmission system provided in this embodiment can be applied to the sending and conversion equipment in the C2F application transmission system.
[0080] Step 701: Obtain the C2F application industrial message data input by the sending station.
[0081] Step 701 is described in detail below.
[0082] In a C2F scenario, at the factory side, when responding to a request from the sending station to send C2F application industrial message data to the receiving station, the sending conversion device first receives the C2F application industrial message data of the EtherCAT protocol type. This facilitates subsequent encryption and data type conversion of the C2F application industrial message data, enabling remote transmission of the C2F application industrial message data over the IP network while ensuring data transmission security.
[0083] In addition, the transmitting and converting equipment also parses industrial message data from C2F applications to extract message data characteristics, such as extracting command type (Command field): 0x01 (write operation), 0x04 (read operation), etc.; extracting device identifier: master station MAC address (MAC_master), target slave station address (32-bit logical address); extracting data fields: control commands (such as motion parameters) or sensor status data, etc.
[0084] Step 702: Based on the message data characteristics of C2F application industrial message data and the real-time network characteristics of the IP network, encrypt the C2F application industrial message data to obtain encrypted message data.
[0085] Step 702 is described in detail below.
[0086] In some embodiments, while obtaining the input C2F application industrial message data, it is also necessary to extract network features from the connected IP network to extract the real-time network features of the IP network corresponding to the time the message data was sent. These real-time network features include latency, jitter, bandwidth utilization, packet loss rate, throughput, etc.
[0087] Next, by utilizing the message data characteristics of C2F application industrial message data and the real-time network characteristics of IP networks—two random characteristic data—the C2F application industrial message data will undergo more random encryption processing, thereby effectively improving the security of C2F application industrial message data transmission. The encryption process for industrial message data will be further described below.
[0088] Reference Figure 8 Based on the message data characteristics of C2F application industrial message data and the real-time network characteristics of IP network, the C2F application industrial message data is encrypted to obtain encrypted message data, including the following steps 801 to 803.
[0089] Step 801: Generate an encryption key based on message data characteristics and real-time network characteristics.
[0090] Step 801 will be described in detail below.
[0091] In some embodiments, after obtaining two random feature data points—the message data characteristics of C2F application industrial message data and the real-time network characteristics of the IP network—a highly random encryption key is generated using these two random feature data points. This allows for improved data security when the encryption key is subsequently used for encrypting C2F application industrial message data. The following will further describe how to generate the encryption key based on the message data characteristics and real-time network characteristics.
[0092] Reference Figure 9 The encryption key is generated based on message data characteristics and real-time network characteristics, including the following steps 901 to 904.
[0093] Step 901: Generate an initial key by performing hash processing based on register configuration.
[0094] Step 902: Normalize and concatenate the message data features and real-time network features to generate dynamic factors.
[0095] Step 903: Generate a dynamic key by performing hash processing based on the dynamic factor.
[0096] Step 904: Perform XOR obfuscation on the dynamic key and the initial key to generate an encryption key.
[0097] Steps 901 to 904 are described in detail below.
[0098] In some embodiments, a hash value is first generated based on the information in the register configuration of the receiving conversion device, and this hash value is used as a fixed initial key.
[0099] It is understandable that the information in the register configuration of the receiving conversion device mainly includes: DEC_KEY[0-3] (stores a 256-bit dynamic decryption key, which is updated synchronously with the sending end), IP_SRC_MAP (the mapping table address from the source IP to the EtherCAT master station MAC, used to recover the broadcast address), IP_PROTOCOL_FILTER (protocol number filter mask, only processes specified encrypted messages), GCM_TAG_THRESH (authentication tag tolerance threshold, messages exceeding the limit are discarded), CYCLE_COUNTER_SYNC (cycle counter synchronization value, aligns with the master station timing), NET_JITTER_MAX (maximum allowed network jitter, triggers redundancy fault tolerance), and CRC_CHECK_EN (CRC check enable), etc.
[0100] In addition, the hash function used for hashing can be a general hash function, such as MD5, SHA series, etc.
[0101] Next, the relevant data in the message data features and real-time network features are numerically normalized to map all these data into the same numerical range. For example, if the delay t∈[0,255], then the delay t is normalized to t / 255. The processing of the rest of the data is similar.
[0102] Then, all the normalized feature data are concatenated to obtain a vector containing all the feature data. This vector is used as a dynamic factor, and a hash function is used to hash this dynamic factor to obtain a dynamic key with the same format as the initial key but a different value.
[0103] Next, the dynamic key and the initial key are XORed, and then the first 256 bits are truncated as the encryption key.
[0104] Through steps 901 to 904 above, a highly random dynamic key is generated by utilizing the unique message characteristics of each C2F application industrial message and the time-varying and random real-time network characteristics of the IP network. The highly random dynamic key is then used to perform XOR obfuscation on the fixed initial key, further enhancing the randomness of the generated encryption key. This greatly improves the security of subsequent transmission of C2F application industrial message data after encryption using this encryption key.
[0105] Step 802: Encrypt the C2F application industrial message data based on the encryption key to generate encrypted data and corresponding authentication tags.
[0106] Step 803: Generate encrypted message data based on the combination of encrypted data, authentication tags, and real-time network features.
[0107] Steps 802 to 803 are described in detail below.
[0108] In some embodiments, after generating a highly confidential encryption key using highly random message feature data and real-time network features, the encryption key is further used to encrypt the C2F application industrial message data to obtain highly secure encrypted data and a corresponding authentication tag. The encrypted data and the corresponding authentication tag are then combined as encrypted message data for transmission. This allows the data to be transmitted to the receiving and conversion device via the IP network. The receiving and conversion device can then use the authentication tag to decrypt the encrypted data to obtain the corresponding C2F application industrial message data.
[0109] The following section will further describe how to use encryption keys to encrypt industrial message data in C2F applications.
[0110] Reference Figure 10 The C2F application industrial message data is encrypted based on the encryption key to generate encrypted data and corresponding authentication tags, including the following steps 1001 to 1004.
[0111] Step 1001: Obtain the nonlinear mapping table and generate misalignment processing identifiers.
[0112] Step 1002: Based on the nonlinear mapping table, perform nonlinear replacement on each byte in the C2F application industrial message data to generate nonlinear message data.
[0113] Step 1003: Based on the misalignment processing identifier and encryption key, perform misalignment encryption processing on the nonlinear message data to obtain encrypted data.
[0114] Step 1004: Generate an authentication tag based on the mapping table identifier and misalignment processing identifier of the nonlinear mapping table.
[0115] Steps 1001 to 1004 are described in detail below.
[0116] In some embodiments, after obtaining the encryption key, the nonlinear mapping table and misalignment processing identifier corresponding to the current encryption process are determined. The nonlinear mapping table is an S-Box (multi-order lookup table) which contains nonlinear mapping relationships of multiple character data. The misalignment processing identifier includes row shift identifiers and column shift identifiers. The row shift identifier includes the target rows corresponding to multiple row transformation processes and the corresponding processing methods. The column shift identifier includes the target columns corresponding to multiple column transformation processes and the corresponding processing methods.
[0117] Next, based on this nonlinear mapping table, each byte in the C2F application industrial message data is nonlinearly replaced to generate nonlinear message data. When the conversion device uses an FPGA, the S-Box module can be used in parallel to accelerate the nonlinear replacement process.
[0118] After performing nonlinear replacement processing, the nonlinear message data is further encrypted based on the misalignment processing identifier and encryption key to obtain encrypted data, as described below.
[0119] Reference Figure 11 Based on the misalignment processing identifier and encryption key, the nonlinear message data is subjected to misalignment encryption processing to obtain encrypted data, including the following steps 1101 to 1103.
[0120] Step 1101: Select the target row data from the nonlinear message data based on the row shift identifier and perform row shifting to obtain the first shifted data.
[0121] Step 1102: Obtain the mixing matrix corresponding to the column mixing identifier, select the target column data from the first shifted data based on the column mixing identifier, and perform matrix operations on the target column data and the mixing matrix to obtain the second shifted data.
[0122] Step 1103: Perform an XOR operation between the second shifted data and the encryption key to obtain the encrypted data.
[0123] Steps 1101 to 1103 are described in detail below.
[0124] In some embodiments, after obtaining the misalignment processing identifier, encryption key, and nonlinear message data, the target row data is first selected from the nonlinear message data based on the row shift identifier in the misalignment processing identifier and then shifted to obtain the first shifted data, such as shifting the first row of the nonlinear message data left by 1 byte, shifting the second row right by 2 bytes, and so on.
[0125] Next, obtain the mixing matrix corresponding to the column shift identifier in the misalignment processing identifier, then select the target column data from the first shift data based on the column shift identifier, and then perform matrix multiplication operation on the target column data and the mixing matrix to obtain the second shift data. Finally, perform XOR obfuscation processing (XOR operation) on the obtained second shift data and the encryption key again to obtain encrypted data with strong randomness and confidentiality.
[0126] Finally, the mapping table identifier and misalignment processing identifier (including row transformation identifier and column transformation identifier) in the nonlinear mapping table are used to generate an authentication tag, so that the subsequent receiving and conversion device can use the authentication tag to perform corresponding decryption processing on the encrypted data after receiving the encrypted data.
[0127] Through steps 1001 to 1004 and steps 1101 to 1103 above, the security of C2F industrial messages is significantly improved through the synergistic effect of dynamic nonlinear obfuscation and multi-level diffusion mechanisms. Byte replacement based on a nonlinear mapping table destroys the statistical characteristics of message data to resist side-channel attacks based on pattern analysis. The introduction of spatial diffusion effects by dynamic row shifting and hybrid matrix operations means that a single byte modification will trigger a chain reaction of changes in multiple columns of data, effectively suppressing differential attacks. Combined with the obfuscation parameters of dynamic identifiers (row shift identifiers and column hybrid identifiers), a dynamic encryption strategy of "one message, one key" is realized. Even if the key is leaked, it is still impossible to reverse-engineer historical messages. Furthermore, authentication tags are used to generate deeply fused nonlinear mapping table features and misalignment identifiers, simultaneously realizing data integrity protection and traceability of the encryption process, preventing replay attacks and man-in-the-middle tampering.
[0128] After obtaining the encrypted data and the corresponding authentication tag, the encrypted data, the corresponding authentication tag, and the real-time network characteristics corresponding to the sending time are combined to generate encrypted message data. This allows the receiving and conversion device to perform the corresponding decryption process based on the authentication tag and the real-time network characteristics after the encrypted message data is sent to the receiving and conversion device.
[0129] Step 703: Based on the register configuration of the receiving conversion device, encapsulate the encrypted message data into IP packets to obtain IP encrypted message data.
[0130] Step 703 is described in detail below.
[0131] In some embodiments, after generating encrypted message data, the encrypted message data is further encapsulated into IP packets based on the information items in the register configuration of the aforementioned receiving conversion device to obtain IP encrypted message data that can be transmitted in an IP network. The conversion process of this message format will be further described below.
[0132] Reference Figure 12 Based on the register configuration of the receiving conversion device, the encrypted message data is encapsulated into IP messages to obtain IP encrypted message data, including the following steps 1201 to 1203.
[0133] Step 1201: Obtain the IPV4 packet header based on register configuration.
[0134] Step 1202: Obtain the target MAC address of the receiving station and generate an Ethernet frame header based on the target MAC address.
[0135] Step 1203: Add the IPv4 packet header and Ethernet frame header to the header of the encrypted packet data to obtain the IP encrypted packet data.
[0136] Steps 1201 to 1203 are described in detail below.
[0137] In some embodiments, after encrypting the C2F application industrial message data to obtain encrypted message data, the entire encrypted message data is used as the payload of the IPV4 message. Then, the IPV4 message header is obtained according to the information in the register configuration, and the target MAC address of the receiving station is determined, and the target MAC address is used as the Ethernet frame header.
[0138] Next, the IPv4 packet header and Ethernet frame header are added to the header of the encrypted packet data to perform IP packet format conversion, forming a new Ethernet packet, namely the IP encrypted packet data. Finally, this new packet is sent to the IP network through the second Ethernet interface of the device. Because the packet has an IP header, it can be transmitted within the IP network.
[0139] Reference Figure 13 This is a schematic diagram of a protocol number in IP encrypted message data provided in an embodiment of this application. For example... Figure 13 As shown, in order to indicate that the payload of the IP packet is this encrypted EtherCAT packet, the IPv4 header includes an idle protocol identifier value, that is, the protocol number in the IPv4 header uses an unused value, such as a value between 147 and 252, which can be used. This value can be configured through a register.
[0140] Through steps 1201 to 1203 above, by dynamically configuring protocol identifiers and optimizing hardware-level encapsulation, seamless compatibility between industrial encrypted messages and standard network protocols is achieved. An IPv4 header carrying an idle protocol identifier value is generated using register configuration, avoiding standard protocol conflicts while retaining protocol extension capabilities. An Ethernet frame header is then dynamically constructed based on the target MAC address, accurately encapsulating encrypted data into unicast / multicast frames, avoiding network storms caused by traditional broadcast transmission. Furthermore, the encrypted message data is converted using the IP header and Ethernet frame header to obtain IP-formatted encrypted message data that can be transmitted over IP networks. This facilitates long-distance transmission of the IP-encrypted message data over IP networks, thereby improving the transmission flexibility of industrial message data in C2F applications.
[0141] Step 704: Send the IP encrypted message data to the receiving and conversion device via the IP network, so that the receiving and conversion device forwards the C2F application industrial message data to the receiving station.
[0142] Step 704 is described in detail below.
[0143] Reference Figure 14 This is a schematic diagram illustrating an industrial message data transmission and processing method provided in an embodiment of this application. For example... Figure 14 As shown, the sending station sends C2F application industrial message data in EtherCAT message format. The sending conversion device receives the C2F application industrial message data, encrypts it, and converts its format to obtain IP encrypted message data in IP message format, which is then sent to the IP network. After being forwarded through the IP network, the IP encrypted message data is sent to the receiving conversion device. This device performs format conversion and decryption on the IP encrypted message data to recover the original C2F application industrial message data in EtherCAT message format, which is then sent to the receiving station. GATE_DMAC is the destination MAC address, and GATE_SMAC is the source address.
[0144] Furthermore, embodiments of this application also provide an industrial message receiving method for a C2F application transmission system. (Refer to...) Figure 15 This is an optional flowchart of an industrial message receiving method for a C2F application transmission system provided in this application embodiment. Figure 15 The method may include, but is not limited to, steps 1501 to 1504. It is also understood that this embodiment... Figure 15 The order of steps 1501 to 1504 is not specifically limited; the order of steps can be adjusted or certain steps can be added or removed according to actual needs. The industrial message sending method for the C2F application transmission system provided in this application embodiment can be applied to the receiving and conversion equipment in the C2F application transmission system.
[0145] Step 1501: Obtain the IP encrypted message data transmitted by the sending station through the transmission conversion device and IP network, and obtain the message data characteristics.
[0146] Step 1502: Based on the register configuration of the receiving conversion device, decapsulate the IP encrypted message data to obtain the encrypted message data.
[0147] Step 1503: Obtain the real-time network characteristics of the IP network at the time of transmission from the encrypted message data.
[0148] Step 1504: Decrypt the encrypted message data based on message data characteristics and real-time network characteristics to obtain C2F application industrial message data, and forward the C2F application industrial message data to the receiving station.
[0149] Steps 1501 to 1504 are described in detail below.
[0150] Similar to the industrial message sending method of the C2F application transmission system described above, refer to... Figure 16 This is one embodiment provided in this application. For example... Figure 16 As shown, after the receiving conversion device receives the IP encrypted message data transmitted by the sending station through the sending conversion device and the IP network via the IP network, it first uses the register configuration of the receiving conversion device to decapsulate the IP encrypted message data, so as to remove the IP message header and Ethernet frame header in the IP encrypted message data, thereby leaving the encrypted message data corresponding to the payload.
[0151] Next, based on the message data characteristics corresponding to the IP encrypted message data and the real-time network characteristics of the IP network in the encrypted message data at the time of transmission, a highly random encryption key is generated. Then, the encryption key and the authentication tag in the encrypted message data are used to decrypt the encrypted data in the encrypted message data to recover the C2F application industrial message data originally sent by the sending station. Finally, the C2F application industrial message data is forwarded to the receiving station.
[0152] Reference Figure 17 This is a flowchart illustrating the processing of industrial message data in a C2F application, as provided in an embodiment of this application. Figure 17 As shown, the process includes the following steps.
[0153] S01: The Ethernet interface of the sending conversion device receives Ethernet frames, which may be messages sent by EtherCAT devices or messages sent by IP network devices.
[0154] S02: The sending conversion device performs protocol parsing on the message, parsing out the Ethernet frame header and IPv4 message header.
[0155] S03: The sending conversion device determines whether the message is an EtherCAT message based on the parsing result of step S02. If it is an EtherCAT frame, it means that the other end is connected to an EtherCAT device. Judgment method: Check if the value of the Ethernet type field is equal to 0x88A4. If they are equal, it means it is an EtherCAT message; otherwise, it is not.
[0156] S04: If it is an EtherCAT frame, the sending conversion device encrypts the message using the encryption algorithm mentioned above to obtain the encrypted ciphertext.
[0157] S05: The sending conversion device uses the ciphertext encrypted in step S04 as the payload of the IP packet, and adds the IPv4 header according to the register configuration information. Note the setting of the protocol field in the IPv4 header, and use an unused protocol identifier value between 147 and 252. This value can be flexibly configured through the register.
[0158] S06: The sending conversion device adds an Ethernet frame header to the message data. The destination MAC address added at this time is the MAC address of the IP network device port connected to the protocol conversion device. This address is not a broadcast address, thus overcoming the defect of the original EtherCAT message broadcast address.
[0159] S07: The transmitting conversion device sends the complete data frame assembled in step S06 out through another Ethernet interface. This interface is connected to an IP network device.
[0160] S08: After receiving the data frame, the receiving conversion device makes a judgment. If the message is not an EtherCAT message, it means that the other end of the interface is connected to an IP network device. The sending conversion device continues to determine whether it is an IPv4 message.
[0161] S09: If it is an IPv4 message, the receiving and conversion device continues to determine whether the value of the protocol field in the IPv4 header is a specially set value (this value is made into a register that can be configured). If it is, it means that the payload content is an encrypted EtherCAT message.
[0162] S10: Receive the Ethernet frame header stripped from the message by the conversion device.
[0163] S11: The receiving and conversion device strips the IP header of the message to obtain the payload of the IP message. This payload is an encrypted EtherCAT message.
[0164] S12: The receiving and conversion device decrypts the ciphertext of the payload, and the decrypted data is the original EtherCAT message.
[0165] S13: The receiving and conversion device sends the original EtherCAT message out through another interface.
[0166] S14: If the message is not an IPv4 message or the IPv4 message payload is not an encrypted EtherCAT message, the receiving and conversion device continues to perform other processing (for example, if the message is an ARP message, it will perform ARP message response processing, etc.).
[0167] In summary, this industrial protocol conversion device enables the mutual conversion between EtherCAT and IPv4 messages, thus overcoming the limitation of existing EtherCAT devices being unable to access IP networks. This solution allows existing EtherCAT devices to continue operating without modification, maximizing the protection of user investment while supporting the evolution of industrial control networks, which is of significant importance. This is beneficial for the implementation of C2F application models.
[0168] This application proposes an industrial message sending method, receiving method, and related equipment for a C2F application transmission system. The C2F application transmission system includes a sending station, a sending conversion device, a receiving conversion device, and a receiving station connected in sequence. The method is applied to the sending conversion device and includes: First, acquiring C2F application industrial message data input from the sending station; Next, generating an initial key through hash processing based on register configuration, normalizing and concatenating message data features and real-time network features to generate a dynamic factor, generating a dynamic key through hash processing based on the dynamic factor, XORing the dynamic key and the initial key to generate an encryption key, acquiring a nonlinear mapping table and generating a misalignment processing identifier, performing nonlinear replacement on each byte in the C2F application industrial message data based on the nonlinear mapping table to generate nonlinear message data, and selecting a target row of data from the nonlinear message data based on the row shift identifier for row shifting to obtain a first shift number. According to the process, the following steps are taken: First, obtain the mixing matrix corresponding to the column mixing identifier. Then, select the target column data from the first shifted data based on the column mixing identifier. Perform matrix operations on the target column data and the mixing matrix to obtain the second shifted data. XOR the second shifted data with the encryption key to obtain encrypted data. Generate an authentication tag based on the mapping table identifier and misalignment processing identifier of the nonlinear mapping table. Generate encrypted message data based on the encrypted data, authentication tag, and real-time network features. Next, based on register configuration, obtain the IPV4 message header, which includes an idle protocol identifier value. Obtain the target MAC address of the receiving station and generate an Ethernet frame header based on the target MAC address. Add the IPV4 message header and Ethernet frame header to the header of the encrypted message data to obtain IP encrypted message data. Finally, send the IP encrypted message data to the receiving conversion device via the IP network so that the receiving conversion device forwards the C2F application industrial message data to the receiving station.
[0169] This application embodiment sets up a sending conversion device and a receiving conversion device between the master station and the slave station, or between slave stations. The sending conversion device encapsulates the industrial message data of the C2F application into IP packets, converting the data format from EtherCAT to an IP data format suitable for transmission over an IP network. This allows the industrial message data to be transmitted between the sending and receiving stations via the IP network, improving the transmission flexibility of the C2F application's industrial message data. Furthermore, before transmission, the C2F application's industrial message data is encrypted using two random characteristics: the message data characteristics of the C2F application's industrial message data and the current real-time network characteristics of the IP network. This approach avoids the possibility of data theft during transmission, thereby improving both the flexibility and security of C2F application industrial message data transmission. Furthermore, by utilizing the unique message characteristics of each C2F application industrial message and the time-varying, random real-time network characteristics of the IP network to generate a highly randomized dynamic key, and then using this highly randomized dynamic key to XOR-obfuscate a fixed initial key, the randomness of the generated encryption key is further enhanced. This significantly improves the security of subsequent encryption and transmission of C2F application industrial message data using this encryption key. Finally, the synergistic effect of dynamic nonlinear obfuscation and multi-level diffusion mechanisms significantly improves… The security of C2F industrial messages is enhanced by using byte replacement based on a nonlinear mapping table to disrupt the statistical characteristics of message data, thus resisting side-channel attacks based on pattern analysis. Dynamic row shifting and hybrid matrix operations introduce a spatial diffusion effect, where a single byte modification triggers a chain reaction of changes across multiple columns, effectively suppressing differential attacks. Combined with obfuscation parameters of dynamic identifiers (row-shift identifiers and column-mixed identifiers), a dynamic encryption strategy of "one message, one key" is implemented. Even if the key is leaked, historical messages cannot be reverse-engineered. Furthermore, authentication tags are used to generate deeply integrated nonlinear mapping table features and misalignment identifiers, simultaneously achieving data integrity protection and traceability of the encryption process, preventing replay attacks and man-in-the-middle tampering. Moreover, dynamic protocol identifiers and hardware-level... Encapsulation optimization achieves seamless compatibility between industrial encrypted messages and standard network protocols. Register configuration generates IPv4 headers carrying idle protocol identifiers, avoiding standard protocol conflicts while retaining protocol extension capabilities. Ethernet frame headers are dynamically constructed based on the target MAC address, accurately encapsulating encrypted data into unicast / multicast frames, avoiding network storms caused by traditional broadcast transmission. Furthermore, IP and Ethernet headers are used to convert the encrypted message data into an IP-formatted encrypted message that can be transmitted over IP networks. This facilitates long-distance transmission of the IP-encrypted message data over IP networks, thereby improving the transmission flexibility of industrial message data in C2F applications.
[0170] This application embodiment also provides an industrial message sending device for a C2F application transmission system, which can implement the above-described industrial message sending method for the C2F application transmission system, see reference. Figure 18 The device 1800 includes:
[0171] The message data acquisition module 1810 is used to acquire C2F application industrial message data input by the sending station;
[0172] The encryption processing module 1820 is used to encrypt the C2F application industrial message data based on the message data characteristics of the C2F application industrial message data and the real-time network characteristics of the IP network to obtain encrypted message data.
[0173] The format conversion module 1830 is used to encapsulate encrypted message data into IP packets based on the register configuration of the receiving conversion device to obtain IP encrypted message data.
[0174] The data transmission module 1840 is used to send IP encrypted message data to the receiving and conversion device through the IP network, so that the receiving and conversion device can forward the C2F application industrial message data to the receiving station.
[0175] In some embodiments, the format conversion module 1830 is further configured to:
[0176] Based on the register configuration, the IPv4 packet header is obtained, which includes the idle protocol identifier value;
[0177] Obtain the target MAC address of the receiving station and generate an Ethernet frame header based on the target MAC address;
[0178] The IPv4 packet header and Ethernet frame header are added to the header of the encrypted packet data to obtain the IP encrypted packet data.
[0179] In some embodiments, the encryption processing module 1820 is further configured to:
[0180] Generate encryption keys based on message data characteristics and real-time network characteristics;
[0181] The industrial message data of C2F application is encrypted based on the encryption key to generate encrypted data and corresponding authentication tags.
[0182] Encrypted message data is generated based on a combination of encrypted data, authentication tags, and real-time network characteristics.
[0183] In some embodiments, the encryption processing module 1820 is further configured to:
[0184] The initial key is generated by hashing based on register configuration.
[0185] The message data features and real-time network features are normalized and spliced together to generate dynamic factors;
[0186] Dynamic keys are generated by hashing based on dynamic factors.
[0187] The dynamic key and the initial key are XORed together to generate the encryption key.
[0188] In some embodiments, the encryption processing module 1820 is further configured to:
[0189] Obtain the nonlinear mapping table and generate misalignment handling identifiers;
[0190] Based on a nonlinear mapping table, each byte in the industrial message data of C2F application is nonlinearly replaced to generate nonlinear message data.
[0191] Based on the misalignment processing identifier and encryption key, nonlinear message data is subjected to misalignment encryption processing to obtain encrypted data.
[0192] Authentication tags are generated based on the mapping table identifier and misalignment processing identifier of the nonlinear mapping table.
[0193] In some embodiments, the encryption processing module 1820 is further configured to:
[0194] Based on the row shift identifier, the target row data is selected from the nonlinear message data and shifted to obtain the first shifted data;
[0195] Obtain the mixing matrix corresponding to the column mixing identifier, select the target column data from the first shifted data based on the column mixing identifier, and perform matrix operations on the target column data and the mixing matrix to obtain the second shifted data;
[0196] The second shifted data is XORed with the encryption key to obtain the encrypted data.
[0197] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, the specific implementation of the industrial message sending device of the C2F application transmission system is basically the same as the specific implementation of the industrial message sending method of the C2F application transmission system described above, and will not be repeated here.
[0198] In this embodiment, the industrial message sending device of the C2F application transmission system sets up a sending conversion device and a receiving conversion device between the master station and the slave station, or between slave stations. The sending conversion device encapsulates the industrial message data of the C2F application into IP packets, converting the data format from EtherCAT to an IP data format suitable for transmission over an IP network. This allows the industrial message data to be transmitted between the sending and receiving stations via the IP network, improving the transmission flexibility of the C2F application industrial message data. Furthermore, before transmission, the message data characteristics of the C2F application industrial message data and the current real-time network characteristics of the IP network are used to analyze the C2F application's data. Encrypting industrial message data significantly reduces the possibility of interception during data transmission, thereby improving both the flexibility and security of C2F application industrial message data transmission. Furthermore, by utilizing the unique message characteristics of each C2F application industrial message and the time-varying, random real-time network characteristics of the IP network, a highly randomized dynamic key is generated. This highly randomized dynamic key is then XORed with a fixed initial key to further enhance the randomness of the generated encryption key, thus greatly improving the security of subsequent transmission of encrypted C2F application industrial message data using this encryption key. Additionally, dynamic nonlinear obfuscation and multi-level diffusion mechanisms further enhance the security of the encryption key. The synergistic effect of these technologies significantly enhances the security of C2F industrial messages. It utilizes byte replacement based on a nonlinear mapping table to disrupt the statistical characteristics of message data, thus resisting side-channel attacks based on pattern analysis. By introducing a spatial diffusion effect through dynamic row shifting and hybrid matrix operations, a single byte modification triggers a chain reaction of changes across multiple columns, effectively suppressing differential attacks. Combined with obfuscation parameters of dynamic identifiers (row shift identifiers and column hybrid identifiers), a dynamic encryption strategy of "one message, one key" is implemented. Even if the key is leaked, historical messages cannot be reversed. Furthermore, authentication tags are used to generate deeply integrated nonlinear mapping table features and misalignment identifiers, simultaneously achieving data integrity protection and traceability of the encryption process, preventing replay attacks and man-in-the-middle tampering. Moreover, through dynamic protocol identifiers... Through hardware-level encapsulation optimization, seamless compatibility between industrial encrypted messages and standard network protocols is achieved. Register configuration is used to generate IPv4 headers carrying idle protocol identifier values, avoiding standard protocol conflicts while retaining protocol extension capabilities. Ethernet frame headers are then dynamically constructed based on the target MAC address, accurately encapsulating encrypted data into unicast / multicast frames, avoiding network storms caused by traditional broadcast transmission. Furthermore, the encrypted message data is formatted using IP headers and Ethernet frame headers to obtain IP-formatted encrypted message data that can be transmitted over IP networks. This facilitates long-distance transmission of the IP-encrypted message data over IP networks, thereby improving the transmission flexibility of industrial message data in C2F applications.
[0199] This application also provides an electronic device, including:
[0200] At least one memory;
[0201] At least one processor;
[0202] At least one program;
[0203] The program is stored in a memory, and the processor executes the at least one program to implement the industrial message transmission method of the C2F application transmission system described above. The electronic device can be any smart terminal, including mobile phones, tablets, personal digital assistants (PDAs), and in-vehicle computers.
[0204] Please see Figure 19 , Figure 19 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:
[0205] The processor 1901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0206] The memory 1902 can be implemented in the form of ROM (Read-Only Memory), static storage device, dynamic storage device, or RAM (Random Access Memory). The memory 1902 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1902 and is called and executed by the processor 1901 to execute the industrial message sending method of the C2F application transmission system of this application embodiment.
[0207] The input / output interface 1903 is used to implement information input and output;
[0208] The communication interface 1904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0209] Bus 1905 transmits information between various components of the device (e.g., processor 1901, memory 1902, input / output interface 1903, and communication interface 1904);
[0210] The processor 1901, memory 1902, input / output interface 1903, and communication interface 1904 are connected to each other within the device via bus 1905.
[0211] This application embodiment also provides a storage medium, which is a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the industrial message sending method of the C2F application transmission system described above.
[0212] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0213] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0214] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0215] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0216] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0217] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0218] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0219] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The coupling or direct coupling or communication connection between the shown or discussed units may be through some interfaces, or indirect coupling or communication connection between the apparatus or units, and may be electrical, mechanical, or other forms.
[0220] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0221] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0222] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0223] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. An industrial message transmission method for a C2F application transmission system, characterized in that, The C2F application transmission system includes a transmitting station, a transmitting conversion device, a receiving conversion device, and a receiving station connected in sequence. The method is applied to the transmitting conversion device, and the method includes: Acquire C2F application industrial message data input by the sending station; Based on the message data characteristics of the C2F application industrial message data and the real-time network characteristics of the IP network, the C2F application industrial message data is encrypted to obtain encrypted message data. Based on the register configuration of the receiving and conversion device, the encrypted message data is encapsulated into IP packets to obtain IP encrypted message data; The IP encrypted message data is sent to the receiving and conversion device through the IP network, so that the receiving and conversion device forwards the C2F application industrial message data to the receiving station; Based on the message data characteristics of the C2F application industrial message data and the real-time network characteristics of the IP network, the C2F application industrial message data is encrypted to obtain encrypted message data, including: An encryption key is generated based on the message data characteristics and the real-time network characteristics; The C2F application industrial message data is encrypted based on the encryption key to generate encrypted data and corresponding authentication tags. The encrypted message data is generated based on the encrypted data, the authentication tag, and the real-time network features. The step of generating an encryption key based on the message data characteristics and the real-time network characteristics includes: The initial key is generated by hashing based on the aforementioned register configuration. The message data features and the real-time network features are normalized and concatenated to generate dynamic factors; A dynamic key is generated by hashing based on the dynamic factor, and the dynamic key has the same format as the initial key. The dynamic key and the initial key are XORed together to generate the encryption key; The process of encrypting the C2F application industrial message data based on the encryption key to generate encrypted data and a corresponding authentication tag includes: Obtain the nonlinear mapping table and generate misalignment handling identifiers; Based on the nonlinear mapping table, each byte in the C2F application industrial message data is nonlinearly replaced to generate nonlinear message data. Based on the misalignment processing identifier and the encryption key, the nonlinear message data is subjected to misalignment encryption processing to obtain the encrypted data; The authentication tag is generated based on the mapping table identifier of the nonlinear mapping table and the misalignment processing identifier.
2. The industrial message transmission method of the C2F application transmission system according to claim 1, characterized in that, The process of encapsulating the encrypted message data into IP packets based on the register configuration of the receiving and conversion device to obtain IP encrypted message data includes: Based on the register configuration, an IPv4 header is obtained, which includes an idle protocol identifier value. Obtain the target MAC address of the receiving station, and generate an Ethernet frame header based on the target MAC address; The IPv4 packet header and the Ethernet frame header are added to the header of the encrypted packet data to obtain the IP encrypted packet data.
3. The industrial message transmission method of the C2F application transmission system according to claim 1, characterized in that, The misalignment processing identifier includes a row shift identifier and a column hybrid identifier. The step of performing misalignment encryption processing on the nonlinear message data based on the misalignment processing identifier and the encryption key to obtain the encrypted data includes: Based on the row shift identifier, target row data is selected from the nonlinear message data and shifted to obtain the first shifted data; Obtain the mixing matrix corresponding to the column mixing identifier, select target column data from the first shifted data based on the column mixing identifier, and perform matrix operations on the target column data and the mixing matrix to obtain the second shifted data; The second shifted data is XORed with the encryption key to obtain the encrypted data.
4. An industrial message receiving method for a C2F application transmission system, characterized in that, The C2F application transmission system includes a transmitting station, a transmitting conversion device, a receiving conversion device, and a receiving station connected in sequence. The method is applied to the receiving conversion device, and the method includes: The method involves acquiring IP encrypted message data transmitted through the transmission conversion device and IP network by the industrial message transmission method of the C2F application transmission system as described in claim 1, and acquiring message data characteristics. Based on the register configuration of the receiving and conversion device, the IP encrypted message data is decapsulated to obtain encrypted message data. Obtain the real-time network characteristics of the IP network at the time of transmission from the encrypted message data; The encrypted message data is decrypted based on the message data characteristics and the real-time network characteristics to obtain the C2F application industrial message data, and then the C2F application industrial message data is forwarded to the receiving station.
5. An industrial message sending device for a C2F application transmission system, characterized in that, The C2F application transmission system includes a transmitting station, a transmitting conversion device, a receiving conversion device, and a receiving station connected in sequence. The device is applied to the transmitting conversion device and includes: The message data acquisition module is used to acquire C2F application industrial message data input by the sending station; The encryption processing module is used to encrypt the C2F application industrial message data based on the message data characteristics of the C2F application industrial message data and the real-time network characteristics of the IP network to obtain encrypted message data. The format conversion module is used to encapsulate the encrypted message data into IP packets based on the register configuration of the receiving conversion device to obtain IP encrypted message data. The data transmission module is used to send the IP encrypted message data to the receiving and conversion device through the IP network, so that the receiving and conversion device forwards the C2F application industrial message data to the receiving station; Based on the message data characteristics of the C2F application industrial message data and the real-time network characteristics of the IP network, the C2F application industrial message data is encrypted to obtain encrypted message data, including: An encryption key is generated based on the message data characteristics and the real-time network characteristics; The C2F application industrial message data is encrypted based on the encryption key to generate encrypted data and corresponding authentication tags. The encrypted message data is generated based on the encrypted data, the authentication tag, and the real-time network features. The step of generating an encryption key based on the message data characteristics and the real-time network characteristics includes: The initial key is generated by hashing based on the aforementioned register configuration. The message data features and the real-time network features are normalized and concatenated to generate dynamic factors; A dynamic key is generated by hashing based on the dynamic factor, and the dynamic key has the same format as the initial key. The dynamic key and the initial key are XORed together to generate the encryption key; The process of encrypting the C2F application industrial message data based on the encryption key to generate encrypted data and a corresponding authentication tag includes: Obtain the nonlinear mapping table and generate misalignment handling identifiers; Based on the nonlinear mapping table, each byte in the C2F application industrial message data is nonlinearly replaced to generate nonlinear message data. Based on the misalignment processing identifier and the encryption key, the nonlinear message data is subjected to misalignment encryption processing to obtain the encrypted data; The authentication tag is generated based on the mapping table identifier of the nonlinear mapping table and the misalignment processing identifier.
6. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the industrial message sending method of the C2F application transmission system according to any one of claims 1 to 3, or the industrial message receiving method of the C2F application transmission system according to claim 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the industrial message sending method of the C2F application transmission system as described in any one of claims 1 to 3, or the industrial message receiving method of the C2F application transmission system as described in claim 4.
Citation Information
Patent Citations
Key generation method and device, electronic equipment and storage medium
CN117527238A
Communication method, device and system, electronic equipment and storage medium
CN119728637A