Method for ensuring security of communication data between PLCs

Through the closed-loop communication mechanism of REQ and ASW data structures, the problem of data incompleteness between PLCs is solved, data integrity and security are improved, and the response speed and device security of PLCs are improved.

CN120474820APending Publication Date: 2025-08-12AIHUA (WUXI) SEMICON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510832415.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

When there is a lot of communication data between PLCs, there is a risk of incomplete data in the prior art, resulting in PLC running errors and delay adjustment affects program response speed.

Method used

Using REQ and ASW data structures, the data integrity and security are ensured through interactive instructions, processing methods and closed-loop communication mechanisms that receive feedback, including the steps of data application, sending, proofreading and restoring the initial state.

Benefits of technology

Effectively ensure data integrity, improve the security and response speed of interactive data, and avoid PLC operation errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120474820A_ABST
    Figure CN120474820A_ABST
Patent Text Reader

Abstract

The invention relates to a method for ensuring the security of communication data between PLCs (Programmable Logic Controller), which comprises the following steps that: the PLCs requesting data use REQ (Region Evaluation Queue) data structures which comprise members: (1) interaction instructions, (2) processing modes and (3) receiving feedback; the PLC requested with the data uses an ASW data structure and comprises members: 1) instruction response, 2) data transmission and 3) feedback processing; if the two parties interact, that is, the PLC requests data and is requested data, the PLC comprises an REQ data structure and an ASW data structure at the same time; comprising the following steps: S1, applying for data; S2, sending the data; S3, checking the integrity of data sending; and S4, recovering an initial state, and ending the data interaction. The method has the advantages that the method is reasonable in design, the data integrity can be effectively guaranteed, and the security of interactive data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for ensuring the security of communication data between PLCs, and belongs to the technical field of electrical automation. Background Art

[0002] In the application of electrical automation control, PLC programs generally run periodically, and communication between PLCs is often also periodic due to serial transmission.

[0003] When there is less interactive data, the communication speed between PLCs is very fast, and the communication cycle is shorter than the PLC program running cycle. Then the data transmission between PLCs can respond in real time without data loss.

[0004] However, when there is a lot of interactive data between PLCs, the communication speed between PLCs will be greater than or even much greater than the PLC operation cycle. At this time, if the PLCs still directly use the received data, incomplete data may occur, which will cause PLC operation errors.

[0005] In existing technology, a common way to avoid errors is to increase the delay to ensure that data is fully transmitted before use. However, in practice, the communication cycle is difficult to estimate, so the delay is often set to a large value, affecting program response speed. On the other hand, if the delay is set too low, the data is too long, or the communication between PLCs is affected by interference, resulting in a slow response, which still poses the risk of incomplete data. Summary of the Invention

[0006] The present invention proposes a method for ensuring the security of communication data between PLCs, which aims to overcome the above-mentioned shortcomings of the existing technology, effectively ensure the integrity of data, and improve the security of interactive data.

[0007] The technical solution of the present invention is a method for ensuring data security in communication between PLCs. The PLC requesting data uses a REQ data structure, which includes the following members: 1) interaction command, 2) processing mode, and 3) receiving feedback. The PLC receiving data uses an ASW data structure, which includes the following members: 1) command response, 2) transmission data, and 3) processing feedback. If both parties are interacting, that is, the PLC is both requesting data and receiving data, then the PLC contains both the REQ data structure and the ASW data structure. The following steps are involved: S1. Application data; S2, send data; S3. Check the integrity of data transmission; S4. Restore the initial state and end this data interaction.

[0008] Said step S1 specifically comprises: first, the PLC requesting data determines whether each member in REQ is in an initial state; Then, the PLC requesting data applies to the PLC being requested, specifically: 1. Update the interaction instructions and specify the specific required data, including the address, ID or name of the data. 2. Update the processing method and specify the preprocessing requirements of the data. 3. Refresh to receive feedback.

[0009] The step S2 specifically includes: first, the PLC whose data is requested waits for the data request of the PLC requesting data, that is, the interactive instruction in REQ of the PLC requesting data is updated to a non-initial state; Then, the PLC whose data is requested determines that the current data feedback in the REQ of the PLC requesting the data is empty, and then finds the corresponding data according to the identifier specified by the instruction, which includes an address, ID or name; Then, the PLC that requested the data pre-processes the data according to the processing method specified in the REQ of the PLC that requested the data; Finally, the PLC that requested the data updates the instruction response in the ASW to writing, writes the preprocessed data into the transmission data of the ASW, and after the data preprocessing is completed, updates the processing feedback in the ASW to the specified processing method received from the REQ of the PLC that requested the data.

