1 Introduction

A large quantity of livestock manure is produced owing to intensive farming, which exceeds the absorptive capacity of farmland (Dotaniya et al. 2022). Therefore, how to accelerate the utilization of livestock manure is an urgent problem to be solved. Composting and anaerobic digestion are the main treatment means of livestock manure (Zhou et al. 2021; Liu et al. 2021). Composting has the characteristics of simple operation and is environment-friendly, so the technology is widely applied to the comprehensive utilization of livestock manure (Zhang et al. 2020; Qian et al. 2018). Composting can degrade organic substances in manure and transform them  into more valuable humus substances (Li et al. 2021a; Qu et al. 2022). Meanwhile, pathogenic bacteria are killed in the thermophilic phase of composting (Gou et al. 2018; Mishra et al. 2022), and most pollutants such as antibiotics and polycyclic aromatic hydrocarbons can also be biodegraded, thereby obtaining more valuable and less toxic organic fertilizers (Congilosi and Aga 2021). However, livestock manure also contains a large number of refractory pollutants, such as heavy metals. This was caused by the addition of a large amount of  Cu and Zn in the breeding process to promote animal growth and reduce intestinal diseases (Duan et al. 2021). The heavy metal content presented the increased trend due to the degradation of organic matters during composting. The content of heavy metals in compost products was at least 20% higher than that of initial materials, and some were even more than twice as high (Cui et al. 2020; Duan et al. 2021). Therefore, heavy metal pollution is a potential threat in the application of composting products (Zhang et al. 2017).

It is difficult to remove heavy metals during composting, therefore,  mitigating the bioavailability of heavy metals is the main way to alleviate heavy metal pollution during composting. Many studies have demonstrated that the proportion of weak acid extracted or reducible heavy metals reduced during composting, while the proportion of organically bound and residual heavy metals increased. The organically bound heavy metals were mostly combined with humus substances to realize heavy metal passivation (Zhang et al. 2017). In addition, heavy metal ions added to composting could also be quickly transformed into the carbonate-bound state, and mitigated the toxicity of heavy metals (Chen et al. 2022). Nevertheless, the passivation efficiency of heavy metals was at a relatively low level during composting. Therefore, researchers have widely developed techniques and methods that can strengthen the heavy metal passivation during composting (Liu et al. 2019; Li and Song 2020). Biochar, as a popular material, has also been found to possess a nearly all-around role during composting (Hou et al. 2021). The application of biochar to composting was conducive to composting improvement and contaminant reduction (Godlewska et al. 2017), including influencing microbial community structure, reducing nitrogen loss, promoting organic matter degradation and humification, and mitigating the bioavailability and mobility of heavy metals (Cui et al. 2020; Zhou et al. 2018; Awasthi et al. 2020). In the previous studies, the relevant studies almost used black-box research methods, focusing only on the change of indicators, without specifying the specific impact pathway. Specifically, biochar has strong adsorption capacity for heavy metals (Mahmoud and Kathi 2022). The addition of biochar can theoretically adsorb heavy metals to mitigate the bioavailability of heavy metals. In addition, biochar can also improve the quality of compost (Godlewska et al. 2017; Cui et al. 2020), such as the elevation of humus substance and other organic substances and the increase of pH value, so as to accelerate the passivation of heavy metals. However, in fact, the specific mechanism for biochar to reduce the bioavailability of heavy metals was unclear during composting.

At present, biochar was often added to compost in scattered form, which was difficult to recover to determine the adsorption performance of biochar. Given that, this study adopted the method of wrapping and embedding biochar. Specifically, a certain amount of biochar was put into the nylon mesh bag and then added to compost. This was conducive to the separation of added biochar from the composting to explore the action mechanism of materials. In addition, this way was convenient to change the implementation position of biochar and replace contained biochar at any time, which was also conducive to improving the application efficiency. Collectively, the object of this paper was to: (1) explore the effect of embedded biochar on basic indexes of composting in the context of heavy metal stress; (2) clarify the main action mode of added biochar during composting; (3) reveal action mechanism that biochar reduced the biotoxicity of heavy metals during composting. This study provided the theoretical and technical supports for mitigating the biotoxicity of heavy metals by biochar during composting.

