An edge visual security communication method based on a zero-trust architecture

By adopting an edge vision security communication method based on a zero-trust architecture, the problems of packet loss, heterogeneous format, and security in industrial vision data transmission are solved, achieving highly reliable and secure data transmission and disaster recovery in case of disconnection, and is suitable for harsh network environments.

CN123074693APending Publication Date: 2026-11-10HANGZHOU POLYTECHNIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611585812.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-14
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing industrial vision data transmission is prone to packet loss, heterogeneous data formats, and lacks security protection in harsh network environments, making it impossible to achieve highly reliable and secure edge governance and replay-resistant transmission.

Method used

We adopt an edge vision security communication method based on zero-trust architecture. Through edge-side proxy gateways, we perform data governance, encryption signing, store-and-forward, and dynamic defense. Combined with high-rate lossless compression and asynchronous persistence technology, we achieve unified data format, secure transmission, and disaster recovery in case of disconnection.

Benefits of technology

It achieves highly reliable, secure, and replay-resistant data transmission in harsh industrial network environments, ensuring data integrity and continuity, reducing the computational burden on backend servers, and is suitable for remote and low-bandwidth communication environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123074693A_ABST
    Figure CN123074693A_ABST
Patent Text Reader

Abstract

The application discloses an edge visual security communication method based on a zero-trust architecture. The method dynamically identifies and trims the non-standard industrial visual protocol prefix through an edge side proxy gateway, and automatically injects a system absolute timestamp when the visual equipment lacks a timestamp; lossless data compression is implemented before encryption, key derivation is performed by using PBKDF2, and national encryption SM4-CBC and HMAC-SHA256 are fused for encryption and signature authentication; in the communication process, the proxy gateway realizes broken line sequence preservation and retransmission based on a bidirectional cache queue and a header rollback mechanism, and the background terminal performs front strong cut-off pre-check on the source IP based on a dynamic black list. The application has strong tamper resistance and anti-replay capability, protects the background computing resource, realizes lossless decoupling of network I / O and disk writing, and guarantees high concurrency and low delay of the whole system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of industrial edge computing, zero-trust secure communication and machine vision data processing technology, and specifically relates to an edge vision secure communication method based on a zero-trust architecture. Background Technology

[0002] With the rapid development of the Industrial Internet, machine vision systems (such as VisionMaster) have been widely used in industrial settings such as smart manufacturing, defect detection, and material tracking. In typical industrial scenarios, edge-side machine vision devices need to transmit real-time detected image features, industrial barcodes, and detection result data to the back-end Manufacturing Execution System (MES) or Supervisory Control and Data Acquisition System (SCADA) via high-frequency network transmission for production decision-making and persistent storage.

[0003] Currently, the transmission of industrial vision data between the edge and backend systems primarily relies on native SocketTCP plaintext stream communication, or is encapsulated into simple ASCII string format via industrial control gateways. However, the aforementioned existing industrial vision data transmission solutions suffer from the following significant technical challenges in actual deployment and operation:

[0004] First, the on-site network environment is harsh and fragile, lacking the ability to maintain order and recover data in the event of disconnection: Industrial sites are often accompanied by severe electromagnetic interference and network fluctuations. Although the native TCP direct connection transmission scheme has an underlying retransmission mechanism, streaming sockets are prone to packet fragmentation and splicing when encountering sudden network outages, prolonged congestion, or brief physical link interruptions. Existing technologies typically discard the current frame or blindly retransmit it when socket transmission is abnormal. This not only leads to physical packet loss of visual inspection data but also disrupts the physical and temporal order of data arrival at the backend, seriously affecting the continuity of industrial production decisions and the integrity of the entire lifecycle quality traceability.

