In the era of digital economy, smart contract as the core technology of blockchain application is facing the bottleneck of execution efficiency. This study proposes an optimization model based on integrated learning for the smart contract execution efficiency optimization problem. The study compares the performance of single algorithms such as logistic regression, decision tree, SVM and integrated learning methods such as GBDT and Stacking in the task of smart contract execution efficiency optimization. The experiment constructs a weighted Stacking integrated learning model, which makes full use of the advantages of each classifier by assigning different weights to the primary learners. The experimental results show that the weighted Stacking model outperforms the single algorithm model in all evaluation indexes, with an accuracy of 83.15%, an F1 value of 0.8496, which is 3.79% higher than that of the best-performing single model CatBoost, and an AUC value of 0.9178, which is 0.97% higher than that of CatBoost. Confusion matrix analysis shows that the model successfully predicts 5445 executive users and 400 nonexecutive users with a low misclassification rate. The study proves that the smart contract execution efficiency optimization strategy based on integrated learning can effectively improve contract execution performance, reduce resource consumption, significantly improve user experience, and provide efficient and stable technical support for blockchain applications.