[0010] The step S3 specifically includes: the PLC requesting data waits for the instruction response in the ASW of the PLC receiving data to be updated to "writing in progress"; The PLC requesting data then confirms that the processing method of the feedback in the ASW of the PLC being requested is the same as that in the REQ of the PLC requesting data, and writes the data received by the PLC requesting data into the receiving feedback of REQ, feeding back the received data in real time; The PLC receiving the data request receives the receiving feedback in REQ of the PLC requesting the data, verifies and confirms that the data returned by the PLC requesting the data is exactly the same as the data sent by the PLC receiving the data request; Then, the PLC that requested the data updates the command response in the ASW to write completed; The PLC requesting data waits for the instruction response in the ASW of the PLC being requested to be updated to write completion, then transfers the received data to the corresponding data variable for latching, and updates the interaction instruction in REQ to end reception, and the processing mode is no processing.

[0011] The step S4 specifically includes: the PLC whose data is requested waits for the interactive instruction in REQ of the PLC requesting data to be updated to end reception, and the processing mode to be updated to not process; The PLC that is requested to process data resets the command response in the ASW to the initial state, resets the processing feedback to not process, and resets the transmission data to empty; The PLC requesting data waits for the instruction response in the ASW of the PLC being requested to be reset to the initial state, resets the processing feedback to not processing, resets the transmission data to empty, then resets the interaction instruction in REQ to the initial state, and feeds back the empty data to the PLC being requested in real time. The process of the PLC requesting data ends; The PLC whose data is requested waits for the interactive instruction in REQ of the PLC requesting data to be reset to the initial state, and after confirming that the feedback data becomes empty data, the PLC process of the PLC requesting data ends; At this point, the REQ of the PLC requesting data and the ASW of the PLC being requested data are both in the initial state.

[0012] Advantages of the present invention: The method is reasonably designed, can effectively ensure the integrity of data, and improve the security of interactive data. Specifically: 1) Data comparison is performed every time data is transmitted, rather than through delay, forming a closed-loop communication that can effectively ensure data integrity and improve the security of interactive data; 2) Data can be latched immediately after comparison is completed without redundant delay, which can effectively improve the response speed of interaction between PLCs; 3) Since the integrity of interactive data between PLCs is guaranteed, longer and more complex data can be transmitted between PLCs without worrying about PLC operation errors caused by data errors, which can effectively improve the safety of the entire equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 This is a flow chart of an embodiment of a method for ensuring data security in communication between PLCs according to the present invention. DETAILED DESCRIPTION

[0014] The present invention will be further described in detail below with reference to examples and specific implementation methods.

[0015] A method to ensure the security of communication data between PLCs, The PLC requesting data uses the REQ data structure, which contains the following members: 1) interaction instructions, 2) processing method, and 3) receiving feedback (receiving feedback is the real-time feedback of the data transmitted by the PLC requesting data); The PLC that requests data uses the ASW data structure, which contains the following members: 1) command response, 2) transmission data, and 3) processing feedback; If the two parties interact, that is, the PLC both requests data and is requested data, then the PLC contains both the REQ data structure and the ASW data structure; The following steps are involved: S1. Application data: First, the PLC requesting data determines whether each member in REQ is in the initial state to ensure that there is no residual data before communication begins.

[0016] Then, the PLC requesting data applies for data from the PLC being requested. 1. Update the interaction instructions and specify the specific required data (usually the address, ID, or name of the data); 2. Update the processing method and specify the preprocessing requirements of the data; 3. Refresh to receive feedback (the current status should be "empty").

[0017] S2. Send data: First, the PLC whose data is requested waits for the data request from the PLC requesting data, that is, the interaction instruction in REQ of the PLC requesting data is updated to a non-initial state.

[0018] Then, the PLC whose data is requested determines that the current data feedback in the REQ of the PLC requesting the data is empty to ensure that there is no data remaining, and then finds the corresponding data according to the identifier (address, ID or name) specified by the instruction.

[0019] Then, the PLC requested for data pre-processes the data according to the processing method specified in the REQ of the PLC requesting the data, so as to ensure that the data meets the requirements of the PLC requesting the data.

[0020] Finally, the PLC that requested the data updates the instruction response in the ASW to writing, writes the preprocessed data into the transmission data of the ASW, and after the data preprocessing is completed, updates the processing feedback in the ASW to the specified processing method received from the REQ of the PLC that requested the data.

[0021] S3. Check the integrity of data transmission: The PLC requesting data waits for the command response in the ASW of the PLC receiving the data to be updated to "writing in progress".