[0005] Secondly, edge data exhibits significant heterogeneity and lacks a unified message governance and standard clock mapping mechanism: Different industrial vision devices and their peripheral adapter buses output raw data streams in varying formats, generally containing specific non-standard protocol headers, channel identifiers, or packaging prefixes (such as custom prefix characters like "1-"). Backend servers require additional computing resources for string cleaning when parsing this non-standard data. More seriously, due to embedded hardware limitations or the lack of Network Time Protocol (NTP) configuration, most edge vision devices often lack standard, high-precision timestamps in their output detection messages, preventing the backend system from achieving high-precision event attribution and security auditing.

[0006] Third, the protocols lack security protection and proactive defense capabilities, making them vulnerable to replay and man-in-the-middle attacks: Traditional industrial vision communication protocols mostly use plaintext or lightweight weak encryption formats for transmission, making detection data highly susceptible to interception, eavesdropping, or tampering by man-in-the-middle attacks in cross-trust domain industrial networks. Simultaneously, existing solutions lack anti-replay verification mechanisms (such as dynamic time tolerance windows) for message time validity, and the backend receiver lacks proactive intrusion prevention capabilities (IPS) against external physical connections, making the backend system highly vulnerable to high-frequency malicious scanning, replay injection, and protocol obfuscation attacks from insecure edge networks.

[0007] Therefore, how to achieve highly reliable, secure, replay-resistant, and edge-governed transmission of machine vision inspection data in a highly insecure and unstable industrial network environment is a technical problem that urgently needs to be solved in the field of industrial internet security.

[0008] Therefore, this invention proposes an edge vision secure communication method based on a zero-trust architecture, which solves the problems of network fluctuations leading to packet loss, plaintext transmission being easily tampered with, lack of edge governance, and inability to effectively defend against replay and man-in-the-middle attacks in the existing industrial machine vision data transmission process, ensuring strong compliance, high confidentiality, absolute integrity, and reliable disaster recovery of data in harsh industrial network environments. Summary of the Invention

[0009] The purpose of this invention is to provide an edge visual security communication method based on a zero-trust architecture, which is implemented based on a dual-end collaborative system consisting of an edge-side proxy gateway and a back-end receiving terminal, integrating edge governance, zero-trust encryption signature, store-and-forward disaster recovery, dynamic defense, and asynchronous persistence technologies.

[0010] The method described in this invention is as follows:

[0011] The edge-side proxy gateway receives the raw detection data stream and trims non-standard protocol prefixes; if a missing timestamp is found during the retrieval, it calls the local system clock to inject the current system's absolute timestamp (including year, month, day, hour, minute, and second) to generate the post-governance dataset.

[0012] The edge-side proxy gateway parses the timestamps of each data object in the post-governance dataset, calculates the difference between the timestamp and the current gateway's absolute system time, and discards the data if it exceeds a preset time tolerance window as a replay attack; otherwise, it derives encryption and MAC keys based on the PBKDF2 algorithm, compresses each data object at a high lossless rate, combines it with the generated random initialization vector, performs SM4-CBC encryption and PKCS7 tail padding, and outputs encrypted ciphertext; it concatenates the preset single-byte frame type identifier, initialization vector, and encrypted ciphertext, and performs HMAC-SHA256 signature to generate a MAC tag; finally, it assembles the preset protocol magic number, single-byte frame type identifier, combined payload length, and combined payload including initialization vector, MAC tag, and encrypted ciphertext into a standard secure data frame.

[0013] Then, the edge-side proxy gateway sends standard secure data frames to the back-end receiving terminal through a bidirectional buffer queue.

[0014] When the back-end receiving terminal receives a new TCP connection request from the client, it performs a strong pre-cutoff check on the client's source IP based on a dynamic blacklist. For connections that pass the pre-check, the back-end receiving terminal reads the standard security data frame and verifies the protocol magic number. If they do not match, it directly triggers security failure handling and disconnects the connection. If they match, it extracts the frame type byte, initialization vector, MAC tag, and encrypted ciphertext. It then reconstructs the HMAC signature using the same local MAC key, comparing it with the extracted MAC tag over a constant time interval. If the verification fails, it immediately throws an exception and closes the channel. If the verification passes, it sequentially uses the local SM4 encryption key to perform CBC mode decryption, removes PKCS7 padding, and decompresses the data to fully restore the plaintext detection data.

