The SVM (support vector machines) is a classification technique based on the structural risk minimization principle. In this paper, another method is given to implement the structural risk minimization principle. And an exact maximal margin algorithm is proposed when classification problem is linearly separable. The linearly non-separable problem can be changed to separable linearly by using the proposed concept of the contraction of a closed convex set. The method in this paper has the same function and quality as SVM and Cortes'soft margin algorithm,but its theoretical system is simple and strict,and geometric meaning of its optimization probem is very clear and obvious.