Abstract
With the rise of e-commerce network search systems, product search efficiency and user satisfaction have become increasingly important. To address the low accuracy of consumer sentiment analysis in existing product recommendation scenarios, a webpage localization and sentiment analysis recommendation model is proposed that combines an improved web search algorithm with a bidirectional long short-term memory network and an attention mechanism. An e-commerce network search system is then designed around this model. Experimental results show that the sentiment analysis recommendation model achieves an accuracy of 98.88% and an average mean squared error of 1.027, outperforming all comparison models. The average root-mean-square error is 0.476, recall is 98.92%, the F1 score is 97.78%, and the recognition accuracy for each of the four emotional tendencies exceeds 95%. In addition, the integrated system delivers an average search time of 87.6 ms, a central processing unit occupancy of 44.68%, a missed-search rate of 1.42%, and a user satisfaction of 99.34%, all superior to the comparison systems. The system offers a ready-to-deploy solution for sentiment-aware product search and provides a theoretical basis for future research in e-commerce search systems.
Keywords
Introduction
The rapid growth of e-commerce has made cross-platform price comparison essential for consumers, yet existing search systems suffer from low accuracy in sentiment analysis for product recommendations.1–2 Many experts have conducted relevant research, but the results are not ideal. N. Modi and J. Singh used eye-tracking technology to explore the impact of e-commerce graphic layout on consumer attention, providing a basis for understanding user browsing behavior, but did not involve improving search results or page positioning accuracy. 3 In response to the problem of low efficiency in detecting logical vulnerabilities in the dialogue and communication system of e-commerce websites, W. Yu et al. proposed a modeling and analysis method for multiparticipant and multisession e-commerce interaction processes based on color web, but the effect was not satisfactory. 4 S.K. Subramaniam et al. introduced an approach grounded in visual search and real-time personalized engine to tackle the challenge of instantly matching products in current e-commerce searches. Experimental results showed that this method outperformed comparative methods in terms of recall and recall rates. 5 In response to the problem of low accuracy in predicting consumer behavior, S. Wei et al. introduced a technique for capturing user interests utilizing a multihead attention mechanism, with experiments demonstrating its effectiveness. 6 Y. An et al. proposed a clustering framework based on Deep Clustering Network to solve the problem of difficult manual extraction of product advantages, disadvantages, and trend information in e-commerce reviews. The experimental results showed that the framework could accurately extract consumer opinions and predict demand trends. 7
Accurate webpage localization and sentiment analysis are critical for improving online shopping efficiency. PageRank (PR) leverages link relationships with iterative optimization to enhance search quality, 8 while bidirectional long short-term memory (BiLSTM) captures bidirectional context for improved sequence understanding in sentiment analysis. 9 Many experts have conducted relevant research. For instance, V. Srinivas and P. Gowda proposed an improved PR algorithm to improve search engine accuracy. The performance of this algorithm was compared and analyzed, and the results showed that it was superior to the comparison algorithm. 10 In response to the problem of low efficiency in user retrieval of scientific papers, A. Lubis and E. Prasiwenningrum proposed a PR-based visual search system. Comparative experimental outcomes revealed that the system had good search performance. 11 S. Murugaiyan and S.R. Uyyala proposed a hybrid model based on BiLSTM and deep convolutional neural network to accurately recognize human emotions. The model was tested on four benchmark datasets, and the results showed that the emotion classification accuracy of the model was above 90%. 12 In response to the problem of ignoring contextual information in emotion recognition, M. Wankhade et al. proposed a model that combined BiLSTM and transformer bidirectional encoder representation. Experimental results showed that this model performed better than the comparison model. 13 Q. Zhao et al. proposed a sentiment analysis framework that combines specific parts of speech and BiLSTM to address the issue of neglecting word orientation in sentiment analysis of online e-commerce comment information. The framework was trained on three pre trained corpora, and the results showed that it had good robustness. 14
Existing methods treat web page positioning and sentiment classification as separate tasks, leading to suboptimal performance: positioning algorithms ignore user emotions, while sentiment analysis disregards page relevance. This study proposes an integrated approach: (1) an improved PR method combining Shark-Search and term frequency–inverse document frequency (TF-IDF) for precise target page positioning, and (2) a BiLSTM-attention-based sentiment analysis model for recommendation. Finally, these components are integrated into an e-commerce search system to enhance purchasing efficiency and satisfaction. The novelty lies in the fusion of PR-Shark-Search for positioning and BiLSTM-attention for sentiment analysis.
Methods and Materials
Design of target webpage localization method for improved PR by integrating Shark-Search and TF-IDF
Current search systems suffer from low accuracy in sentiment analysis for product recommendations. This study addresses this by integrating an improved PR algorithm with TF-IDF and Shark-Search for target webpage positioning and a BiLSTM-attention-based sentiment analysis model. These components form an e-commerce search system designed to enhance recommendation accuracy. PR is a ranking algorithm based on the link relationship between webpages, which adjusts the page ranking results to improve the ranking of more important webpages in search results, thus improving the pertinence and caliber of search outcomes.15–16 However, the PR algorithm suffers from irrelevant page links in thematic results. 17 Shark-Search, a heuristic algorithm for focused crawlers, offers rapid response to webpage updates and efficient thematic relevance assessment, effectively compensating for PR’s deficiencies. TF-IDF is a statistical method widely used in information retrieval and text mining, characterized by strong anti-interference capabilities and simple computation. 18 This study combines PR, Shark-Search, and TF-IDF to construct an improved target webpage positioning method. The workflow of this method is illustrated in Figure 1.

