In order to solve the problems of the limited devices resources in the edge computing environment and the negligence of computing load as well as the redundant trust path in the existing trust models, a trust evaluation optimization model of the edge computing was proposed based on the graph theory. First, an architecture of trust model based on edge computing was built, of which the complex and huge trust relationship between edge devices was abstracted into a directed weighted graph, and the trust relationship between devices was defined and explained. Then, an adaptive aggregation method based on the information entropy theory was used to aggregate the trust value, which could correct the difference between multi-source trust. Secondly, the constraints of trust threshold, path length restriction and sliding window were added. With these multiple constraints, the nodes and trust edges that obviously do not meet the trust requirements were filtered in advance, which reduces unnecessary computing consumption. Finally, an improved depth first search algorithm was used to filter redundant trust edges, which could avoid loop and node detour problems in the trust path search process. The recursive function Combine was further used to aggregate the feedback trust value. The MATLAB simulation software was used to determine the experiment parameters, and verified the model’s ability of distinguishing malicious nodes from normal nodes. The proposed model was compared with PSM model, RFSN model and random selection model in interaction success rate, time cost and energy cost. The experimental results show that compared with other models, the proposed model could achieve stable state quickly in network environments with different honesty degrees, and the time and energy costs are lower than that of other models. The proposed model can reduce the resource overhead of edge devices and improve the network life cycle while ensuring the effectiveness.