This invention belongs to the interdisciplinary fields of
edge computing, privacy and security, and
machine learning. It discloses a trust management method for
fog nodes in
edge computing. First, it calculates the
fog node's trust value based on subjective trust value, indirect trust value, and capability trust value. The Bellman equation is used to solve for the shortest trust path, resulting in an initial dataset containing the three trust attributes of the
fog node. This initial dataset is divided into a
training set and a
test set. The dataset is preprocessed by blurring the distribution range of the trust values. The trust attribute with the largest
information gain in the
training set is calculated as the splitting attribute. The
training set is then divided into several subsets. The partitioning terminates if all fog nodes in a subset belong to the same category or if all candidate attributes of a fog node have been used. After generating a
decision tree, a
loss function is used to prune the
decision tree. This invention demonstrates reliability and effectiveness in detecting malicious nodes and internal attacks.