1 Introduction

The rapid expansion of the poultry industry has led to a substantial accumulation of chicken manure (CM) each year (Zhang et al. 2021a, b). To enhance animal growth and prevent viral infections, animal farms frequently employ feed supplements containing heavy metals (HMs). However, due to limited absorption within animal bodies, 95% of HMs (especially Cu: 730.1–1250 mg kg−1, and Zn: 2250–4333.8 mg kg−1) are excreted in manures (Chen et al. 2022a, b), thereby influencing environmental microbes and bolstering the prevalence of metal-resistance genes (Zhao et al. 2022). CM is rich in nutrients and holds potential as a fertilizer; inadequate management of manure could result in the accumulation of Zn and Cu in the environment, thus posing risks to human and animal health (Zhang et al. 2021a, b). Furthermore, the application of raw CM to agricultural soils may lead to high concentrations of Zn and Cu along the food chains, impacting soil fertility and crop quality (Zhang et al. 2021a, b). Therefore, it is imperative to seek effective methods for treating and managing raw CM properly, while also reducing Zn and Cu levels in the final products before application.

Composting is a functional approach for managing CM by reducing both organic and inorganic pollutants (Zhang et al. 2021a, b; Zhou et al. 2021). Despite its benefits, conventional composting methods only partially mitigate the accumulation of HMs (Chen et al. 2019; Chung et al. 2021; Zhang et al. 2021a, b). Besides, the degree of bioavailability of HMs and their mobility in compost final products have a considerable impact on their probable accumulation and release into plants and soils (Ejileugha et al. 2023). Lately, combining biochar into a composting matrix has arisen as a cost-effective and environmentally friendly approach to fostering humification, enhancing microbial activity, and reducing the bioavailability of Zn and Cu (Li et al. 2021a, b; Zhou et al. 2021; Nguyen et al. 2022; Abdellah et al. 2023a). Studies have confirmed that biochar supplement drastically moderates the bioavailability of Cu (34.8–90.3%) and Zn (4.10–56.7%) within organic waste composting via different mechanisms including adsorption, precipitation, complexation, and reduction reactions (Cui et al. 2020; Duan et al. 2021). However, despite evidence indicating the efficacy of various biochars in reducing HMs’ bioavailability (Zhou et al. 2021; Duan et al. 2021), the potential mechanisms and impacts of invasive plants and their derived biochar on Zn and Cu bioavailability in compost remain uncertain.

Mikania micrantha Kunth (MM), a prolific natural invasive plant in south China, serves as a model raw plant residue for different phytochemicals such as sesquiterpene lactones and phenolic compounds (Yu et al. 2021; Abdellah et al. 2023a, b). Additionally, its biomass carbonization process yields high-quality biochar due to its low ash and moisture content coupled with a high lignin content (Wang et al. 2021). Research by Wang et al. (2021) indicated that among various biochars derived from five invasive plants and utilized for HMs mitigation, Mikania micrantha Kunth biochar (MMB) exhibited higher adsorption capacities and buffer abilities for HMs. Consequently, incorporating MMB into compost as an additive presents an appealing and promising strategy for controlling the bioavailability and distribution of Zn and Cu. Notably, composting under elevated Zn and Cu tends to impact microbial abundance and impair their functional gene expression (Zhou et al. 2021). Nevertheless, microorganisms can effectively absorb and redistribute existing Zn and Cu, facilitated by the unique biochar structure, which provides a suitable habitat for their growth and interaction (Zhou et al. 2021). These microorganisms produce specific low molecular weight organic compounds known as siderophore-related genes (Saha et al. 2015), which serve to bind and transport iron within microbes cells (Soares 2022). Additionally, these genes can form relatively stable complexes with metals such as Zn and Cu (Soares 2022). Hence, the fate and transport of Zn and Cu during composting can be significantly influenced by these siderophore-related genes. For example, the mobilization and transference of Zn and Cu by siderophore-related genes following compost application may trigger the secondary release and circulation of Zn and Cu in the agricultural soil (Jiang et al. 2019). This is attributable to siderophore-related genes making Zn and Cu available to the producing microorganisms but also to other microbes possessing similar receptors, thereby distributing the costs and benefits associated with producing siderophore-related genes among various species within the microbial community (Kramer et al. 2019). Furthermore, it has been observed that the presence of MM-related phytochemicals influences the abundance of pathogenic microbes and their associated genes during composting (Abdellah et al. 2023a, b). However, addressing the increase of siderophore-related genes in the compost remains a challenging issue that has yet to be fully resolved. Moreover, there is a dearth of research examining the relationship between Zn and Cu bioavailability and siderophore-related genes under the influence of MM-related phytochemicals during composting.

Herein, we investigate the interactive effects among various compost physicochemical parameters, Zn and Cu bioavailability, microbial structure, siderophore-related genes, and MM-related phytochemicals with/without biochar addition during composting. We hypothesized that under MMB and/or MM, the MM-related phytochemicals may directly or indirectly shape Zn and Cu bioavailability by affecting the abundance of microbes producing siderophores, thereby altering Zn and Cu bioavailability and distribution within composting. The outcomes represent an applicable and economically low-cost alternative for controlling Zn and Cu circulation in the compost as well as managing the problem of plant invasion in the natural environment. Zn and Cu can be "greenly," cheaply, and efficiently immobilized by utilizing absorption additives such as MBB and MM combination, which can serve the dual purpose of mitigating pollutants while also managing MM growth and spread.

2 Materials and methods

Chicken manure (CM), Mikania micrantha (MM), and corn straw (CS) are the primary raw materials utilized for the composting process. The fresh CM was collected from a local farm in Gaoming District, Foshan City, Guangdong Province. MM and CS were collected from the agricultural farm of South China Agricultural University, Guangzhou, China. The collected materials were air-dried and then chopped into pieces. The primary physicochemical features of raw composting mixtures (CM, MM, and CS) are presented in Table 1.

Table 1 Physicochemical features of the raw composting materials on a dry weight basis

2.1 Preparation of Mikania micrantha, and corn straw biochars

The fresh MM and CS were air-dried, then oven-dried at 80 °C for 48 h. Dried residues were then chopped into small pieces and pulverized into powder using a stainless-steel high-speed pulverizer (JP-500C, Yongkang Jiupin Industry, and Trading Co. Ltd., Yongkang, China). Then, the pulverized residues were balanced and pyrolyzed in a muffle furnace (Beijing Yong Guangming Medical Instrument Factory, Beijing, China) under restricted O2 conditions at 500 °C for 2.0 h (Wang et al. 2021). The biochar produced through pyrolysis at temperatures ranging from 450 to 500 °C showed high efficacy in immobilizing Zn, and Cu when integrated in composting (Nguyen et al. 2022).

