Security assurance method for cloud PLC network architecture based on TSN

By analyzing and verifying the priority of the data group to be transmitted in the PLC control method, combined with encryption processing, the problem of low reliability of data transmission in the PLC control system is solved, and efficient, stable and safe data transmission is achieved.

CN118337716BActive Publication Date: 2024-08-30HANGZHOU IZHI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410751342.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-08-30
Estimated Expiration
2044-06-12

AI Technical Summary

Technical Problem

Due to the complexity and uncertainty of the network environment during the data transmission process of existing PLC control methods and systems, the integrity and consistency of data transmission cannot be guaranteed, resulting in low reliability of data transmission.

Method used

By analyzing the data group to be transmitted, its transmission priority is determined, and the data transmission flow is adjusted based on the priority, and security check fields are added and encrypted to ensure the reliability of data transmission. Specific steps include obtaining the data packet to be transmitted, analyzing the importance and real-time nature of the data group, sorting and classifying, verifying data integrity and consistency, generating security check fields, and decrypting and verifying during the transmission process. If it fails, adjust the priority and resend.

Benefits of technology

Improves the reliability and efficiency of data transmission, prevents data from being tampered with or lost during transmission, ensures the correctness and validity of data, avoids network congestion and delays, optimizes the verification process, and improves system reliability and data Transmission stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118337716B
    Figure CN118337716B
Patent Text Reader

Abstract

The present invention relates to the field of PLC control technology, and in particular to a security assurance method for a cloud PLC network architecture based on TSN, the method comprising: obtaining a data packet to be transmitted; analyzing a plurality of data groups to be transmitted, and determining a transmission priority; adjusting a preset data transmission flow based on the transmission priority, obtaining an initial transmission flow group, transmitting a plurality of data groups to be transmitted, and obtaining a plurality of initial transmission data groups; verifying a plurality of initial transmission data groups based on the transmission priority, and when the initial transmission data group passes the verification, adding a security verification field and encrypting, and obtaining an edited transmission data group; sending the edited transmission data group to a target node and decrypting, obtaining a received transmission data group, and verifying the received transmission data group, and if the verification fails, adjusting the transmission priority, and resending a plurality of data groups to be transmitted. The present invention improves the reliability of the data transmission process in the cloud PLC network architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of PLC control technology, and in particular to a security assurance method for a TSN-based cloud PLC network architecture. Background Art

[0002] Time-Sensitive Networking (TSN) is a network technology used in industrial automation. It aims to provide deterministic data transmission to ensure that data can reach the destination at the scheduled time. Cloud PLC is based on virtualization technology and uses the implementation idea of ​​software-defined networking to decouple traditional dedicated PLC functions and implement PLC logic control functions through applications, providing a direction for the realization of intelligent manufacturing.

[0003] The patent document with Chinese patent application publication number CN115442202A discloses a 5G network cloud-end collaborative virtual PLC control method and system, including cloud platform basic service deployment and I / O module information interaction with the cloud. Using virtualization technology, a part of the physical resources in the cloud server is abstracted to construct a logical resource layer, a strong real-time operating system is installed to support application deployment, and the development environment and operating environment of the software-defined PLC are deployed. A single software-defined PLC resource is further divided, and multiple virtual PLCs are configured through virtualization. The CPU part of the PLC controller hardware is functionally replaced, the hardware driver and system interface are abstractly designed, and the software-defined PLC establishes a communication connection with the I / O module to achieve the control effect.

[0004] In the PLC control method and system in the prior art, during the data transmission process, due to the complexity and uncertainty of the network environment, data may be interfered with or tampered with, resulting in the inability to ensure the integrity and consistency of data transmission, thereby causing the problem of low data transmission reliability. Summary of the invention

[0005] To this end, the present invention provides a security assurance method for a cloud PLC network architecture based on TSN, which determines the transmission priority of each data group based on factors such as the importance and real-time performance of several data groups to be transmitted, verifies the initial transmission data group based on the transmission priority, adds a security verification field to the initial transmission data group and encrypts it, and transmits it to the target node for verification again, which can solve the problem of low data transmission reliability.

[0006] To achieve the above object, the present invention provides a security assurance method for a cloud PLC network architecture based on TSN, the method comprising:

[0007] Acquire a data packet to be transmitted, wherein the data packet to be transmitted includes a plurality of data groups to be transmitted;

[0008] Analyzing the plurality of data groups to be transmitted, and determining transmission priorities of the plurality of data groups to be transmitted according to the analysis results;

[0009] Adjust the preset data transmission flow rate based on the transmission priority, obtain an initial transmission flow group, transmit the plurality of data groups to be transmitted to the security layer according to the initial transmission flow group and the transmission priority, and obtain a plurality of initial transmission data groups;

