The invention relates to an AAONAO continuous flow two-sludge denitrification advanced nitrogen removal and dephosphorization device and technology based on online control. The device mainly comprises an anaerobic pond, a first-stage anoxic pond, a first-stage quick aeration tank, a first-stage sedimentation tank, an aeration biological filter, a second-stage anoxic pond, a second-stage quick aeration tank, a second sedimentation tank, a redox potential measuring control system, a dissolved oxygen measuring control system and an aeration subsystem. The device is based on a double-sludge denitrification nitrogen removal and dephosphorization principle and the oneline control technology, anaerobic phosphorus release, secondary sedimentation of sludge, secondary denitrification phosphorus uptake, secondary aerobiotic phosphorus uptake, secondary denitrification nitrogen removal, control of low-oxygen low-ammonia nitrogen nitrification liquor, backflow denitrification of sludge mixed liquid and other nitrogen removal and dephosphorization technologies are optimized and combined, when the carbon-nitrogen ratio of inflow water is 6.5-14, the carbon-phosphorus ratio is larger than 50, under the condition that no extra organic carbon sources are added, advanced nitrogen removal and dephosphorization of domestic wastewater are stably achieved, and the quality of outflow water can meet the requirement of surface water of the fourth grade or above.