2.2 Determination of physicochemical properties of yielded biochars

The pH value of biochars was determined by mixing 1:5 (w/v) of the biochars and deionized (DI) water and shaking them on a mechanical shaker for 1 h with a pH meter (Muhammad et al. 2022). Cation exchange capacity (CEC), was evaluated under neutral conditions (pH 7) following the method described by Wang et al. (2021). The surface area of produced biochars was determined with nitrogen adsorption isotherms at 77 K with a gas sorption analyzer (Micromeritics ASAP 2460, America) (Wang et al. 2021). The major features of yielded Mikania micrantha biochar (MMB) and corn straw biochar (CSB) are displayed in Table 2.

Table 2 Physicochemical properties of yielded biochars [Mikania micrantha biochar (MMB) and corn straw biochar (CSB)]

2.3 Experimental design and composting processing

Four compost groups (with three replicates for each group) were set up. They were categorized accordingly as follows: compost groups amended with biochar including the MMB compost (MM and CM amended with MMB), and the CSB compost (CS and CM amended with CSB), while compost groups without biochar addition comprise the MM compost (MM and CM), and the CS compost (CS and CM). Here, biochar was added at a 6% rate into the composting process. A previous study reported that 6% biochar amendment significantly improved in compost quality, degradation rates, and nutritional value, which is recommended as the ideal ratio for obtaining mature and safe compost products from the feedstock, food waste, and livestock manure (Ravindran et al. 2022). Besides, Zhou et al. (2021) investigated the efficacy of five different biochar ratios (0%, 2%, 4%, 6%, and 10% on a dry weight basis) on HMs and HM-resistant bacteria during poultry manure composting. Overall, their results showed that the addition of 6% biochar was potentially beneficial to enriching the abundance of bacterial community to improve composting environment quality and composting efficiency as well as immobilize HMs and HM-resistant bacteria in the end product (Zhou et al. 2021). Adding up to 7% biochar into composting is an effective approach to moderating Zn and Cu bioavailability and supporting composting safety (Nguyen et al. 2022; Wu et al. 2023). Four composting reactors were designed, prepared, and used according to the former study (Abdellah et al. 2021).

2.4 Sample collection and determination of physicochemical parameters and Zn and Cu fractions

Compost samples were collected in triplicate from the four compost groups for each phase of the composting, which was divided into the initial phase (in the beginning) (1st day), heating phase (2nd day), thermophilic phase (3rd, 7th, and 10th day), mesophilic phase (15th, and 22nd day), and maturation phase (32nd day). The collected samples were mixed evenly and separated into two parts: one part was preserved at − 20 °C for metagenomic analysis, while the other part was air-dried and crushed, and sieved to quantify physicochemical parameters and Zn and Cu fractions. The samples collected on the 1st, 3rd, and 32nd days were selected for metagenomic analysis according to temperature fluctuations (initial, thermophilic, and maturation stages, respectively) (Abdellah et al. 2023a). Temperature, pH, total organic carbon (TOC), total nitrogen (TN), moisture content (MC), electrical conductivity (EC), ammonium (NH4+−N), nitrate (NO3−N), and germination index (GI) were determined as reported previously (Sun et al. 2022; Abdellah et al. 2023a, b).

Zn and Cu fractions were measured and calculated in triplicate according to the modified BCR (European Community Bureau of Reference) sequential extraction procedure (Zhang et al. 2021a, b), in which Zn and Cu were defined as acid extractable (AcidExt) (F1), reducible (Red) (F2), oxidizable (Oxi) (F3), and residual (Res) (F4) fractions in the order of decreasing bioavailability (Guo et al. 2022). F1 and F2 are stable fractions that can be utilized to estimate Zn and Cu mobility and bioavailability. Meanwhile, F3 and F4 represent non-bioavailable HM fractions that can be used for Zn and Cu toxicity estimation. The flame atomic absorption spectrophotometry was used to measure Cu and Zn concentrations.

2.5 Metagenomic analysis

10 g of compost samples stored at − 20 °C were prepared and sent to Oebiotech Co. Ltd. (Shanghai, China) for DNA extraction and sequencing by applying an Illumina PE150 (Illumina Inc.). The total DNA was extracted and the raw reads were produced following sequencing. Meanwhile, the clean data were obtained by removing adaptor fragments and low-quality reads. Following quality analysis and control by applying the FastQC (version 0.11.2) and Trimmomatic (version 0.36) programs, the clean reads were assembled into contigs using SOAPdenovo software. After attaining valid reads, MEGAHIT software (v1.1.2) was used for the sequence metagenomic splicing. At the scaffold’s internal gap, the scaffold was broken into a new contig (Scaf Contig) and preserved contigs greater than or equal to 500 bp. Open reading frames (ORFs) prediction of the spliced scaffold was performed using prodigal software (v2.6.3) and translated into amino acid sequences. CDHIT software (v4.5.7) was applied to construct non-redundant gene sets for the predicted genes in all samples, and the clustering parameters were 95% identity and 90% coverage between sequences (Abdellah et al. 2023a, b). The longest gene in each cluster was selected as the representative sequence of the gene set, and then bowtie2 software (v2.2.9) was employed to compare clean reads of each sample with the non-redundant gene set (95% identity), and the abundance information of genes in the corresponding sample was counted. DIAMOND software (v0.9.7) was applied to compare and annotate the gene set representative sequence (amino acid sequence) with the data of NR library, Kyoto Encyclopedia of Genes and Genomes (KEGG), Gene Ontology (GO), and Clusters of Orthologous Genes (COGs). The expected e-value of the BLAST comparison parameter was set to 1e-5. MM-related phytochemicals were verified by calculating the relative abundances of their related KEGG Orthology (KO entries) at different composting stages (Abdellah et al. 2023a, b). Meanwhile, siderophore-related genes were detected by calculating the relative abundances of their related GOs in different composting phases. The microbial classification annotation information of genes was achieved under the microbial classification information database of NCBI, and the microbes’ relative abundance within different levels was calculated using the gene abundance corresponding to the species. Finally, the microbial abundance was counted at the taxonomic levels of Kingdom, Phylum, Class, Order, Family, Genus, and Species (Abdellah et al. 2023a, b). Ultimately, the raw sequencing data have been uploaded to NCBI under accession number No. PRJNA872310.

2.6 Statistical analysis

