Enhancing the Performance of Intrusion Detection through Netwrok Optimization in Ultra Dense Cloud Networks