2 Materials and methods

2.1 The preparation of materials

Biochar was made from corn straw under a vacuum and oxygen-free state in an atmosphere furnace (Kejia Furnace, KJ-M1200-8LZ, China). The temperature program of atmosphere furnace was set as follows: Heating up to 400 °C at the rate of 5 °C/min, keeping for 1h, and finally, cooling to room temperature at the rate of 5 °C/min. Biochar was obtained by carbonization in the state of no oxygen or low oxygen for 12 h. Biochar was ground into fine particles with a diameter of 100 mesh for use.

To have a better comparison, biochar was modified by different methods to enhance the ability to adsorb heavy metals in this experiment, including acid modification (HNO3, H2SO4 solution and mixtures) (Sahin et al. 2017), alkali modification (NaOH solution) (An et al. 2020), salt modification (AlCl3, MgCl2, FeCl3 solution) (Akgül et al. 2019) and oxidation modification (H2O2 solution) (Zuo et al. 2016). The performance of different modification methods was evaluated by measuring the adsorption capacity of Zn due to the greater toxicity (Additional file 1). The adsorption capacity of 2 mol L− 1 NaOH modified biochar was the highest, which was 81.62% higher than that of unmodified biochar. This is due to the increase of surface area of biochar by alkali modification (Ahmed et al. 2016), which also was confirmed by the result of electron microscope (Additional file 1). Therefore, the alkali modification was selected to treat biochar in this experiment. The specific modification method was as follows: The prepared biochar was added  to 2 mol L-1 NaOH solution in the ratio of 1:20 and placed in a 70 oC water bath, during which it was shaken and stirred several times to make it fully mixed. Then, it was washed to neutral and dried in an oven at 80 oC. Finally, the modified biochar was collected for use.

For easy reference, cotton ball was selected owing to its excellent adsorption capacity (Abdelhameed et al. 2018). The cotton balls were pretreated to be rich in nutrients such as carbon and more similar to biochar in adsorption capacity and nutrient element composition. The specific treatment method was to soak the cotton ball in the sterilized LB medium and dry it naturally to keep it dry and contain voids.

2.2 Implementation of composting test

Chicken manure from the college of animal medicine in school and corn stalks from the surrounding area were chosen as raw materials. The C/N ratio of chicken manure and corn straw were determined, as shown in Additional file 1. Chicken manure and corn straw were mixed to make the C/N value reach about 25 (Wu et al. 2017). The mixed pollution of Cu and Zn was taken as the stress condition of heavy metals in this study because Cu and Zn were the main heavy metals in chicken manure (Chen et al. 2022). The addition amount was confirmed based on the approximate content of Cu and Zn after chicken manure composting (Cu2+: 200 mg/kg and Zn2+: 400 mg/kg). Simultaneously, sterilized water was added to make moisture content reach about 60%. The three adsorption materials were placed in nylon mesh bags with a size of 5 * 7 cm (width * length). The nylon mesh bags were purchased from the store. Each mesh bag was filled with 1 g biochar or alkali modified biochar. To ensure a univariate test, the pretreated cotton ball was also changed into a flake and put into the mesh bag to increase its contact area. Four treatments were set up in this experiment: control group (CK), biochar treatment (BC), modified biochar treatment (MB) and cotton ball treatment (CB). To meet the uniform distribution of nylon mesh bags in the composting reactor and ensure that biochar can fully contact with composting materials, the 10 nylon mesh bags containing corresponding materials were added to each reactor, and evenly placed in the compost materials. The device was a special cylindrical reactor (Chen et al. 2022). Each treatment had three parallels, for a  total of 12 reactors. The temperature change is displayed in Additional file 1. The ventilation rate of composting was maintained at 0.5 L kg−1 min−1. It was necessary to turn it over regularly during composting, and constantly change the position of nylon mesh bags to make them contact more fully. The composting test lasted for 50 days based on the degree of humification. The five-point sampling method was adopted to take samples on days 1, 5, 8, 13, 30 and 50, which represented different stages of the composting. One part of the obtained mixed samples was naturally air-dried for the determination of basic physiochemical indexes and heavy metal related indexes. The other part was cryopreserved for DNA extraction and microbial community determination.

