In the process of mechanical ventilation, the patients were divided into two groups according to the failure of spontaneous breathing test and spontaneous breathing test.In the index of predicting mechanical ventilation, the investigators will take the index of inflammatory response, the function index of diaphragm and the amount of exhaled CO2 into account to reduce the failure rate of mechanical ventilation.