The invention discloses an anomaly detection method based on a heterogeneous information network element learning architecture. The anomaly detection method comprises the following steps: sampling sub-graphs from an original graph; sampling a plurality of support graph instances in the support set; iterating the sampling graph, generating structure node embedding in each sub-graph, and inputting the structure node embedding into a heterogeneous graph neural network module for training and updating; task embedding is obtained according to node embedding; calculating a support loss function and updating parameters; sampling a plurality of query graph instances, and learning node embedding and querying a loss function according to the same training process as the support set; task weights are calculated, anomaly detection is carried out, and anomaly labeling is carried out on corresponding products or nodes of the original graph. According to the invention, migration can be carried out among different heterogeneous information networks; a structure module, a heterogeneous module and a comparison module are adopted to capture structure information, heterogeneous features and unmarked information of sub-graphs respectively, and the technology is obviously superior to the latest technology on multiple heterogeneous information networks.
Abnormity detection method based on heterogeneous information network element learning architecture