The data were statistically analyzed in Excel (2019) (Microsoft, USA) and Prism Graph software (version 8.0, San Diego, CA), representing the mean ± standard deviation (SD) of three replicates, and calculated for statistical significance by applying one-way analysis of variance (ANOVA) (P < 0.05). Figures were drawn in Origin Pro software (version 2022, Origin Lab, USA). The multivariate analysis based on Pearson correlation of the physicochemical parameters, metal-related enzymes, and microbial communities was conducted on Prism Graph software (version 8.0, San Diego, CA). The correlation coefficients were set between − 1 and + 1 and the strength of the linear relationship among the variables at P < 0.05. Structural equation models (SEMs) were accomplished with the software AMOS 26.0 (SPSS, IBM, NY, USA), coupled with the maximum likelihood evaluation program to investigate the direct and indirect effects of physicochemical parameters and biotic parameters on Zn and Cu bioavailability. Non-significant chi-square test (P > 0.05) was applied to display a good fit for SEM models.

3 Results and discussion

3.1 Composting physicochemical parameters change in response to biochar addition

The changes in physicochemical parameters can support the reduction of HMs’ bioavailability through composting (Hao et al. 2019). Fig. S1 illustrates the profiles of physicochemical parameters [temperature, pH, electrical conductivity (EC), germination index (GI), moisture content (MC), ammonium (NH4+−N), nitrate (NO3−N), total potassium (TK), total phosphorus (TP), total organic carbon (TOC), carbon and nitrogen ratio (C:N), and total nitrogen (TN)] observed throughout the CM composting process in response to biochar addition. Detailed explanations are placed in Supplementary Materials.

3.2 Variation of Zn and Cu fractions in response to biochar addition during composting

HMs mobility and bioavailability are dependent on their particular chemical fractions or the element-binding types (Xu et al. 2022). Here, the extractable (F1), reducible (F2), oxidizable (F3), and residual (F4) fractions of Zn and Cu in compost samples are presented in Fig. 1. F1 and F2 are usually deemed mobile and bioavailable, while F3 and F4 are non-bioavailable. F1 is more mobile and bioavailable than the other three fractions (Kong et al. 2021). As indicated in Fig. 1a and b, the bioavailable Zn and Cu levels (F1 + F2) showed a fluctuating reduction within composting. Compared with the MM and CS composts, MMB and CSB composts revealed a significant decrease in bioavailable Cu [(2.3 mg kg−1 + 12.1 mg kg−1), and (3.3 mg kg−1 + 14.6 mg kg−1)], and bioavailable Zn [(103.1 mg kg−1 + 110.1 mg kg−1), and (109.6 mg kg−1 + 117.2 mg kg−1)] (P < 0.05) in the finished stage of composting. Zn and Cu availability in biochar-amended composting was reduced probably via co-precipitation and complexation with humic matter and biochar mineral oxides (Jiao et al. 2022; Abdellah et al. 2022a, b). These findings agreed with those of Zhang et al. (2024), who reported that amending biochar achieved 52.0% and 20.4% of Cu and Zn passivation rates, respectively, during the composting process. Whereas, compared with the CSB, MMB composts exhibited higher Zn and Cu availability reduction, indicating a considerable passivation impact of biochar derived from MM as an additive. These outcomes harmonized with the earlier research and demonstrated higher metal equilibrium adsorption capacities of MMB than biochars derived from other invasive plants (Wang et al. 2021). Besides, enhancing microbes’ metabolic activity by biochar might facilitate more extracellular metabolites (siderophore-related genes) production, which could adsorb Zn and Cu, thereby increasing their bioavailability (Chen et al. 2019). Meanwhile, F3 and F4 of Zn and Cu displayed fluctuating reductions within composting, where a significant reduction in F3 and F4 of Cu [(71.1 mg kg−1 and 14.6 mg kg−1) and (75.2 mg kg−1 and 15.7 mg kg−1)] and Zn [(60.5 mg kg−1 and 14.5 mg kg−1) and (68.9 mg kg−1 and 13.6 mg kg−1)] was observed in the last stage of MMB and CSB composting (P < 0.05). These findings may be due to the accelerated humus formation besides the microbial activity under biochar impact, thus forming complexes for Zn and Cu passivation (Chen et al. 2020). Also, previous studies indicated the significant effects of biochar on Zn and Cu passivation (Chung et al. 2021; Zhou et al. 2021). In addition, Nguyen et al. (2022) mentioned that biochar significantly reduced Zn, Cu, Ni, and Pb bioavailability within composting compared with the control. The main Zn and Cu reduction mechanisms could be through surface complexation of functional groups and intra-sphere complexation with free hydroxyl mineral oxides of biochar (Jiao et al. 2022). However, no significant difference was observed in the reduction of F3 and F4 of Cu and Zn between the MMB and CSB composts. Overall, MMB could be adopted as a significant approach to mitigating Zn and Cu bioavailability in raw CM, thereby declining their environmental menaces.

Fig. 1
figure 1

Distributions of Zn and Cu fractions during composting. a Cu fractions, and b Zn fractions. MMB, CSB, MM, and CS represent samples extracted from CM composting amended with Mikania micrantha biochar, CM composting amended with corn straw biochar, Mikania micrantha composting, and corn straw composting, respectively. Results are the mean of three replicates and error bars indicate standard deviation (SD). Different letters indicate statistical differences among different compost samples (P < 0.05)

3.3 Impact of biochar on the succession of microbial community throughout composting

Biochar directly or indirectly affects microbial communities by providing a suitable microenvironment, thereby improving the compost’s physicochemical properties to stimulate microbial growth and function (Jiao et al. 2022; Wang et al. 2023). The bacterial phyla succession during composting is shown in Fig. 2. The higher relative abundance of Proteobacteria, Firmicutes, and Actinobacteria are thought to play a significant role in organic matter degradation (particularly carbohydrates and amino acids) (Guo et al. 2022). Proteobacteria is the main phylum involving metal-resistant bacteria during composting (Li et al. 2023). In this study, Proteobacteria, Firmicutes, and Actinobacteria abundances disclosed a significant change trend as the composting proceeded. For example, CSB and MMB composts maintained a higher abundance of phyla than CS and MM composts (Fig. 2). These findings agreed with those of Chen et al.(2022a, b), who stated that variable and higher abundance community resulting from biochar addition played a key function in the organic matter degradation, humic formation, and HM bioavailability reduction during composting. This occurrence is expected as biochar could potentially boost microbial growth and function by adjusting aeration, habitats (Zhang et al. 2021a, b), different unstable aliphatic mixtures, and inorganic nutrients that could be utilized as the carbon source by microbial communities (Cui et al. 2020; Wang et al. 2023). It might be remarked that Proteobacteria and Acidobacteria abundances in CS and CSB composts denoted reduction patterns and more significantly in MM and MMB composts (P < 0.05), possibly due to MM-related phytochemicals existing in MM and MMB composts (Abdellah et al. 2023a, b). With increasing temperature, Firmicutes abundance increased in MM and MMB composts and more considerably in CS and CSB composts (P < 0.05), with a slight reduction in the composting late stage, probably due to endospores developed by Firmicutes, therefore significantly improving its abundance in the thermophilic stage (Guo et al. 2022). Zn and Cu play an important role in metabolic processes under low concentrations but can become toxic with increasing their levels. Microbes can manage Zn and Cu by altering their oxidation state, bioaccumulation, and metal binding on their cell walls (Fakhar et al. 2020). Additionally, biochar may activate Zn and Cu immobilization during composting, potentially enhancing microbial diversity under low Zn and Cu concentrations. However, high concentrations of Zn and Cu can reduce microbial abundance and diversity, thereby altering the entire microbial community structure (Sharma et al. 2022).

