As an essential unconventional oil and gas resource, shale oil is of great significance to energy replacement and socio-economic development. Total organic carbon (TOC) and pyrolyzed hydrocarbon (S
1), as key parameters for hydrocarbon reservoir evaluation, are important guides for practical exploration. Usually, the high precision determination of TOC and S
1 requires sample collection and laboratory analysis, but is often compromised due to the cost and the limitation of coring continuity. With the advent of the digital age, increasingly intelligent methods are being employed in this field, such as ΔlogR, support vector regression (SVR), and backpropagation neural network (BPNN). However, ΔlogR has low performance, SVR does wrong in feature extraction, and BPNN is prone to local optimum. The coefficients of determination (R
2) for TOC prediction using the three methods registered values of 0.25, 0.69, and 0.74. In contrast, the R values for S
1 prediction were 0.23, 0.54, and 0.58. Thus, a low-cost, intelligent, and high-precision method to predict TOC and S
1 is needed. This paper proposes a new model for predicting TOC and S1 in shale reservoirs based on an improved Deep learning network model (Encoder-ECA) based on the Transformer. With nearly 3,000 rock samples selected from the Jurassic Da'anzhai member of the Sichuan Basin, China, and sedimentary facies variations in the study area, our results show that the Encoder-ECA model achieves an R
2 of 0.86 for TOC content prediction and an R
2 of 0.82 for S
1 content prediction. In addition, the Encoder-ECA model was successfully applied to the recently implemented exploratory well evaluations in the study area, and the prediction results were used to optimize the sweet spot section, with a combined daily production of 22.4 mcf of oil and 33,600 mcf of gas. Simultaneously, data from different basins will be utilized to validate the applicability range of the model. This research demonstrates the great potential of deep learning technology in unconventional resource evaluation. It confirms the application of the Encoder-ECA model in the exploration practice of lacustrine facies shale oil and gas.