[0010] Verifying the initial transmission data groups based on the transmission priority, obtaining verification results, and when the initial transmission data group passes the verification, adding a security verification field to the initial transmission data group and encrypting it, to obtain an edited transmission data group;

[0011] The edited transmission data group is sent to the target node and decrypted, the received transmission data group is obtained, and the received transmission data group is verified. If the verification passes, the data transmission is completed. If the verification fails, the transmission priority is adjusted and several of the data groups to be transmitted are resent.

[0012] Furthermore, the step of analyzing the plurality of data groups to be transmitted includes:

[0013] Sorting the plurality of data groups to be transmitted based on the data initial timestamps, and determining the real-time performance of the plurality of data groups to be transmitted based on the sorting results;

[0014] The correlation between the plurality of data groups to be transmitted is analyzed, and the correlation between the plurality of data groups to be transmitted is determined according to the analysis result.

[0015] Furthermore, the step of analyzing the correlation between the plurality of data groups to be transmitted includes:

[0016] Based on the plurality of data groups to be transmitted, a plurality of corresponding data change curves are drawn to obtain a plurality of change curve graphs;

[0017] Judging the change trends of the change curves, obtaining trend judgment results, and determining an initial relevant data group according to the trend judgment results;

[0018] The correlation of several to-be-transmitted data in several initial related data groups is evaluated based on a statistical method, an evaluation result is obtained, and an actual related data group is determined according to the evaluation result.

[0019] Furthermore, the step of determining the transmission priority of the data to be transmitted according to the analysis result includes:

[0020] Assigning corresponding weight values ​​as first weights to the plurality of data groups to be transmitted according to the real-time ranking;

[0021] Assigning corresponding weight values ​​as second weights to the plurality of data to be transmitted according to the absolute values ​​of the correlations;

[0022] Calculate the total weight of the plurality of data to be transmitted according to the first weight and the second weight;

[0023] The transmission priority is determined based on the total weight.

[0024] Furthermore, the step of adjusting the preset data transmission flow based on the transmission priority includes:

[0025] Determining a number of traffic weights based on the total weights corresponding to the transmission priorities;

[0026] The initial transmission traffic group corresponding to the transmission priority is determined according to the plurality of traffic weights and the preset data transmission traffic.

[0027] Further, the step of verifying a plurality of the initial transmission data groups based on the transmission priority includes:

[0028] Classifying the initial transmission data groups based on the transmission priority to obtain a high-level transmission data group and a low-level transmission data group;

[0029] For the high-level transmission data group, verify the integrity and consistency of any of the initial transmission data groups to obtain a verification result;

[0030] For the low-level transmission data group, a verification data portion in any of the initial transmission data groups is selected, the integrity and consistency of the verification data portion is verified, and a verification result is obtained to complete the verification of any of the initial transmission data groups.

[0031] Furthermore, the step of verifying the integrity and consistency of any of the initial transmission data groups includes:

[0032] Comparing the data length of the initial transmission data group with the data length in the corresponding to-be-transmitted data group, so as to determine the integrity according to the comparison result;

[0033] Comparing the initial transmission data in the initial transmission data group with the to-be-transmitted data in the corresponding to-be-transmitted data group one by one, so as to determine the consistency according to the comparison result;

[0034] When the initial transmission data group is incomplete or inconsistent, the initial transmission data group verification fails;

[0035] When the initial transmission data group is complete and consistent, the initial transmission data group passes the verification.

[0036] Furthermore, the step of adding a security check field to the initial transmission data group and encrypting the data includes:

[0037] Determine the location to add;

[0038] generating an initial sequence number for any of the initial transmission data groups based on the transmission priority;

[0039] generating a transmission timestamp based on the transmission time of any of the initial transmission data groups;

[0040] Generate an initial check value based on a cyclic redundancy check algorithm and initial transmission data in any of the initial transmission data groups;

[0041] Generate the security check field according to the initial sequence number, the transmission timestamp and the initial check value, add the security check field at the adding position, and obtain the added transmission data group;

[0042] Any of the added transmission data groups is encrypted based on a preset encryption key to obtain the edited transmission data group.

[0043] Furthermore, the step of verifying the received transmission data group includes:

[0044] Identify the security check field in the received transmission data group, and obtain a received sequence number, a received timestamp, and a received check value;

[0045] Matching the received sequence number with the initial sequence number to obtain a sequence number matching result;

[0046] Compare the receiving timestamp with the transmitting timestamp to obtain a timestamp comparison result;

[0047] Recalculating the received transmission data group according to the cyclic redundancy check algorithm to obtain a calculated check value, comparing the calculated check value with the transmission check value in the received transmission data group to obtain a check value comparison result;