Fig. 2
figure 2

Relative abundance of bacterial community during composting (a) At the phylum level (top 9 microbial phyla), (b) At the genera level (the top 15 bacterial genera). MMB, CSB, MM, and CS represent samples extracted from the CM composting amended with Mikania micrantha biochar, CM composting amended with corn straw biochar, Mikania micrantha composting, and corn straw composting, respectively

Bacillus and Cerasibacillus were found to be dominant in the thermophilic phase of composting, which might be due to their significant ability to promote the degradation of organic matter and lignocellulolytic substrates (Chen et al. 2022a, b). In contrast, the abundances of Corynebacterium and Pseudomonas decreased in the late stage of MMB and MM, compared to the CS and CSB composts. Corynebacterium, identified as a potential human pathogen (Chen et al. 2022a, b), serves as a reservoir for Zn and Cu resistance genes in HMs-polluted environments (Sheam et al. 2020). Previous research suggested that MM-related phytochemicals exhibit potential antibacterial activities against Xanthomonas, Pseudomonas, Salmonella, Fusarium, Staphylococcus, Bacillus, E. coli, and Streptococcus (Abdellah et al. 2023a, b; Sheam et al. 2020) by disrupting the structure and function of their cell membranes as well as nucleic acid synthesis and metabolism (Abdellah et al. 2023a, b). The decrease in the abundances of these genera could lead to a reduction in the bioavailability of Zn and Cu. Bacterial genera such as Corynebacterium, Pseudomonas, Flavobacterium, Enterobacter, Bacillus, and Micrococcus possess potential active chemisorption sites such as Teichoic acid on their cell walls, enabling them to exhibit strong Zn and Cu biosorption capabilities (Fakhar et al. 2020). The succession of such bacterial genera promoted the humic formations and the activation of HM bioavailability (Chen et al. 2022a, b). Overall, these findings revealed that phytochemicals related to MM and mechanisms associated with MMB may influence the structure and function of the microbial community structure and function in compost containing Zn and Cu.

3.4 KEGG level variations under biochar addition throughout composting

Microbes prevent HMs from entering their cells by forming a protective layer comprised of proteins, polysaccharides, and nucleic acids (Wang et al. 2022a, b). Additionally, microorganisms produce metal-chelating agents that can uptake Zn and Cu, suggesting that these metals may directly influence the production of secondary metabolite production such as siderophores. Moreover, phytochemicals related to MM could impact microbial growth and function, which may indirectly affect Zn and Cu uptake and circulation by microbes. Hence, KEGG pathways were explored to assess the metabolic function and secondary metabolite production in different composting groups under the biochar effect (Fig. 3).

Fig. 3
figure 3

Metabolic functions of microbial community inferred by KEGG levels during composting. KEGG level 1 (top 3 pathways in abundance), and level 3 (top 20 KO in abundance). Results are the mean of three replicates and error bars indicate standard deviation (SD), while the value of P < 0.05 is marked with *. MMB, CSB, MM, and CS denote samples extracted from CM composting amended with Mikania micrantha biochar, CM composting amended with corn straw biochar, Mikania micrantha composting, and corn straw composting, respectively

In CS compost, on the 1st day of composting, ABC transporters (K17319), biosynthesis of siderophore group nonribosomal peptides (K02552), carbon metabolism (K01679), and nitrogen metabolism (K00260) indicated the highest abundances of 8.2%, 5.9%, 4.4%, and 4.3%, respectively (P < 0.05) (Fig. 4), while during the thermophilic phase, K17319, K02552, K01679, and K00260 abundances increased to 9.7%, 6.9%, 6.7%, and 5.1%, respectively, on the 3rd day, nevertheless, within composing late stage on the 32nd day their abundances reduced to 5.7%, 3.4%, 3.2%, and 3.7%, respectively. The peak abundance revealed by ABC transporters within composting stages may facilitate Zn and Cu-related gene functions, as some of them encode the periplasmic binding protein-dependent ABC transport system (Li et al. 2023). On the other hand, the higher abundance of siderophore group nonribosomal peptides biosynthesis (involving uptake and efflux systems) within the composting process denotes the core regulation of Zn and Cu uptake and conversion (Li et al. 2023).

Compared with CS compost, K02552, K17319, K01679, and K00260 exhibited the maximum abundances of 5.9%, 5.2%, 9.2%, and 5.3%, respectively, on the 1st day of the CSB compost. K02552, K17319, K01679, and K00260 abundances escalated to 7.9%, 5.8%, 10.9%, and 6.1%; however, on the 3rd, and 32nd days of the CSB compost their abundances declined to 4.9%, 6.1%, 6.4%, and 4.4%, respectively. These outcomes were similar to those of Wang et al. (2022a, b), who reported that the biological decomposition of organic matter was significantly enhanced with the biochar application in the composting. Alternatively, compared with CSB and CS composts, KEGG level profiles of MMB and MM composts disclosed different trends. These outcomes were reasonable as the microbial metabolism and growth were possibly shaped by nutrient availability, which may consecutively alter different KO abundances throughout the composting. Some KOs were more expressed during composting, which may be caused by a microbial preference for nutrient sources (Abdellah et al. 2023a, b).

In MMB compost, on the 1st day, K17319, K01679, flavone, and flavonol biosynthesis (K01195), flavonoid biosynthesis (K00588), and an isoquinoline alkaloid biosynthesis (K00832) showed the highest abundance of 8.9%, 7.2%, 8.6%, 7.9%, and 8.1%, respectively (P < 0.05). By the 3rd day, K17319, K01679, K00260, sesquiterpenoid and triterpenoid biosynthesis (K00801), and K00832 exhibited the maximum abundances of 8.5%, 8.7%, 7.6%, 7.6%, and 5.9%, respectively. On the 32nd day, K17319, K01679, K05281, and K00801 indicated the higher abundances of 5.3%, 6.4%, 6.3%, and 5.8%, respectively. The findings suggest that compared with CS and MM composts, biochars (CSB and MMB) had significant impacts on the richness of particular KEGG levels, with CSB potentially being the most favorable for microbial activity and function (Abdellah et al. 2023a, b). Biochar can positively regulate microbial growth and metabolism and improve their related genes by enhancing nutrient availability and transformation during composting (Zhou et al. 2021). Furthermore, nitrogen metabolism, carbohydrate metabolism, and energy metabolism are intimately associated with microbial respiration (Wang et al. 2022a).

