The application provides a detection formula setting and optimization method and device,
electronic equipment and a storage medium. The method comprises the following steps: labeling a first data sample to obtain a second data sample; wherein the first data sample comprises a plurality of detection result data; the second data sample comprises the detection result data and a
label corresponding to each piece of data; and data feature distribution information of a detection object is obtained according to the second data sample; a preset
outlier statistical analysis strategy is used to perform
outlier statistical analysis on the data feature distribution information, to obtain defect distribution boundary information and determine a detection formula; and finally, the values of the detection parameters of the detection formula are determined or optimized through reverse deduction according to the defect distribution boundary information and the preset
outlier statistical analysis strategy. The application considers the
coupling relationship between parameters, can avoid repeated adjustment of parameters, can infer a complete set of detection parameters at the same time, realizes rapid modeling of the detection formula, and can save manpower and time costs.