[0015] Finally, the restored plaintext detection data is delivered by the receiving terminal on the backend to the decoupled asynchronous database queue on the backend. The persistent thread then retrieves the data and writes it in batches to the industrial database, achieving lossless decoupling between network I / O and disk writing.

[0016] Furthermore, the edge-side proxy gateway receives the raw detection data stream sent by the machine vision system through a local listening thread, performs packet fragmentation and repackaging on the raw detection data stream, extracts the raw JSON string of each frame, and dynamically identifies and removes non-standard protocol packet prefixes.

[0017] Furthermore, the edge-side proxy gateway searches whether the JSON string contains a timestamp field in a preset format. If it does not contain it, the edge-side proxy gateway actively calls its local system clock to dynamically inject the system's absolute timestamp and generate a normalized post-governance dataset.

[0018] Furthermore, the edge-side proxy gateway calls the anti-replay interceptor to parse the timestamps in the governed dataset (i.e., the timestamps inherent in the JSON string or the aforementioned injected system absolute timestamps), calculates the difference between the timestamps and the current absolute system time of the proxy gateway, and determines whether the difference is within a preset time tolerance window. If it exceeds the window, it is directly intercepted and discarded as expired data or a replay attack.

[0019] Furthermore, the edge-side proxy gateway pushes standard secure data frames into an internal FIFO high-availability asynchronous bidirectional buffer queue with a maximum capacity limit; the physical sending thread of the proxy gateway continuously dequeues standard secure data frames from the head of the bidirectional buffer queue and attempts to send them to the back-end receiving terminal.

[0020] If a transmission failure or connection interruption occurs due to fluctuations in the industrial network, the transmission thread captures the failure and executes high-availability rollback logic: the currently failed standard security data frame is re-appended to the front of the bidirectional buffer queue to ensure strict ordering of data transmission; at the same time, a disconnection reconnection backoff timer is started, and newly generated machine vision data is continued to be appended to the rear of the bidirectional buffer queue until the queue is full before the network is restored.

[0021] Furthermore, when a new TCP connection request is received from the backend receiving terminal, the source IP address of the client is first extracted, and the IP is searched in the blacklist dictionary in memory to see if it is in a blocked state and the blocking time has not expired. If a match is found, the connection is forcibly disconnected at the beginning of the connection establishment; if no match is found, the connection is allowed to be established.

[0022] Furthermore, during subsequent communication, if any security verification, protocol determination, or decryption initiated by any source IP address fails, the backend receiving terminal will treat it as a security threat event and accumulate the verification failure count of that IP. When the number of failures of that IP within the set sliding time window reaches the maximum failure threshold, dynamic blocking will be triggered, the IP will be written into the blacklist dictionary, and the preset blocking duration will be locked.

[0023] Furthermore, the restored plaintext detection data is delivered by the receiving terminal on the backend to a decoupled asynchronous database queue on the backend. A dedicated persistent worker thread asynchronously retrieves the data from the queue, parses out key business fields such as timestamp, tool name, and detection result, and writes them in batches into SQLite or an industrial relational database, achieving lossless decoupling between network I / O and disk write.

[0024] Compared with the prior art, the technical solution provided by this invention has the following significant advantages:

[0025] First, intelligent edge data governance and full-time clock compliance: By using an edge-side proxy gateway to dynamically trim non-standard industrial vision protocol prefixes (such as "1-" and other packaging), and automatically injecting high-precision system time when the vision device itself lacks a timestamp, it not only greatly reduces the data cleaning burden on the back-end server, but also unifies the data format across the entire network, laying the foundation for zero-trust time window verification.

