The judgments of some hot cases that exceeded public expectations seem to confirm this. Although the legal certainty is questioned, the judgment remains predictable. The predictability of judgments is a way to enhance judicial authority and maintain judicial credibility. It is also a way to achieve overlapping consensus between the judiciary and the public, provide stable value guidance and behavioral expectations for the public, and promote the generation and development of public rational trust. To enhance public legal trust by improving the predictability of judgments, it is necessary to increase the burden of reasoning for judicial judgments, avoid randomness and contingency, and ensure the adequate provision and substantial disclosure of previous judgment information, so that judgment prediction in the era of big data can truly become possible. The research is to use the optimized particle swarm algorithm as the underlying model to carry out joint modeling and prediction research on the analysis and application of problems in the prediction of legal judgments. According to experimental calculations, the optimized particle swarm algorithm can significantly improve the accuracy and universality of legal judgment prediction. After optimization, the convergence speed is increased by about 5%, and the value of the acceleration factor is more significant.