In urban settings, the highly complex communication environment leads to a frequent occurrence blockage in the link between ground users and unmanned aerial vehicle (UAV), which renders the quality of communication poor. To address this issue, an UAV edge computing system based on reconfigurable intelligent surface (RIS) is proposed in this paper. The goal of this system is to minimize energy consumption by considering various factors such as user transmission power, intelligent reflector phase shift matrix, UAV trajectory, computational resource allocation and the stability of task queues. By applying the Lyapunov optimization theory, the original non-convex problem is decomposed into a series of optimization-related sub-problems. Additionally, it is possible to obtain the closed solution to the original problem through Lagrange dual, Karush-Kuhn-Tucker (KKT) conditions, and mixed differential genetic evolution algorithm (MDGEA). As indicated by the simulation results, the proposed RIS-assisted UAV edge computing system is more effective in reducing energy consumption for the system than traditional UAV mobile edge computing on the basis of maintaining queue stability.