[0026] Secondly, it offers extreme bandwidth savings and industrial adaptability: high-rate lossless data compression is implemented before encryption, which significantly reduces the actual load volume of network transmission, making it extremely suitable for harsh industrial edge communication environments such as remote, wireless, or low-bandwidth environments.

[0027] Thirdly, it features a high-strength zero-trust fail-closed security defense: PBKDF2 is used for high-strength key derivation, and the core encryption integrates the Chinese national cryptographic standard SM4-CBC and HMAC-SHA256. During the signature generation stage, the "FrameType byte" is deeply bound to the IV and ciphertext, completely eliminating the "Type-confusion attack" common in industrial networks. Combined with clock deviation window verification of the timestamp, it achieves extremely strong resistance to man-in-the-middle tampering and replay attacks. Once any data fine-tuning occurs, the backend triggers the fail-closed mechanism to immediately disconnect the connection.

[0028] Fourth, lossless fault tolerance and strict data order preservation: Addressing the common occurrence of intermittent network outages in industrial settings, this invention does not rely on ordinary retransmission mechanisms. Instead, it designs a store-and-forward daemon based on a bidirectional deque. During a network interruption, failed standard frames are appended to the front of the queue, while subsequent frames are enqueued normally. This ensures that after network recovery, backlogged data can be received by the backend in strict production time order, guaranteeing the logical integrity of the data stream from receiving terminals (e.g., MES / SCADA systems).

[0029] Fifth, dynamic pre-detection and non-blocking high-concurrency architecture: The backend terminal performs a strong pre-screening check on the source IP of the client based on a dynamic blacklist. This enables second-level identification and dynamic blacklisting of source IPs involved in malicious scanning, brute-force attacks, or tampering attacks, directly rejecting malicious traffic at the physical connection layer and protecting the backend's computing resources. Simultaneously, the design of dual-end asynchronous thread queues (UI queue, DB queue) completely decouples heavy disk I / O from high-frequency network data decryption, ensuring high concurrency and extremely low latency for the entire system. Attached Figure Description

[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0031] Figure 1 This is a flowchart of edge-side data governance in an embodiment of the present invention;

[0032] Figure 2 This is a flowchart illustrating the edge-side zero-trust secure encapsulation and standard data frame assembly process in an embodiment of the present invention.

[0033] Figure 3 This is a flowchart illustrating the workflow of the bidirectional buffer queue in an embodiment of the present invention.

[0034] Figure 4 This is a flowchart of the pre-inspection process for back-end connection in an embodiment of the present invention;

[0035] Figure 5 This is a flowchart of the back-end decryption and verification process in an embodiment of the present invention;

[0036] Figure 6 This is the background-side asynchronous persistent non-blocking write process in this embodiment of the invention. Detailed Implementation

[0037] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0038] An edge vision secure communication method based on a zero-trust architecture is implemented through a dual-end collaborative system consisting of an edge-side proxy gateway deployed at the production site and a receiving terminal deployed at the back-end center. The proxy gateway is deployed at the edge where the machine vision equipment is located, serving as a zero-trust isolation proxy between the production network and the transmission network; the receiving terminal is deployed on the back-end server (such as the MES or SCADA system server), serving as a highly secure trusted receiving node and data aggregation center.

[0039] Specifically, the steps include the following:

[0040] Step 1: Edge-side data governance

[0041] In industrial production environments, the raw inspection data streams output by machine vision equipment typically contain non-standard packet headers specific to certain protocols and may lack standard timestamps. For example... Figure 1 As shown, the specific process of data governance is as follows:

[0042] (1) The local listening thread of the edge-side proxy gateway is bound to a preset communication port to read the raw detection data stream sent by the machine vision system in a streaming manner;

[0043] (2) The listening thread performs streaming depacket segmentation on the original detection data stream in the memory receive stream buffer with a preset newline character as the message boundary to obtain a single frame of original text string;

[0044] (3) The proxy gateway uses a character retrieval algorithm to locate the start and end boundary indices of the original text string in a single frame, trims and strips non-standard protocol prefixes or suffixes outside the boundary, and accurately extracts the pure JSON format text string;

