In this study, indium tin oxide (ITO), zinc oxide (ZnO), tungsten oxide (WO x ), and aluminum nitride (AlN) were employed to fabricate and investigate four transparent resistive random access memory (ReRAMs) structures: ITO/ZnO/ITO (structure 1), ITO/WO 3 /ZnO/ITO (structure 2), ITO/WO x (x < 3)/WO 3 /ZnO/ITO (structure 3), and ITO/WO x (x < 3)/WO 3 /ZnO/AlN/ITO (structure 4). Structure 4 exhibited less variation in low-resistance states, lower operating voltages, and higher endurance compared with other structures. This phenomenon was attributed to the oxygen-deficient WO x layer in structure 4, which acted as an oxygen ion reservoir for efficient resistive changes, and the WO 3 layer limited the filament rupture and formation region. Moreover, the high thermal conductivity of the AlN layer alleviated the thermally activated ion movement of the ReRAM and strengthened the high-resistance state. Structure 4 was found to be the optimal structure, with median operating voltages 1.6 V for SET operations and − 1.0 V for RESET operations, retention of > 10 4 s at 200 °C, and endurance of 10 4 cycles with a resistance ratio of over 20. Structure 4 exhibited extremely high stability in both low- and high-resistance states during cycling. The transmittance of structure 4 was 85.49%, which is suitable for optoelectronic applications.