Network media emotion evaluation method for building space based on Transform model

Through the emotional evaluation method of building space network media based on the Transformer model, the problem of difficulty in quickly and accurately analyzing massive data in the existing technology is solved, and real-time and personalized building space recommendation services are realized.

CN120146686APending Publication Date: 2025-06-13XI'AN UNIVERSITY OF ARCHITECTURE AND TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510269146.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The existing technology is difficult to quickly and accurately extract and analyze massive data, obtain real-time changing architectural space evaluation results, and cannot provide personalized recommendations to tourists.

Method used

The online media emotion evaluation method of building space based on the Transformer model is adopted. By obtaining online media comment data, it is input into the pre-trained Transformer emotion evaluation model, and extracting and analysis are performed to automatically identify the public's emotional tendencies in real time, and the buildings are recommended based on the emotional evaluation results.

Benefits of technology

It realizes efficient and accurate extraction and analysis of massive data, shortens the evaluation cycle, improves evaluation efficiency, ensures the real-time and accuracy of evaluation results, and provides tourists with personalized and intelligent building space recommendation services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146686A_ABST
    Figure CN120146686A_ABST
Patent Text Reader

Abstract

The invention discloses a method, a system, equipment, a medium and a program for network media emotion evaluation of a building space based on a Transform model, and belongs to the technical field of building spaces. The method comprises the steps of obtaining data of building comments in network media; and inputting the data of the building comments in the network media into a pre-trained emotion evaluation model based on a Transform architecture, and carrying out extraction analysis to obtain a building space evaluation result. According to the method, the building space environment comment hobbies of the public can be automatically recognized in real time with high precision, the emotion evaluation data results of the space environment are classified and recognized, and precision, datamation and scientization of building space emotion evaluation are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of building space, and particularly relates to a method, program, device, medium and program for network media sentiment evaluation of building space based on the Transformer model. Background Art

[0002] As a key link in the field of building design and operation optimization, the research on building space evaluation has become increasingly important. This research aims to provide a scientific basis for the optimization of building space by systematically evaluating the response of building performance standards and user needs. However, traditional building space evaluation methods, such as expert scoring, public questionnaires, behavior tagging, interviews, on-site observations, physical measurements, etc., all have obvious limitations. These methods are not only time-consuming and laborious, but also limited by problems such as small sample size and large subjective influence, and it is difficult to collect sufficient quantitative and comprehensive data comprehensively and efficiently. Especially when facing a large-scale and diverse user group, the sample randomness of traditional methods limits the comprehensiveness of evaluation, with high research costs and low efficiency.

[0003] To address these challenges, the academic and practical fields have begun to explore the application of new technologies in building space evaluation. Among them, emerging technologies such as space syntax analysis, machine learning, and virtual reality technology have provided new ideas and methods for quantitatively analyzing people's perception of building space. Space syntax analysis reveals the internal relationship between space layout and user behavior by quantifying space structure relationships; machine learning technology realizes the automated processing and analysis of building space evaluation data through training models; virtual reality technology provides an immersive evaluation method, enabling evaluators to more intuitively feel the building space and thus make more accurate evaluations. However, these new technologies are currently mainly playing a role at the academic research level, have not been widely applied, and generally have problems with cross-platform use.

[0004] In recent years, the rise of big data technology has injected new vitality into the research on building space evaluation. The big data analysis method realizes the comprehensive and efficient collection of building space evaluation by collecting a large amount of user feedback data on platforms such as social media and review websites. The user evaluation data on these platforms has the characteristics of spontaneity, authenticity, and richness, and is more referential than the information obtained by guiding users to evaluate through questionnaires designed by researchers. The big data analysis method extracts keywords from online user evaluations, digitizes the data for analysis, and thus realizes the continuous evaluation of a large sample size and long time period for a specific space. This method breaks through the limitations of traditional research and provides a scientific basis for the design optimization of building space.

[0005] However, the big data analysis method also faces some challenges. First, due to the diversity of information sources, the data collected often has irregular and messy situations, and the data needs to be screened and preprocessed in advance. Second, although the big data analysis method can process a large amount of data, there are still deficiencies in processing timeliness. Especially when facing the real-time changing evaluation requirements of building spaces, how to quickly and accurately extract and analyze data has become an urgent problem to be solved. Summary of the Invention

[0006] Aiming at the problem in the prior art that it is impossible to quickly and accurately extract and analyze a large amount of data to obtain the evaluation results of real-time changing building spaces and recommend them to tourists. The present invention provides a method for network media sentiment evaluation of building spaces based on the Transformer model, which can accurately and automatically identify in real time the public's preferences for building space environment comments, and classify and identify the sentiment evaluation data results of the space environment, and recommend buildings according to the sentiment evaluation data results.

[0007] To achieve the above object, the present invention provides the following technical solutions.

[0008] In a first aspect, the present invention provides a method for network media sentiment evaluation of building spaces based on the Transformer model, including: Obtain the data of building reviews in network media; Input the data of building reviews in network media into a pre-trained sentiment evaluation model based on the Transformer architecture for extraction and analysis to obtain the building space evaluation results; The training method of the pre-trained sentiment evaluation model based on the Transformer architecture includes: Collect the data of building reviews in network media and preprocess it to obtain the sentiment data set of building reviews in network media; Input the training set in the sentiment data set of building reviews in network media obtained by preprocessing into the pre-trained model based on Transformer for training to obtain the training evaluation result pairs; Train the pre-trained model based on Transformer based on the training evaluation result pairs to obtain the trained sentiment evaluation model based on the Transformer architecture; Input the test set in the sentiment data set of building reviews in network media into the trained sentiment evaluation model based on the Transformer architecture for test verification and identification to obtain the building space evaluation results, and recommend buildings according to the building space evaluation results.

[0009] As a further improvement of the present invention, collecting data of building reviews in online media and performing preprocessing to obtain a sentiment dataset of building reviews in online media, including: Collecting data of building reviews in online media; Performing data cleaning on the data of building reviews collected in online media to obtain a basic dataset; Based on multi-person cross-annotation of sentiment labels, performing data annotation on the basic dataset to obtain a sentiment dataset of the annotated building reviews; Performing data balancing processing on the sentiment dataset of the annotated building reviews to obtain a processed sentiment dataset of the building reviews; Dividing the processed sentiment dataset of the building reviews into a training set, a validation set, and a test set.

