Understanding the mechanisms of complex systems is very important. Networked dynamical system, that understanding a system as a group of nodes interacting on a given network according to certain dynamic rules, is a powerful tool for modelling complex systems. However, finding such models according to the time series of behaviors is hard. Conventional methods can work well only on small networks and some types of dynamics. Based on a Bernoulli network generator and a Markov dynamics learner, this paper proposes a unified framework for Automated Interaction network and Dynamics Discovery (AIDD) on various network structures and different types of dynamics. The experiments show that AIDD can be applied on large systems with thousands of nodes. AIDD can not only infer the unknown network structure and states for hidden nodes but also can reconstruct the real gene regulatory network based on the noisy, incomplete, and being disturbed data which is closed to real situations. We further propose a new method to test data-driven models by experiments of control. We optimize a controller on the learned model, and then apply it on both the learned and the ground truth models. The results show that both of them behave similarly under the same control law, which means AIDD models have learned the real network dynamics correctly.