2.3 The physicochemical property determination

The organic matter (OM) content was measured through weight difference. Samples were ignited at 550 °C for 6 h to constant weight, and the value of weight difference was the OM content (Li et al. 2021a). The pH value was measured at the ratio of 1:10 (w/v) using a digital pH meter. The humic acid (HA) and fulvic acid (FA) contents were measured according to the following procedure: samples with a mix solution of 0.1 M Na4P2O7·10H2O and 0.1 M NaOH at 1:10 (w:v) ratio were shaking for 24 h at room temperature. The supernatant was filtered through the 0.45 μm membrane after centrifugation, and then pH was adjusted to 1 and left to stand at 4oC for 12 h. After centrifugation, the supernatant was FA, while the precipitate was dissolved with 0.05 M NaHCO3 to obtain HA. The total organic carbon was measured to represent HA and FA content (Zhu et al. 2021; Li et al. 2021b). To measure ammonia nitrogen (NH4+–N) and nitrate nitrogen (NO3–N) concentration, fresh samples were shaken with 2 mol·L−1 KCl (1:10 ratio) at 200 rpm for 1 h. Then the filtrates were assayed by NaRSH’S colorimetry and UV-spectrophotometry (Yu et al. 2021). The heavy metal content was measured by the digestion method using concentrated acid (Cui et al. 2020). The four forms of heavy metal, acid-soluble fraction (F1), reducible fraction (F2), oxidizable fraction (F3) and residual fraction (F4), were extracted by the modified BCR sequential extraction method (Li et al. 2021b).

2.4 Characterization techniques

The nylon mesh bags were taken out on the 10th, 20th, 25th and 43rd days of composting, and ten new mesh bags containing materials were replaced. The removed mesh bags were marked and stored in a freezer at -20oC. To obtain an insight into the effectiveness of material adsorption, the Fourier transform infrared spectrometry (FTIR) (Nicolet is50) and scanning electron microscope coupled with energy dispersive spectroscopy (SEM-EDX) (SU8010-Element) were employed to determine the characterization of biochar and modified biochar.

2.5 Microbial community analysis

Fresh samples were employed to extract sample DNA by DNA kit. The universal primers 341 F (ACTCCTACGGGAGGCAGCAG) and 806R (GGACTACHVGGGTWTCTAAT) were employed to amplify the V3 and V4 regions of 16 S rRNA gene. The PCR product was used to perform high-throughput sequencing through an Illumina MiSeq platform by BGI Genomics.

2.6 Statistical analysis

The dynamics of physicochemical properties were analyzed by Origin 2021. SPSS version 23.0 was employed for multivariate statistical analysis. The network analysis was constructed in the R language (version 4.0.2) through the packages of Hmisc and igraph, and the network was visualized in the Gephi 0.9.2. The correlation heatmaps with Mantel test were also performed in the R language through the packages of Hmisc, corrplot, vegan and dplyr. The structural equation models were constructed by AMOS 20.0 software though the maximum likelihood evaluation program, which were used to reveal the potential ways of alleviating biotoxicity of heavy metals during composting.

3 Results and discussion

3.1 Effects of embedded materials on physicochemical properties

The OM content was decreased during composting (Fig. 1a). There were no significant differences in OM content among the four treatments on days 1, 5 and 8 of composting, however, the OM content in BC, MB and CB treatments was significantly lower than that in CK treatment during the maturity phase of composting (P < 0.05), indicating that adding materials effectively facilitated the degradation of OM in the context of heavy metal stress. Meanwhile, no significant difference in OM final content was found among BC, MB and CB treatments. In addition, embedded materials also significantly improved the HA content (Fig. 1b). HA is the main component of humic substance, which is significantly related to the degree of humification and represents the quality of composting (Zhu et al. 2021). Compared with CK treatment, the HA content in  BC, MB and CB treatments increased by 57.18%, 59.55% and 103.97% on the 30th day of composting, respectively. The content of HA decreased slightly on the 50th day in each treatment, which was due to the formation of more complex structures by polymerization (Liu et al. 2020a). On the 50th day of composting, the HA content in MB and CB treatments was still significantly higher than that of CK treatment (P < 0.05).