[0010] As a further improvement of the present invention, inputting the training set in the sentiment dataset of building reviews in online media obtained by preprocessing into a pre-trained model based on Transformer for training to obtain a training evaluation result, including: Inputting the training set in the sentiment dataset of building reviews in online media obtained by preprocessing into a pre-trained model based on Transformer, and using a cross-entropy loss function to optimize the model to optimize and adjust the pre-trained model based on Transformer to obtain a training result; Inputting the validation set in the sentiment dataset of building reviews in online media obtained by preprocessing into a pre-trained model based on Transformer to obtain a validation result; By comparing the training result and the validation result, identifying whether there is an overfitting phenomenon in the pre-trained model based on Transformer; If not, obtaining the final training result; Performing evaluation and classification according to the final test result to obtain a training evaluation result.

[0011] As a further improvement of the present invention, performing evaluation and classification according to the final test result to obtain a training evaluation result, including accuracy rate, recall rate, F1 score, and F2 score;

[0012]

[0013] Among them, True Positive is a true positive, representing the number of samples that are actually positive and predicted to be positive; True Negative is a true negative, representing the number of samples that are actually negative and predicted to be negative; False Positive is a false positive, representing the number of samples that are actually negative but predicted to be positive; False Negative is a false negative, representing the number of samples that are actually positive but predicted to be negative.

[0014] As a further improvement of the present invention, it is characterized in that the pre-training model based on Transformer is trained based on the training evaluation result to obtain a trained sentiment evaluation model based on the Transformer architecture, including: Judge whether the training evaluation result exceeds a preset accuracy threshold; If it does not exceed the preset accuracy threshold, it means that the training result is good, and the pre-training model based on Transformer is the trained sentiment evaluation model based on the Transformer architecture; If it exceeds the preset accuracy threshold, based on the training evaluation result, the pre-training model based on Transformer is optimized, the learning rate is readjusted, the dataset ratio is adjusted, and the training evaluation result is obtained again until the newly obtained training evaluation result does not exceed the preset accuracy threshold, then the optimized and adjusted pre-training model based on Transformer is the trained sentiment evaluation model based on the Transformer architecture.

[0015] As a further improvement of the present invention, the test set in the sentiment dataset of building reviews in the network media is input into the trained sentiment evaluation model based on the Transformer architecture for test verification and recognition to obtain a building space evaluation result, including: Based on the trained sentiment evaluation model based on the Transformer architecture, obtain the recognition result; Perform weighted scoring on the recognition result to obtain the building sentiment classification and weighted scoring result; Use the test set in the sentiment dataset of building reviews in the network media to verify the building sentiment classification and weighted scoring result. If the verification result meets the set conditions, obtain the building space evaluation result, and recommend the building according to the building space evaluation result.

[0016] In a second aspect, the present invention provides a system for network media sentiment evaluation of a building space based on a Transformer model, including: Data acquisition module: used to acquire data, that is, acquire data on building reviews in the network media; Evaluation result module: It is used to input the data of building reviews in online media into a pre-trained sentiment evaluation model based on the Transformer architecture, perform extraction and analysis, and obtain the evaluation result of the building space; The training system of the pre-trained sentiment evaluation model based on the Transformer architecture includes: Sentiment data collection module: It is used to collect the data of building reviews in online media and preprocess it to obtain the sentiment dataset of building reviews in online media; Training evaluation result module: It is used to input the training set in the sentiment dataset of building reviews in online media obtained by preprocessing into the pre-trained model based on Transformer for training, and obtain the training evaluation result; Training and optimizing model module: It is used to train the pre-trained model based on Transformer based on the training evaluation result, and obtain the trained sentiment evaluation model based on the Transformer architecture; Space evaluation result module: It is used to input the test set in the sentiment dataset of building reviews in online media into the trained sentiment evaluation model based on the Transformer architecture for test verification and recognition, and obtain the evaluation result of the building space; recommend buildings according to the evaluation result of the building space.

[0017] In a third aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the method for network media sentiment evaluation of a building space based on the Transformer model.

[0018] In a fourth aspect, the present invention provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps of the method for network media sentiment evaluation of a building space based on the Transformer model as claimed.

[0019] In a fifth aspect, the present invention provides a computer program product, characterized in that it includes computer instructions, and when the computer instructions are executed by a processor, it implements the steps of the method for network media sentiment evaluation of a building space based on the Transformer model.