[0045] (4) Deserialize the JSON format text string into a key-value pair data object and perform a deep search to see if it contains a timestamp field in a preset format;

[0046] (5) If the missing timestamp field is determined, the proxy gateway actively calls the local high-precision system clock to generate the system absolute timestamp in the format of the current year, month, day, hour, minute, and second and injects it into the data object; if a valid timestamp field is included, it is retained as is.

[0047] (6) Re-serialize the processed data objects to generate a normalized, governed dataset.

[0048] Step 2: After completing edge data governance, the edge-side proxy gateway performs zero-trust security encapsulation and standard data frame assembly on the governed dataset based on a zero-trust architecture, such as... Figure 2 As shown, the specific process is as follows:

[0049] (1) The edge-side proxy gateway receives the processed dataset obtained in step one through the anti-replay interceptor;

[0050] (2) Extract the timestamps of each data object in the dataset through the anti-replay interceptor and calculate the absolute deviation between them and the current system absolute time of the proxy gateway;

[0051] (3) Determine whether the absolute deviation is within a preset time tolerance window (e.g., 5 seconds);

[0052] (4) If the absolute deviation exceeds the preset time tolerance window, it is determined to be an expired message or a replay attack. The anti-replay interceptor triggers the security circuit breaker, discards the data object and increments the security interception count.

[0053] (5) If the absolute deviation is within the preset time tolerance window, based on the shared password and preset salt value stored locally, the PBKDF2-HMAC-SHA256 algorithm is called to perform multiple rounds of hash iteration, and the original key material including the SM4 encryption key and the MAC signature key is derived.

[0054] (6) Use lossless data compression algorithm to pre-compress data objects to reduce transmission load volume;

[0055] (7) The proxy gateway generates a 16-byte random initialization vector (IV) through the internally integrated general cryptographic module, performs symmetric encryption and PKCS7 tail padding on the compressed data in CBC mode using the national cryptographic SM4 algorithm, and outputs encrypted ciphertext;

[0056] (8) Assign a single-byte frame type identifier according to the business attributes, concatenate the frame type identifier, initialization vector and ciphertext in order, run the HMAC-SHA256 algorithm using the MAC signature key to generate a MAC tag that is deeply bound to the frame type;

[0057] (9) Assemble a standard secure data frame according to the preset protocol magic number (4 bytes), frame type identifier (1 byte), combined payload length (4 bytes) and combined payload including initialization vector, MAC tag and encrypted ciphertext.

[0058] Step 3: To address network fluctuations and intermittent outages in industrial settings, the edge-side proxy gateway sends standard security data frames to the back-end receiving terminal via a bidirectional cache queue store-and-forward protection mechanism; for example... Figure 3 As shown, the specific process is as follows:

[0059] (1) The physical sending thread inside the proxy gateway starts a continuous working loop;

[0060] (2) Check whether the first-in-first-out (FIFO) edge-side high-availability bidirectional buffer queue protected by thread lock is empty;

[0061] (3) If the bidirectional buffer queue is empty, the sending thread will suspend and sleep for a preset time (e.g., 0.05 seconds) before re-retrieval;

[0062] (4) If the bidirectional buffer queue is not empty, the sending thread acquires the thread lock, pops the standard safe data frame to be sent from the head of the queue, and calls the underlying network socket to perform synchronous sending;

[0063] (5) Determine whether network transmission anomalies are detected during synchronous transmission;

[0064] (6) If no network transmission anomaly is detected, update the real-time transmission throughput and the number of bytes sent on the edge side;

[0065] (7) If a network transmission anomaly is detected, initiate the transaction consistency rollback logic and re-acquire the thread lock;

[0066] (8) The sending thread pushes the currently failed standard security data frame back to the very front of the bidirectional buffer queue;

[0067] (9) Mark the network connection status as interrupted, forcibly close the old socket channel, and start the backoff reconnection timer (e.g., try to reconnect every 2 seconds).