Fig. 1
figure 1

Changes of physicochemical indexes and heavy metal content during composting. a Organic matters content; b humic acid content; c Cu content; d Zn content. CK CK composting, BC BC composting, MB MB composting, CB CB composting

Embedded materials had no pronounced effects on the changing trend of FA content, pH value, NO3–N and NH4+–N content (Additional file 1). There were no differences among the treatments. In this experiment, the biochar was modified with NaOH solution, then washed to neutral and added to compost. Compared with CK and BC composting, the pH value of MB composting had no significant difference, indicating that the modified treatment was washed thoroughly. In addition, it was noteworthy that biochar itself was alkaline (Thomas et al. 2020), however, the pH value of composting environment was not changed compared with CK composting when it was embedded. This implied that the addition of biochar by embedding would not change the pH of composting. Therefore, pH would not be the main driving factor to reduce the biological toxicity of heavy metals during composting in this study (Novak et al. 2019). Consequently, embedded materials promoted the degradation of OM and the formation of HA without affecting the environmental pH and inorganic nitrogen trasformation during composting.

3.2 Changes in heavy metal  content and speciation during composting

Differences in heavy metal content emerged between treatments from the 13th day of composting, which was due to the replacement of materials (Fig. 1c, d). Nevertheless, the OM content had also a pronounced difference on the 13th day of composting (Fig. 1a). Thus, it was difficult to judge the contribution of embedded materials to the change of heavy metal content. From another perspective, the OM degradation rate was tiny during the maturity phase of composting (from day 30 to day 50), and heavy metal content of CK composting remained relatively constant. However, heavy metal  content decreased in treatments, especially Cu and Zn content in CB treatment and Zn content in BC treatment. Therefore, heavy metals could be removed by embedded materials, and pretreated cotton balls had a preferable effect, but the removal effect of heavy metals was nonsignificant (P > 0.05).

The proportion of the acid-soluble fraction of Cu (CuF1) increased after one day of embedding materials. However, the distribution proportion of CuF1 in BC, MB and CB composting was lower compared to CK composting at the end of composting (Fig. 2). The distribution proportion of CuF1 of BC, MB and CB composting decreased by 15.72%, 21.25% and 19.39%, respectively. Meanwhile, the distribution proportion of the residual fraction of Cu (CuF4) was expanded. These results indicated that embedded materials could reduce the biotoxicity of Cu during composting. Zn mainly existed in the form of F2 during composting (Fig. 3), which was identical with other research results (Guo et al. 2021; Chen et al. 2022). Compared with CK composting, embedded materials reduced the distribution proportion of the acid-soluble fraction of Zn (ZnF1) and increased the proportion of the reducible fraction of Zn (ZnF2). The distribution proportion of ZnF1 of BC, MB and CB composting decreased by 45.38%, 38.72% and 33.44%, respectively. This suggested that embedded materials also effectively mitigated the bioavailability of Zn during composting. The effect of embedded materials to mitigate the bioavailability of Zn was better than that of Cu. To summarize, embedded materials effectively reduced the bioavailability of heavy metals, albeit it was difficult to remove heavy metals.

Fig. 2
figure 2

Changes in Cu speciation distribution proportion of CK (a), BC (b), MB (c) and CB (d) composting. F1: acid-soluble fraction; F2: reducible fraction; F3: oxidizable fraction; F4: residual fraction

Fig. 3
figure 3

Changes in Zn speciation distribution proportion of CK (a), BC (b), MB (c) and CB (d) composting. F1: acid-soluble fraction; F2: reducible fraction; F3: oxidizable fraction; F4: residual fraction