[0022] The PLC requesting data then confirms that the processing method for processing feedback in the ASW of the PLC being requested is the same as that in the REQ of the PLC requesting data, and writes the data received by the PLC requesting data into the receiving feedback of REQ, and feeds back the received data in real time.

[0023] The PLC whose data is requested receives the reception feedback in REQ of the PLC requesting data, verifies and confirms that the data feedback by the PLC requesting data is exactly the same as the data sent by the PLC whose data is requested, to ensure that the data received by the PLC requesting data is complete and correct.

[0024] Then, the PLC that requested the data updates the command response in the ASW to write completion.

[0025] The PLC requesting data waits for the instruction response in the ASW of the PLC being requested to be updated to write completion, then transfers the received data to the corresponding data variable for latching, and updates the interaction instruction in REQ to end reception, and the processing mode is no processing.

[0026] S4. Restore the initial state and end this data interaction: The PLC requested for data waits for the interactive instruction in REQ of the PLC requesting data to be updated to end reception, and the processing mode to be updated to not process.

[0027] The PLC that is requested to process data resets the instruction response in the ASW to the initial state, resets the processing feedback to not process, and resets the transmission data to empty.

[0028] The PLC requesting data waits for the instruction response in the ASW of the PLC being requested to be reset to the initial state, the processing feedback is reset to not processed, the transmission data is reset to empty, and then the interaction instruction in REQ is reset to the initial state, and the empty data is fed back to the PLC being requested in real time. The PLC process requesting data ends.

[0029] The PLC whose data is requested waits for the interactive instruction in REQ of the PLC requesting data to be reset to the initial state, and after confirming that the feedback data becomes empty data, the PLC process of the PLC requesting data ends.

[0030] At this point, the REQ of the PLC requesting data and the ASW of the PLC being requested data are both in the initial state. Example

[0031] like Figure 1 As shown in Figure 1, a method for ensuring data security in inter-PLC communication is presented. Assume there are two PLCs, assuming the two communicating PLCs are PLCA and PLCB. Assume that PLCA requests data from PLCB. PLCA uses the REQ data structure, which contains the following members: 1. Interaction command; 2. Processing method; 3. Received feedback. PLCB uses the ASW data structure, which contains the following members: 1. Command response; 2. Transmitted data; 3. Processing feedback. If PLCB requests data from PLCA, the opposite occurs. If both parties interact, both parties contain the REQ and ASW data structures.

[0032] The following steps are involved: S1. Application data: First, PLCA determines whether each member in REQ is in the initial state to ensure that there is no residual data before communication begins.

[0033] Then, PLCA applies for data from PLCB. Specifically: 1. Update the interaction instructions and specify the specific required data; 2. Update the processing method and specify the preprocessing requirements of the data; 3. Refresh to receive feedback.

[0034] S2. Send data: First, PLCB waits for PLCA’s data request, that is, the interaction instruction in PLCA’s REQ is updated to a non-initial state.

[0035] Then, PLCB determines that the current data feedback in PLCA's REQ is empty to ensure that there is no data remaining, and then finds the corresponding data according to the identifier specified by the instruction.

[0036] Then, the PLCB pre-processes the data according to the processing method specified in the PLCA's REQ to ensure that the data meets the requirements of the PLCA.

[0037] Finally, PLCB updates the instruction response in ASW to writing, writes the preprocessed data into the transmission data of ASW, and updates the processing feedback in ASW to the specified processing method received from PLCA's REQ after data preprocessing is completed.

[0038] S3. Check the integrity of data transmission: PLCA waits for the instruction response in PLCB's ASW to be updated to writing.

[0039] Then PLCA confirms that the processing method of the feedback in PLCB's ASW is the same as that in PLCA's REQ, and writes the data received by PLCA into the receiving feedback of REQ, feeding back the received data in real time.

[0040] PLCB receives the reception feedback in PLCA's REQ, verifies and confirms that the data fed back by PLCA is exactly the same as the data sent by PLCB to ensure that the data received by PLCA is complete and correct.

[0041] The PLCB then updates the command response in the ASW to write completion.

[0042] PLCA waits for the instruction response in PLCB's ASW to be updated to write completion, then transfers the received data to the corresponding data variable for latching, and updates the interaction instruction in REQ to end reception, and the processing mode is no processing.

[0043] S4. Restore the initial state and end this data interaction: PLCB waits for the interaction instruction in PLCA's REQ to be updated to end reception and the processing mode to be updated to not process.