Detailed workflow of the improved PR algorithm combined with Shark-Search for target webpage positioning. PR, PageRank.
Figure 1a shows the process begins with initializing PR values and Shark-Search scores. PR values are calculated using the PR algorithm, while Shark-Search scores are computed based on webpage content and link relationships. The algorithm then calculates topic relevance scores and compares them against a threshold; pages exceeding the threshold are added to the topic queue. Convergence is checked next. If satisfied, the topic webpage queue is output; otherwise, iteration continues until the maximum count is reached. Figure 1b illustrates that the algorithm first employs TF-IDF to extract product feature words from webpage text and constructs a feature lexicon,
19
then calculates feature word weights using equation (1).
In equation (1),
Next, the Skip Gram model is used to generate a vector representation in a high-dimensional space for each feature word. The cosine similarity algorithm is used to calculate the semantic similarity of all feature words and topic words. Then, the Shark-Search algorithm and PR algorithm are combined to evaluate the topic relevance
In equation (3),
In equation (4),
Construction of information extraction method based on DOM and target webpage localization
To achieve accurate analysis of users’ emotions, it not only needs the target page positioning method to locate the webpage users want to visit but also needs to extract the information inside the located webpage. Therefore, the study designs an information extraction method based on the document object model (DOM). The extraction process of this method is shown in Figure 2.