3.3 Adsorption characterization of materials

To reveal the underlying mechanism of embedded materials, this study explored the adsorption properties of the materials. The above results found that the speciation changes of heavy metals mainly occurred in the early stage of composting. Therefore, the materials (including biochar and modified biochar) that were taken out on the 10th (M10d) and 20th (M20d) days of composting were used for the determination of FTIR and SEM-EDX analysis to judge the variations in functional groups and atomic composition of materials. The FTIR absorbing peaks of biochar were observed at 3394, 2923, 1577 and 1383 cm−1 (Additional file 1). The peaks at 3394 cm−1 and 1383 cm−1 were assigned to associated intermolecular hydrogen bond O-H stretching vibration and C–H bending vibration, respectively (Liu et al. 2020b; Wesley et al. 2021). The peaks at 3394 and 1577 cm−1 indicated the presence of aromatic compounds (Periyasamy et al. 2018), which suggested that the prepared biochar had high aromaticity. The peak at 2923 cm−1 indicated that the saturated hydrocarbon of biochar contained methylene peak (Yao et al. 2015). The peak at 1106 cm−1 appeared in M20d, which was caused by the C–O stretching vibration of fatty ether substances (Liu et al. 2020b). This indicated that the surface structure of biochar and modified biochar changed during composting, which produced ether structure. The spectral difference was mainly in the range of 850–400 cm−1. The three peaks at 792, 601 and 469 cm−1 appeared for biochar, while only one peak at 594 cm−1 for the modified biochar, indicating that the C–H stretching vibration weakened and the substituents of aromatic rings changed after alkali modification (Kumar et al. 2018). The above results showed that there was no obvious peak change in FTIR spectra of the materials taken out from composting, implying that no apparent adsorption of functional groups occurred during composting (Liang et al. 2021). In fact, besides functional group adsorption, biochar could also adsorb heavy metals through electrostatic interaction or ionic interaction (Thomas et al. 2020; Mahmoud et al. 2022b). Therefore, this study further revealed the adsorption capacity of biochar for heavy metals by SEM–EDS analysis.

 The SEM pattern showed that the biochar had a honeycomb structure with a neat arrangement and a smooth surface, while the alkali-modified biochar had a barbed shape with an irregular arrangement and a rough surface  (Additional file 1). This suggested that alkali modification significantly changed the surface structure of biochar and increased the contact area (An et al. 2020). This was also the reason why the adsorption capacity was stronger after modification. The emergence of attached substances on the surface of M10d and M20d suggested that they could adsorb substances through nylon mesh bags during composting. Furthermore, the surface atomic ratio of biochar and modified biochar was explored by EDS analysis (Fig. 3a). The original biochar was dominated by the C atom (67.0%), followed by the O atom (27.1%), followed by a small amount of N and Si atoms, and the content of other atoms was less than 1%. After alkali modification, no change in the proportion of C and O atoms was found, however, the content of Na atom increased significantly, accounting for 2%. This was caused by the  modification with NaOH solution, which also indicated that the  biochar was successfully modified. In addition, the proportion of C atom of M10d and M20d decreased significantly, while the proportion of O and N atoms increased. Meanwhile, the proportion of nutrient elements on the surface of M10d also increased significantly. This may be caused by the absorption of nutrient elements from composting, or biochar and modified biochar released C atom into composting because the proportion of C atom decreased (Li et al. 2020; Ye et al. 2019), resulting in an increase in the proportion of other atoms. In addition, the proportion of Cu and Zn atoms of M10d and M20d was higher than that of the original materials, however, the proportion was still less than 1%. This also proved that the adsorption of heavy metals by embedded materials was nonsignificant. The main reason was that heavy metals were easy to combine with organic substances to form complexes (Chen et al. 2022; Wei et al. 2022), resulting in almost no free heavy metals contacting with the adsorption materials.

3.4 Effects of embedded materials on microbial community structure

To explore the influence of embedded materials to microbial community, this study constructed network maps based on significant correlations (P < 0.05) between predominated microorganisms with relative abundance greater than 0.005 (Fig. 3b–e).