[0044] PLCB resets the command response in ASW to the initial state, resets the processing feedback to not processing, and resets the transmission data to empty.

[0045] PLCA waits for the instruction response in PLCB's ASW to be reset to the initial state, the processing feedback to be reset to not processed, the transmission data to be reset to empty, and then resets the interactive instruction in REQ to the initial state, and feeds back the empty data to PLCB in real time. The PLCA process ends.

[0046] PLCB waits for the interactive instruction in PLCA's REQ to be reset to the initial state, and confirms that the feedback data becomes empty data, and then the PLCB process ends.

[0047] At this point, PLCA's REQ and PLCB's ASW are both in their initial states.

[0048] The above description is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this field, several variations and improvements can be made without departing from the creative concept of the present invention, which all fall within the scope of protection of the present invention.

Claims

1. A method for ensuring data security in communication between PLCs, characterized in that: The PLC requesting data uses the REQ data structure, which includes the following members: 1) interaction command, 2) processing method, and 3) receiving feedback. The PLC receiving data uses the ASW data structure, which includes the following members: 1) command response, 2) transmission data, and 3) processing feedback. If both parties are interacting, that is, the PLC is both requesting data and receiving data, then the PLC contains both the REQ data structure and the ASW data structure. The following steps are involved: S1. Application data; S2, send data; S3. Check the integrity of data transmission; S4. Restore the initial state and end this data interaction.

2. A method for ensuring data security in communication between PLCs according to claim 1, characterized in that: Said step S1 specifically comprises: first, the PLC requesting data determines whether each member in REQ is in an initial state; Then, the PLC requesting data applies to the PLC being requested, specifically:

1. Update the interaction instructions and specify the specific required data, including the address, ID or name of the data.

2. Update the processing method and specify the preprocessing requirements of the data.

3. Refresh to receive feedback.

3. A method for ensuring data security in communication between PLCs as claimed in claim 2, characterized in that: Said step S2 specifically comprises: first, the PLC whose data is requested waits for the data request of the PLC requesting data, that is, the interactive instruction in REQ of the PLC requesting data is updated to a non-initial state; Then, the PLC whose data is requested determines that the current data feedback in the REQ of the PLC requesting the data is empty, and then finds the corresponding data according to the identifier specified by the instruction, which includes an address, ID or name; Then, the PLC that requested the data pre-processes the data according to the processing method specified in the REQ of the PLC that requested the data; Finally, the PLC that requested the data updates the instruction response in the ASW to writing, writes the preprocessed data into the transmission data of the ASW, and after the data preprocessing is completed, updates the processing feedback in the ASW to the specified processing method received from the REQ of the PLC that requested the data.

4. A method for ensuring data security in communication between PLCs as claimed in claim 3, characterized in that: The step S3 specifically includes: the PLC requesting data waits for the instruction response in the ASW of the PLC receiving data to be updated to "writing in progress"; The PLC requesting data then confirms that the processing method of the feedback in the ASW of the PLC being requested is the same as that in the REQ of the PLC requesting data, and writes the data received by the PLC requesting data into the receiving feedback of REQ, feeding back the received data in real time; The PLC receiving the data request receives the receiving feedback in REQ of the PLC requesting the data, verifies and confirms that the data returned by the PLC requesting the data is exactly the same as the data sent by the PLC receiving the data request; Then, the PLC that requested the data updates the command response in the ASW to write completed; The PLC requesting data waits for the instruction response in the ASW of the PLC being requested to be updated to write completion, then transfers the received data to the corresponding data variable for latching, and updates the interaction instruction in REQ to end reception, and the processing mode is no processing.

5. A method for ensuring data security in communication between PLCs as claimed in claim 4, characterized in that: The step S4 specifically includes: the PLC whose data is requested waits for the interactive instruction in REQ of the PLC requesting data to be updated to end reception, and the processing mode to be updated to not process; The PLC that is requested to process data resets the command response in the ASW to the initial state, resets the processing feedback to not process, and resets the transmission data to empty; The PLC requesting data waits for the instruction response in the ASW of the PLC being requested to be reset to the initial state, resets the processing feedback to not processing, resets the transmission data to empty, then resets the interaction instruction in REQ to the initial state, and feeds back the empty data to the PLC being requested in real time. The process of the PLC requesting data ends; The PLC whose data is requested waits for the interactive instruction in REQ of the PLC requesting data to be reset to the initial state, and after confirming that the feedback data becomes empty data, the PLC process of the PLC requesting data ends; At this point, the REQ of the PLC requesting data and the ASW of the PLC being requested data are both in the initial state.