This paper develops a real-time identification algorithm for structures of network systems. We have already proposed a structure identification method for nonlinear network systems with nonlinear couplings by combining Koopman operator theory and a sparse identification method. However, the proposed method is only applicable for offline use under the assumption that the state of an isolated system is available. To relax this assumption, this paper shows that the dynamical model of isolated systems can be extracted from measured data of interconnected systems under some weak restrictions on network structures. We also modify the identification algorithm to obtain real-time identification results with fewer calculation resources and analyse the convergence of the proposed methods. Numerical examples demonstrate that the proposed method can identify network structures in real-time and detect changes in networks correctly.