[0048] The received transmission data group is verified according to the sequence number matching result, the timestamp comparison result and the check value comparison result.

[0049] Furthermore, the step of adjusting the transmission priority includes:

[0050] Calculating an error coefficient according to the sequence number matching result, the timestamp comparison result, or the check value comparison result;

[0051] The total weight is adjusted based on the error coefficient to adjust the transmission priority.

[0052] Compared with the prior art, the beneficial effect of the present invention lies in that, by acquiring the data packets to be transmitted and grouping the data, the management and processing of the data are facilitated, the efficiency of data processing is improved, and at the same time, different transmission strategies are applied to different data groups. By analyzing the data group to be transmitted, the transmission priority is determined, and the priority is assigned according to the importance and real-time requirements of the data, so that the priority assignment result is accurate, the rationality of data transmission is ensured, and the efficiency of data processing is improved. By adjusting the data transmission flow based on the transmission priority, it is helpful to avoid network congestion and delay, and ensure the smoothness and stability of data transmission. The combination of the initial transmission flow group and the transmission priority makes the data transmission more efficient and orderly. Adding a security check field to the transmission data group and encrypting it is an important measure to ensure the reliability of data transmission, prevent the data from being tampered with, lost or leaked during the transmission process, prevent the data from being tampered with or leaked during the transmission process, improve the reliability of data transmission, send the edited transmission data group to the target node, and decrypt and verify it to ensure the correctness and validity of the data. If the verification fails, the transmission priority is adjusted and the data is resent, thereby improving the reliability of data transmission.

[0053] In particular, by drawing a data change curve, the changing trend of the data can be intuitively observed, which makes it easier to judge which data may be correlated. The changing trend of the curve can be determined based on the change in slope at each point on the curve, which can more accurately reflect the dynamic characteristics of the data and provide a reliable basis for subsequent correlation analysis. Data with the same or opposite changing trends can be grouped together to form an initial correlation data group to improve the efficiency of subsequent correlation evaluation. The use of statistical methods to quantitatively evaluate the correlation of the data to be transmitted in the initial correlation data group can more accurately reveal the degree of correlation between the data, provide strong support for the formulation of data transmission strategies, and help optimize data transmission efficiency and reliability.

[0054] In particular, by assigning different traffic weights to each transmission priority and adjusting the preset data transmission traffic according to these weights, it is ensured that network resources are reasonably allocated, thereby ensuring the real-time and reliability of its transmission, allowing important data to be transmitted faster and reducing waiting time, thereby improving the overall data transmission efficiency. In the network, when the data transmission volume is too large, congestion is prone to occur, resulting in data transmission delays or even losses. By adjusting the data transmission traffic based on the transmission priority, network congestion can be effectively avoided and the stability and reliability of data transmission can be guaranteed.

[0055] In particular, by classifying the initial transmission data group into two groups, high-level and low-level, according to the transmission priority, different verification strategies are adopted for data of different priorities, thereby optimizing the verification process and improving the verification efficiency. For the high-level transmission data group, by strictly verifying its integrity and consistency, the accuracy and reliability of these key data are ensured. For the low-level transmission data group, by only selecting the verification data part for verification, the consumption of system resources is reduced, the complexity of verification is reduced, and the efficiency of the verification process is improved. By verifying the initial transmission data group, the integrity and consistency of the data during the transmission process are ensured, and the data is prevented from being tampered with or lost, which helps to improve the reliability of the system.

[0056] In particular, by comparing the data length of the initial transmission data group with the corresponding data group to be transmitted, possible data loss or truncation during the transmission process can be discovered in time, thereby avoiding incomplete data from being erroneously received or processed; by comparing the initial transmission data in the initial transmission data group with the corresponding data to be transmitted in the data group to be transmitted one by one, it can be ensured that the data has not been tampered with or replaced during the transmission process, and the accuracy of the data can be accurately verified to ensure the originality and authenticity of the data; by verifying the integrity and consistency of the data, problems in the data transmission process can be discovered and resolved in time, thereby improving the reliability of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 A schematic diagram of a process flow of a security assurance method for a TSN-based cloud PLC network architecture provided in an embodiment of the present invention;

[0058] Figure 2 A schematic diagram of a flow chart of determining the correlation between data groups to be transmitted in a security assurance method for a TSN-based cloud PLC network architecture provided in an embodiment of the present invention;

[0059] Figure 3 A schematic diagram of a process for verifying an initial transmission data group in a security assurance method for a cloud-based PLC network architecture based on TSN provided in an embodiment of the present invention;

[0060] Figure 4 A schematic diagram of a process for verifying a received transmission data group in a security assurance method for a TSN-based cloud PLC network architecture provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0061] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0062] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.

