A heuristic optimization algorithm for HMM based on SA and EM in machinery diagnosis