[0020] Compared with the prior art, the present invention has the following beneficial effects: The present invention realizes the efficient and accurate extraction and analysis of architectural review data in a large amount of online media, not only greatly shortening the evaluation cycle and improving the evaluation efficiency, but also ensuring the timeliness and accuracy of the evaluation results, and providing a more personalized and intelligent architectural space recommendation service for tourists. First, at the data processing level, the present invention utilizes the powerful parallel processing ability of the Transformer model, effectively solving the computational bottleneck problem faced by traditional methods when dealing with large-scale data. By directly scraping architectural review data from online media, the cumbersome and inefficient manual collection is avoided, ensuring the extensiveness and timeliness of the data source. At the same time, the original data is preprocessed, including steps such as noise removal, text cleaning, and standardization, to construct a high-quality sentiment dataset, laying a solid foundation for subsequent model training. This process not only improves the data quality, but also significantly enhances the generalization ability of the model, enabling it to more accurately capture and understand complex and variable user sentiment expressions. Secondly, in terms of model construction and training, the present invention adopts a pre-trained Transformer architecture, which takes its self-attention mechanism as the core and is good at capturing long-range dependencies in sequential data, and is very suitable for processing text with high context dependence. Through pre-training on a large-scale corpus, the model already has rich language understanding and generation capabilities, and then fine-tuning is carried out for architectural review data to further improve its sentiment analysis accuracy in a specific domain. This "pre-training + fine-tuning" strategy enables the model to quickly adapt to new tasks, reduces the dependence on a large amount of labeled data, and reduces the cost and time cost of model development. In addition, through continuous feedback and iterative optimization of the training evaluation results, the model performance is continuously improved, ensuring that the final output of the architectural space evaluation results not only conforms to the general aesthetic trend, but also accurately reflects the true feelings of users towards the architectural space environment. Furthermore, from the perspective of application effects, the method of the present invention can automatically and real-time identify the sentiment tendencies of the public towards architectural spaces, including positive, neutral, and negative evaluations, and convert these sentiment data into quantifiable evaluation indicators, such as sentiment scores, satisfaction indexes, etc. These indicators not only provide valuable user feedback for architectural designers and operators, guiding them to carry out space optimization and transformation, but also provide strong content support for tourism platforms, online reservation systems, etc., making architectural recommendations more accurate and personalized. When planning a trip, tourists can quickly screen out architectural spaces that meet their personal preferences and needs based on these recommendations based on real user sentiment, thus greatly enhancing the travel experience and satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings described herein are for illustrative purposes only and are not intended to limit the scope of the disclosure of the present invention in any way. In the drawings: Figure 1Schematic flowchart of a method for network media sentiment evaluation of building spaces based on the Transformer model in the present invention; Figure 2 Schematic flowchart of a training method for a pre-trained sentiment evaluation model based on the Transformer architecture in the present invention; Figure 3 Schematic flowchart of the specific process of a method for network media sentiment evaluation of building spaces based on the Transformer model in the present invention; Figure 4 Partial diagram of tokenization and tagging operations using BertTokenizer in an embodiment of the present invention; Figure 5 Diagram of tokenization and tagging results in an embodiment of the present invention; Figure 6 Comparison diagram of the classification accuracy of the model on the test set at different learning rates in an embodiment of the present invention; among them, Figure (a) shows the comparison diagram of the classification accuracy of the model on the test set when the learning rate is 2 ; Figure (b) shows the comparison diagram of the classification accuracy of the model on the test set when the learning rate is 5 ; Figure (c) shows the comparison diagram of the classification accuracy of the model on the test set when the learning rate is 1 ; Figure 7 Trend diagram of the accuracy change of the model on the training set and the test set during the training process in an embodiment of the present invention; among them, Figure (a) shows the trend diagram of the accuracy change of the model on the training set and the test set when the learning rate is 2 ; Figure (b) shows the trend diagram of the accuracy change of the model on the training set and the test set during the training process when the learning rate is 5 ; Figure (c) shows the trend diagram of the accuracy change of the model on the training set and the test set during the training process when the learning rate is 1 ; Figure 8 Trend diagram of the loss change of the model during the training process in an embodiment of the present invention; among them, Figure (a) shows the trend diagram of the loss change of the model during the training process when the learning rate is 2 ; Figure (b) shows the trend diagram of the loss change of the model during the training process when the learning rate is 5 ; Figure (c) shows the trend diagram of the loss change of the model during the training process when the learning rate is 1 ; Figure 9 Diagram of the actual calculation results of the sentiment classification model on the test set at different learning rates in an embodiment of the present invention; among them, Figure (a) shows the actual calculation results of the sentiment classification model on the test set when the learning rate is 2 ; Figure (b) shows the actual calculation results of the sentiment classification model on the test set when the learning rate is 5 The actual calculation result graph of the sentiment classification model for the test set under; Figure (c) shows when the learning rate is 1 The actual calculation result graph of the sentiment classification model for the test set under; Figure 10 It is a schematic structural diagram of a system for network media sentiment evaluation of building spaces based on the Transformer model of the present invention; Figure 11 It is a schematic structural diagram of a training system for a pre-trained sentiment evaluation model based on the Transformer architecture of the present invention; Figure 12 It is a schematic diagram of an electronic device in an embodiment of the present invention. Detailed implementation manners

[0022] In order to enable those skilled in the art of this technology to better understand the technical solutions in the present invention, the technical solutions in the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the present invention. The described embodiments are only some embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without making creative efforts shall fall within the protection scope of the present invention.

[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs. The terms used in the description of the present invention in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0024] Aiming at the problem in the prior art of how to quickly and accurately extract and analyze massive data to obtain real-time changing building space evaluation results and being unable to recommend to tourists. The present invention provides a method for network media sentiment evaluation of building spaces based on the Transformer model, as Figure 1 shown, the method includes: S100: Obtain data of building reviews in network media; S200: Input the data of building reviews in network media into a pre-trained sentiment evaluation model based on the Transformer architecture, perform extraction and analysis, and obtain a building space evaluation result; As Figure 2 shown, the training method of the pre-trained sentiment evaluation model based on the Transformer architecture includes: S201: Collect data of building reviews in network media and perform preprocessing to obtain a sentiment dataset of building reviews in network media; S202: Input the training set in the sentiment dataset of architectural reviews in online media obtained through preprocessing into a pre-trained model based on Transformer for training to obtain training evaluation results; S203: Train the pre-trained model based on Transformer according to the training evaluation results to obtain a sentiment evaluation model based on the Transformer architecture after training; S204: Input the test set in the sentiment dataset of architectural reviews in online media into the sentiment evaluation model based on the Transformer architecture after training for test verification and recognition to obtain architectural space evaluation results, and recommend buildings according to the architectural space evaluation results.

[0025] The present invention can accurately and automatically identify in real time the public's preferences for architectural space environment reviews, classify and identify the sentiment evaluation data results of the space environment, and recommend buildings according to the sentiment evaluation data results.

[0026] The present invention will be further explained below with reference to specific drawings.

[0027] As Figure 3 shown, a method for online media sentiment evaluation of an architectural space based on a Transformer model according to the present invention includes: S1: Data preprocessing: Crawl the text data of reviews on a certain building from platforms such as Dianping, Douyin, and Xiaohongshu, and use the open-source Chinese sentiment dataset ChnSentiCorp as the basis for training data classification.

[0028] S11: Data collection: Use Python to collect a certain amount of review data of architectural space cases in different time periods and different platforms, including primary and secondary review contents. Clean abnormal characters, duplicate texts, and invalid data to obtain a basic dataset.

[0029] S12: Data annotation: Perform multi-person cross-annotation of sentiment labels on the basic dataset in S11 to ensure annotation consistency, including five emotion types: "negative", "relatively negative", "neutral", "relatively positive", and "positive", to obtain a sentiment dataset of annotated architectural reviews.

[0030] S13: Data balancing: Adopt data augmentation techniques to perform synonym replacement and back-translation on the sentiment dataset of annotated architectural reviews to ensure data balance, and obtain a processed sentiment dataset of architectural reviews.

