The invention provides an AI-based
code review opinion automatic classification and priority
ranking method. The method comprises the steps of collecting
code review historical data; data preprocessing: preprocessing the collected data, and constructing a training
data set; an AI model is selected and trained; inputting a new review opinion; automatic classification: the model automatically classifies the review suggestions, and classification categories include but are not limited to code errors, code style problems, performance optimization suggestions and potential safety
hazard prompts; performing priority
ranking: performing priority
ranking on the review opinions based on a preset priority rule and the
classification result; and generating result output. According to the
code review method and device, automatic classification and priority ranking of the code review opinions are achieved through the AI model, a traditional manual
processing mode is replaced, the problems that manual classification is low in efficiency and priority ranking is high in subjectivity are effectively solved, and the
overall efficiency and result accuracy of code review are improved.