The urban water supply system is an important part of the urban foundation, which is related to the survival and development of the city. The survey of 35 cities by the Chinese Center for Disease Control showed that the unqualified rate of tap water increased by about 20% after the factory water was transported to users' tap water through the pipe network, and some cities repeatedly suffered drinking-water pollution accidents caused by pipe network pollution. Domestic water quality monitoring work often used manual inspection, which has many disadvantages such as immediacy, global, continuity and human error. Therefore, the establishment of the online monitoring system of water quality from the source can not only carry out real-time and continuous monitoring of water quality from the source for 24 hours, but also provide alarm information for decision makers, so that they can respond quickly and correctly to the change of water quality from the source, and ensure the safety of drinking water for people.