The invention discloses a labeling method of any code snippets and a retrieval
system thereof, and relates to the related field of
machine learning, the method comprises the following steps: establishing a
code snippet database, activating a multi-dimensional feature labeling model, executing
code snippet labeling, and establishing a first labeling result; calling a self-adaptive
annotation network, performing context
backtracking analysis on the code snippets in the
database by utilizing the self-adaptive
annotation network, and establishing a second
annotation result; performing static and dynamic fusion analysis on the
database, establishing a joint function similarity, and establishing a third labeling result; code version change labeling is executed, and a fourth labeling result is established; and performing code labeling retrieval management according to the four labeling results. The technical problem that the
management efficiency and the retrieval precision of the code snippets are low due to
high complexity of the code snippets in multi-dimensional feature labeling is solved, and the technical effect that the labeling accuracy and the retrieval efficiency of the code snippets are improved in the mode that multi-dimensional labeling and self-adaptive
backtracking analysis are combined is achieved.