[0068] (10) Determine whether the physical network link has been successfully reconnected;

[0069] (11) When the reconnection is successful, the communication channel is restored, and the physical sending thread continues to pop data frames from the head of the bidirectional buffer queue in order for sending, ensuring that the data frames backed up during the network outage are completely retransmitted in strict production time physical order. If the reconnection fails, return to the previous step.

[0070] Step 4: When the backend receiving terminal receives a new TCP connection request from the client, it performs a strong pre-screening check on the client's source IP based on a dynamic blacklist. The backend receiving terminal also runs an active intrusion prevention system (IPS) for extended periods, performing pre-screening checks on external connection requests, such as... Figure 4 As shown, the specific process is as follows:

[0071] (1) The network listening thread of the receiving terminal on the back end receives a new physical TCP connection request;

[0072] (2) In the early stage of connection establishment before the application layer session is established (Pre-connection stage), the source IP address of the client is directly extracted;

[0073] (3) The background side acquires the thread lock and checks whether the source IP address exists in the dynamic blacklist dictionary in memory;

[0074] (4) If the source IP address exists in the dynamic blacklist dictionary, determine whether the current system time is less than the unlock timestamp corresponding to the IP;

[0075] (5) If the current system time is less than the unlock timestamp, perform a pre-cut-off and forcibly close the socket channel without reading any application layer data;

[0076] (6) Reject the physical access request from the source IP address and terminate subsequent computing power consumption;

[0077] (7) If the source IP address does not exist in the dynamic blacklist dictionary, or the unlock timestamp has expired, allow the establishment of a physical connection and start the session processing thread;

[0078] (8) Hand over the established session to the subsequent session processing thread for data streaming.

[0079] Step 5: For connections that pass the pre-inspection, the back-end receiving terminal reads the standard secure data frame and performs strict zero-trust verification and decryption on the transmitted data, such as... Figure 5 As shown, the specific process is as follows:

[0080] (1) The session processing thread reads network data frames in a streaming manner;

[0081] (2) Determine whether the protocol magic number in the read data frame matches the preset magic number;

[0082] (3) If the protocol magic number matches, extract the frame type identifier, initialization vector, MAC tag and encrypted ciphertext;

[0083] (4) Reconstruct the HMAC signature using the same local key derivation algorithm and compare it with the received MAC tag in constant time;

[0084] (5) Determine whether the HMAC signature constant-time comparison verification passes;

[0085] (6) If the signature verification fails or the protocol magic number does not match, an exception is triggered and the channel is closed (Fail-Closed) circuit breaker mechanism is used to refuse subsequent decryption and decompression operations, throw a security verification failure exception and forcibly close the physical connection channel;

[0086] (7) If the signature verification passes, use the SM4 key to decrypt in CBC mode and remove PKCS7 padding, and perform lossless data decompression;

[0087] (8) Completely restore the structured plaintext detection data;

[0088] In the event of any of the following security threats, such as protocol magic number mismatch or signature verification failure, the following actions shall be taken:

[0089] Add timestamped failure records with source IP addresses to the threat monitoring dictionary;

[0090] Automatically clear historical records outside the preset sliding time window (e.g., the past 60 seconds), and dynamically count the total number of valid failures for the source IP within the sliding time window;

[0091] Determine whether the total number of valid failures within the sliding time window has reached the preset maximum failure threshold (e.g., 3 times).

[0092] If the preset maximum failure threshold is not reached, maintain threat monitoring of the source IP.

[0093] If the preset maximum failure threshold is reached, the source IP address will be added to the dynamic blacklist dictionary, and the future unlock timestamp will be calculated based on the preset blocking duration (e.g., 60 seconds) and written into the dictionary; a time-limited blocking penalty and alarm circuit breaker will be implemented on the source IP address.