Comprehensive process of information extraction based on webpage positioning (the icons sourced from https://iconpark.oceanengine.com/official).
Figure 2 illustrates the extraction process comprising webpage preprocessing, topic information template generation, and template information extraction. Preprocessing involves modifying special symbols and removing unrelated tags and code from target webpages located via an improved PR algorithm. For topic information template generation, DOM is employed to cluster information from target products such as computers. 20 DOM provides a tree-structured representation of HTML/XML documents with dynamic operation capabilities. 21 The process utilizes a multidimensional semantic dictionary to annotate DOM semantics, detailed in Figure 3.

Multidimensional semantic DOM semantic annotation process. DOM, document object model.
As shown in Figure 4, the annotation process traverses each text node in the DOM tree to match attributes (e.g., “product name,” “delivery method,” “price”) against predefined sets. Successfully matched nodes are added to the information table. The effectiveness of information extraction is evaluated by the structural semantic entropy degree, as shown in equation (5).

Basic structure of BiLSTM and structure of the hybrid attention mechanism. BiLSTM, bidirectional long short-term memory.
In equation (5),
Design of e-commerce network search system based on target webpage localization and sentiment analysis recommendations
After locating the target webpage and using the DOM algorithm to extract the targeted webpage information, it is necessary to accurately analyze the user comments and emotions contained in the extracted information to improve the accuracy of e-commerce network search. Therefore, the study first uses latent Dirichlet allocation (LDA) to integrate the topic words in consumer reviews with semantically similar topic words into a topic interface.
22
LDA is an unsupervised learning probabilistic topic model that has advantages such as unsupervised learning ability and strong interpretability of probabilistic models. It is widely used in fields such as text classification and topic extraction.
23
LDA can automatically identify themes such as “price,” “quality,” and “logistics” from a large number of product reviews.
24
The number of topics is determined by perplexity
In equation (6),
In Figure 4a,
In equation (7),
In equation (8),
In equation (9),
In equation (10),
Pseudo-code of the gate unit integration process for position attention mechanism and BiLSTM
Thus, the construction of the hybrid attention mechanism is completed. By combining the results obtained from BiLSTM and LDA with the hybrid attention mechanism, a sentiment analysis recommendation model is constructed, as shown in Figure 5.

Sentiment analysis recommendation model integrating BiLSTM and LDA with hybrid attention mechanism (the icons sourced from https://iconpark.oceanengine.com/official). LDA, latent Dirichlet allocation.
The model first preprocesses review texts and LDA-extracted topic words, including cleaning, noise reduction, and sentiment annotation. These are transformed into topic word vectors and text vectors via word vector matrix. BiLSTM then extracts sentiment features from these vectors, which are fed into a hybrid attention mechanism to capture relationships between topic words and contextual information, yielding refined sentiment representations. Finally, a fully connected layer with Softmax determines sentiment orientation. Based on these processes, an e-commerce search system integrating target webpage positioning and sentiment analysis recommendation is constructed, with functional architecture shown in Figure 6.

Functional architecture of e-commerce search system (the icons sourced from https://iconpark.oceanengine.com/official).
Figure 6 illustrates the system architecture comprising three modules: query processing, sentiment analysis recommendation, and webpage localization with information extraction. The query module receives user requests and processes them via Solr full-text search. The sentiment analysis module employs BiLSTM-LDA-attention integration to analyze user sentiment and recommend relevant products. The webpage positioning module uses an improved PR algorithm for target page location, followed by DOM-based extraction of topic-relevant information. These modules collaborate to identify highly relevant pages, extract information, and generate sentiment-based recommendations.
Results
Performance analysis of sentiment analysis model
To evaluate the proposed BiLSTM-LDA-attention model, experiments were conducted using bidirectional encoder representations combined with convolutional neural network (BERT-CNN), ERNIE and recurrent convolutional neural network (ERNIE-RCNN), and convolutional neural network-gated recurrent unit (CNN-GRU). These models were selected for their proven effectiveness in NLP tasks and architectural diversity—BERT-CNN for deep bidirectional encoding, ERNIE-RCNN for entity-enhanced representation, and CNN-GRU for sequential processing. All models were trained under identical conditions on a combined dataset from Amazon (publicly available at https://www.heywhale.com/mw/dataset/5a698cdeafceb51770d610b4) and scraped JD.com/Taobao computer sales pages (2000 pages, 68,791 entries), spanning January 2023 to December 2024 with balanced category distribution (40% electronics, 30% clothing, 20% household, 10% others).
Key experimental settings: LSTM hidden/state dimensions 128, learning rate 0.001, 300 iterations, 300-dim vectors, Adam optimizer, batch size 25, max sentence length 100, attention weight dimension 128, L2 regularization 0.001, dropout 0.5, LDA perplexity 7. Fivefold cross-validation was employed for parameter tuning.27–28 Data preprocessing included deduplication, missing value removal, tag cleaning, and min–max normalization. Evaluation metrics comprised accuracy, precision, recall, F1 score, mean squared error (MSE), and root mean square error (RMSE). The experimental environment is detailed in Table 2.
Experimental environment
In the above environment, the study first conducted comparative experiments on the average accuracy and average precision of each model, and the experimental results are shown in Figure 7.

Comparison results of precision rate and accuracy rate.
As shown in Figure 7, the proposed model achieved average precision of 98.88% and accuracy of 97.69%, outperforming BERT-CNN (92.14%, 94.21%), ERNIE-RCNN (89.59%, 90.02%), and CNN-GRU (87.09%, 86.84%). This superior performance stems from the BiLSTM-attention integration, which captures key emotional cues more precisely to provide high-quality inputs for recommendations. The MSE and RMSE comparisons are shown in Figure 9.
As shown in Figure 8, the proposed model achieved the lowest MSE (1.027) and RMSE (0.476), compared to BERT-CNN (5.821, 2.746), ERNIE-RCNN (4.473, 2.489), and CNN-GRU (2.874, 1.423). These lower error rates reflect the model’s superior ability to precisely analyze sentiment, supporting reliable recommendations. The F1 scores and recall rates are compared in Figure 9.

Comparison results of average MSE and average RMSE. MSE, mean squared error; RMSE, root mean square error.
Figure 9 shows the proposed model achieved 98.92% recall and 97.78% F1 score, surpassing BERT-CNN (93.75%, 94.26%), ERNIE-RCNN (88.94%, 84.86%), and CNN-GRU (91.24%, 86.58%). The high recall reflects the model’s strong ability to identify relevant documents, while the F1 score indicates balanced precision and recall—both critical for reliable sentiment analysis in recommendation systems. Table 3 presents the statistical analysis results verifying experimental reliability.

Comparison results of F1 scores and recall rates.
Statistical analysis results
BERT-CNN, bidirectional encoder representations combined with convolutional neural network; CNN-GRU, convolutional neural network-gated recurrent unit; ERNIE-RCNN, ERNIE and recurrent convolutional neural network.
From Table 3, the p value of each experiment was less than 0.001, indicating that the performance difference between the proposed model and other models was statistically significant. The error range was extremely small. The experimental results were reliable and trustworthy. A total of 1247 reviews were selected for Dell XPS 14 computer, and positive, negative, neutral, and other emotions were analyzed and recommended for testing. The accuracy of sentiment analysis recommendations is shown in Figure 10.

Results of recommendation accuracy in sentiment analysis.
The proposed sentiment analysis recommendation system achieved accuracies of 97.9%, 98.4%, 98.3%, and 98.6% across the four sentiment categories (Fig. 10a), while the best comparison models BERT-CNN, ERNIE-RCNN, and CNN-GRU reached only 91.8%, 90.8%, and 89.1%, respectively (Fig. 10b–d). Notably, the lowest accuracy of the proposed model exceeds the highest accuracy of any baseline, demonstrating superior and more consistent performance across all emotional categories.
Performance analysis of e-commerce network search system
After validating the performance of the sentiment analysis recommendation model proposed in the study, a performance comparison analysis was conducted on the proposed e-commerce network search system. The comparative system includes an e-commerce search system based on BERT-CNN, an e-commerce search system based on ERNIE-RCNN, and an e-commerce search system based on the CNN-GRU model. The comparison results of search speed and CPU occupancy among various systems are shown in Figure 11.

Comparison results of search speed and CPU usage.
Figure 11a shows the proposed system achieved 87.6 ms average search time, lower than BERT-CNN (127.7 ms), ERNIE-RCNN (118.3 ms), and CNN-GRU (138.2 ms). Figure 11b indicates its CPU occupancy was 44.68%, surpassing BERT-CNN (54.76%), ERNIE-RCNN (49.88%), and CNN-GRU (58.97%). These results demonstrate the proposed system’s superior performance in both search speed and CPU occupancy compared to all baseline systems. The comparison of the missed search rate and user satisfaction of each system is shown in Figure 12.

Comparison results of missed search rate and satisfaction rate.
Figure 12a shows the proposed system achieved 1.42% missed search rate, lower than BERT-CNN (5.34%), ERNIE-RCNN (7.47%), and CNN-GRU (9.88%). Figure 12b indicates its satisfaction rate reached 99.34%, surpassing BERT-CNN (93.27%), ERNIE-RCNN (87.22%), and CNN-GRU (81.38%). These results demonstrate the proposed system’s superior performance in both missed search rate and user satisfaction.
Discussion
This study conducted a performance comparison analysis between the proposed sentiment analysis recommendation model and the e-commerce network search system. The proposed sentiment analysis model achieved 98.88% precision, 97.69% accuracy, 98.92% recall, and 97.78% F1 score, with an MSE of 1.027 and an RMSE of 0.476. These metrics significantly outperform BERT-CNN, ERNIE-RCNN, and CNN-GRU, demonstrating the effectiveness of the BiLSTM architecture in capturing contextual dependencies for emotion recognition. This finding aligns with Agbesi et al., 29 who similarly reported improved accuracy through BiLSTM enhancement. Furthermore, the notably lower error rates suggest that the hybrid attention mechanism successfully directs focus toward sentiment-bearing phrases, refining recommendation precision. This observation is consistent with Chen et al., 30 confirming attention mechanisms’ utility in fine-grained sentiment analysis.
Regarding system performance, the proposed approach achieved 87.6 ms average search time alongside 44.68% CPU occupancy, 1.42% missed search rate, and 99.34% user satisfaction. The reduced search time indicates that integrating TF-IDF with Shark-Search and PR algorithms optimizes webpage location efficiency without sacrificing result quality, corroborating Liu et al. 31 Meanwhile, the high fitting coefficient and low missed search rate reflect the DOM algorithm’s accuracy in topic extraction. The comprehensive performance gains—spanning retrieval speed, resource utilization, and recommendation accuracy—validate the synergistic design of combining improved PR-based positioning with LDA-BiLSTM-attention sentiment analysis, a conclusion supported by Shang et al. 32 The main limitation of this study is the four-category emotion classification, which may not fully capture the complexity of real-world emotional expression, such as subtle distinctions between surprise and disappointment. Future work can explore multimodal sentiment analysis by integrating image or audio data or incorporate pretrained Transformer models like BERT for more fine-grained classification. In addition, the computational complexity of the proposed model requires optimization for resource-constrained environments through techniques such as pruning, distributed computing, or knowledge distillation to ensure scalability and real-time performance.
Conclusion
To address low accuracy in sentiment analysis for e-commerce search, this study proposes an improved PR algorithm integrating TF-IDF and Shark-Search for webpage positioning, combined with DOM-based topic extraction. A sentiment analysis recommendation model employing LDA, BiLSTM, and hybrid attention mechanism is also constructed. Experimental results demonstrate the proposed model achieves 98.88% precision, 1.027 MSE, 0.476 RMSE, and 97.78% F1 score, significantly outperforming BERT-CNN, ERNIE-RCNN, and CNN-GRU. The integrated search system achieves 87.6 ms average search time, 44.68% CPU occupancy, 1.42% missed detection rate, and 99.34% satisfaction rate, surpassing all comparison systems. These results confirm the proposed approach effectively improves e-commerce search efficiency and user satisfaction.
The innovation of this research lies in three aspects. First, an improved PR algorithm integrating Shark-Search and TF-IDF was proposed for webpage positioning, considering both link relationships and content relevance to improve accuracy and efficiency. Second, a sentiment analysis recommendation model combining BiLSTM with attention mechanism was established to better capture emotional information in text. Finally, these components were unified into an e-commerce search system that simultaneously ensures high-precision webpage positioning and fine-grained sentiment recommendation, unlike existing methods that treat them as independent tasks.
The Innovative Technical Advantage Mechanism of TF-IDF + Shark Search + PR Combination and the Synergy Effect Among Each Module
The integration of TF-IDF, Shark Search, and PR combines text content understanding, webpage positioning optimization, and search quality assurance into a unified solution for e-commerce recommendation systems. The system comprises three complementary modules: query processing, sentiment analysis recommendation using BiLSTM-LDA-attention, and webpage location with improved PR for topic-relevant information extraction. This collaboration enables simultaneous consideration of link structure and user emotions, outperforming traditional methods that neglect either structural information or emotional tendencies.
Footnotes
Author’s Contributions
Y.-C.H.: Conceptualization, Data curation, Formal analysis, Funding acquisition, Investigation, Methodology, Project administration, Resources, Software, Supervision, Validation, Visualization, Writing—original draft, Writing—review & editing.
Author Disclosure Statement
The author declares that there is no conflict of interest.
Funding Information
The research is supported by the