In MM compost, K17319, K02552, K01195, K00588, and K00832 demonstrated higher abundances of 5.4%, 6.8%, 9.7%, 8.1%, and 9.5%, respectively, on the 1st day. Meanwhile, K01195, K00588, K00832, K00260, and K00801 showed the higher abundances of 6.9%, 5.9%, 7.3%, 5.5%, and 6.0%, respectively, on the 3rd day. On the 32nd day, K01195, K00588, K05281, K00832, and K00260 abundances accounted for 4.5%, 4.9%, 4.5%, 5.1%, and 4.8%, respectively. Here, flavone and flavonol biosynthesis, flavonoid biosynthesis, isoquinoline alkaloid biosynthesis, sesquiterpenoid, and triterpenoid biosynthesis, which are only detected within composting stages, are important for inhibiting pathogenic microbes and are widely present in MM residue (Abdellah et al. 2023a, b). Additionally, microbial functions such as microbial secretion systems, peptide, and metal transport systems, two-component regulatory systems, phosphate, and amino acid transport systems were enhanced by controlled Zn and Cu levels (Ma et al. 2022). Furthermore, compared with CS and CSB composts, MM effects on KEGG levels in MM and MMB composts were evident due to antibacterial substances like sesquiterpene lactones, diterpenes, polyphenols, flavonoids, mikanolide, and miscandenin, which are responsible for antibacterial action (Sheam et al. 2020).

In brief, these findings indicated that the MM-related phytochemicals and MMB mechanisms may be closely related to interference with the key KEGG levels during composting, consequently altering the microbes’ metabolic functions and Zn and Cu bioavailability.

3.5 Variations in siderophore biosynthesis and transport-related genes under biochar addition during composting

Exploring the siderophore-related genes has attracted considerable attention due to their role in influencing the fate of Zn and Cu. These genera are typically classified into catecholate, hydroxamate, and α-hydroxycarboxylate categories (Table S1) based on their functional groups that coordinate with HMs (Soares 2022), rendering them in bioavailable forms (Khan et al. 2019). A total of 453 GOs related to the siderophore biosynthesis and transport pathways were identified from the metagenomic data. Specifically,100 GOs were associated with the siderophore biosynthetic process, while 258 GOs and 95 GOs indicated a relation with the siderophore transport process and siderophore transmembrane transporter activity, respectively. The most abundant GO-related siderophore biosynthesis and transport pathways are displayed in Fig. 4. Particularly, the pathway of the siderophore biosynthetic process (Fig. 4a) represents the main responsible GOs with their relative abundances (Fig. 4b) and their main functions (Table S2). Siderophores biosynthesis via non-ribosomal peptide synthetases (Fig. 4a) is the main generic pathway that involves multi-enzymes, wherein amino acids, carboxylic acids, and hydroxy acids are joined into peptidic precursor molecules. These molecules are then modified by either non-ribosomal peptide synthetases or other enzymes to produce the final siderophores (Kramer et al. 2019).

Fig. 4
figure 4

Siderophore-related gene patterns in the composting; a Predicted siderophore biosynthetic pathway; b Abundance of genes modeling siderophore biosynthetic pathway inferred by the abundance of Gene Ontology (GO) clusters (top 22 GOs). The numbers on the ribbon chart matched the gene percentage abundance assigned to a particular abundance of GO in each compost sample. MMB, CSB, MM, and CS represent samples extracted from CM composting amended with Mikania micrantha biochar, CM composting amended with corn straw biochar, Mikania micrantha composting, and corn straw composting, respectively

As depicted in Fig. 4b, compared to CS and CSB composts, the abundance of GOs associated with the siderophore biosynthesis process decreased in the MM and MMB. This reduction could effectively inhibit the Zn and Cu biosorption and accumulation inside microbial cells, although a slight difference was observed between the MM and MMB composts. On the 32nd day compared to 1st and 3rd day, the abundances of GO: 0019290, GO: 0009987, GO: 0019748, and GO: 0009058, which are relevant to the siderophore biosynthetic process, cellular process, secondary metabolic process, and biosynthetic process, were 0.019% and 0.011%, 0.018% and 0.019%, 0.139% and 0.021%, and 0.044% and 0.013% in MMB and MM composts, respectively. In contrast, these abundances were significantly enhanced to 0.646% and 0.468%, 0.785% and 0.469%, 0.546% and 0.438%, and 0.668% and 0.488% in CSB and CS composts. This phenomenon agreed with the outcomes of Ma et al. (2023), who reported that microbes responded to HMs selective stress by adjusting GO abundances to improve their resistance. Notably, MM substantially reduced the bioavailability of Zn and Cu during composting through the influence of MM-related phytochemicals on siderophore-producing microbes (Fig. 2), suggesting that the impact of MM on the fate of the siderophore biosynthetic process may be comprehensive.