The network maps of CK, BC, MB and CB composting consisted of 79, 74, 91, 78 nodes, 196, 199, 297 and 152 edges, respectively. Compared with CK composting, the microbial relationship was closer during BC composting. More nodes and edges were found during MB composting, indicating that the microbial network of MB composting was more complex. The number of nodes of CB and CK composting was basically the same, but the number of edges of CB composting was less, indicating that the correlations between microorganisms were weak during CB composting. In addition, there was an obvious clustering phenomenon in the microbial network. Microorganisms were divided into several small microbial groups during CB composting, indicating that the microbial network of CB composting might have multiple modules, clear division of labor and high degree of order. The composition of clustered microorganisms at the phyla level in the network of CK (mainly the phyla Proteobacteria and Bacteroidetes) and treatments composting (mainly the phyla Proteobacteria and Firmicutes) was different. This indicated that the  embedded materials changed the microbial network. Furthermore, the 6, 4, 9 and 14 negative correlation relationships were found in the networks of CK, BC, MB and CB composting, respectively. This suggested that the embedded biochar and modified biochar enhanced the cooperative relationship between microorganisms (Zhang et al. 2021). The negative correlation in the network of CK composting accounted for 8.16%, however, while that of CB composting accounted for 9.21%, suggesting that the  embedded pretreated cotton balls increased the competitive relationship between microorganisms. This was mainly because the pretreated cotton balls contained easily available carbon sources, which elicited microbial competition when added to compost. Collectively, embedded materials changed the microbial network during composting in the context of heavy metal stress, and different materials had diverse effects.

This study further compared the differences of predominated microorganisms (Fig. 4f). There were 30 shared microorganisms in the four treatments, indicating that at least one third of predominated microorganisms existed in the four treatments. However, the number of unique microorganisms was relatively small, of which the largest number of unique microorganisms (13) were found during MB composting. In addition, compared to CK composting, at least 60% of microorganisms still existed after embedding materials (BC: 62.16%; MB: 60.44%; CB: 65.38%). In this study, 30 shared microorganisms were defined as stable community, which still stably existed in each treatment after the addition of different materials. The remaining predominated microorganisms were called variable community.

Fig. 4
figure 4

The element composition of the  biochar and modified biochar taken out from composting (a). Network analysis between bacteria at genus level during CK (b), BC (c), MB (d) and CB (e) composting. Comparison of the differences of predominated bacteria under different treatments with Venn diagrams (f). CK CK composting; BC BC composting, MB MB composting, CB CB composting

3.5 Response characteristic of different microbial groups in heavy metal passivation

To further reveal the functional role of different microbial groups, this study explored the response relationship between environmental factors and microbial groups. Compared with CK composting, the relationship between HA, OM and heavy metal speciation enhanced after embedding materials (Fig. 5), indicating that the combining capacity between organic substances and heavy metals enhanced. This might be the reason for the decrease of bioavailability of heavy metals. Previous studies have found that organic substances combined with heavy metals through adsorption and coordination during composting (Li et al. 2021b; Zhang et al. 2017), reducing the bioavailability of heavy metals. Therefore, it was inferred from the results of correlation analysis that embedded materials strengthened the combination of organic substances and heavy metals, thereby promoting the passivation of heavy metals. In addition, the correlation among various forms of heavy metals also enhanced after embedding materials. Most notably, the significant relationship between different microbial groups (stable community and variable community) and environmental factors was different in the four treatments. The stable community was significantly correlated with ZnF2 and the residual fraction of Zn (ZnF4) during CK composting, and variable community was significantly correlated with CuF1, CuF4, OM and HA, indicating that stable community had a great impact on Zn speciation, while variable community had a great impact on Cu speciation and organic substance conversion. The stable community and variable community were merely and significantly related to ZnF2 and CuF1 during BC composting, respectively. Notably, the stable community was significantly correlated with OM, HA and speciation of heavy metals, while variable community was only significantly correlated with ZnF1 during MB and CB composting. These results suggested that variable community played a major role in the conversion of OM and HA during CK composting, however, stable community had  a significant impact on OM and HA after embedding materials. This implied that the conversion of organic substances and heavy metal speciation was not affected by emerging microorganisms after embedding materials, albeit microbial network was changed, but by stable community. Therefore, the microbial community and functional distribution changed after embedding materials. The succession of microbial community promoted the formation of HA and the mitigation of heavy metal bioavailability (Cui et al. 2020; Awasthi et al. 2021).