[0094] Step Six: The restored plaintext detection data is delivered to the non-blocking write in the decoupled asynchronous database queue in the background. A dedicated persistent worker thread asynchronously retrieves the data from the queue, parses out the key business fields, and writes them in batches to SQLite or industrial relational database, realizing lossless decoupling of network I / O and disk writing.

[0095] like Figure 6 As shown, the specific process is as follows:

[0096] (1) The receiving session processing thread decrypts and restores the structured plaintext detection data;

[0097] (2) Push the plaintext detection data directly into the first-in-first-out asynchronous persistent data queue on the backend side;

[0098] (3) The session processing thread returns immediately and continues to receive and decrypt the next frame of network data in streaming mode; at the same time, the long-running independent persistent worker thread continuously listens to the asynchronous persistent data queue and asynchronously dequeues data when the queue is not empty.

[0099] (4) The persistent worker thread deserializes the outgoing data and parses out key business fields such as detection timestamp, visual tool name, defect detection result and full text fields;

[0100] (5) The parsed fields are physically inserted into an industrial relational database (such as SQLite database) in batches using pre-compiled SQL statements;

[0101] (6) Achieve lossless decoupling between network I / O data reception and decryption and physical disk writing.

[0102] In the above steps: Step 1, data governance, unified the heterogeneous industrial vision data format and timestamp benchmark; Step 2, PBKDF2 key derivation, zlib compression, SM4-CBC encryption, and frame type binding signature, constructed a high-strength zero-trust security payload; Step 3, bidirectional buffer queues and header rollback transactions, ensured the strict physical time order of data retransmission after disconnection; Step 4, pre-cutting strong pre-detection, and Step 5, Fail-Closed circuit breaking and sliding window dynamic blocking, constructed proactive intrusion defense capabilities; Step 6, asynchronous queue architecture, eliminated the blocking of high-frequency network transmission by disk I / O.

[0103] The lossless data compression and decompression algorithm used in this embodiment is specifically implemented using the zlib algorithm; the encryption and signature algorithm is specifically implemented using the Chinese national cryptographic SM4-CBC mode and the HMAC-SHA256 algorithm.

[0104] The above method enables edge vision security communication that eliminates the cumbersome overhead of traditional digital certificates in highly insecure and unstable industrial network environments, achieving high reliability, high security, replay resistance, and meeting the requirements of fault tolerance and order preservation for machine vision inspection data.

Claims

1. An edge visual security communication method based on a zero-trust architecture, implemented based on a dual-end collaborative system consisting of an edge-side proxy gateway and a back-end receiving terminal, characterized in that... Specifically: First, the edge-side proxy gateway receives the raw detection data stream and trims non-standard protocol prefixes; if a missing timestamp is found during the retrieval, the local system clock is called to inject the current system's absolute timestamp to generate the post-governance dataset; The edge-side proxy gateway parses the timestamps of each data object in the data set after governance, calculates the difference between the timestamp and the absolute system time of the current gateway, and discards the data if it exceeds the preset time tolerance window as a replay attack. If the limit is not exceeded, the encryption key and MAC key are derived based on the PBKDF2 algorithm. Each data object is compressed at a high rate of lossless data compression and then combined with the generated random initialization vector to perform SM4-CBC encryption and PKCS7 tail padding to output encrypted ciphertext. The preset single-byte frame type identifier, initialization vector and encrypted ciphertext are concatenated and HMAC-SHA256 signature is performed to generate a MAC tag. Finally, the preset protocol magic number, single-byte frame type identifier, combined payload length and combined payload including initialization vector, MAC tag and encrypted ciphertext are assembled into a standard secure data frame. Then, the edge-side proxy gateway sends standard security data frames to the back-end receiving terminal through a bidirectional buffer queue; When the backend receiving terminal receives a new TCP connection request from the client, it performs a strong pre-cutoff check on the client's source IP based on a dynamic blacklist. For connections that pass the pre-check, the backend receiving terminal reads a standard security data frame and verifies the protocol magic number. If they do not match, it directly triggers security failure processing and disconnects the connection. If they match, it extracts the frame type byte, initialization vector, MAC tag, and encrypted ciphertext. It then reconstructs the HMAC signature using the same local MAC key based on the frame type, initialization vector, and ciphertext, and performs a constant-time comparison verification with the extracted MAC tag. If the verification fails, an exception is immediately thrown and the channel is closed; if the verification passes, the local SM4 encryption key is used to decrypt in CBC mode, remove PKCS7 padding, and decompress to fully restore the plaintext detection data. Finally, the restored plaintext detection data is delivered by the receiving terminal on the backend to the decoupled asynchronous database queue on the backend. The persistent thread then retrieves the data and writes it in batches to the industrial database, achieving lossless decoupling between network I / O and disk writing.

