In this paper we propose Cyber Physical Systems (CPS) framework to mitigate intrusions in the existing dataset by constructing a distinctive system model with an analytical framework. With the exponential growth of data network topologies, the prevalence of CPS facing various sorts of invasions is evident across all data management strategies. Therefore, it is imperative to eradicate any data associated with invasions, as it may inflict significant harm on other users. The analytical framework for CPS is designed to distinguish between true and false data samples and to assess the failure rate of each data sample set. The primary contribution of the created system model, which incorporates a learning technique, is to reduce data loss, hence eliminating all incursions under conditions of minimal loss through the use of generators and discriminators. Furthermore, the integrated framework is evaluated in real-time, and simulations are conducted, demonstrating that the simulated results are significantly more effective in reducing failure rates, data losses, and state count durations. The simulated outcomes are also contrasted with existing methodologies that do not incorporate learning methods. The comparative simulated results for the suggested method indicate an only 1% data loss, allowing for implementation in real-time situations without data integrity issues, achieving an average of 97% efficacy.