To make service robots plan a whole task execution sequence and deal with task failure intelligently in the face of object occlusion and incomplete home environment information, a hybrid offline and online task planning strategy is proposed. We establish object-level semantic map and object location probabilistic relations between dynamic and static objects. Semantic mapping helps to obtain semantic locations of static objects, and the probabilistic relationship between dynamic and static objects can obtain semantic locations of dynamic objects through probabilistic reasoning. Probabilistic planning domain definition language (PPDDL) can generate offline action sequences, while partially observable Markov decision process (POMDP) can generate online action sequences. Therefore, a hybrid task planner that can receive semantic location information is constructed to generate offline and online action sequences, and realizes the dynamic switching of the two kinds of sequences through the designed planner switching mechanism. In order to improve the robustness and intelligence of robot task planning, a task replanning mechanism considering the position relationship between robot and candidate static objects is designed. Experimental results in real environment and simulation environment show that this approach can effectively increase the intelligence of task planning and improve the robustness and efficiency of robot task execution.