Introduction

In China, corn-soybean meal mixture (CSMM) is a widely used protein resource for livestock husbandry (or pig feeds) due to its reasonable price, good palatability, high protein content, and balanced amino acid profile (Song et al., 2010; Qu et al., 2013). However, the antinutritional factors (ANFs) in soybean meal (SBM), such as enzyme inhibitors, phytic acid, tannins, and lectins, can affect the digestibility and absorption of nutrients (Goebel and Stein, 2010; Goodarzi Boroojeni et al., 2018). β-Conglycinin and glycinin are the two common allergenic proteins in SBM, which connected with intestinal abnormal morphology (Li et al., 1991). The disorder of the intestinal environment would cause diarrhea and growth retardation (Sun et al., 2008). Many processing technologies, such as enzymolysis, chemical processing, and fermentation, have been applied to reduce the allergenicity of CSMM and improve its digestibility (Drew et al., 2007). Enzymolysis is the most effective method, but the high cost and restricted reaction limit its wide application. The chemical process may cause the loss of nutrient value and produce a large amount of wastewater, increasing the environmental burdens (Hou et al., 2019). Compared to the other methods, microbial fermentation is the most promising one due to its reasonable cost and the high efficiency of reduction of allergenicity (Dai et al., 2017; Pi et al., 2019, 2021). Solid-state fermentation (SSF) is a low-cost fermentation method with a mild reaction (Reddy et al., 2008). Previous investigations showed that the SSF increased the nutrient value by degrading ANFs and allergenic proteins and appended the probiotic effects in the meantime (Canibe and Jensen, 2012; Koo et al., 2018). In addition, a co-fermentation using Bacillus subtilis and Bacillus amyloliquefaciens could increase crude protein while removing ANFs like raffinose, β-conglycinin, and glycinin using SSF technology (Medeiros et al., 2018).

Compared to the traditional SSF, the multi-stage process can achieve various purposes by using different bacterial strains (Zentek and Goodarzi Boroojeni, 2020). For instance, Chi et al. reported that Bacillus amyloliquefaciens could significantly degrade ANFs, while Saccharomyces cerevisiae just affected the level of the carbohydrate-based ANFs and Lactobacillus could remove the trypsin inhibitors (Chi and Cho, 2016). Shi et al. also reported that the two-stage fermentation of soy protein and corn mixture by Bacillus subtilis and Enterococcus faecium increased the content of crude protein (CP), small peptides (SP), and free amino acids (FAA). A better effect of the two-stage fermentation on nutrient digestibility and animal growth performance was also observed in previous investigations (Shi et al., 2017; Yeh et al., 2018). In addition, mixed fermentation shows higher destruction and masking of allergenic protein epitopes compared to single bacterial fermentation due to the more types of enzymes (Pi et al., 2022). Enzymes produced by microorganisms can hydrolyze proteins into peptides and free amino acids, so as to improve digestibility and reduce allergenicity (Seo and Cho, 2016). The peptides of hydrolysis could endow products with higher antioxidant, anti-inflammatory, angiotensin I-converting enzyme (ACE) inhibition, and metal chelating capacity than non-fermented products (Dai et al., 2017; Moktan et al., 2008).

Most present studies aimed to investigate the effects of two-stage fermentation on reducing the antinutrient factors and improving the digestibility of SBM, less focusing on the dynamic change of the microbial community (Chi and Cho, 2016; Li et al., 2019). To the best of our knowledge, there were few studies to investigate the two-stage fermentation regarding the feeding value of CSMM and explore the role of the microbial community in this process. This study aimed to (1) intensify the two-stage fermentation for the enhancement of the feeding value of CSMM by optimizing the ratio of Lactobacillus acidophilus to Bacillus subtilis, solid–liquid ratio, inoculum, and fermentation time, (2) evaluate the physicochemical properties, i.e., pH, CP, FAA, as well as the microbial amount and organic acid; (3) ascertain the dynamic change and composition of the microbial community during the fermentation process of the corn-SBM mixture using 16S rDNA sequencing; and (4) analyze the correlation between microbes and physicochemical characteristics using the O2PLS model and reveal the characteristic microbial community related to changes in physicochemical properties in two stages of fermentation.

Materials and methods

Effect of single bacteria fermentation on CSMM