Also, the findings confirmed that the GO-related siderophore biosynthesis and transport pathways (Fig. 5) were significantly enriched in CSB and CS than in MMB and MM composts, suggesting that MM-related phytochemicals may be efficient in alleviating siderophore-related gene proliferation. Compared with CS, MMB, and MM, the elevated siderophore-related gene abundance was noticed in the CSB compost (Fig. 5), which may drastically raise Zn and Cu bioavailability. It can be reasonably assumed that biochar contributed to forming active microbial resistance towards Zn and Cu during composting (Zhou et al. 2021) by generating different siderophore-related genes. Within composting, the clusters related to the siderophore transport, siderophore transmembrane transporter activity, and siderophore biosynthetic process dominated the siderophore-related gene pathways, respectively. From the highest abundance of clusters-related siderophore transport process, it may be speculated that siderophore-related genes can be combined with Zn and Cu to form Zn and Cu-siderophore chelates, thereby increasing the activity of Zn and Cu, promoting their uptake and accumulation in microbe cells (Kramer et al. 2019) existing in compost, and increasing the potential ecological threats they may pose once compost is applied in the environments (Jiang et al. 2019). Remarkably, the abundance of siderophore-related gene pathways significantly reduced (P < 0.05) in MMB and MM composts compared with in CSB and CS composts. It was found that among the main clusters, 6 clusters (cluster_339273, cluster_264435, cluster_246074, cluster_637502, cluster_59199, and cluster_13656) were undetected in MMB and MM composts on the 1st day, probably due to the synergistic effect of different MM-related phytochemicals (Abdellah et al. 2023a, b). Whereas, a smaller proportion of these clusters were then detected on the 3rd and 32nd days of the composting. Meanwhile, in CSB and CS composts, these clusters exhibited a significant increase in their abundance as composting continued (P < 0.05), which may even indicate the less effectiveness of applied biochar to inhibit siderophore-related gene transfer. Notably, these clusters are related to the Zn and Cu transport process, and the increase in their abundance in the composting late stage might lead to Zn and Cu mobilization following compost utilization. Escalating MM-related phytochemical levels may significantly inhibit the biosynthesis of the siderophore group nonribosomal peptides. The activities of MM-related phytochemicals may be achieved by rebuilding the structure of bacterial cell membranes and cell walls, inhibiting bacterial virulence factors expression, regulating metabolite factors expression levels, and improving antioxidant enzyme activity (Li et al. 2021a, b). The inhibition of the biosynthesis of the siderophore group nonribosomal peptides pathway can guarantee less circulation of Zn and Cu, as siderophore-related genes can effectively mobilize and transmit them (Jiang et al. 2019). Particularly, siderophore-related genes’ fate after the Zn and Cu discharge is not well grasped. In some cases, siderophore-related genes can be reutilized across certain recycling mechanisms, while others release HMs via hydrolysis (Ma et al. 2022) and both cases could instigate Zn and Cu bioavailability in the environment. A recent study found a significant correlation between HMs concentration and distribution, and siderophore within the microbial community (Sheam et al. 2020). Finally, biochar could boost microbial growth by improving nutrient availability and immobilizing Zn and Cu, thus increasing their activities including siderophore biosynthesis and transport processes during composting. Meanwhile, MM-related phytochemicals in the composting can inhibit or decline siderophore biosynthesis and transport processes whereas biochar could support Zn and Cu immobilization.   

Fig. 5
figure 5

Dominant clusters (top 20 clusters in abundance) related to siderophore transport (GO: 0015891), siderophore transmembrane transporter activity (GO: 0015343), and siderophore biosynthetic process (GO: 0019290) within composting. Results are the mean of three replicates and error bars indicate standard deviation (SD), while the value of P < 0.05 is marked with *. MMB, CSB, MM, and CS represent samples extracted from CM composting amended with Mikania micrantha biochar, CM composting amended with corn straw biochar, Mikania micrantha composting, and corn straw composting, respectively

3.6 Exploring the variation of metal-related enzymes under biochar addition during composting

Microbes gain HMs resistance through the genetic evolution process, while chains of biological and enzymatic responses are initiated, certain of which can act exactly on Zn and Cu and facilitate their bioavailability (Chen et al. 2020; Sun et al. 2022). Thus, it might assumed that metal-related enzyme activities could be an indicator for Zn and Cu distribution among microbes producing siderophores. Accordingly, COG data were scrutinized to assess these enzymes through composting. In total, 8319 COGs indicated a relation with Zn and Cu distribution through composting, indicating a response to selective pressure exerted by these HMs (Li et al. 2023). Among them, COGs related to membrane-associated zinc metalloprotease (591 COGs), HM transport detoxification protein (452 COGs), membrane-bound metal-dependent hydrolase (207 COGs), ATP-dependent zinc metallopeptidase (834COGs), metal-dependent phosphohydrolase (1174 COGs), metallocarboxypeptidase activity (275 COGs), metal-dependent hydrolase (454 COGs) and multicopper oxidase (434 COGs) were metagenomically characterized during composting. Commonly, at high Zn and Cu levels, microbial activity is relatively hindered and driven by a decline in enzyme activity. Nonetheless, the situation may vary in the presence of HMs-resistant microorganisms, which is in agreement with Wang et al.(2022a, b), who stated that these microbes could directly absorb HM into their cells and decrease to a level with less toxicity via specific enzymes and oxidization mechanisms.

Generally, higher abundances of metal-related enzymes were observed in the CS compost and more significantly when biochar was applied in the CSB compost (P < 0.05). Within composting, multicopper oxidase [COG2132 (Cluster_167355, and Cluster_129187)], HM transport detoxification protein [COG2608 (Cluster_1098105), (Cluster_1098298), (Cluster_1135593), and (Cluster_1093530)], ATP-dependent zinc metallopeptidase [COG0465 (Cluster_14757), and (Cluster_267719)], and metallophosphoesterase [COG1408 (Cluster_89041)] displayed a significant increase in CSB compost compared with CS, MMB, and MM composts (P < 0.05) (Fig. 6). It's worth noting that the succession of these enzymes promoted the bioavailability of Zn and Cu within composting (Chen et al. 2022a, b). On the 32nd day of composting multicopper oxidase, metallophosphoesterase, and metallocarboxypeptidase activity illustrated the highest abundances in CSB compost compared with CS, MMB, and MM composts (P < 0.05) (Fig. 6). These outcomes were consistent with those of a former study reporting that amending biochar in composting could offer optimal habitats for microorganisms with HMs resistance to promote their growth and metabolic function (Zhou et al. 2021). A significant decline in the above-mentioned metal-related enzymes was observed in MMB and MM composts compared to the CSB and CS composts (P < 0.05), probably due to the influence of MM-related phytochemicals on microbial activity (Abdellah et al. 2023a, b). Overall, the metal-related enzymes disclosed increasing patterns as composting continued and decreased in the end stage (Fig. 6). These findings further indicated that the interaction impact between metal-related enzymes and MM-related phytochemicals was significantly enhanced by biochar, which promoted compost quality and safety.

Fig. 6
figure 6

Main dominant metal-related enzymes inferred by clusters of Orthologous Genes (COGs) abundance (top 29 clusters in abundance) during composting. Results are the mean of three replicates and error bars indicate standard deviation (SD), while the value of P < 0.05 is marked with *. MMB, CSB, MM, and CS denote samples extracted from CM composting amended with Mikania micrantha biochar, CM composting amended with corn straw biochar, Mikania micrantha composting, and corn straw composting, respectively

3.7 Correlation among physicochemical parameters, Zn and Cu bioavailability, metal-related enzymes, and microbial communities under biochar addition

Microbes initiated Zn and Cu uptake and absorption via generating siderophore-related genes and metal-related enzymes, but the process was affected by physicochemical parameters, Zn and Cu concentrations, microbial abundance, and additive type. Accordingly, the multivariate analysis based on Pearson correlation of the physicochemical parameters, metal-related enzymes, and microbial communities was performed to explore their specific effect on Zn and Cu bioavailability (Fig. 7).

Fig. 7
figure 7

