Recently computer systems' call sequences are considered as a data source, this paper expounds how to use Hidden Markov Models (HMM) for software behavior recognition and trend prediction. Due to that HMM is sensitive to initial parameters, especially sensitive to B-parameter which makes model fall into a local optimum in training, this paper proposes using Genetic Algorithm (GA) approach to optimize the B-parameter together with HMM for establishing an optimal training model. The model is called GA-HMM. In order to eliminate the HMM's reflection on observations characteristics, this paper puts forward a new approach to recognize software behavior with hidden states.