A medical code
allocation method based on hierarchical association and diversity enhancement comprises the following steps: S1, data preprocessing and graph construction: based on a tree hierarchical classification architecture of ICD codes, adopting a hierarchical
graph model to perform visual representation on the tree hierarchical classification architecture, and constructing a co-occurrence matrix of the
clinical record text and the ICD codes for the
clinical record text; s2, applying a Graph-BERT graph neural
network structure to perform graph structure conversion on a
tree structure of an ICD code
system, and
learning based on an
encoder structure of a graph
transformer to obtain embedded representation of ICD codes; s3, performing word segmentation
processing on a clinical text, inputting the processed clinical text into a bioBERT model to obtain a
feature vector of the clinical text, and unifying semantic features of clinical records, hierarchical features of ICD codes and related association information between the semantic features and the hierarchical features through a multi-
modal fusion mode; s4, after the final
feature vector of the
clinical record text is obtained, correlation enhancement prediction is performed by using a CorNet network, so that a related probability matrix is generated, a binary
cross entropy loss function is expanded, the binary
cross entropy loss function, hierarchical diversity loss and semantic diversity loss jointly form a diversified
loss function, and the diversified loss function and a classic model are subjected to comparative analysis, so that the final
feature vector of the clinical
record text is obtained. Therefore, the accuracy and effectiveness of the method are verified.