[0063] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be understood as a limitation on the present invention.

[0064] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0065] See also Figure 1 As shown, an embodiment of the present invention provides a security assurance method for a cloud PLC network architecture based on TSN, the method comprising:

[0066] Step S100, obtaining a data packet to be transmitted, wherein the data packet to be transmitted includes a plurality of data groups to be transmitted;

[0067] Step S200, analyzing the plurality of data groups to be transmitted, and determining the transmission priorities of the plurality of data groups to be transmitted according to the analysis results;

[0068] Step S300, adjusting the preset data transmission flow rate based on the transmission priority, obtaining an initial transmission flow group, transmitting a plurality of the to-be-transmitted data groups to the security layer according to the initial transmission flow group and the transmission priority, and obtaining a plurality of initial transmission data groups;

[0069] Step S400, verifying the initial transmission data groups based on the transmission priority, obtaining verification results, and when the initial transmission data group passes the verification, adding a security verification field to the initial transmission data group and encrypting it, to obtain an edited transmission data group;

[0070] Step S500, sending the edited transmission data group to the target node and decrypting it, obtaining the received transmission data group, verifying the received transmission data group, if the verification passes, completing the data transmission, if the verification fails, adjusting the transmission priority, and resending several of the data groups to be transmitted.

[0071] Specifically, TSN, as a family of protocols that achieve determinism and minimum latency, ensures real-time, deterministic and reliable transmission of data in Ethernet. The present invention ensures real-time and reliable transmission of data by analyzing the data group to be transmitted and assigning priority according to the importance and real-time requirements of the data.

[0072] Specifically, the embodiment of the present invention obtains data packets to be transmitted and groups data, which facilitates data management and processing, improves data processing efficiency, and facilitates the application of different transmission strategies to different data groups. By analyzing the data group to be transmitted, the transmission priority is determined, and the priority is assigned according to the importance and real-time requirements of the data, so that the priority assignment result is accurate, the rationality of data transmission is ensured, and the efficiency of data processing is improved. By adjusting the data transmission flow based on the transmission priority, it helps to avoid network congestion and delay, and ensure the smoothness and stability of data transmission. The combination of the initial transmission flow group and the transmission priority makes the data transmission more efficient and orderly. Adding a security check field to the transmission data group and encrypting it is an important measure to ensure the reliability of data transmission, prevent data from being tampered with, lost or leaked during transmission, prevent data from being tampered with or leaked during transmission, improve the reliability of data transmission, send the edited transmission data group to the target node, and decrypt and verify it to ensure the correctness and validity of the data. If the verification fails, the transmission priority is adjusted and the data is resent, thereby improving the reliability of data transmission.

[0073] Specifically, the step of analyzing the plurality of data groups to be transmitted includes:

[0074] Sorting the plurality of data groups to be transmitted based on the data initial timestamps, and determining the real-time performance of the plurality of data groups to be transmitted based on the sorting results;

[0075] The correlation between the plurality of data groups to be transmitted is analyzed, and the correlation between the plurality of data groups to be transmitted is determined according to the analysis result.

[0076] Specifically, the initial timestamp in the embodiment of the present invention is the time when the data to be transmitted is received;

[0077] The data are sorted from back to front according to the time of the initial timestamp to determine the real-time performance according to the order of sorting. For example, the initial timestamp of the data group A1 to be transmitted is T1, the initial timestamp of the data group A2 to be transmitted is T2, and T1 is later than T2, then the sorting is A1, A2.

[0078] See also Figure 2 As shown, the step of analyzing the correlation between the plurality of data groups to be transmitted includes:

[0079] Step S210, drawing corresponding data change curves based on the plurality of data groups to be transmitted, and obtaining a plurality of change curve graphs;

[0080] Step S220, judging the change trends of the change curves, obtaining trend judgment results, and determining an initial related data group according to the trend judgment results;

[0081] Step S230, evaluating the correlation of several to-be-transmitted data in several initial related data groups based on a statistical method, obtaining evaluation results, and determining actual related data groups according to the evaluation results.

[0082] Specifically, the step of determining the initial relevant data group according to the trend judgment result in the embodiment of the present invention includes:

[0083] Identify a number of curves in the change curve graph, and determine whether the change trend of the curve is rising, falling or stable based on the change of the slope at each point on the curve;

[0084] The data to be transmitted corresponding to the change curves with the same or opposite change trends are collected as the initial related data group.

[0085] Specifically, the step of evaluating the correlation of several to-be-transmitted data in several initial related data groups based on a statistical method in the embodiment of the present invention includes:

[0086] Calculate the Pearson correlation coefficient for any two groups of the initial correlation data sets;

