Conventional physical and chemical activation methods can be used to develop large specific surface area and pore volume, but it is difficult to obtain ordered nanoporous structure. The template carbonization activation strategy can effectively control the morphology and pore size, and can be used to develop pore size and balanced ordered microstructure in the range of 1–200 nm [
102]. The template carbonization activation strategy can be divided into two steps. The first is the carbonization of carbon precursors and hard template composites [
24]. The hard template includes zeolite, SiO
2, nano-CaCO
3,
etc., and the mesoporous structure is generated by carbonization. The second step is the activation of chemicals such as KOH and NaOH to form microporous structures. Li
et al. [
103] selected boric acid as a new activator, using auricularia as raw material, through soaking, the volume of dried auricularia will expand to 3.5 times the original size, under the action of hygroscopicity, boric acid can enter the interior of auricularia well. During the carbonization process, boric acid first melts into molten Be
2O
3, which has high viscosity and excellent wettability, adheres to the agaric matrix, and then KOH is used to remove the Be
2O
3 template. The prepared material has a typical honeycomb-like porous structure. It contains a large number of mesoporous structures, and the specific surface area of the prepared material can reach 2279.5 cm
2/g. Chun-Hsiang Hsu
et al. [
104] used rhombus shells as raw materials, nano-zinc oxide as a template, and KOH as an activator to prepare porous carbon materials with a specific surface area of up to 1537 m
2/g and good electrochemical performance (128 F/g at 5 mV/s). However, nano-zinc oxide can not only be used as a template for the production of mesopores, but also as an activator for the preparation of layered porous carbon (
Figs. 7a1 and
a2). Wang
et al. [
105] selected EDTANa
2Zn salt as a hard template, activator and nitrogen source at the same time. Sucrose was used as a carbon precursor and EDTANa
2Zn salt was mixed in deionized water. After freeze-drying and curing treatment, a composite material with intertwining structure was obtained. EDTANa
2Zn salt was decomposed to produce zinc oxide and Na
2CO
3 nanoparticles. Na
2CO
3 nanoparticles were used as hard templates. As the carbonization temperature increased, nano-ZnO was used as an activator. It reacts with the carbon material to etch to form a microporous structure. Zn exists in the form of simple substance until 907 ℃ reaches the boiling point of Zn, leaving small mesopores by evaporation (
Fig. 7b1). After washing with hydrochloric acid to remove the template, a nitrogen-doped carbon with a layered porous structure was obtained (
Fig. 7b2). The prepared porous carbon material has the highest specific capacitance of 283 F/g at 0.1 A/g. In addition, it has high specific surface area (2160 m
2/g) and high nitrogen content (1.85%), and has excellent rate performance and cycle durability. Jiang
et al. [
106] used waste straw as raw material and nano-zinc oxide as both template and activator. Nano-zinc oxide has a placeholder effect to produce rich mesoporous structure, and etched carbon atoms at high temperature to form microporous structure. The optimum carbonization temperature was explored through experiments: when the carbonization temperature was 800 ℃, the specific surface area of biochar was the highest, reaching 1293.2 m
2/g. Molten metal salts are also often used as templates. Salt templates have lower eutectic points, which can increase the contact area between carbon precursor and activator at low activation temperature, thus greatly improving the utilization efficiency of activator. As an excellent thermochemical medium, it has strong thermal conductivity. The molten salt medium has good reaction ability with impurities (such as silica [
107] and potassium oxide [
108]) in biomass, and high purity derived carbon is obtained. As a green nontoxic template, chloride can adjust the pore structure and microstructure of carbon materials. Zhang
et al. [
109] prepared porous carbon nanosheets derived from Ginkgo biloba leaves using CaCl
2 and KCl molten salts as activators and templates. Calcium chloride has a dual role in the preparation of porous carbon materials. First, the fixed ammonia comes from the decomposition of the ammonia precursor, resulting in high nitrogen content in the synthesized carbon product, on the other hand, calcium chloride can be used as a pore-forming / expansion agent to introduce pores into carbon matrix materials during carbonization, resulting in the formation of pores in the final carbon products. At the same time, potassium chloride can also be used as a template to penetrate into the carbon precursor to form pores. Adjusting the ratio of molten salt is the key to the preparation of porous carbon materials with high porosity. With the increase of KCl ratio, the specific surface area of the prepared carbon materials increases. When the molar ratio of KCl and CaCl
2 is 0.75:0.25, the prepared carbon-based supercapacitor exhibits a good specific capacitance of 150.4 F/g at 0.05 A/g. After 10, 000 charge and discharge cycles at 1 A/g, it has good cycle performance, capacity retention of 94.2%, and electrochemical performance is the best. On this basis, Zhang
et al. [
110] further prepared N/S co-doped flake porous carbon from Ginkgo biloba leaves by using molten salt KCl/K
2CO
3 as template and activator (
Fig. 7c1). The main activation effect is chemical/physical activation and carbon lattice expansion caused by K
2CO
3.When KCl is used as a template, Cl-etching carbon skeleton will also form a pore structure (
Fig. 7c2). The prepared porous carbon material as an electrode has 215.2 F/g at 0.05 A/g and maintains 78.9% at 20 A/g (169.8 F/g at 20 A/g). There is only 1.6% capacity decay after 10, 000 charge and discharge cycles. However, although the biomass porous carbon materials produced by template carbonization activation have large surface area and mesoporous structure, most of them are dominated by micropore effect. Although they have high capacitance, their rate performance is poor. Therefore, Hu
et al. [
111] proposed a preparation strategy based on the combination of
in-situ hard template method and NaOH activation. The lotus seed shell was used as the carbon precursor and sodium phytate was used as the hard template precursor, which was fully mixed to form a mixed gel. Soluble sodium phytate was pyrolyzed to nano-Na
5P
3O
10 during carbonization, and then reacted with NaOH to form nano-Na
2CO
3 and nano-Na
3PO
4 particles, which were uniformly dispersed in the carbon matrix and left mesopores after washing. Combined with the micropores generated by sodium hydroxide activation, a well-developed layered porous carbon with a hollow nest structure was obtained, with a high specific surface area (3188 m
2/g) and a large pore volume (3.20 cm
3/g). Although the prepared porous carbon material has good performance, the preparation process involves the preparation of nano-templates and the complex steps of dispersing in carbon precursors. For rough biomass, the growth structure is compact, the nano-templates cannot penetrate well, and the hard template method is not applicable. Chen
et al. [
112] have noticed that some biomass raw materials contain a large amount of minerals, such as calcium and silicon, which can be used as an internal biological template for
in-situ mesoporous development. Not only does it not need to introduce additional template substances, but also the biological template is well distributed in the biomass and does not require laborious mixing and dispersion. On this basis, a preparation method combining self-template method and chemical activation was proposed. Rice straw containing a large amount of dispersed silicon (10%–20%) was selected as the raw material, and uniformly dispersed SiO
2 was used as the biological template. When the activator KOH/K
2CO
3 reacts with organic matter at high temperature, the loss of C, H and O leads to the opening of pores. At the same time, SiO
2 particles aggregate into larger particles. The diameter range of these larger silica particles is very wide (
Fig. 7d1). Removal of these particles will lead to abundant nanopores, and activation will generate a large number of microporous structures (
Fig. 7d2). The porosity of the prepared samples is reasonable. It allows rapid transport of ions with a large specific surface area and additional pseudocapacitive behavior. As a result, the prepared material has excellent capacitance retention and excellent cycle stability for 357 F/g (0.5 A/g, 1 mol/L H
2SO
4) of the three-electrode system and 260 F/g (1 A/g, 1 mol/L sodium sulfate) of the two-electrode system, which is superior to most biomass-derived carbon. In addition, the energy density is as high as 29.3 Wh/kg at a power density of 900 W/kg.