2. The edge visual security communication method based on zero-trust architecture as described in claim 1, characterized in that, The edge-side proxy gateway receives the raw detection data stream sent by the machine vision system through a local listening thread, performs packet fragmentation and splitting on the raw detection data stream, extracts the raw JSON string of each frame, and dynamically identifies and removes non-standard protocol packet prefixes.

3. The edge visual security communication method based on zero-trust architecture as described in claim 2, characterized in that, The edge-side proxy gateway searches the JSON string for a timestamp field in a preset format. If it does not contain a timestamp field, the edge-side proxy gateway actively calls its local system clock to dynamically inject the system's absolute timestamp and generate a normalized post-governance dataset.

4. The edge visual security communication method based on zero-trust architecture as described in claim 1, characterized in that, The edge-side proxy gateway calls the anti-replay interceptor to parse the timestamps in the managed dataset, calculates the difference between the timestamps and the current absolute system time of the proxy gateway, and determines whether the difference is within a preset time tolerance window. If it exceeds the window, the data is directly intercepted and discarded as expired data or a replay attack.

5. The edge visual security communication method based on zero-trust architecture as described in claim 1, characterized in that, The edge-side proxy gateway pushes standard secure data frames into an internal FIFO high-availability asynchronous bidirectional buffer queue with a maximum capacity limit; The proxy gateway's physical sending thread continuously dequeues standard security data frames from the head of the bidirectional buffer queue and attempts to send them to the back-end receiving terminal. If a transmission failure or connection interruption occurs due to fluctuations in the industrial network, the transmission thread captures the failure and executes high-availability rollback logic: the currently failed standard security data frame is re-appended to the front of the bidirectional buffer queue to ensure strict ordering of data transmission; at the same time, a disconnection reconnection backoff timer is started, and newly generated machine vision data is continued to be appended to the rear of the bidirectional buffer queue until the queue is full before the network is restored.

6. The edge visual security communication method based on zero-trust architecture as described in claim 1, characterized in that, When the backend receiving terminal receives a new TCP connection request from the client, it first extracts the client's source IP address and searches the blacklist dictionary in memory to see if the IP is blocked and if the blocking time has not expired. If a match is found, the connection is forcibly closed at the beginning of the connection establishment; if no match is found, the connection is allowed to be established.

7. The edge vision security communication method based on zero-trust architecture as described in claim 6, characterized in that, During subsequent communication, if any security verification, protocol determination, or decryption initiated by any source IP address fails, the backend receiving terminal will treat it as a security threat event and accumulate the verification failure count of that IP. When the number of failures of that IP within the set sliding time window reaches the maximum failure threshold, dynamic blocking will be triggered, the IP will be written into the blacklist dictionary, and the preset blocking duration will be locked.

8. The edge visual security communication method based on zero-trust architecture as described in claim 1, characterized in that, The restored plaintext detection data is delivered by the receiving terminal on the backend to a decoupled asynchronous database queue on the backend. A dedicated persistent worker thread asynchronously retrieves the data from the queue, parses out the key business fields, and writes them in batches into SQLite or an industrial relational database, achieving lossless decoupling between network I / O and disk writes.