[0087] When the absolute value of the Pearson correlation coefficient is greater than 0.7, any two groups of the initial correlation data are correlated;

[0088] Among them, assuming that the first group of initial related data is (x1, x2, ... xn), and the second group of initial related data is (y1, y2, ... yn), then the corresponding Pearson correlation coefficient r is , where n is an integer, xi is any data to be transmitted in the first group of initial related data, and yi is any data to be transmitted in the second group of initial related data.

[0089] Specifically, the value range of the Pearson correlation coefficient in the embodiment of the present invention is from -1 to 1, and a value close to 1 indicates a strong positive correlation, and a value close to -1 indicates a strong negative correlation.

[0090] Specifically, the embodiment of the present invention draws a data change curve graph to intuitively observe the change trend of the data, thereby facilitating the judgment of which data may be correlated, and determines the change trend of the curve based on the change in slope at each point on the curve, so as to more accurately reflect the dynamic characteristics of the data, provide a reliable basis for subsequent correlation analysis, and group data with the same or opposite change trends to form an initial correlation data group, thereby improving the efficiency of subsequent correlation evaluation. The statistical method is used to quantitatively evaluate the correlation of the data to be transmitted in the initial correlation data group, which can more accurately reveal the degree of correlation between the data, provide strong support for the formulation of data transmission strategies, and help optimize data transmission efficiency and reliability.

[0091] Specifically, the step of determining the transmission priority of the data to be transmitted according to the analysis result includes:

[0092] Assigning corresponding weight values ​​as first weights to the plurality of data groups to be transmitted according to the real-time ranking;

[0093] Assigning corresponding weight values ​​as second weights to the plurality of data to be transmitted according to the absolute values ​​of the correlations;

[0094] Calculate the total weight of the plurality of data to be transmitted according to the first weight and the second weight;

[0095] The transmission priority is determined based on the total weight.

[0096] Specifically, a possible example of an embodiment of the present invention assigning corresponding weight values ​​as the first weight to several of the data groups to be transmitted according to the real-time sorting is: let the weight corresponding to the first-ranked data group to be transmitted in the real-time sorting be n, the weight corresponding to the second-ranked data group to be transmitted be n-1, ... the weight corresponding to the nth-ranked data group to be transmitted be 1, n is the number of the several data groups to be transmitted, and the first weight is n, n-1, ... 1.

[0097] Specifically, a possible example of an embodiment of the present invention assigning corresponding weight values ​​as the second weight to a number of the data to be transmitted according to the absolute value of the correlation is: calculating the sum of the absolute values ​​of the correlations between any of the data groups to be transmitted and the remaining groups in the initial actual relevant data group as the total correlation, and taking the total correlation as the second weight of the data group to be transmitted; if the correlations between any of the data groups to be transmitted and the remaining groups in the initial actual relevant data group are -0.8 and 0.7 respectively, then the corresponding second weight is 1.5.

[0098] Specifically, the total weight in the embodiment of the present invention is the first weight multiplied by the second weight.

[0099] Specifically, the embodiment of the present invention determines the transmission priority based on the total weight, that is, determines the transmission priority from first to last according to the total weight from large to small.

[0100] Specifically, the step of adjusting the preset data transmission flow based on the transmission priority includes:

[0101] Determining a number of traffic weights based on the total weights corresponding to the transmission priorities;

[0102] The initial transmission traffic group corresponding to the transmission priority is determined according to the plurality of traffic weights and the preset data transmission traffic.

[0103] Specifically, the preset transmission flow rate described in the embodiment of the present invention is the maximum transmission flow rate that can be transmitted by the transmission channel of the cloud PLC network architecture based on TSN.

[0104] Specifically, the traffic weight described in the embodiment of the present invention = (total weight / sum of total weights) × preset transmission traffic.

[0105] Specifically, the initial traffic group in the embodiment of the present invention is obtained by multiplying a number of the traffic weights and the preset data transmission traffic.

[0106] Specifically, the embodiments of the present invention ensure that network resources are reasonably allocated by assigning different traffic weights to each transmission priority and adjusting the preset data transmission traffic according to these weights, thereby ensuring the real-time and reliability of its transmission, allowing important data to be transmitted faster and reducing waiting time, thereby improving the overall data transmission efficiency. In the network, when the data transmission volume is too large, congestion is likely to occur, resulting in data transmission delays or even losses. By adjusting the data transmission traffic based on the transmission priority, network congestion can be effectively avoided and the stability and reliability of data transmission can be guaranteed.

[0107] See also Figure 3 As shown, the step of verifying a plurality of the initial transmission data groups based on the transmission priority comprises:

[0108] Step S410, classifying the initial transmission data groups based on the transmission priority to obtain a high-level transmission data group and a low-level transmission data group;

