Objective:Near-infrared diffuse reflectance spectroscopy was used for quantitative analysis of sophora flavescens extract to determine the total amount of matrine and oxymatrine and to guide the technology study on preparation of sophora flavescens extracts.Methods:The laboratory-made samples and samples purchased on the market,in OPUS software environment,were used to establish a quantitative models with partial least squares method,and new samples were used as validation to set for validation.Results:The results of model predictions and laboratory measurement results are basically the same.Conclusion:The established model can provide a more accurate forecast of the unknown sophora flavescens extract about the total amount of matrine and oxymatrine,easily guide sophora extraction process.