Multiple variable analysis based on Pearson correlation explained the relations among the physicochemical parameters (temperature, MC, TOC, and TN), Zn and Cu bioavailability, metal-related enzymes, and microbial communities, (a) MMB compost; (b) CSB compost; (c) MM compost; and (d) CS compost. Metal-related enzymes are inferred by the abundance of Orthologous Genes (COGs) clusters including cluster_167355 which symbolizes multicopper oxidase. Simultaneously, cluster_1098298, cluster_1093530, and cluster_1098105 denote HM transport detoxification protein; cluster_14757 represents ATP-dependent zinc metallopeptidase; cluster_631121 represents membrane-bound metal-dependent hydrolase; cluster_608196 denotes metal-dependent phosphohydrolase; cluster_796899 represents metalloendopeptidase activity; cluster_267719 symbolizes ATP-dependent zinc metallopeptidase; and cluster_89041 represents metallophosphoesterase. The rho was calculated by Pearson’s correlation. Rho is performed with different colors, Rho > 0 indicates a positive correlation, and rho < 0 indicates a negative correlation; the value of P < 0.05 is marked with *

Figure 7a displays temperature, MC, TOC, Corynebacterium, Bacillus, Cluster_167355, Cluster_1098298, Cluster_14757, and Cluster_267719 as the main factors that demonstrated significant correlations with Cu and Zn bioavailability (− 0.90 ≤ r ≤ 0.90, P < 0.05). With increasing temperature, MC and TOC tended to decrease Zn and Cu bioavailability, probably because HMs bioavailability depends on microbial activity, which is significantly affected by the composting physicochemical parameters (Fakhar et al. 2020). The significant positive correlation among Corynebacterium, Bacillus, Cluster_167355, Cluster_1098298, Cluster_14757, and Cluster_267719 suggested that these microbes and genes might be the key contributors to Zn and Cu bioavailability during composting which is in agreement with the outcomes reported by Zhang et al. (2024). HMs biosorption by microbes was affected by temperature, contact time, and pH (Fakhar et al. 2020). Besides, escalating temperature due to biochar was an indicator of organic matter degradation by microbes, which will lead to an increase in humification level, forming a complex between Zn and Cu and humic acid (Abdellah et al. 2022a, b). Biochar also could effectively decrease Zn and Cu mobility by raising the pH level during composting (Wang et al. 2022a, b), whereas, increasing the microbial abundance and metal-related enzymes tended to increase Zn and Cu bioavailability.

In CSB compost, Zn and Cu bioavailability significantly correlated with temperature, MC, TOC, TN, Cluster_167355, Cluster_14757, Cluster_1093530, Cluster_1098105, and Cluster_89041(− 0.69 ≤ r ≤ 0.81, P < 0.05) (Fig. 7b). The significant positive correlation of these clusters signified their functions in accelerating Zn and Cu bioavailability during composting. Accordingly, biochar is suggested to enhance microbial degradation of organic matter via improving aeration, providing habitats for microbes, and stimulating their enzymatic activities (Nguyen et al. 2022).

Figure 7c demonstrates temperature, pH, MC, TOC, Corynebacterium, Methylobacterium, Cerasibacillus, Bacillus, Mycobacterium, and Cluster_608196 as the key factors that exhibited the most significant correlations with Cu and Zn bioavailability (− 0.99 ≤ r ≤ 0.79, P < 0.05). These findings indicated that microorganisms and their related enzymes may have a potential response to Zn and Cu bioavailability. It could be noted that the core microbes influence Zn and Cu bioavailability in MM compost, where the elevated Zn and Cu concentrations and MM-related phytochemicals may lead to a reduction in the abundance of pathogenic microbes, as well as a deficiency in metal-related enzymes (Sharma et al. 2022).

Figure 7d exhibits that only temperature, pH, and TOC were significantly correlated with Cu and Zn bioavailability (− 0.46 ≤ r ≤ 0.80, P < 0.05), while the role of microbes and metal-related enzymes in Zn and Cu bioavailability were slight or even negligible, probably due to increasing Zn and Cu amounts within composting. Instead, the mobility of Zn and Cu was commonly regulated by pH, where the solubility of Zn and Cu was decreased in compost with a higher pH (Nguyen et al. 2022; Abdellah et al. 2022a, b). Compared with MMB and CSB composts, the microorganisms in MM and CS composts elucidated a negative pattern with Zn and Cu bioavailability, probably because increasing Zn and Cu mobilization will tend to affect microbial growth even in the presence of microbes producing siderophores. Under biochar conditions, Zn and Cu tended to accumulate and immobilize, and simultaneously the microbial growth and activity managed to increase as well; however, MM-related phytochemicals could instigate a selective pressure for their activity in MMB compost. Alternatively, compared with MM compost, added biochar in MMB compost reduced the amount and Zn and Cu bioavailability and enhanced the microbial structure, whereas MM-related phytochemicals shaped the microbes producing siderophores. Therefore, MMB could effectively improve the compost quality and reduce Zn and Cu bioavailability via microbes producing siderophores and metal-related enzymes.

3.8 Validation of the potential impact of physicochemical parameters, microbes, and siderophore-related genes on Zn and Cu bioavailability under biochar addition

SEM is valuable in examining the direct and indirect impacts of physicochemical parameters (temperature and TOC) and biotic parameters (microbes and siderophore-related genes) on Zn and Cu bioavailability during composting (Fig. 8). Zn and Cu bioavailability had different responses to biotic and abiotic parameters within compost groups. In MMB compost, microbial abundance [(−0.80, P < 0.01), and (−0.54, P < 0.05)] , siderophore-related gene abundance [(−0.55, P < 0.05), and (−0.44, P < 0.001)] and temperature [(−0.31, P < 0.05), and (−0.15, P < 0.05)] had significant direct negative effects on zinc and copper bioavailability through composting. These findings were in accordance with a previous study that stated the variation in HMs bioavailability is closely related to the direct action of microbes and their related genes, mainly by microbes with multiple metabolism mechanisms (Zhang et al. 2024). After that, a significant positive effect of TOC [(0.93, P < 0.001), and (0.47, P < 0.01)] was observed on Zn and Cu bioavailability within composting (Fig. 8a, and b). TOC indirectly affected Zn and Cu bioavailability by significantly influencing the microbial abundances (− 0.52, P < 0.05), and siderophore-related genes (0.48, P < 0.001) (Fig. 8a). Interestingly, rising temperature indirectly affected Zn and Cu bioavailability by significantly shaping TOC (− 0.75, P < 0.0001) during composting. Whereas increasing the microbial abundance indirectly shaped Zn and Cu bioavailability via its strong significant positive influence on siderophore-related genes (0.90, P < 0.001) (Fig. 8a). This was probably because the conversion of Zn and Cu fractions throughout composting played a key function in their mobility and bioavailability. Besides, the bacterial communities were key factors in shaping the conversion of Zn and Cu fractions (Zhang et al. 2021a, b), by generating metabolites (like siderophores and metal-related enzymes) (Soares 2022).