[0109] Step S420, for the high-level transmission data group, verify the integrity and consistency of any of the initial transmission data groups to obtain a verification result;

[0110] Step S430, for the low-level transmission data group, select the verification data part in any of the initial transmission data groups, verify the integrity and consistency of the verification data part, and obtain the verification result to complete the verification of any of the initial transmission data groups.

[0111] Specifically, a possible method for classifying several of the initial transmission data groups based on the transmission priority in an embodiment of the present invention is to classify the top 1 / 2 of the transmission priority groups as high-level transmission data groups and the bottom 1 / 2 of the transmission priority groups as low-level transmission data groups.

[0112] Specifically, the method for selecting the verification data area in the embodiment of the present invention may be to determine the verification data area based on an area in which problems occur in a historical transmission data group corresponding to the initial transmission data group during a historical transmission process.

[0113] Specifically, the embodiment of the present invention classifies the initial transmission data group into two groups, high-level and low-level, according to the transmission priority, and adopts different verification strategies for data of different priorities, thereby optimizing the verification process and improving the verification efficiency. For the high-level transmission data group, its integrity and consistency are strictly verified to ensure the accuracy and reliability of these key data. For the low-level transmission data group, only the verification data part is selected for verification, which reduces the consumption of system resources, reduces the complexity of verification, and improves the efficiency of the verification process. By verifying the initial transmission data group, the integrity and consistency of the data during the transmission process are ensured, and the data is prevented from being tampered with or lost, which helps to improve the reliability of the system.

[0114] Specifically, the step of verifying the integrity and consistency of any of the initial transmission data groups includes:

[0115] Comparing the data length of the initial transmission data group with the data length in the corresponding to-be-transmitted data group, so as to determine the integrity according to the comparison result;

[0116] Comparing the initial transmission data in the initial transmission data group with the to-be-transmitted data in the corresponding to-be-transmitted data group one by one, so as to determine the consistency according to the comparison result;

[0117] When the initial transmission data group is incomplete or inconsistent, the initial transmission data group verification fails;

[0118] When the initial transmission data group is complete and consistent, the initial transmission data group passes the verification.

[0119] Specifically, the step of determining the integrity according to the comparison result in the embodiment of the present invention includes:

[0120] When the data length of the initial transmission data group is equal to the data length in the data group to be transmitted, the initial transmission data group is complete;

[0121] When the data length of the initial transmission data group is not equal to the data length in the data group to be transmitted, the initial transmission data group is incomplete.

[0122] Specifically, the step of determining the consistency according to the comparison result in the embodiment of the present invention includes:

[0123] When the comparison result between the initial transmission data and the data to be transmitted is the same, the initial transmission data group is consistent;

[0124] When the comparison results of the initial transmission data and the data to be transmitted are different, the initial transmission data groups are inconsistent.

[0125] Specifically, the embodiments of the present invention compare the data lengths of the initial transmission data group with the corresponding data group to be transmitted, and promptly discover the loss or truncation of data that may occur during the transmission process, thereby avoiding incomplete data from being erroneously received or processed. By comparing the initial transmission data in the initial transmission data group with the corresponding data to be transmitted in the data group to be transmitted one by one, it is ensured that the data is not tampered with or replaced during the transmission process, and the accuracy of the data is accurately verified to ensure the originality and authenticity of the data. By verifying the integrity and consistency of the data, problems in the data transmission process can be discovered and resolved in a timely manner, thereby improving the reliability of data transmission.

[0126] Specifically, the step of adding a security check field to the initial transmission data group and encrypting the data includes:

[0127] Determine the location to add;

[0128] generating an initial sequence number for any of the initial transmission data groups based on the transmission priority;

[0129] generating a transmission timestamp based on the transmission time of any of the initial transmission data groups;

[0130] Generate an initial check value based on a cyclic redundancy check algorithm and initial transmission data in any of the initial transmission data groups;

[0131] Generate the security check field according to the initial sequence number, the transmission timestamp and the initial check value, add the security check field at the adding position, and obtain the added transmission data group;

[0132] Any of the added transmission data groups is encrypted based on a preset encryption key to obtain the edited transmission data group.

[0133] Specifically, the step of determining the adding position in the embodiment of the present invention includes:

[0134] Identifying the data format and data length of the initial transmission data group;

[0135] According to the data format and the data length, if the data format contains a reserved spare field, it is used as the adding position; if the data format does not contain a reserved spare field, the end of the data group is selected as the adding position.

[0136] Specifically, the method for generating an initial sequence number for any initial transmission data group based on the transmission priority described in an embodiment of the present invention is that if the transmission priority is ranked as the first level, the second level...the nth level, then the corresponding sequence number is 01, 02..., 0N.