[0031] In the process of obtaining the sentiment dataset of labeled building reviews, there will be an imbalance in the five emotion types of "negative", "relatively negative", "neutral", "relatively positive", and "positive", that is, the number of samples in some categories is much larger than that in other categories. This imbalanced data will make the model more inclined to predict the categories with more samples, resulting in poor generalization ability of the model. By balancing the data, it can be ensured that the subsequent model will not be biased towards a certain category during the training process, thereby improving the prediction accuracy of minority categories.

[0032] S14: Data splitting: Split the sentiment dataset of the processed building reviews into a training set, a validation set, and a test set according to the ratio of 8:1:1.

[0033] According to different usage scenarios, sentiment datasets in other languages can also be obtained as the basis for training data classification, not limited to Chinese.

[0034] S2: Model selection: Use a pre-trained model based on the Transformer architecture and adjust the structure after configuring the model.

[0035] S21: Tokenization and encoding: Use the tokenizer of the pre-trained Transformer model (BERT tokenizer) to tokenize the text into a sequence of Tokens and perform sequence encoding, including Token ID, Segment ID, Attention Mask, etc.

[0036] S22: Model architecture adjustment S221: Select a pre-trained model based on Transformer (such as bert-base-chinese of Hugging Face).

[0037] S222: Add a classification head to the model, including a fully connected layer and a Softmax activation function for sentiment classification.

[0038] S3: Training phase configuration: Set the optimizer and adjust the learning rate after loading the model. S31: Use the AdamW optimizer and combine it with a linear learning rate scheduling strategy to improve training efficiency, and set the weight decay to reduce overfitting.

[0039] S32: The learning rate update strategy is:

[0040] where: T is the total number of training steps; is the warm-up step; t is the current training step; is the maximum learning rate; is the learning rate.

[0041] S33: Dynamically adjust the learning rate (such as Learning Rate Scheduler) to stabilize model training.

[0042] S4: Model training and evaluation: Repeatedly train the model and evaluate the accuracy of the overall data.

[0043] S41: Use the training set in the sentiment dataset of building reviews to fine-tune the pre-trained model of Transformer to obtain training results.

[0044] Input the training set in the sentiment dataset of building reviews in network media obtained by preprocessing into the pre-trained model based on Transformer, and use the cross-entropy loss function to optimize the model to optimize and adjust the pre-trained model based on Transformer to obtain test training results; The loss function is defined as:

[0045] where y is the actual label.

[0046] S42: Monitor the performance of the validation set to avoid overfitting.

[0047] After the training in S41 ends, use the validation set to evaluate the performance of the pre-trained model based on Transformer. During this process, the losses of the training set and the validation set are calculated independently. The training set is used to optimize the model, while the validation set is only used to evaluate the generalization ability of the current model.

[0048] If the loss of the pre-trained model based on Transformer starts to rise on the validation set while the loss on the training set continues to decline, it may indicate that the model has started to overfit.

[0049] The accuracy on the validation set can also be used as an indicator to judge whether the model is overfitting. If the accuracy tends to stabilize or decline on the validation set, although the accuracy on the training set continues to rise, it may indicate that the model memorizes too much of the training data and thus loses good generalization ability.

[0050] If it is observed that the loss and accuracy of the training set continue to improve, but the loss of the validation set starts to rise, or the accuracy of the validation set stops improving, it means that the pre-trained model based on Transformer may start to overfit.

[0051] The performance of overfitting is usually that the performance of the training set gets better and better, but the performance on the validation set gradually deteriorates.

[0052] To prevent overfitting, an early stopping strategy is adopted. When the performance on the validation set no longer improves (or starts to decline) over several training epochs, training can be stopped to avoid overfitting of the Transformer-based pre-trained model on the training set.

[0053] Set a threshold for early stopping. If the performance on the validation set does not improve within 5 consecutive epochs, stop training.

[0054] According to the performance of the validation set, hyperparameters of the Transformer-based pre-trained model, such as the learning rate, batch size, etc., need to be adjusted, or regularization methods (such as dropout, L2 regularization, etc.) are used to prevent overfitting.

[0055] Record the loss and accuracy on the validation set after each training epoch. Use charts (such as loss curves, accuracy curves) to visualize the training process to help identify whether there is overfitting.

[0056] During the training process, if the performance on the validation set is the best, the model parameters can be saved. Finally, conduct a final evaluation on the test set to determine the generalization ability of the model and obtain the final test results.

[0057] S43: Evaluate the classification performance on the test results, and calculate the accuracy, recall, F1 score, and F2 score.

[0058]

[0059] Among them, True Positive is the true positive, representing the number of samples that are actually positive and predicted as positive; True Negative is the true negative, representing the number of samples that are actually negative and predicted as negative; False Positive is the false positive, representing the number of samples that are actually negative but predicted as positive; False Negative is the false negative, representing the number of samples that are actually positive but predicted as negative.

[0060] Accuracy is the proportion of correct predictions, used to measure the prediction correctness of the model among all samples. Recall is used to measure how many of all the samples that are actually positive are correctly predicted as positive by the model. The F1 score is the harmonic mean of precision and recall, used to balance the influence of these two metrics. A higher F1 score indicates that the model performs better in dealing with positive and negative class samples. The F2 score is the weighted harmonic mean of precision and recall. Compared with the F1 score, the F2 score pays more attention to recall. If you hope the model to perform better in recalling positive class samples, the F2 score can be used.

[0061] S44: Analyze the misclassification situation using a confusion matrix and further optimize it.

[0062] During the process of optimizing the classification model, by analyzing the misclassification situation generated by the model, false positives and false negatives are reduced, thereby improving the performance of the classification model. According to the requirements of specific problems, it may be necessary to balance metrics such as precision, recall, and F1-score to ensure that the optimization of the model meets the requirements of the actual application scenario.

[0063] S45: Judge the accuracy and adjust the strategy: If the training result is good, the training and adjustment of the model are completed; If the training result is not good, use methods such as adjusting the learning rate, adjusting the dataset ratio, and using data augmentation to optimize the model, and return to S41 to retrain.

[0064] S5: Obtain the evaluation data of spatial elements: Measure and score the crawled data, classify the public's comments on building spatial elements into five sentiment categories, and evaluate the scores of spatial preferences according to the sentiment classification results.

[0065] S51: Based on the trained sentiment evaluation model based on the Transformer architecture, read the recognition results with an appropriate learning rate.

