As a new type of network structure, the Software Defined Network (SDN) provides a new solution for network flow management and optimization, which has made the accurate detection of anomaly SDN flows a hot research topic. This paper presents an SDN-based flow detection method, builds structures for detecting anomaly SDN flows and performs classification detection on the flows using the double P-value of transductive confidence machines for K-nearest neighbors algorithm. The experimental results show that the algorithm proposed achieves a lower false positive rate, higher precision, and better adaptation to the SDN environment than do other algorithms of the same type.