IoT infrastructures have been growing in recent years across a variety of industrial applications in sustainable smart cities and communities, including smart manufacturing and smart industries. Infrastructure geared towards Internet of Things also includes Cyber-Physical System (CPS). With a distributed environment, CPS has experienced significant success in industrial applications and critical infrastructure. However, there are numerous difficulties in such an environment, including those related to scalability, centralization, communication latency, and security and privacy. Deep residual squeeze and excitation network (DRSEN) with Single Candidate Optimizer-based IoT-oriented infrastructure is used in this manuscript to address these challenges. Blockchain creates a distributed environment for CPS's communication phase, and Software-Defined Networking (SDN) establishes protocols for data forwarding in network. At the application layer of suggested infrastructure, a deep learning-based cloud is used to address communication latency, centralization, and scalability issues. It makes high-performance, affordable computing resources available for smart city applications like smart industrial and smart transportation. The proposed method is implemented in ns-3 tool and the effectiveness is assessed using F-measure, reliability, scalability, accuracy, sensitivity, specificity, and precision. The proposed method provides 35.39%, 23.87% and 20.67% higher reliability, 42.39%, 11.39%, 34.16% and 25.78% higher accuracy, 15.02%, 26.64% and 37.55% higher F-measure compared with existing techniques like Industrial Internet of Things based on Blockchain Secure Device Authentication Solution (IIoT-BC-BASA), Industrial Internet of things based on Blockchain- InterPlanetary File System (IIoT-BC-IPFS), Industrial Internet of Things based on Blockchain- Shamir Threshold Cryptography (IIoT-BC-SHC), Industrial Internet of Things based on Blockchain- software Define Networking (IIoT-BC-SDN) methods, respectively.