Ten strains of lactic acid bacteria (LAB) bacteria and six strains of Bacillus with excellent in vitro properties were isolated from wild boar fecal samples and were selected to inoculate the CSMM. LAB were cultivated twice in MRS broth at 37 °C for 18 h. Bacillus was cultivated twice in LB medium at 37 °C for 24 h. The fermentation substrate was composed of soybean meal-corn (1:1) (total 500 g), the ratio of material to water was 1:0.8, and the inoculum volume was 8% (6–7 log CFU/g). The substrate inoculated with Bacillus was sealed with a breathable film for aerobic fermentation for 48 h, and the substrate inoculated with lactic acid bacteria was sealed with a sealing film for anaerobic fermentation for 48 h. After fermentation, wet samples (50 g) were collected and microbial and organic acids were determined. The remaining samples were dried at 60 °C for 12 h and crushed through a 60-mesh screen for physical and chemical properties analysis.

Construction of CSMM two-stage solid-state fermentation composite strain

Two-stage solid-state fermentation CSMM was prepared according to the method of Wang et al. (2020). Bacillus and lactic acid bacteria strains selected from single strain solid fermentation CSMM was used to construct composite strains. The CSMM (500 g) was composed of 50% soybean meal and 50% corn, and was placed in a 1000 mL fermentation bottle. The solid fermentation process was divided into two stages. The first stage of solid fermentation was aerobic fermentation with 7% Bacillus medium (7 log CFU/g) for 24 h in the bottle and using the breathable film to seal. The second stage was anaerobic fermentation with 7% LAB medium (7 log CFU/g) for 72 h and using the sealing film to seal. Sterile deionized water was added to the CSMM as a control. Quick sampling after fermentation, the wet sample was used for determining the number of viable bacteria, pH value, organic acid and other indicators, and the remaining sample is dried and crushed for physical and chemical property analysis.

Optimization of two-stage solid-state fermentation conditions for composite strain

In order to get the best fermented effect, the incubation ratio between LAB and Bacillus (1:1, 1:2, 2:1), the cell amount (4%, 6%, 8%, 10%, 12%), fermentation time (48 h, 72 h, 96 h, 120 h, 144 h), and the ratio of material to liquid (1:0.6, 1:0.8, 1:1, and 1:1.2 g/mL) were analyzed through the single factor method using the level of pH, CP, TCA-SP, FAA, SP, lactic acid, and acetic acid as indicators. Further optimization was performed by response surface analysis (Design Expert software, Version 8.0.6, USA) using the content of TCA-SP and lactic acid as response values. Under the best fermentation conditions, moisture samples were collected at different fermentation times to determine pH value, organic acid, and cell count. The rest of the samples were dried at 60 °C for 12 h and crushed through a 60-mesh screen for physicochemical analysis.

Fermentation process and sample collection of the optimum two-stage SSF

Thirty fermentation barrels containing 500 g of CSMM were inoculated with Bacillus subtilis and Lactobacillus acidophilus for two-stage solid-state fermentation based on the optimized solid-state fermentation composite strain and fermentation conditions. At fermentation 0 h, 12 h, 24 h, 48 h, 72 h, 96 h, four fermentation barrels were opened for sampling. Two samples of 100 g wet samples were collected at each time point. One sample was tested for viable bacteria count, pH value and other indicators, and the other sample was sent for high-throughput sequencing. The remaining samples were dried and physicochemical property analyzed.

Analysis of physicochemical property

The sample was diluted tenfold with ultrapure water, homogenized by blending and centrifuged (8000×g, 10 min). The pH values of diluted samples were directly measured using a PHS-25 pH meter (Shanghai Precision Scientific Instruments Company, China). Organic acids were detected by the method in our lab through the UV detector of Angilent HPLC 1260. The liquid phase detection conditions were 6 mmol/L H2SO4 as the mobile phase, 0.5 mL/min as the flow rate, 218 nm as the detection wavelength, and 30 °C as the column temperature. The column was Aminex HPX-87H (300 × 7.8 mm, Bio-Rad).

The sample was dried in an oven at 105 °C for 24 h to determine the total dry matter (DM). The CP content was determined by the Kjeldahl method (Barros et al., 2010). FAA was determined by the method in accordance with Yin et al. (2020). The SP content was determined as the protein content minus the amino acid content. Neutral detergent fiber (NDF) and acid detergent fiber (ADF) measurement methods as described by Van Soest et al. (1991). Ash was calculated by the method of AOAC (International, 1990). The trichloroacetic acid-soluble protein (TCA-SP) was determined by the method in accordance with Shi et al. (2017). The measurement of glycinin and β-conglycinin was determined through ELISA kit in accordance with the introduction book. The assay method for trypsin inhibitor (TI) activity is consistent with Smith et al. (1980).

