With the emerging of sensor networks, research on sensor-based activity recognition has attracted much attention. Many existing methods cannot well deal with the cases that contain hundreds of sensors and their recognition accuracy is requisite to be further improved. A novel framework for recognizing human activities in smart home was presented. First, small, easy-to-install, and low-cost state change sensors were adopted for recording state change or use of the objects. Then the Bayesian belief network (BBN) was applied to conducting activity recognition by modeling statistical dependencies between sensor data and human activity. An edge-encode genetic algorithm (EEGA) approach was proposed to resolve the difficulties in structure learning of the BBN model under a high dimension space and large data set. Finally, some experiments were made using one publicly available dataset. The experimental results show that the EEGA algorithm is effective and efficient in learning the BBN structure and outperforms the conventional approaches. By conducting human activity recognition based on the testing samples, the BBN is effective to conduct human activity recognition and outperforms the naive Bayesian network (NBN) and multiclass naive Bayes classifier (MNBC).