The present invention discloses a secure hierarchical
federated learning method based on isolation forest
anomaly detection, and relates to the technical field of electronic
digital data processing. The method comprises the following steps: establishing a GRU self-
attention model on the
edge server side, extracting the temporal feature state of the global parameter through the GRU self-
attention model, using the isolation forest
algorithm to build a tree of the temporal feature state of the aggregated GRU self-
attention model update parameter, comparing the
anomaly detection strength evaluation coefficient with the
anomaly detection strength threshold after the GRU self-attention
model parameter is aggregated, and taking measures to adaptively adjust the anomaly detection strength or issue an alarm according to the comparison result. The present invention generates a personalized anomaly detection strength threshold decision for each
server, fully considers the difference in the degree of
attack suffered by different servers, and reasonably allocates the detection strength, thereby achieving the effect of improving the security of the
server and solving the problem of insufficient
server security in the prior art.