[0066] S52: Perform weighted scoring on the recognition results to obtain a comprehensive sentiment score for the building space, and obtain the building sentiment classification and weighted scoring results.

[0067] Based on the building sentiment classification and weighted scoring results, it can be used to evaluate the public's media's preference for building space cases.

[0068] S53: Input the test set into the trained sentiment evaluation model based on the Transformer architecture to obtain the test recognition results. Verify the sentiment classification and weighted scoring results of S52 according to the obtained test recognition results. Ensure that the verification results meet the set conditions to ensure that the final building space preference evaluation is reasonable and accurate, and obtain the building space evaluation results. The present invention employs a Transformer model, particularly its core multi-head attention mechanism, which can effectively capture and understand long-range context relationships when processing text data. This mechanism allows the model to assign different attention weights to each word or phrase in the input text, thereby deeply understanding the semantic meanings of different parts. Compared with traditional RNN- or CNN-based models, Transformer can better capture global information and context dependencies when dealing with long texts, significantly improving its performance in text classification tasks. The multi-head attention mechanism further enhances the model's learning ability for multi-dimensional semantic information by processing multiple attention heads in parallel, especially performing well in complex tasks. This powerful semantic understanding ability enables the present invention to classify the details and deep meanings in the text more accurately, thus achieving higher accuracy and robustness in applications such as sentiment analysis and topic classification.

[0069] Through the technique of fine-tuning based on pre-trained models, the present invention can significantly reduce the dependence on large-scale labeled data. In traditional deep learning methods, training an efficient text classification model requires a large amount of labeled data, and the acquisition of labeled data is usually time-consuming and costly. By using a pre-trained model (such as BERT) as a basis, the present invention can quickly adapt to multiple tasks and fine-tune specific tasks using the language model knowledge learned during the pre-training phase. This not only greatly shortens the training time but also effectively improves the generalization ability of the model, enabling the model to maintain good classification performance even when the labeled data is scarce. The high efficiency of transfer learning makes the present invention particularly suitable for fields with scarce data or difficult annotation, possessing stronger flexibility and practicality.

[0070] The method of the present invention has strong scalability and can be widely applied to text classification scenarios of multiple languages and multiple tasks. Its powerful semantic understanding ability and transfer learning advantages enable the method to be not limited to a single language or task but to support text classification tasks in a multi-language environment. For example, the present invention can be applied to text analysis in Chinese, English, and other languages, and can automatically adapt to the grammar and semantic differences in different languages.

[0071] In addition, the present invention is also applicable to text classification of multiple tasks, such as sentiment analysis, topic classification, and spam detection. Sentiment analysis can help enterprises understand user emotions, topic classification can efficiently organize and manage large-scale text data, and spam detection can help improve the security of email systems. By fine-tuning different pre-trained models, the present invention can be optimized for different tasks and demonstrate good performance in multi-task scenarios. Therefore, the method of the present invention has broad application prospects and can meet the text processing needs of multiple industries and fields.

[0072] This method is presented in a logic and form that conforms to architectural evaluation, combining big data with the emotional evaluation of building spaces, gradually shifting from qualitative analysis to "precision and dataization". With the help of technologies such as word segmentation, word frequency statistics, and emotional semantic analysis, it breaks through the subjectivity and roughness in traditional building evaluations and provides a more scientific and objective analysis method. By combining big data with emotional analysis, it is possible to more accurately capture people's emotional responses to different building spaces, thus providing more detailed optimization suggestions for space design. With the further development of the Internet and natural language processing technologies, based on a large amount of user-generated text data, such as reviews, social media posts, and online feedback, it is possible to quickly identify the emotional trends and potential problems regarding building spaces. The emotional evaluation of building spaces no longer solely relies on individual subjective impressions but is based on a large amount of data, demonstrating higher objectivity and representativeness. As more, faster, and more accurate methods for collecting review data and conducting emotional analysis, they will provide more possibilities for the emotional evaluation of building spaces. At the same time, this method has flexibility and scalability. With the continuous accumulation of data volume, the results of emotional analysis will be more accurate and diversified, covering more types of building spaces and more dimensions of user experiences.

[0073] Generally speaking, this method not only expands the dimensions of building space evaluation but also improves the matching degree between building design and user needs, contributing to the improvement and enhancement of the human settlement environment and promoting the innovation of architectural research and practice.

[0074] The following further explains and illustrates the present invention in combination with specific embodiments.

[0075] Embodiment S1: Data Processing Retrieve the first-level comment data of tourists on Douyin, Xiaohongshu, and Dianping with the theme of the most beautiful rural primary school - Fuwen Township Central Primary School, collect and export it to Excel through Python, and establish an Excel dataset. Also, perform noise information processing on the collected original text data. Considering the complexity of the language environment, in this embodiment, all emoticons are removed, and emotional intensity words are retained. Unify the text format, convert between simplified and traditional Chinese characters, and unify punctuation marks. Cross-annotate the data by multiple people, including five emotion types: "negative", "relatively negative", "neutral", "relatively positive", and "positive" to ensure annotation consistency.

[0076] In this embodiment, the Excel data is loaded through the pandas library of Python to ensure access to each column of data. The established original Excel dataset is divided into a training set, a validation set, and a test set according to a ratio of 8:1:1.

[0077] S2: Model Selection Using a pre-trained model, based on the Transformer architecture. Select the bert-base-chinese model provided by Hugging Face and modify the model's classification head to adapt to the five-class classification task.

[0078] The data processed by Panda is then tokenized and tokenized using BERT's tokenizer (BertTokenizer). The main goal is to convert the original text into a form that the model can understand and convert Chinese characters into tensors. The following is a breakdown of the specific process: 1) Initialize the tokenizer First, load the pre-trained BERT tokenizer (bert-base-uncased or other models suitable for the task).

[0079] This can be done using the BertTokenizer class in the transformers library as shown. Figure 4 as shown.

[0080] 2) Tokenization Split the input text into subword units.

[0081] BERT's tokenizer uses the WordPiece or SentencePiece tokenization algorithm to break down rare words into more common subwords.

[0082] 3) Add special tokens Based on the tokenization result, automatically add special tokens for separating sentences and indicating tasks: [CLS]: Sentence start token, used for classification tasks.

[0083] [SEP]: Sentence end token or sentence pair separator token.