Fig. 5
figure 5

Response relationships between stable community, variable community and environmental indicators during composting. a CK composting; b BC composting; c MB composting; d CB composting. Mantel test was employed to reveal links. Deep red lines: 0.001 < P < 0.01. Light red lines: 0.01 < P < 0.05. Gray lines: P > 0.05. CuF1: the acid-soluble fraction of Cu; CuF2: the reducible fraction of Cu; CuF3: the oxidizable fraction of Cu; CuF4: the residual fraction of Cu; ZnF1: the acid-soluble fraction of Zn; ZnF2: the reducible fraction of Zn; ZnF3: the oxidizable fraction of Zn; ZnF4: the residual fraction of Zn; HA: humic acid; OM: organic matter

3.6 Verification of action mechanism of biochar

To confirm the mechanism of biochar alleviating the biotoxicity of heavy metals during composting, the structural equation models were constructed to clarify the causal relationship between microbial groups, organic substance conversion and biotoxicity of heavy metals (Fig. 6). Both stable community and variable community could significantly affect the biotoxicity of heavy metals during CK composting (Fig. 6a). Compared to stable community, variable community had a greater influence on the biotoxicity of heavy metals. The variable community also significantly affected the formation of HA. However, the causal relationship was different after embedding materials. The influence of stable community on the biotoxicity of heavy metals was greater than that of variable community (Fig. 6b). It is worth noting that the stable community also indirectly affected the toxicity of heavy metals by affecting the HA content. Therefore, the stable community had a key role in alleviating the biotoxicity of heavy metals during composting of treatment groups. The main reason for these differences was that the embedded materials changed the microbial community of composting, and then affected the composting process. These results suggested that the embedded materials promoted the formation of HA by stable community, so as to accelerate the passivation of heavy metals. The results of structural equation model further verified the above results. To summarize, despite different materials had different effects on microbial community, the action mechanism of adsorption materials was the same. Biochar and other adsorption materials improved the formation of HA by changing the function of stable microbial groups, so as to achieve heavy metal passivation and mitigate the bioavailability. Therefore, the added adsorption materials such as biochar did not directly adsorb heavy metals, but indirectly mitigate the biotoxicity by affecting the composting process.

Fig. 6
figure 6

The structural equation models of CK composting (a) and treatment group composting (b), which represented the hypothesized causal relationships among different microbial groups, HA content and the bioavailable fractions of heavy metals. Arrows descript the casual relationship (solid: significant relationship; dotted: nonsignificant relationship. Numbers adjacent to arrow represent path coefficients. Significance level is descripted: *0.01 < P < 0.05, **0.001 < P < 0.01, ***P < 0.001. HA humic acid, biotoxicity of HM biotoxicity of heavy metals

4 Conclusion

Embedded adsorption materials such as biochar effectively facilitated the degradation of OM and the formation of HA, and mitigated the bioavailability of heavy metals during composting. This indicated that the  embedded materials effectively improved the composting. The results of FTIR and SEM–EDX analysis showed that the materials did not adsorb heavy metals obviously, however, the microbial networks changed after embedding materials. Statistical analysis suggested that the succession of microbial community promoted the formation of HA, thereby improving the mitigation of heavy metal bioavailability. Ultimately, structural equation models verified that the addition of biochar promoted the HA formation through stable community, thereby accelerating the passivation of heavy metals. Therefore, this study revealed the action mechanism of biochar during composting in detail, which provided theoretical and technical supports for mitigating the biotoxicity of heavy metals by biochar during composting.