隨著電子商務的蓬勃發展,使用Cookies和數位指紋等追蹤技術來收集大量的用戶行為和商品數據已成為常態。目前,主要有兩種技術幫助用戶迅速找到符合他們需求的商品和資訊:資訊檢索系統和推薦系統。然而,傳統的資訊檢索系統僅基於關鍵字搜索提供結果,缺少個性化推薦能力。推薦系統雖然可依據消費行為提供個性化建議,但常忽略用戶當前的搜索意圖,限制了推薦的即時性和準確性。 為了解決這些問題,我們提出了一個新的架構CondBERTRec,結合了資訊檢索的即時性和推薦系統的個性化特徵。CondBERTRec通過分析用戶的消費行為和搜索紀錄,綜合考慮長短期偏好和即時需求來生成精確的個性化推薦。此架構的核心在於它能夠同時處理用戶的即時搜索意圖和長短期消費模式,克服傳統系統的局限,提供更精確、更符合用戶當前需求的推薦,從而提升用戶滿意度和體驗。 在本研究中,我們使用兩個真實世界的資料進行實驗,結果顯示我們的方法在處理中到高品質的關鍵字搜索記錄時,性能優於其他現有的序列推薦方法。相對於傳統的資訊檢索方法和序列模型,CondBERTRec表現出更高的穩定性和適應性,特別是在處理關鍵字品質一般的用戶搜索記錄情境時,更顯得合適。;As e-commerce evolves, the integration of tracking technologies like cookies and digital fingerprints is crucial for collecting extensive user behavior and product data. Currently, two main technologies that help users quickly find products and information that meet their needs: information retrieval systems and recommendation systems. However, traditional information retrieval systems provide results based solely on keyword searches, lacking personalized recommendation capabilities. Although recommendation systems can provide personalized suggestions based on consumer behavior, they often overlook the user′s current search intent, limiting the immediacy and accuracy of the recommendations. To bridge these gaps, we introduce CondBERTRec, a novel framework that synergizes the immediacy of information retrieval with the personalization of recommendation systems. This framework uniquely analyzes both the user′s long-term and short-term consumption behaviors and immediate search needs, offering more precise and timely recommendations. In this study, we conducted experiments with two real-world datasets, and the results show that our method outperforms other existing sequence recommendation methods when dealing with medium to high-quality keyword search records. Compared to traditional information retrieval methods and sequence models, CondBERTRec exhibits higher stability and adaptability, especially in scenarios involving user search records of average keyword quality. Keyword