A method for treating pulp, in particular a method for treating purification plant sludge, for producing energy and/or organic matter that has been rendered hygienic, comprising i. a step of aerated or non-aerated thermal hydrolysis of the pulp, ii. optionally a step of dilution of the pulp hydrolyzed in step i), iii. a digestion step of mesophilic or thermophilic type either of the pulp hydrolyzed in step i), or of the pulp hydrolyzed and diluted in step ii), iv. a step of dehydration of the pulp resulting from the step iii) and v. a step of recirculation of a part of the dehydrated pulp resulting from step iv) to the thermal hydrolysis step i), said part of the dehydrated pulp resulting from step iv) which is recirculated to the thermal hydrolysis step i) being controlled by the rate of loading of the digester in order to keep it as constant as possible and close to 1, the rate of loading of the digester being obtained by calculated the rate of loading of the thermal hydrolysis i) ou by calculated the rate of loading of the digestion step ii) or of both, characterized in that: - the rate of loading of the thermal hydrolysis is calculated from the measurements of the flow rate and of the concentration at the inlet of the thermal hydrolysis and of the residence time in the thermal hydrolysis, to which it is added the measurements of flow rate concentration at the return of the dehydration, - the rate of loading of the digestion step is calculated from the measurements of flow rate entering into the digester, the nominal residence time and the concentration of the sludge at the intlet of the digester. i. a step of aerated or non-aerated thermal hydrolysis of the pulp, ii. optionally a step of dilution of the pulp hydrolyzed in step i), iii. a digestion step of mesophilic or thermophilic type either of the pulp hydrolyzed in step i), or of the pulp hydrolyzed and diluted in step ii), iv. a step of dehydration of the pulp resulting from the step iii) and v. a step of recirculation of a part of the dehydrated pulp resulting from step iv) to the thermal hydrolysis step i), said part of the dehydrated pulp resulting from step iv) which is recirculated to the thermal hydrolysis step i) being controlled by the rate of loading of the digester in order to keep it as constant as possible and close to 1, the rate of loading of the digester being obtained by calculated the rate of loading of the thermal hydrolysis i) ou by calculated the rate of loading of the digestion step ii) or of both, characterized in that: - the rate of loading of the thermal hydrolysis is calculated from the measurements of the flow rate and of the concentration at the inlet of the thermal hydrolysis and of the residence time in the thermal hydrolysis, to which it is added the measurements of flow rate concentration at the return of the dehydration, - the rate of loading of the digestion step is calculated from the measurements of flow rate entering into the digester, the nominal residence time and the concentration of the sludge at the intlet of the digester. - the rate of loading of the thermal hydrolysis is calculated from the measurements of the flow rate and of the concentration at the inlet of the thermal hydrolysis and of the residence time in the thermal hydrolysis, to which it is added the measurements of flow rate concentration at the return of the dehydration, - the rate of loading of the digestion step is calculated from the measurements of flow rate entering into the digester, the nominal residence time and the concentration of the sludge at the intlet of the digester.