Fig. 8
figure 8

SEM illustrating the potential impact of physicochemical parameters, microbes, and siderophore-related genes on Zn and Cu bioavailability: a SEM of MMB compost; b Histograms denoted the standardized total impacts obtained from SEM analyses of MMB compost for Zn and Cu bioavailability; c SEM of CSB compost; d Histograms denoted the standardized total impacts obtained from SEM analyses of CSB compost for Zn and Cu bioavailability; e SEM of MM compost; f Histograms denoted the standardized total impacts obtained from SEM analyses of MM compost for Zn and Cu bioavailability; and g SEM of CS compost; h Histograms denoted the standardized total impacts obtained from SEM analyses of CS compost for Zn and Cu bioavailability. The asterisks on the arrows represent the level of significance (P < 0.05; **P < 0.01; and ***P < 0.001). The solid red and black arrows indicate positive and negative associations, respectively. The dotted arrows outlined in red and black indicate no significance. The numbers above the arrows reflect the standardized path coefficients

In CSB compost, while temperature exhibited a significantly direct negative impact [(− 0.46, P < 0.001), and (− 0.17, P < 0.01)], microorganisms’ abundance and siderophore-related genes abundance indicated an insignificant negative effect (− 0.79, and − 0.46) and (− 0.24, and − 0.63) on Zn and Cu bioavailability. TOC demonstrated a significant positive influence [(0.44, P < 0.001), and (0.49, P < 0.001)] on Zn and Cu bioavailability throughout composting (Fig. 8c, and d). Meanwhile, temperature and TOC exhibited an indirect positive impact on Zn and Cu bioavailability by affecting microbial abundance [(0.54, P < 0.05), and (0.42, P < 0.01)], and siderophore-related genes [(0.56, P < 0.05), and (0.36, P < 0.05)] (Fig. 8c). There was an indirect positive influence of microbes’ abundance on Zn and Cu bioavailability via its impact on siderophore-related genes (0.51, P < 0.05) (Fig. 8c). The correlation coefficients in MMB compost were significantly larger than those in CSB compost, suggesting that physicochemical factors, microbes’ abundance, and siderophore-related genes had a greater influence on Zn and Cu bioavailability in MMB compost. However, the positive indirect effect of physicochemical properties on Zn and Cu bioavailability via shaping the microbial abundance, and siderophore-related genes was more significant in CSB compost than in MMB compost. This result could be due to biochar, which could improve and enhance aeration quality, enrich organic matter, and increase microbial diversity (Abdellah et al. 2022a, b), while the MM-related phytochemicals in MMB compost could restrict and inhibit the microbial activity and siderophore-related genes (Abdellah et al. 2023a, b), thereby reducing Zn and Cu bioavailability in the environment.

In MM compost, abundances of microbes [(− 0.28, P < 0.05), and (− 0.25, P < 0.05)] and siderophore-related genes [(− 0.34, P < 0.05), and (− 0.50, P < 0.05)] revealed a significant direct negative association with Zn and Cu bioavailability (Fig. 8e, and f). Whereas, a significant direct positive influence on Zn and Cu bioavailability was illustrated by temperature [(0.40, P < 0.05), and (0.25, P < 0.01)], and TOC [(0.80, P < 0.001), and (0.92, P < 0.01)], respectively (Fig. 8e, and f). Furthermore, both temperature and TOC indirectly shaped Zn and Cu bioavailability by influencing the abundance of microbes [(0.24, P < 0.05), and (− 0.27, P < 0.05)] and siderophore-related genes [(− 0.27, P ˃ 0.05), and (− 0.35, P < 0.05)]. Temperature presented another indirect impact on Zn and Cu bioavailability through its negative effect on TOC amount (− 0.28, P < 0.05). Additionally, microbes pointed indirect impact on Zn and Cu bioavailability through their significant positive impact on siderophore-related genes (0.15, P < 0.001) (Fig. 8e).

In CS compost, microbial abundances showed a significant negative effect on Zn and Cu bioavailability [(− 0.49, P ˃ 0.01), and (− 0.36, P < 0.05)] (Fig. 8g, and h). Conversely, increasing temperature [(0.30, P ˃ 0.05) and (0.27, P < 0.01)] and TOC [(0.19, P ˃ 0.001) and (0.29, P < 0.001)] revealed a significant direct positive effect on Zn and Cu bioavailability, respectively. Similarly, temperature and TOC indicated a significant indirect positive impact on Zn and Cu bioavailability by influencing microbial abundance [(0.88, P < 0.05), and (0.34, P < 0.001)] and siderophore-related genes [(0.14, P ˃ 0.01), and (0.32, P < 0.001)]. It’s worth noting the indirect effect of microorganisms’ abundance on Zn and Cu bioavailability through their strong, significant positive impact on siderophore-related genes (0.72, P < 0.001) (Fig. 8g).

In the present study, the results obtained by SEM in all compost groups indicate that physicochemical factors were the most important factors, with a strong direct effect on Zn and Cu bioavailability, as well as greater indirect effects through shaping microbes and siderophore-related gene abundances. These outcomes were coincident with the results of Multiple variable analysis based on Pearson correlation (Fig. 7). However, the presence of biochar can positively or negatively alter the response of these factors as it has a direct effect on Zn and Cu bioavailability and an indirect effect through shaping the microbial community structure and function.

4 Conclusions

This study compared the effects of composting Mikania micrantha Kunth’s (MM) and corn straw (CS) with and without biochar addition on various parameters including temperature, nutrient retention (TK, TP, TN), and bioavailability of zinc (Zn) and copper (Cu) and siderophore-related genes. The results indicated that biochar addition, particularly in corn straw biochar (CSB) and Mikania micrantha biochar (MMB), effectively enhanced composting temperature and nutrient retention, and reduced Zn and Cu bioavailability, with MMB showing more significant effects. The increase in phytochemical abundances, specifically isoflavonoid biosynthesis, sesquiterpenoid, and triterpenoid biosynthesis towards the end of MMB composting, likely contributed to the reduction in siderophore-related gene abundances. CSB stimulated microbial abundance and function, promoting siderophore-related gene abundance. Multiple variable analysis identified temperature, MC, TOC, Corynebacterium, Bacillus, multicopper oxidase, HM transport detoxification protein, and ATP-dependent zinc metallopeptidase as the main factors mediating Zn and Cu bioavailability. Overall, utilizing MMB and MM straw in composting proves to be an effective approach to reducing Zn and Cu bioavailability and siderophore-related genes, thereby enhancing resource utilization of the invasive MM plant.