The invention discloses a cross-document type retrieval method and
system based on differentiated nested coding. The method comprises the following six steps: document preprocessing, document type identification,
differential coding, index construction and optimization, online retrieval and result fusion. The method comprises the steps of firstly, performing standardized preprocessing on a document, and extracting structured information; secondly, a BERT classifier is used for analyzing document features, and document types are recognized; then, selecting a corresponding
encoder to generate an original encoding vector according to the document type; thirdly, constructing a differentiated nested coding index, and optimizing the differentiated nested coding index; in the online retrieval stage, user query is preprocessed, related document types are predicted, and approximate nearest neighbor retrieval is executed. And finally, sorting the retrieval results through a stepped weight fusion strategy, and returning a Top-100
retrieval result. According to the method, efficient retrieval of different types of documents is realized through
differential coding and index optimization, and the method has remarkable practical value and application prospect.