[0084] 4) Convert to Token IDs Map each token to its corresponding integer ID based on the vocabulary of the pre-trained model.

[0085] 5) Generate the Attention Mask Used to indicate which positions in the model are valid inputs (non-padding parts).

[0086] Non-padding positions are marked as 1, and padding positions are marked as 0. For example: The input length is 5, padded to the maximum length of 10, and the attention mask is: [1,1,1,1,1,0,0,0,0,0].

[0087] 6) Generate Segment IDs For sentence pair tasks, to distinguish sentences, usually all tokens of the first sentence are set to 0, and the second sentence is set to 1.

[0088] As Figure 5 shown, for single sentence tasks, the Segment ID of all tokens is 0.

[0089] 7) Convert to tensor format Convert Token IDs, Attention Mask, and Segment IDs to tensors for model input.

[0090] Use PyTorch to complete the conversion: S3: Training phase configuration Load pre-trained weights from the Hugging Face Transformers library.

[0091] Use the optimizer with weight decay settings: Use the AdamW optimizer, which introduces a weight decay term on the basis of Adam. It can effectively suppress overfitting and improve the generalization ability of the model. Weight decay introduces a regularization effect in gradient updates to prevent the model from relying too much on specific parameter values. Weight decay limits the overfitting of the model to specific training samples, especially reduces the dependence on noisy data, and makes the model perform more consistently on different samples. At the same time, the AdamW optimizer can dynamically adjust the update direction of the learning rate, accelerate the convergence speed and improve the optimization efficiency of parameters.

[0092] In the training of deep learning models, the learning rate is a key hyperparameter that affects the convergence speed and final performance of the model. The selected range of the learning rate is based on the practical experience widely verified by Transformer models in similar tasks, and at the same time provides a reasonable range for the subsequent automatic exploration of the optimal learning rate. At a smaller learning rate, the parameter adjustment of the model is more delicate, which can avoid violent fluctuations of parameters during training and at the same time maintain the knowledge learned by the model from pre-training. For high-capacity models like Transformer, this strategy helps to reduce the risk of overfitting and improve performance on test data. Select , and as the initial learning rates in the experiment for the following reasons: 1) Characteristics of the model type: Transformer models (such as BERT) have a relatively large number of parameters. An overly high learning rate may lead to gradient explosion or instability, while an overly low learning rate may result in slow convergence. Therefore, these learning rate ranges are generally considered reasonable choices for training Transformer models in text classification tasks.

[0093] 2) Requirements for fine-tuning pre-trained models: Pre-trained Transformer models usually require a relatively small learning rate for fine-tuning because significantly adjusting the model parameters may disrupt the knowledge learned during the pre-training stage. These learning rates can balance the magnitude of parameter adjustment while avoiding gradient oscillations.

[0094] 3) Gradient update efficiency: , and cover a learning rate range from low to high, which can effectively explore the performance of the model at different update steps and help select the optimal parameters.

[0095] 4) Linear learning rate scheduling strategy: During the training process, the linear learning rate scheduling strategy (Linear Warmup and Decay) is adopted. The learning rate is gradually increased to the maximum value at the beginning of training and then gradually decreased as the number of training epochs increases. This strategy helps avoid instability at the beginning of training and gradually stabilizes the learning process of the model. The update formula for the learning rate is:

[0096] where: T is the total number of training steps; is the warmup steps; t is the current training step; is the maximum learning rate; is the learning rate.

[0097] S4: Model training and evaluation Import the processed recognizable data into the configured model for training.

[0098] To verify the effectiveness of the sentiment evaluation method based on the Transformer model in this embodiment, this embodiment conducts experiments by training models with learning rates of , and respectively. This embodiment evaluates the model performance from the classification accuracy, the changes in accuracy and loss during the training process, and the prediction distribution results. The following are the specific results and analyses: As Figure 6As shown, the classification accuracy of the model on the test set at different learning rates. It can be seen from the figure that the classification accuracy of all sentiment categories remains at a relatively high level, and the overall accuracy is close to or reaches 90%. When the learning rate is , the classification performance of the model on all sentiment categories is more balanced, especially the accuracy on low-frequency categories is higher; while a higher learning rate (such as ) may cause slight fluctuations in the classification performance of some categories. This indicates that choosing an appropriate learning rate can better balance the comprehensiveness and stability of classification.

[0099] Such as Figure 7 shown, the changing trends of the accuracy of the model on the training set and the test set during the training process. It can be observed that as the number of training epochs increases, the training accuracy and test accuracy of the model under the three learning rates both show a stable upward trend. Among them, when the learning rate is relatively high (such as ), the training accuracy of the model increases faster, but the test accuracy fluctuates greatly in the early stage, indicating that this setting may lead to the risk of overfitting. In contrast, when the learning rate is , the test accuracy curve is smoother, and the performance of the model between the training and test data is more consistent.

[0100] Such as Figure 8 shown, the changing trend of the loss of the model during the training process. It can be seen from the figure that the loss values under the three learning rates all gradually decrease with the increase of the training epochs, indicating that the model is constantly optimizing. When the learning rate is relatively high (such as and ), the loss value decreases faster, but there are slight fluctuations during the later convergence process, which may be due to the unstable convergence caused by the larger learning rate. In comparison, the loss curve when the learning rate is is smoother, showing higher training stability and consistency.

[0101] Such as Figure 9 shown, the prediction distribution of the sentiment classification model on the test set at different learning rates. It can be seen from the figure that the prediction results of the model under the three learning rates generally show a good distribution trend. When the learning rate is relatively low (such as ), the distribution of the model on different sentiment labels is more balanced; while when the learning rate is relatively high (such as ), the prediction frequency of the model on positive sentiment (labels 4 and 5) increases significantly. It is worth noting that the neutral sentiment (label 3) accounts for a large proportion under all learning rates, which may be related to the proportion of such labels in the training data. This result indicates that the learning rate setting not only affects the model convergence speed but also may have a certain impact on the category bias of the model.

[0102] According to whether the implementation results meet the accuracy threshold, it can be directly used as the basis for scoring in Step 5. If some categories perform poorly, set higher weights for these categories in the loss function, or adjust the learning rate and batch size; or use sampling augmentation to increase the sample size for samples with fewer categories and other methods to optimize the model.

