Among all cancers occurring in the head and neck region, oral squamous cell carcinoma (OSCC) is the most common oral malignant tumours characterized by its aggressiveness and metastasis. The development of transcriptomics technology has greatly facilitated the diagnosis of various cancers. However, identifying genetic biomarkers is limited by data from a single batch of OSCC samples, and integrating analysis across different platforms remains a great challenge. In this study, we integrated five OSCC transcriptome datasets using an innovative strategy capable of mitigating batch effect, and extracting information from different datasets based on changes in the relative expression of gene pairs. By leveraging a machine learning method, we developed a prediction model including 27 differential gene pairs (DGPs) to discriminate OSCC from control samples, achieving an area under the receiver operating characteristic curve (AUC) of 0.8987 for the training set. Moreover, the model demonstrated commendable performance in four external validation sets, with AUCs of 0.9926, 0.9688, 0.8052 and 0.8565, respectively. Subsequently, a prognostic model was constructed based on six key gene pairs through univariate and multivariate Cox regression analysis. The AUCs of the model at 1-year and 3-year overall survival time prediction were 0.717 and 0.779 in an independent dataset. Our result demonstrates the effectiveness of this new method of integrating data and identifying DGPs. Using DGPs can significantly improve the performance of both diagnostic and prognostic models.