The formation mechanism and the influence factor of residual stress in machining