[0103] S5: Model Application and Network Scoring Generally speaking, all three learning rates can achieve a relatively high sentiment classification accuracy, but there are significant differences in model stability and convergence speed. A low learning rate (such as ) helps to obtain a more balanced and stable model performance, while a high learning rate (such as ) can reduce the loss faster in the initial stage, but additional parameter tuning strategies need to be combined to avoid overfitting or oscillation.

[0104] Finally, based on the research requirements of network scoring, the recognition results with a high learning rate are selected from the experimental results, and the five evaluations of the public network of the primary school building case in Fuwen Township are statistically analyzed. There are 70 negative comments, 78 relatively negative comments, 180 neutral comments, 250 relatively positive comments, and 128 positive comments respectively. The score (D) of this case is obtained through scoring and weighting.

[0105] Among them: D is the weighted total score; i represents the scores of the five classifications. In this embodiment, the five emotion categories are assigned scores from 1 to 5. Among them, 1 represents negative, 2 represents relatively negative; 3 represents neutral; 4 represents relatively positive; 5 represents positive; Ni is the number of the i-th type of emotion evaluation.

[0106] In summary, the present invention utilizes a pre-trained sentiment evaluation model to efficiently and accurately process and analyze a large amount of building review data, and extract the public's sentiment evaluation of the building space environment. Secondly, through the preprocessing and training of the building review data, this method realizes automated and real-time sentiment recognition and classification, significantly improving the accuracy and scientificity of the evaluation results. This method can not only quickly feedback the preferences and needs of users for the building space environment, but also provide scientific data support for building design, optimization and improvement, helping to promote the refined management and improvement of the building space environment. The method of the present invention can automatically and real-time identify the public's sentiment tendency towards the building space, including positive, neutral and negative evaluations, and convert these sentiment data into quantifiable evaluation indicators, such as sentiment scores, satisfaction indexes, etc. These indicators not only provide valuable user feedback for building designers and operators to guide them in space optimization and transformation, but also provide strong content support for tourism platforms, online reservation systems, etc., making building recommendations more accurate and personalized. When planning their trips, tourists can quickly screen out building spaces that meet their personal preferences and needs based on these recommendations based on real user sentiment, thus greatly enhancing the travel experience and satisfaction. At the same time, it can also provide reference for building design.

[0107] The second object of the present invention is to propose a system for network media sentiment evaluation of building spaces based on the Transformer model, as Figure 10 shown, including: Data acquisition module 100: used to acquire data, that is, to acquire building review data in network media; Evaluation result module 200: used to input the building review data in network media into a pre-trained sentiment evaluation model based on the Transformer architecture for extraction and analysis to obtain a building space evaluation result; As Figure 11 shown, the training system of the pre-trained sentiment evaluation model based on the Transformer architecture includes: Sentiment data collection module 201: used to collect building review data in network media and perform preprocessing to obtain a sentiment data set of building reviews in network media; Training evaluation result module 202: used to input the training set in the sentiment data set of building reviews in network media obtained by preprocessing into a pre-trained model based on Transformer for training to obtain a training evaluation result; Training and optimizing model module 203: used to train the pre-trained model based on Transformer based on the training evaluation result to obtain a trained sentiment evaluation model based on the Transformer architecture; Spatial evaluation result module 204: It is used to input the test set in the sentiment data set of building reviews in network media into the trained sentiment evaluation model based on the Transformer architecture for test verification and recognition, obtain the building space evaluation result, and recommend buildings according to the building space evaluation result.

[0108] As Figure 12 As shown, the third object of the present invention is to provide an electronic device, which includes: a processor 301, a memory 302, and a display screen 303. Among them, the memory 302 and the display screen 303 are both connected to the processor 301, such as through a bus 304. Optionally, the electronic device may further include a transceiver 305. It should be noted that in practical applications, the transceiver 305 is not limited to one, and the structure of the electronic device does not constitute a limitation to the embodiments of the present application.

[0109] The processor 301 may be a CPU (Central Processing Unit, central processor), a general-purpose processor, a DSP (Digital Signal Processor, data signal processor), an ASIC (Application Specific Integrated Circuit, application-specific integrated circuit), an FPGA (Field Programmable Gate Array, field programmable gate array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in connection with the disclosure of the present application. The processor 301 may also be a combination that realizes computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0110] The bus 304 may include a path for transmitting information between the above components. The bus 304 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus or an EISA (Extended Industry Standard Architecture, extended industry standard structure) bus, etc. The bus 304 may be divided into an address bus, a data bus, a control bus, etc.

[0111] The memory 302 can be a ROM (Read Only Memory), or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory), or other types of dynamic storage devices that can store information and instructions. It can also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0112] The memory 302 is used to store the application program code for executing the solution of this application, and is controlled by the processor 301 for execution. The processor 301 is used to execute the application program code stored in the memory 302 to implement the content shown in the foregoing method embodiments.

[0113] Figure 12 The illustrated electronic device is only an example and should not impose any limitations on the functions and usage scope of the embodiments of this application.

[0114] The fourth object of the present invention is to provide a computer-readable storage medium, which stores a computer program. When the program is executed by a processor, it implements each process of the method embodiment as described above. Figure 1 For example, a memory including instructions, and the above instructions can be executed by the processor of the electronic device to complete the above method.

[0115] A computer-readable storage medium can be a tangible device that holds and stores instructions used by an instruction execution device. A computer-readable storage medium can be, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination of the above. Specifically, a computer-readable storage medium can be a portable computer disk, a hard disk, a USB flash drive, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, an optical disc, a magnetic disk, a mechanical coding device, and any combination of the above.

[0116] The fifth object of the present invention is to provide a computer program product including computer instructions, which when executed by a processor implement each process of the method embodiment as described above and can achieve the same technical effects. To avoid repetition, it will not be elaborated here. Figure 1 The various processes of the method embodiment shown above, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.

[0117] Upon reading the above description, many embodiments and many applications other than the provided examples will be apparent to those skilled in the art. Therefore, the scope of this teaching should not be determined with reference to the above description, but rather should be determined with reference to the full scope of the foregoing claims and the equivalents thereof. For the sake of completeness, all articles and references including patent applications and publications are incorporated herein by reference. The omission of any aspect of the subject matter disclosed herein in the foregoing claims is not intended to abandon such subject matter, nor should it be considered that the applicant has not considered such subject matter to be part of the disclosed inventive subject matter.

