## 1 Introduction  
With the exponential growth of data interaction, edge computing, and high-definition live streaming, optical networks have attracted considerable attention over the past decade due to their favorable characteristics, including high speed, large capacity, and low power consumption. Meanwhile, the rapid advancement of emerging technologies has rendered optical network security increasingly vulnerable to sophisticated cyberattacks and malicious intrusions [1]. Optical networks can be affected by different threats depending on their coverage and type [2]. To enhance the security of optical networks, several approaches leveraging optical signal processing have been proposed, such as optical code-division multiple access (OCDMA) [3], all-optical encryption [4], optical steganography [5], and optoelectronic firewalls [6]. As an effective access control mechanism, an optoelectronic firewall leverages all-optical pattern recognition to perform direct detection and analysis of data transmitted through the optical network at the optical layer. Subsequently, it activates the appropriate protection scheme according to the predefined security protocols. Compared with conventional firewalls, it is efficient in filtering malicious traffic within a high-speed data stream since optical-electrical-optical conversion can be avoided. Given the increasing data rate and growing sophistication of malicious network attacks, it is essential to extend the functionality of the firewall to the optical layer and thus implement effective access control directly at the optical layer. The widely investigated optoelectronic firewall originated from the Wirespeed Security Domains using Optical Monitoring (WISDOM) project led by the European Union. It was specifically designed to address inherent vulnerabilities and mitigate cyber threats within packet-switched network architectures. Experimental results show that it can recognize on-off keying (OOK) targets with lengths spanning from 8 to 256 bits with a data rate of 42.6 Gbps [7]. Figure 1 shows the principle and deployment of an optoelectronic firewall. The optoelectronic firewall is located at the edge of optical networks, which provides primary optical information filtering at the router front end. It enables high-speed security monitoring of optical signals directly at the optical layer. Typically, an optoelectronic firewall can be deployed between the IP/Ethernet core and the metro ring, which belongs to the backbone network. When the input data is transmitted through a router to the optoelectronic firewall, the all-optical pattern recognition system inside the optoelectronic firewall conducts simple but high-speed comparison and inspection with the target sequence provided by the electronic interface. The all-optical pattern recognition system developed in WISDOM primarily comprises an XNOR gate, an AND gate, and a regenerator, all of which are implemented using semiconductor optical amplifier-based Mach-Zehnder interferometers (SOA-MZIs). Meanwhile, the electronic interface can be reconfigured by software control to obtain different target sequences. Finally, the security strategy module implements optical prefiltering based on the output results generated by the all-optical pattern recognition system. To reduce recognition time, an all-optical binary recognition system with parallel structure was proposed for short sequence detection in [8]. It can recognize 8-bit OOK signals operating at 40 Gbps. However, the size of the system exhibits a linear correlation with the length of the target. Restricted by the carrier recovery time of SOA, a binary sequence matching system based on highly nonlinear fiber (HNLF) was proposed in [9]. Owing to the short response time of HNLF, it can recognize 8-bit targets in 64-bit OOK data at 160 Gbps.