Analysis of microbial population

One gram of the sample was taken and mixed with 9 mL of sterile water, diluted with 0.85% normal saline, and applied with 0.1 mL of the gradient dilution solution to the medium. The MRS medium plates were used for enumeration of LAB, eosin-methylene blue medium for enumeration of Enterobacteriaceae, Bengal red medium for enumeration of yeasts and molds, and LB medium for enumeration of Bacillus.

DNA extraction, 16S rRNA gene sequencing, and data analysis

To investigate the changes in the bacterial community of the CSMM, samples were collected at various fermentation times and stored at − 80 °C before DNA extraction. Total DNA was extracted from 10 g of samples via the QIAamp DNA Stool Mini Kit (Qiagen, Valencia, USA) according to protocol. The DNA concentration and quality were determined using a NanoDrop 2000c spectrophotometer (Thermo Scientific, USA). Primers 338F (5′-ACTCCTACGGGAGGCAGCA-G-3′) and 806R (5′-GGACTACHVGGGTWTCTAAT-3′) were used to amplify the V3–V4 regions of 16S rRNA (Wang et al., 2019). The method of PCR reactions was operated in accordance with Huang et al. (2020).

The original reads were processed into a single read by using FLASH (V1.2.7). The merged reads were filtered by the quality control program of QIIME (V1.7.0). The chimeric sequences were removed by the UCHIME algorithm. Clean reads were classified as operational taxonomic units (OTUs) based on 97% identity. The class information and microbial composition were obtained by Mothur and the SSUrRNA database of silva132 (Zeng et al., 2020). Alpha-diversity parameters (Shannon, Simpson, and Chao1) and goods coverage were calculated by Mothur. Beta-diversity (principal coordinate analysis) was performed by QIIME. The correlation between the fermentation stage and physicochemical properties was analyzed using the O2PLS model of SIMICA (V14.1). The function prediction of the microbial community was performed by PICRUSt 1.0.0 (http://picrust.github.io/picrust).

Statistical analysis

All samples were determined in quadruplicate and results were expressed as mean ± standard deviations. The significant differences were analyzed by the Duncan test. The difference at a level of P < 0.05 was considered significant.

Results and discussion

Evaluation of nutritional value of fermented CSMM with different Lactobacillus and Bacillus strains

The microbial content of CSMM fermented by different Bacillus was shown in Fig. S1. The concentration of Bacillus ranges from 8.89 to 9.89 log CFU/g, with NCUBSL003 (9.89 log CFU/g) being the highest and NCUBSL005 (8.89 log CFU/g) being the lowest. The content of LAB was 4.23–6.10 log CFU/g, the highest was NCUBSL001, and the lowest was NCUBPM001. The yeast and mold contents of all samples were greater than 6 log CFU/g. However, all samples were detected for Enterobacteriaceae, indicating a risk of infection with pathogenic bacteria in Bacillus raw fermentation of CSMM. As shown in Table S1, the crude protein content of CSMM was significantly increased after fermentation of six Bacillus strains, among which the crude protein content of NCUBSL003 was the highest (32.29%) and that of NCUBSL004 was the lowest (29.48%). After Bacillus fermentation, acid soluble protein (TCA-SP) was significantly increased by 4.65–6.38 times, among which strain NCUBSL003 exhibited the highest content of TCA-SP (14.85%), and the free amino acid content was increased by 3.24–6.07 times. After fermentation, the content of small peptides in NCUBSL003 group increased from 0.65 to 10.18%, followed by NCUBSL004, NCUBPM001, NCUBSL001, NCUBSL010 and NCUBSL005. The hydrolysis rate of glycinin in all the fermented CSMM was more than 60%, the highest was strain NCUBSL003 (23.26 mg/g), and the degradation rate reached 71.91%. The degradation rate of β-Conglycinin was more than 50%, the highest was strain NCUBSL003 (15.17 mg/g), up to 74.61%, followed by strains NCUBPM001 and NCUBSL005. Based on the fermentation effect of six Bacillus strains, NCUBSL003 and NCUBPM001 were selected as aerobic fermentation strains for two-stage solid fermentation.

The microbial content of CSMM fermented by LAB strains was shown in Table S2. The concentration of Bacillus in CSMM fermented by LAB strains ranges from 4.66 to 6.63 log CFU/g, with the highest content in group NCUA064001 and the lowest in group NCUA065016. The LAB concentration in NCUA001005, NCUA001014, NCUA064006, NCUA065016 and NCUA011001 groups was all more than 9 log CFU/g, while that in other groups was less than 9 log CFU/g. For yeast and mold concentration, NCUA001005 and NCUA001014 groups exhibited the lowest, which were 2.84 and 2.33 log CFU/g, while NCUA064001 and NCUA064006 group were more than 5 log CFU/g. As for the content of Enterobacteriaceae, no Enterobacteriaceae were detected in other groups except NF, NCUA063001, NCUA063006, NCUA063008, NCUA006009 and NCUA064001 groups. Meanwhile, high concentrations of Enterobacteriaceae, Bacillus, yeast and mold were detected in NF group. Previous studies have reported that fermented liquid feeds typically contain more than 9 log CFU/g LAB and high concentrations of lactic acid (> 13.5 mg/mL), can inhibit the proliferation of spoilage microorganisms such as Coliform and salmonella (Lyberg et al., 2007). Table S3 shows the pH value, ash, DM, CP, TCA-SP, FAA, SP and TI contents of fermented CSMM of 10 LAB strains. The pH value of raw materials was 6.87, and after LAB fermentation, the pH value decreased significantly. The content of DM was decreased and the CP and ASH contents were increased after LAB fermentation. The NCUA065016 group exhibited the highest CP content (29%), while the CP contents of groups NCUA063008, NCUA001005, NCUA001014, NCUA064001, NCUA064006 and NCUA011001 were all exceed 28%. After fermentation by lactic acid bacteria, the contents of TCA-SP and small peptides in fermented CSMM were not increased greatly. The solution rate of trypsin inhibitor (TI) was 76.55–95.76%, and all strains had good degradation effect on TI. The organic acids contents of CSMM fermented with LAB strains were shown in Table S4. Lactic acid was the main organic acid in fermented CSMM, followed by LAB. The concentration of lactic acid in NCUA065016 group was the highest (65.76 mg/g), followed by NCUA001005, NCUA011001 and NCUA001014. They were 51.36 mg/g, 32.16 mg/g and 31.79 mg/g, respectively. The acetic acid content of fermented CSMM was 3.06–7.37 mg/g, the highest was NCUA063006, the lowest was NCUA065016. Based on the microbial content, physicochemical property and organic acid content of fermented CSMM, three strains NCUA001005, NCUA065016 and NCUA011001 were selected as anaerobic fermentation strains for two-stage solid fermentation.

Evaluation of CSMM after two-stage SSF with different combinations of Bacillus and LAB

The aerobic fermentation of CSMM by inoculating Bacillus can increase the contents of TCA-SP and small peptide of raw materials, but there is a risk of infection with pathogenic bacteria. Although the LAB single bacteria fermentation of CSMM can reduce the pH value of raw materials and increase the content of lactic acid in raw materials, it could not increase the contents of TCA-SP and small peptide. Therefore, the combination of aerobic fermentation of Bacillus and anaerobic fermentation of lactic acid bacteria may be able to increase the content of soluble protein and small peptide in raw materials, as well as the pH value and lactic acid content of raw materials, so as to inhibit the growth of potential pathogens. Therefore, construction of two-stage solid-state fermentation composite strain was carried out. The viable count, physicochemical properties and organic acid content of fermented CSMM with different combinations were exhibited in Tables S5, S6, S7. The microbial content was shown in Table S5. The concentrations of Enterobacteriaceae in the groups BP + LC, BP + LP + LC, and BP + LA + LP + LC were 3.35, 5.27, and 6.32 log CFU/g, respectively, indicating a higher risk of infection with pathogenic bacteria in these three combinations. The LAB and Bacillus contents of all combinations were more than 9 log CFU/g, with the highest LAB content in the combination BS + LP, and the highest Bacillus concentration in the combination BS + LC, reaching 9.55 log CFU/g. Yeast and mold concentrations were not detected in the combination of BS + LC and BS + LP, but only in the BS + LA, BP + LA, BP + LA + LP, and BP + LA + LC groups, with lower concentrations. The physical and chemical properties are shown in Table S6. The two stages of solid-state fermentation with different combinations can reduce the pH value of raw materials and increase the content of CP, FAA, TCA-SP and small peptides. Except for the combinations BP + LC, BP + LP, BS + LA + LP + LC, BP + LA + LP + LC, the pH value of the other combinations was less than 4.2, and the dry matter content of each combination was not significantly different. The crude protein content of CSMM before fermentation was 26.3%, and the crude protein content of all groups was significantly increased. The acid-soluble protein of different combinations of fermented CSMM was significantly increased, among which the highest combination was BS + LA + LC (14.7%), followed by BS + LA (14.23%), but the difference between the two groups was not significant. The content of free amino acids in combinations BS + LA, BP + LA, BS + LA + LC, BP + LA + LC, BS + LA + LP + LC were all greater than 40 mg/g, and the combination with the highest content of small peptides was BS + LA + LC (10.25%). The content of small peptide in combination BS + LP, BS + LA, BP + LC, BP + LA + LC, BP + LA + LP + LC was more than 9%. For in vitro protein digestibility (Fig. S2), the highest combination was BS + LA, followed by BS + LA + LC. The organic acid content of CSMM fermented by different strains combinations was shown in Table S7. Lactic acid is the main organic acid of CSMM in two-stage solid-state fermentation. The lactic acid content of BS + LA (42.78 mg/g) is the highest, followed by BP + LA + LC and BS + LA + LC. The lactic acid content of the combination BS + LP, BP + LA, BS + LP + LC, BS + LA + LC, BP + LA + LC, BS + LA + LP + LC and BP + LA + LP + LC was greater than 30 mg/g, and there was no significant difference. Based on the above results, the results showed that the strains combination of Bacillus subtilis NCUBSL003 (BS) and Lactobacillus acidophilus NCUA065016 (LA) were selected due to their superior fermentation ability and the results.

Optimization of the two-stage fermentation of CSMM

Table S8 shows the effects of different proportions of Bacillus subtilis NCUBSL003 and Lactobacillus acidophilus NCUA065016 on CSMM fermentation. There was no significant difference in CP content among the three groups of BS:LA compatibility, TCA-SP content in the 2:1 group was greater than that in the other two groups. The FAA content in the 1:1 and 2:1 groups exhibited no significantly different, but greater than that in the 1:2 group. The lactic acid content of 1:1 group was significantly higher than that of the other two groups, and there was no significant difference in acetic acid content among the three groups. Based on the above results, BS:LA = 1:1 was the best compatibility. The effects of different inoculations on fermented CSMM are shown in Table S9. Inoculations greatly affect pH value, acid-soluble protein and lactic acid content. With the increase of inoculations, pH value gradually decreases, while the contents of acid-soluble protein and lactic acid gradually increase. There is no significant difference between 10 and 12%. The content of free amino acids was the highest when the inoculation amount was 8%. As shown in Table S10, with the increase of the ratio of material to water, the pH value gradually decreases. The CP content in 1:0.8 group was higher than 1:0.4 and 1:0.6 group, but with no significant difference between 1:1 and 1:1.2. The contents of TCA-SP, FAA and lactic acid in 1:1 group were higher than those of other groups, but there was no significant difference with those of 1:0.8 and 1:1.2 groups. Therefore, 1:0.8 group was chosen as the best ratio of material to water in this study. The effect of fermentation time on the nutritional quality of CSMM is shown in Table S11. With the increase of time (48–144 h), the pH value of fermented CSMM was lower, but the crude protein content was stable. At the same time, TCA-SP showed an increasing trend, while FAA showed an increasing trend and then a decreasing trend. The lactic acid content increased from 16.58 ± 2.04 to 41.01 ± 4.12 mg/g when fermentation reached 48–72 h, and decreased after continuous fermentation. Therefore, 72 h was selected as the appropriate fermentation time.

Based on the single factor experiment (Tables S9, S10, S11), Box–Behnken Design (BBD) (Tables S12, S13) was performed to optimize the fermentation conditions and the experimental design was showed in Tables S12, S13, Figs. S3 and S4. Lactic acid was used as an indicator of the final quality and TCA-SP as an indicator of nutrition. The content of lactic acid (Y1) and TCA-SP (Y2) were used as response values and their second order polynomial equations were found: Y1 = − 365.11 + 83.39A + 198.63B + 0.75C − 3.25AB + 0.05AC + 0.67BC − 5.9A2 − 130.21B2 − 0.01C2, Y2 = − 131.56 + 30.35A + 66.22B + 0.17C − 0.25AB + 0.01AC − 0.07BC − 2.17A2 − 33.28B2 − 0.001C2. The optimized fermentation conditions were as follows: inoculum 7.14%, solid–liquid ratio of 1:0.88 and fermentation time of 74.30 h. The response values of Y1 and Y2 were 44.98 mg/g and 13.11%. The optimized fermentation conditions were verified by the experimental model three times, and the lactic acid content and TCA-SP content were 46.82 mg/g and 11.9%, respectively, which were consistent with the model prediction by 96.07% and 90.77%.

Changes in chemical composition during fermentation

The dynamic changes of chemical composition during fermentation were showed in Table 1. During the aerobic stage (0–24 h), the pH value increased from 6.74 to 8.52. During the anaerobic phase (24–96 h), the pH value sharply dropped to 3.83. The pH value below 4.5 is considered an important parameter for the quality of the fermentation (Missotten et al., 2009). The pH value of the fermented CSMM was 4.22, meaning good preservation and effect. Notably, the levels of glycinin, β-conglycinin and TI were decreased by 77.72%, 69.02%, and 87.28% during the fermentation process, respectively. Glycinin and β-conglycinin were the main proteins in SBM that caused the allergy. In our study, the content of glycinin and β-conglycinin were significantly decreased in the aerobic fermentation stage with BS, while no significant differences were found in the anaerobic fermentation stage inoculated with LA. This was consistent with a previous study that β-conglycinin and glycinin were decreased by 86.94% and 78.28% in the aerobic fermentation stage, respectively (Shi et al., 2017). TI, as an important antinutrient factor affecting the digestibility of the CSMM, showed the same trend as glycinin and β-conglycinin. The results suggested that the proteins were probably hydrolyzed by enzymes produced by Bacillus subtilis, which was reported to secrete various enzymes such as metalloproteinases, serine endopeptidases, and aminopeptidases (Hu et al., 2008). This could be verified by levels of TCA-SP, SP and FAA increased 6.16-fold, 5.80-fold and 7.09-fold, respectively. Furthermore, the contents of CP and ash showed an increasing trend during fermentation and the decrease in DM might explain the increase in CP and ash (Shi et al., 2015, 2017). In addition, the content of ADF did not have a significant change, but the content of NDF changed significantly during the aerobic stage. This may be related to enzymes produced by microorganisms, such as fibrolytic enzymes and non-starch polysaccharide-degrading enzymes (Shi et al., 2017). Therefore, the fermented CSMM have a higher nutrient digestibility and safety.

Table 1 Changes of physicochemical properties of CSMM in two-stage solid state fermentation with BS and LA

Changes in microbial population and organic acid during fermentation

The microbial amounts during fermentation were shown in Fig. 1(A). The viable number of Bacillus was 7.21 log CFU/mL after inoculation and gradually increased to 9.22 log CFU/mL after 24 h of fermentation and remained stable throughout the process. In the aerobic stage, the microbial content of LAB, Enterobacteriaceae, yeast, and mold were increased to 8.45 log CFU/mL, 7.67 log CFU/mL and 5.23 log CFU/mL, which might be due to the utilization of small peptides produced by Bacillus. In the anaerobic stage, the density of Enterobacteriaceae, yeast, and mold decreased to2.56 log CFU/mL and 2.84 log CFU/mL due to the acid environment that can inhibit the growth of the pathogenic bacteria (Riebroy et al., 2004).

Fig. 1
figure 1

Dynamic changes of content on (A) microbial content and (B) organic acid during fermentation process of CSMM

Citric, lactic, acetic, tartaric, malic, succinic, and oxalic acids were the most abundant organic acids during fermentation [Fig. 1(B)]. The main organic acid in the unfermented CSMM was citric acid (12.32 mg/g), and its concentration decreased to 1.13 mg/g after aerobic fermentation. The decrease in citric acid suggested that Bacillus could use it as a carbon source. Nevertheless, fungi such as yeast and mold could also make use of citric acid as a carbon resource and play a competitive role (Li et al., 2022). In order to avoid the competitive effect of yeast and mold, the raw material should be strictly controlled. Lactic acid, which contributed to the decreased pH, was the dominant metabolite during the whole fermentation process. Lactic acid was not detected in the raw material, and the lactic acid concentration was range from 0.93 mg/g (24 h) to 44.85 mg/g (72 h). Moreover, a high lactic acid content in the fermented CSMM could cause a high concentration of lactic acid in the stomach, thereby inhibiting the proliferation of pathogens in the intestinal tract of weaned animal and boosting intake of animals.

The dynamic changes of microbial community during fermentation

Goods coverage of all samples was more than 99%, indicating most microorganisms were detected (Table S14). There were total of 2,181,380 reads of samples in the fermentation process, which ranged from 408 to 430. To investigate the dynamic change in the fermentation process, principal coordinate analysis (PCoA) was performed (Fig. 2). PCoA1 and PCoA2 represented 42.57% and 28.9% of variance and collectively accounted for 71.47% of the total variability. The samples of the CSMM in the different stages were clearly classified into four groups. Inoculation of BS and LA could change the β-diversity of the CSMM distinctly compared to the raw material.

Fig. 2
figure 2

Beta-diversity in microbial communities calculated through principal coordinate analysis (PCoA)

The microbial community composition of the CSMM was investigated at the phylum and genus levels (Fig. 3). At the phylum level, in the raw material, the relative abundance of Cyanobacteria (46.43%) was highest, followed by Proteobacteria (35.98%), Firmicutes (8.74%), unidentified Bacteria (2.70%), Actinobacteria (2.42%), Acidobacteriota (1%), Myxococcota (0.58%) and others (2.11%). In the 12 h after inoculation with BS, Firmicutes (98.57%) became the dominant bacterial community. The relative abundances of Cyanobacteria and Proteobacteria were raring from 0.19 to 0.78% and others were lower than 0.10%. In the 48 h after inoculation with LA, the relative abundance of Firmicutes decreased because of the growth of pathogenic bacteria. Until the end of fermentation, Firmicutes accounted for 97.63% of all bacteria.

Fig. 3
figure 3

Composition of microbial community during fermentation process at phylum (A) and genus (B)

In the aerobic stage (0–24 h), after 12 h of inoculation of BS in the raw material, Bacillus (97.95%) became the dominant genus [Fig. 3(B)]. and it was in accordance with natural fermented SBM (Wang et al., 2021). The rapid proliferation of Bacillus was due to its powerful adaptability to the environment (Cutting, 2011). Furthermore, the antibacterial properties of Bacillus could also help Bacillus proliferate. Bacillus inhibits enteric pathogens mainly by producing cell wall-destroying enzymes (such as chitinase, glucanase, and protease), lipopeptides, biosurfactants, and bacteriocins. In the 24 h, Bacillus dropped to 86.46%, followed by Ralstonia (3.56%), Bacteroides (3.43%) and Faecalibacterium (1.52%). The amount of Enterobacteriaceae was reaching over 7.21 log CFU/g due to the rapid increase of nutrients in the mixture at the end of the aerobic stage (12–24 h) [Fig. 1(A)], and that was in accordance with the increase in tendency of Enterococcus, Ralstonia, and Faecalibacterium. Therefore, although the inoculation Bacillus could reduce allergic protein content and TI, it was difficult to effectively inhibit the pathogen in the raw materials.

In the anaerobic stage (24–96 h), Lactobacillus, which range from 0.51% (24 h) to 30.34% (72 h), became the dominant genus after Bacillus because of the inoculation of LA [Fig. 3(B)]. Previous research has reported that Lactobacillus acidophilus supplementation could decrease the level of E. coli, blood urea nitrogen, and fecal noxious gas emissions for weaned animals (Lan et al., 2016). During the early anaerobic stage (24–48 h), facultative anaerobes such as Cronobacter, Haemophilus, Enterococcus, Neisseria, Enterobacter, Gardnerella, Prevotella, and streptococcus, multiplied rapidly due to the decrease of the oxygen content in the fermentation environment, in the meantime, the average OTUs raised from 190 to 338. Enterococcus may cause a variety of human and animal infections, posing a serious threat to food safety and public health security (Beshiru et al., 2017). Cronobacter, which causes meningitis and septicemia as a pathogen in infants, could also result in diarrhea and gastrointestinal symptoms in adults (Ling et al., 2022). In addition, Haemophilus parasuis of Haemophilus is an important factor of morbidity and mortality in pigs, and the main prevention was bacterins (Álvarez-Estrada et al., 2018). In the middle stage of anaerobic fermentation (72 h), the relative abundance of pathogens and the diversity of microbes decreased distinctively with the increase of Lactobacillus. LA, screened in our previous study, had a good ability of resistance to gastroenteric fluid and antibacterial activity. In addition, an acidic environment can also inhibit the growth of pathogenic microorganisms.

Correlation between microbial community and physicochemical properties

The correlation between physicochemical properties and the microbial community was assessed at the aerobic and anaerobic stages using O2PLS. Among 30 genera, 15 genera were selected (VIP > 1) as significant genera in the aerobic stage. During aerobic fermentation [Fig. 4(A)], Bacillus was positively correlated with pH, CP, TCA-SP, FFA, and SP, and showed a strong negative relationship with TI, glycinin, β-conglycinin, and NDF, indicating that the inoculation of Bacillus subtilis can improve the bioavailability of the CSMM. The other genera, such as Streptococcus, Haemophilus, and Paenibacillus, likewise had similar correlations. It was indicated that indigenous bacteria used nutrients to proliferate and actively participate in the degradation of CSMM allergen. During the anaerobic fermentation stage [Fig. 4(B)], 9 genera were selected (VIP > 1) as significant genera. Lactobacillus showed significant positive correlations with SP, CP, and TCA-SP, as well as negative correlations with NDF and pH, meaning Lactobacillus may also had the ability of hydrolysis. In the other hand, Agathobactor Paenibacillus, Enterococcus, Ralstonia, Cronobacter, Streptococcus and others showed the strong correlation with pH, meaning they were all inhibited in the acidic environment. Bacillus and Tumebacillus still had the function of degrading glycinin, β-conglycinin and TI during the entire fermentation process.

Fig. 4
figure 4

Correlation analysis between microbial community and chemical properties: (A) the aerobic stage; (B) the anaerobic stage; CP crude protein; TCA-SP acid soluble protein; FAA free amino acids; SP small peptide content; Gly glycinin; Congly β-conglycinin; NDF neutral detergent fiber; LA lactic acid content

Prediction of metabolic pathways during the CSMM fermentation

PICRUSt was widely used to predict the function of microbial metabolic pathways. We detected seven classes in level-1 [Fig. 5(A)], namely, metabolism, environmental information processing, genetic information processing, cellular processes, human disease, metabolism, and organismal systems. The proportion of metabolism was the largest during the fermentation of the CSMM, meaning the metabolism was the most important function of bacterial community. In level-2, there were significant difference between aerobic and anaerobic stage [Fig. 5(B)]. Eleven pathways presented a positive correlation with the aerobic stage (12–24 h), such as metabolism of other amino acids, enzyme families, amino acid metabolism, signaling molecules and interaction, xenobiotics biodegradation and metabolism, lipid metabolism, endocrine system, digestive system, environmental adaptation, transport and catabolism, and metabolism of terpenoids and polyketides. Enzyme families and amino acid metabolism, which are related to producing small amino acids (Guan et al., 2020). Five pathways were positively related to the anaerobic stage, including glycan biosynthesis and metabolism, genetic information processing, metabolism, infectious disease, membrane transport and poorly characterized. As showed in Fig. 5(C), Arginine and proline metabolism, pyruvate metabolism, general function prediction, propanoate metabolism, and peptidases and sporulation were found to be more abundant in the aerobic stage, while in the anaerobic fermentation, glycolysis/gluconeogenesis, ABC transporters, phosphotransferase system, amino sugar and nucleotide sugar metabolism, transporters, secretion system, purine metabolism, ribosome biogenesis, chaperones and folding catalysts, and bacterial secretion system and other gene functions were enriched.

Fig. 5
figure 5

The predictive functions of microbial community during different fermentation time. (A) Level 1; (B) Level 2; (C) Level 3

In this study, the dynamic changes of physicochemical properties and the microbial community during two-stage solid fermentation were investigated and further explored the correlation between the aerobic and anaerobic stages. Results showed that fermentation with Bacillus subtilis NCUBSL003 followed by Lactobacillus acidophilus NCUA065016 could reduce the content of glycinin, β-conglycinin, TI, and NDF in the CSMM, as well as increase the levels of WSP, SP, and FAA. Dynamic change of the microbial community showed that the microbial community was largely influenced due to the inoculation and the pathogens were significantly inhibited by Lactobacillus acidophilus NCUA065016. The correlation between microbial community and physicochemical properties showed that microbes could influence the quality effectively. In addition, PICRUSt results verified the different functions of fermentation processes. All in all, the technology of two-stage solid fermentation could improve the safety and feeding value of the CSMM. Furthermore, studies were required to verify the hypoallergenic and digestibility of the fermented CSMM based on animal experiments.