[0118] The above is a further detailed description of the present invention. It cannot be determined that the specific embodiments of the present invention are limited thereto. For those of ordinary skill in the technical field to which the present invention pertains, without departing from the concept of the present invention, several simple deductions or substitutions can be made, which should all be regarded as falling within the protection scope determined by the claims submitted for the present invention.

Claims

1. A method for evaluating network media sentiment of architectural space based on Transformer model, characterized in that: include: Obtain data on architectural reviews in online media; The data of architectural reviews in online media are input into the pre-trained sentiment evaluation model based on the Transformer architecture for extraction and analysis to obtain the architectural space evaluation results. The training method of the pre-trained Transformer-based sentiment evaluation model includes: Collect data on architectural reviews in online media and preprocess them to obtain a sentiment dataset of architectural reviews in online media; The training set of the sentiment dataset of architectural reviews in online media obtained by preprocessing is input into the Transformer-based pre-training model for training to obtain the training evaluation results; Based on the training evaluation results, the Transformer-based pre-trained model is trained to obtain a trained Transformer-based sentiment evaluation model; The test set in the sentiment dataset of architectural reviews in online media is input into the trained sentiment evaluation model based on the Transformer architecture for test verification and recognition, and the architectural space evaluation results are obtained. Buildings are recommended based on the architectural space evaluation results.

2. According to claim 1, a method for evaluating network media sentiment of architectural space based on Transformer model is characterized in that: The data of architectural reviews in online media are collected and preprocessed to obtain a sentiment dataset of architectural reviews in online media, including: Collect data on architectural reviews in online media; Clean the data of architectural reviews collected from online media to obtain a basic data set; Based on the cross-labeling of sentiment labels by multiple people, the basic data set is labeled to obtain the sentiment data set of architectural reviews after labeling; Performing data balancing processing on the sentiment data set of the annotated architectural reviews to obtain a processed sentiment data set of the architectural reviews; The processed architectural review sentiment dataset is divided into training set, validation set and test set.

3. According to the method of network media sentiment evaluation of architectural space based on Transformer model in claim 1, it is characterized in that: The training set in the sentiment data set of architectural reviews in online media obtained by preprocessing is input into the Transformer-based pre-training model for training to obtain training evaluation results, including: The training set of the sentiment data set of architectural reviews in online media obtained by preprocessing is input into the pre-training model based on Transformer, and the cross entropy loss function optimization model is used to optimize and adjust the pre-training model based on Transformer to obtain the training results; The validation set of the sentiment dataset of architectural reviews in online media obtained through preprocessing is input into the pre-trained model based on Transformer to obtain the validation results. By comparing the training results and verification results, we can identify whether the Transformer-based pre-training model has overfitting. If not, the final training result is obtained; Evaluation and classification are performed based on the final test results to obtain the training evaluation results.

4. According to the method of network media sentiment evaluation of architectural space based on Transformer model in claim 3, the evaluation classification is performed according to the final test results to obtain training evaluation results, including accuracy, recall rate, F1 score and F2 score; in, True Positive is true positive, which means the number of samples that are actually positive and predicted as positive; True Negative is true negative, which means the number of samples that are actually negative and predicted as negative; False Positive is false positive, which means the number of samples that are actually negative but predicted as positive; False Negative is false negative, which means the number of samples that are actually positive but predicted as negative.

5. According to claim 1, a method for evaluating network media sentiment of architectural space based on Transformer model, characterized in that: The pre-trained model based on Transformer is trained based on the training evaluation result to obtain a trained sentiment evaluation model based on Transformer architecture, including: Determine whether the training evaluation result exceeds the preset accuracy threshold; If the value does not exceed the preset accuracy threshold, it means that the training result is good, and the Transformer-based pre-training model is a trained Transformer-based sentiment evaluation model. If it exceeds the preset accuracy threshold, the Transformer-based pre-trained model is optimized based on the training evaluation results, the learning rate is readjusted, the data set ratio is adjusted, and the training evaluation results are re-obtained until the re-obtained training evaluation results do not exceed the preset accuracy threshold. In this case, the optimized and adjusted Transformer-based pre-trained model is the trained Transformer-based emotion evaluation model.

6. According to claim 1, a method for evaluating network media sentiment of architectural space based on Transformer model is characterized in that: The test set in the sentiment data set of architectural reviews in online media is input into the trained sentiment evaluation model based on the Transformer architecture for testing, verification and recognition, and the architectural space evaluation results are obtained, including: Obtain recognition results based on the trained Transformer-based sentiment evaluation model; Perform weighted scoring on the recognition results to obtain the building sentiment classification and weighted scoring results; The test set in the sentiment dataset of architectural reviews in online media is used to verify the sentiment classification and weighted scoring results of buildings. The verification results meet the set conditions, and the architectural space evaluation results are obtained. Buildings are recommended based on the architectural space evaluation results.

7. A system for evaluating online media sentiment of architectural space based on the Transformer model, characterized in that: include: Data acquisition module: used to acquire data of architectural reviews in online media; Evaluation result module: used to input the data of architectural reviews in online media into the pre-trained sentiment evaluation model based on the Transformer architecture, perform extraction and analysis, and obtain the architectural space evaluation results; The training system of the pre-trained Transformer-based sentiment evaluation model includes: Sentiment data collection module: used to collect data on architectural reviews in online media, and preprocess them to obtain sentiment data sets of architectural reviews in online media; Training evaluation result module: used to input the training set in the sentiment data set of architectural reviews in online media obtained by preprocessing into the Transformer-based pre-training model for training and obtain the training evaluation results; Training and optimization model module: used to train the Transformer-based pre-trained model based on the training evaluation results to obtain the trained Transformer-based sentiment evaluation model; Spatial evaluation result module: It is used to input the test set in the sentiment data set of architectural reviews in online media into the trained sentiment evaluation model based on the Transformer architecture for test verification and recognition, obtain the architectural space evaluation results, and recommend buildings based on the architectural space evaluation results.

8. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of a method for network media sentiment evaluation of an architectural space based on a Transformer model as described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of a method for evaluating network media sentiment of an architectural space based on a Transformer model as described in any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of a method for evaluating network media sentiment of an architectural space based on a Transformer model as described in any one of claims 1 to 6.