[0137] Specifically, the method for obtaining the initial check value described in the embodiment of the present invention is to use the selected CRC algorithm to calculate the check value of the data. The CRC algorithm usually involves a polynomial division operation, in which the data is regarded as a large binary number, and the CRC generating polynomial is a predefined polynomial. During the calculation process, the data is divided modulo 2 by the generating polynomial, and the remainder obtained is the CRC code, which is the initial check value.

[0138] Specifically, the preset encryption key described in the embodiment of the present invention is a key generated based on the AES symmetric encryption algorithm, and the key is pre-set in the TSN-based cloud PLC network architecture.

[0139] See also Figure 4 As shown, the step of verifying the received transmission data group includes:

[0140] Step S510, identifying the security check field in the received transmission data group, and obtaining a received sequence number, a received timestamp, and a received check value;

[0141] Step S520, matching the received sequence number with the initial sequence number to obtain a sequence number matching result;

[0142] Step S530, comparing the receiving timestamp with the transmitting timestamp to obtain a timestamp comparison result;

[0143] Step S540, recalculating the received transmission data group according to the cyclic redundancy check algorithm to obtain a calculated check value, comparing the calculated check value with the transmission check value in the received transmission data group to obtain a check value comparison result;

[0144] Step S550: Complete verification of the received transmission data group according to the sequence number matching result, the timestamp comparison result and the check value comparison result.

[0145] Specifically, in the embodiment of the present invention, when the sequence number matching results, the timestamp comparison results and the check value comparison results are consistent, the received transmission data verification passes, otherwise it fails.

[0146] Specifically, the embodiment of the present invention can detect whether data is lost or reordered during transmission through sequence number matching and timestamp comparison. When the received sequence number matches the initial sequence number and the received timestamp matches the transmitted timestamp, the integrity and sequentiality of the data are ensured. A cyclic redundancy check algorithm (CRC) is used to recalculate the received transmission data group and compare it with the transmission check value to accurately detect whether errors occur in the data during transmission, improve the accuracy and reliability of the data verification results, and ensure the reliability of the data transmission process.

[0147] Specifically, the step of adjusting the transmission priority includes:

[0148] Calculating an error coefficient according to the sequence number matching result, the timestamp comparison result, or the check value comparison result;

[0149] The total weight is adjusted based on the error coefficient to adjust the transmission priority.

[0150] Specifically, the embodiment of the present invention calculates the error coefficient according to the sequence number matching result as error coefficient k1=l1 / l2, where l1 is the number of unmatched sequence numbers in the sequence number matching result, and l2 is the total number of sequence number matching results;

[0151] The error coefficient is calculated according to the timestamp comparison result as error coefficient k2=|t1-t2| / t2, where t1 is the receiving timestamp and t2 is the transmitting timestamp;

[0152] The error coefficient calculated according to the check value comparison result can be obtained by calculating the similarity between the transmission check value and the calculated check value, and the similarity calculation result is used as the error coefficient k3.

[0153] Specifically, the embodiment of the present invention evaluates the reliability of data transmission in real time by calculating the error coefficient. When an error or abnormal situation is detected, the transmission priority is adjusted in time to ensure that key data is processed first, thereby improving the reliability of data transmission.

[0154] Specifically, a security assurance method for a TSN-based cloud PLC network architecture provided in an embodiment of the present invention can be applied in smart factories. Sensors in the factory collect production data, including machine status, production speed, etc. These data are analyzed by the method of the present invention. After the transmission priority is determined, they are transmitted to the security layer for verification and encryption. The encrypted data is sent to the cloud platform, where it is decrypted and integrity checked. If the data is complete, it is used for production management and optimization; if the data is incomplete, error processing and resending are performed.

[0155] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

[0156] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A security assurance method for a TSN-based cloud PLC network architecture, characterized in that: include: Acquire a data packet to be transmitted, wherein the data packet to be transmitted includes a plurality of data groups to be transmitted; Analyzing the plurality of data groups to be transmitted, and determining transmission priorities of the plurality of data groups to be transmitted according to the analysis results; The step of analyzing the plurality of data groups to be transmitted comprises: Sorting the plurality of data groups to be transmitted based on the data initial timestamps, and determining the real-time performance of the plurality of data groups to be transmitted based on the sorting results; Analyzing the correlation between the plurality of data groups to be transmitted, and determining the correlation between the plurality of data groups to be transmitted according to the analysis result; The step of analyzing the correlation between the plurality of data groups to be transmitted comprises: Based on the plurality of data groups to be transmitted, a plurality of corresponding data change curves are drawn to obtain a plurality of change curve graphs; Judging the change trends of the change curves, obtaining trend judgment results, and determining an initial relevant data group according to the trend judgment results; Evaluate the correlation of several to-be-transmitted data in several initial related data groups based on a statistical method, obtain evaluation results, and determine actual related data groups according to the evaluation results; The step of determining the transmission priority of the data to be transmitted according to the analysis result comprises: Assigning corresponding weight values ​​as first weights to the plurality of data groups to be transmitted according to the real-time ranking; Assigning corresponding weight values ​​as second weights to the plurality of data to be transmitted according to the absolute values ​​of the correlations; Calculate the total weight of the plurality of data to be transmitted according to the first weight and the second weight; determining the transmission priority based on the total weight; Adjust the preset data transmission flow rate based on the transmission priority, obtain an initial transmission flow group, transmit the plurality of data groups to be transmitted to the security layer according to the initial transmission flow group and the transmission priority, and obtain a plurality of initial transmission data groups; The step of adjusting the preset data transmission flow based on the transmission priority comprises: Determining a number of traffic weights based on the total weights corresponding to the transmission priorities; Determine the initial transmission traffic group corresponding to the transmission priority according to the plurality of traffic weights and the preset data transmission traffic; Verifying the initial transmission data groups based on the transmission priority, obtaining verification results, and when the initial transmission data group passes the verification, adding a security verification field to the initial transmission data group and encrypting it, to obtain an edited transmission data group; The edited transmission data group is sent to the target node and decrypted, the received transmission data group is obtained, and the received transmission data group is verified. If the verification passes, the data transmission is completed. If the verification fails, the transmission priority is adjusted and several of the data groups to be transmitted are resent.

2. The security assurance method for the TSN-based cloud PLC network architecture according to claim 1 is characterized in that: The step of verifying a plurality of the initial transmission data groups based on the transmission priority comprises: Classifying the initial transmission data groups based on the transmission priority to obtain a high-level transmission data group and a low-level transmission data group; For the high-level transmission data group, verify the integrity and consistency of any of the initial transmission data groups to obtain a verification result; For the low-level transmission data group, a verification data portion in any of the initial transmission data groups is selected, the integrity and consistency of the verification data portion is verified, and a verification result is obtained to complete the verification of any of the initial transmission data groups.

3. The security assurance method for the TSN-based cloud PLC network architecture according to claim 2 is characterized in that: The step of verifying the integrity and consistency of any of the initial transmission data groups comprises: Comparing the data length of the initial transmission data group with the data length in the corresponding to-be-transmitted data group, so as to determine the integrity according to the comparison result; Comparing the initial transmission data in the initial transmission data group with the to-be-transmitted data in the corresponding to-be-transmitted data group one by one, so as to determine the consistency according to the comparison result; When the initial transmission data group is incomplete or inconsistent, the initial transmission data group verification fails; When the initial transmission data group is complete and consistent, the initial transmission data group passes the verification.

4. The security assurance method for the TSN-based cloud PLC network architecture according to claim 3 is characterized in that: The step of adding a security check field to the initial transmission data group and encrypting the data includes: Determine the location to add; generating an initial sequence number for any of the initial transmission data groups based on the transmission priority; generating a transmission timestamp based on the transmission time of any of the initial transmission data groups; Generate an initial check value based on a cyclic redundancy check algorithm and initial transmission data in any of the initial transmission data groups; Generate the security check field according to the initial sequence number, the transmission timestamp and the initial check value, add the security check field at the adding position, and obtain the added transmission data group; Any of the added transmission data groups is encrypted based on a preset encryption key to obtain the edited transmission data group.

5. The security assurance method for the TSN-based cloud PLC network architecture according to claim 4 is characterized in that: The step of verifying the received transmission data group includes: Identify the security check field in the received transmission data group, and obtain a received sequence number, a received timestamp, and a received check value; Matching the received sequence number with the initial sequence number to obtain a sequence number matching result; Compare the receiving timestamp with the transmitting timestamp to obtain a timestamp comparison result; Recalculating the received transmission data group according to the cyclic redundancy check algorithm to obtain a calculated check value, comparing the calculated check value with the transmission check value in the received transmission data group to obtain a check value comparison result; The received transmission data group is verified according to the sequence number matching result, the timestamp comparison result and the check value comparison result.

6. The security assurance method for the TSN-based cloud PLC network architecture according to claim 5 is characterized in that: The step of adjusting the transmission priority comprises: Calculating an error coefficient according to the sequence number matching result, the timestamp comparison result, or the check value comparison result; The total weight is adjusted based on the error coefficient to adjust the transmission priority.

Citation Information

Patent Citations

  • 5G network cloud-terminal collaborative virtual PLC control method and system

    CN115442202A

  • Data processing method and processor

    CN116707958A